diff --git a/apple/Omnivore.xcworkspace/xcshareddata/swiftpm/Package.resolved b/apple/Omnivore.xcworkspace/xcshareddata/swiftpm/Package.resolved
index 83c1ac48d..37df64703 100644
--- a/apple/Omnivore.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ b/apple/Omnivore.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -159,7 +159,7 @@
"location" : "https://github.com/PSPDFKit/PSPDFKit-SP",
"state" : {
"branch" : "master",
- "revision" : "0e18629c443e3f39ecfee0f600d9ef5551ecf488"
+ "revision" : "b7e5465ab62f5b48735145756e371502fa2a24f0"
}
},
{
diff --git a/apple/OmnivoreKit/Sources/App/AppExtensions/Share/ExtensionSaveService.swift b/apple/OmnivoreKit/Sources/App/AppExtensions/Share/ExtensionSaveService.swift
index 4875e0ba6..9ecd7fc0f 100644
--- a/apple/OmnivoreKit/Sources/App/AppExtensions/Share/ExtensionSaveService.swift
+++ b/apple/OmnivoreKit/Sources/App/AppExtensions/Share/ExtensionSaveService.swift
@@ -1,10 +1,3 @@
-//
-// File.swift
-//
-//
-// Created by Jackson Harper on 6/1/22.
-//
-
import Foundation
import Models
import Services
@@ -18,23 +11,25 @@ class ExtensionSaveService {
self.queue = OperationQueue()
}
- private func queueSaveOperation(
- _ pageScrape: PageScrapePayload,
- shareExtensionViewModel: ShareExtensionChildViewModel
- ) {
- ProcessInfo().performExpiringActivity(withReason: "app.omnivore.SaveActivity") { [self] expiring in
- guard !expiring else {
- self.queue.cancelAllOperations()
+ #if os(iOS)
+ private func queueSaveOperation(
+ _ pageScrape: PageScrapePayload,
+ shareExtensionViewModel: ShareExtensionChildViewModel
+ ) {
+ ProcessInfo().performExpiringActivity(withReason: "app.omnivore.SaveActivity") { [self] expiring in
+ guard !expiring else {
+ self.queue.cancelAllOperations()
+ self.queue.waitUntilAllOperationsAreFinished()
+ return
+ }
+
+ let operation = SaveOperation(pageScrapePayload: pageScrape, shareExtensionViewModel: shareExtensionViewModel)
+
+ self.queue.addOperation(operation)
self.queue.waitUntilAllOperationsAreFinished()
- return
}
-
- let operation = SaveOperation(pageScrapePayload: pageScrape, shareExtensionViewModel: shareExtensionViewModel)
-
- self.queue.addOperation(operation)
- self.queue.waitUntilAllOperationsAreFinished()
}
- }
+ #endif
public func save(_ extensionContext: NSExtensionContext, shareExtensionViewModel: ShareExtensionChildViewModel) {
PageScraper.scrape(extensionContext: extensionContext) { [weak self] result in
@@ -71,7 +66,10 @@ class ExtensionSaveService {
}
}
}
- self.queueSaveOperation(payload, shareExtensionViewModel: shareExtensionViewModel)
+ #if os(iOS)
+ // TODO: need alternative call for macos
+ self.queueSaveOperation(payload, shareExtensionViewModel: shareExtensionViewModel)
+ #endif
case .failure:
DispatchQueue.main.async {
shareExtensionViewModel.status = .failed(error: .unknown(description: "Could not retrieve content"))
diff --git a/apple/OmnivoreKit/Sources/App/Views/LinkedItemTitleEditView.swift b/apple/OmnivoreKit/Sources/App/Views/LinkedItemTitleEditView.swift
index e8911c89d..4fb72af6e 100644
--- a/apple/OmnivoreKit/Sources/App/Views/LinkedItemTitleEditView.swift
+++ b/apple/OmnivoreKit/Sources/App/Views/LinkedItemTitleEditView.swift
@@ -66,24 +66,26 @@ struct LinkedItemTitleEditView: View {
NavigationView {
editForm
.navigationTitle("Edit Title and Description")
+ #if os(iOS)
.navigationBarTitleDisplayMode(.inline)
- .toolbar {
- ToolbarItem(placement: .barTrailing) {
- Button(
- action: {
- viewModel.submit(dataService: dataService, item: item)
- presentationMode.wrappedValue.dismiss()
- },
- label: { Text("Save").foregroundColor(.appGrayTextContrast) }
- )
- }
- ToolbarItem(placement: .barLeading) {
- Button(
- action: { presentationMode.wrappedValue.dismiss() },
- label: { Text("Cancel").foregroundColor(.appGrayTextContrast) }
- )
- }
+ #endif
+ .toolbar {
+ ToolbarItem(placement: .barTrailing) {
+ Button(
+ action: {
+ viewModel.submit(dataService: dataService, item: item)
+ presentationMode.wrappedValue.dismiss()
+ },
+ label: { Text("Save").foregroundColor(.appGrayTextContrast) }
+ )
}
+ ToolbarItem(placement: .barLeading) {
+ Button(
+ action: { presentationMode.wrappedValue.dismiss() },
+ label: { Text("Cancel").foregroundColor(.appGrayTextContrast) }
+ )
+ }
+ }
}
.task { viewModel.load(item: item) }
}
diff --git a/apple/OmnivoreKit/Sources/App/Views/Registration/RegistrationView.swift b/apple/OmnivoreKit/Sources/App/Views/Registration/RegistrationView.swift
index 863ac8751..f365a467e 100644
--- a/apple/OmnivoreKit/Sources/App/Views/Registration/RegistrationView.swift
+++ b/apple/OmnivoreKit/Sources/App/Views/Registration/RegistrationView.swift
@@ -59,8 +59,7 @@ import Views
}
func handleGoogleAuth(authenticator: Authenticator) async {
- guard let presentingViewController = presentingViewController() else { return }
- let googleAuthResponse = await authenticator.handleGoogleAuth(presenting: presentingViewController)
+ let googleAuthResponse = await authenticator.handleGoogleAuth()
switch googleAuthResponse {
case let .loginError(error):
@@ -72,15 +71,3 @@ import Views
}
}
}
-
-private func presentingViewController() -> PlatformViewController? {
- #if os(iOS)
- let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene
- return scene?.windows
- .filter(\.isKeyWindow)
- .first?
- .rootViewController
- #elseif os(macOS)
- return nil
- #endif
-}
diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift
index a16e2a307..2c8757026 100644
--- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift
+++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReader.swift
@@ -139,6 +139,16 @@ import WebKit
func loadContent(webView: WKWebView) {
let fontFamilyValue = UserDefaults.standard.string(forKey: UserDefaultKey.preferredWebFont.rawValue)
+
+ let prefersHighContrastText: Bool = {
+ let key = UserDefaultKey.prefersHighContrastWebFont.rawValue
+ if UserDefaults.standard.object(forKey: key) != nil {
+ return UserDefaults.standard.bool(forKey: key)
+ } else {
+ return true
+ }
+ }()
+
let fontFamily = fontFamilyValue.flatMap { WebFont(rawValue: $0) } ?? .inter
webView.loadHTMLString(
@@ -149,7 +159,8 @@ import WebKit
fontSize: fontSize(),
lineHeight: lineHeight(),
maxWidthPercentage: maxWidthPercentage(),
- fontFamily: fontFamily
+ fontFamily: fontFamily,
+ prefersHighContrastText: prefersHighContrastText
)
.styledContent,
baseURL: ViewsPackage.bundleURL
diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift
index 5974fa876..aa354ef88 100644
--- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift
+++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContent.swift
@@ -11,6 +11,7 @@ struct WebReaderContent {
let themeKey: String
let fontFamily: WebFont
let articleContent: ArticleContent
+ let prefersHighContrastText: Bool
init(
item: LinkedItem,
@@ -19,7 +20,8 @@ struct WebReaderContent {
fontSize: Int,
lineHeight: Int,
maxWidthPercentage: Int,
- fontFamily: WebFont
+ fontFamily: WebFont,
+ prefersHighContrastText: Bool
) {
self.textFontSize = fontSize
self.lineHeight = lineHeight
@@ -28,6 +30,7 @@ struct WebReaderContent {
self.themeKey = isDark ? "Gray" : "LightGray"
self.fontFamily = fontFamily
self.articleContent = articleContent
+ self.prefersHighContrastText = prefersHighContrastText
}
// swiftlint:disable line_length
@@ -82,6 +85,7 @@ struct WebReaderContent {
window.maxWidthPercentage = \(maxWidthPercentage)
window.lineHeight = \(lineHeight)
window.localStorage.setItem("theme", "\(themeKey)")
+ window.prefersHighContrastFont = \(prefersHighContrastText)
diff --git a/apple/OmnivoreKit/Sources/Models/CoreData/StorageProvider.swift b/apple/OmnivoreKit/Sources/Models/CoreData/StorageProvider.swift
index 374770177..6198ec852 100644
--- a/apple/OmnivoreKit/Sources/Models/CoreData/StorageProvider.swift
+++ b/apple/OmnivoreKit/Sources/Models/CoreData/StorageProvider.swift
@@ -14,9 +14,14 @@ public class PersistentContainer: NSPersistentContainer {
// Store the sqlite file in the app group container.
// This allows shared access for app and app extensions.
- let appGroupID = "group.app.omnivoreapp"
+ #if os(iOS)
+ let appGroupID = "group.app.omnivoreapp"
+ #else
+ let appGroupID = "QJF2XZ86HB.app.omnivore.app"
+ #endif
let appGroupContainer = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: appGroupID)
let appGroupContainerURL = appGroupContainer?.appendingPathComponent("store.sqlite")
+
container.persistentStoreDescriptions.first!.url = appGroupContainerURL
container.viewContext.automaticallyMergesChangesFromParent = true
diff --git a/apple/OmnivoreKit/Sources/Services/Authentication/GoogleAuth.swift b/apple/OmnivoreKit/Sources/Services/Authentication/GoogleAuth.swift
index 1302aae7a..9c3f081ab 100644
--- a/apple/OmnivoreKit/Sources/Services/Authentication/GoogleAuth.swift
+++ b/apple/OmnivoreKit/Sources/Services/Authentication/GoogleAuth.swift
@@ -10,8 +10,11 @@ public enum GoogleAuthResponse {
}
extension Authenticator {
- public func handleGoogleAuth(presenting: PlatformViewController) async -> GoogleAuthResponse {
- let idToken = try? await googleSignIn(presenting: presenting)
+ public func handleGoogleAuth() async -> GoogleAuthResponse {
+ let idToken = await withCheckedContinuation { continuation in
+ googleSignIn { continuation.resume(returning: $0) }
+ }
+
guard let idToken = idToken else { return .loginError(error: .unauthorized) }
do {
@@ -47,27 +50,47 @@ extension Authenticator {
}
}
- func googleSignIn(presenting: PlatformViewController) async throws -> String {
- try await withCheckedThrowingContinuation { continuation in
- let clientID = "\(AppKeys.sharedInstance?.iosClientGoogleId ?? "").apps.googleusercontent.com"
- GIDSignIn.sharedInstance.signIn(
- with: GIDConfiguration(clientID: clientID),
- presenting: presenting
- ) { user, error in
- guard let user = user, error == nil else {
- continuation.resume(throwing: LoginError.unauthorized)
+ func googleSignIn(completion: @escaping (String?) -> Void) {
+ #if os(iOS)
+ let presenting = presentingViewController()
+ #else
+ let presenting = NSApplication.shared.windows.first
+ #endif
+
+ guard let presenting = presenting else {
+ completion(nil)
+ return
+ }
+ let clientID = "\(AppKeys.sharedInstance?.iosClientGoogleId ?? "").apps.googleusercontent.com"
+
+ GIDSignIn.sharedInstance.signIn(
+ with: GIDConfiguration(clientID: clientID),
+ presenting: presenting
+ ) { user, error in
+ guard let user = user, error == nil else {
+ completion(nil)
+ return
+ }
+
+ user.authentication.do { authentication, error in
+ guard let idToken = authentication?.idToken, error == nil else {
+ completion(nil)
return
}
-
- user.authentication.do { authentication, error in
- guard let idToken = authentication?.idToken, error == nil else {
- continuation.resume(throwing: LoginError.unauthorized)
- return
- }
-
- continuation.resume(returning: idToken)
- }
+ completion(idToken)
}
}
}
}
+
+private func presentingViewController() -> PlatformViewController? {
+ #if os(iOS)
+ let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene
+ return scene?.windows
+ .filter(\.isKeyWindow)
+ .first?
+ .rootViewController
+ #elseif os(macOS)
+ return nil
+ #endif
+}
diff --git a/apple/OmnivoreKit/Sources/Services/DataService/DataService.swift b/apple/OmnivoreKit/Sources/Services/DataService/DataService.swift
index 0eb0d41ca..078a6ffea 100644
--- a/apple/OmnivoreKit/Sources/Services/DataService/DataService.swift
+++ b/apple/OmnivoreKit/Sources/Services/DataService/DataService.swift
@@ -4,9 +4,14 @@ import Foundation
import Models
import OSLog
import QuickLookThumbnailing
-import UIKit
import Utils
+#if os(iOS)
+ import UIKit
+#else
+ import AppKit
+#endif
+
let logger = Logger(subsystem: "app.omnivore", category: "data-service")
public final class DataService: ObservableObject {
diff --git a/apple/OmnivoreKit/Sources/Utils/PDFUtils.swift b/apple/OmnivoreKit/Sources/Utils/PDFUtils.swift
index 074ec2c03..b722edc3f 100644
--- a/apple/OmnivoreKit/Sources/Utils/PDFUtils.swift
+++ b/apple/OmnivoreKit/Sources/Utils/PDFUtils.swift
@@ -1,7 +1,11 @@
import CoreImage
import Foundation
import QuickLookThumbnailing
-import UIKit
+#if os(iOS)
+ import UIKit
+#else
+ import AppKit
+#endif
public enum PDFUtils {
public static func copyToLocal(url: URL) throws -> String {
@@ -64,7 +68,11 @@ public enum PDFUtils {
public static func createThumbnailFor(inputUrl: URL) async throws -> URL? {
let size = CGSize(width: 80, height: 80)
- let scale = await UIScreen.main.scale
+ #if os(iOS)
+ let scale = await UIScreen.main.scale
+ #else
+ let scale = NSScreen.main?.backingScaleFactor ?? 1
+ #endif
let outputUrl = thumbnailUrl(localUrl: inputUrl)
// Create the thumbnail request.
diff --git a/apple/OmnivoreKit/Sources/Views/Article/WebAppView.swift b/apple/OmnivoreKit/Sources/Views/Article/WebAppView.swift
index 4dfc776cd..6aa5e1803 100644
--- a/apple/OmnivoreKit/Sources/Views/Article/WebAppView.swift
+++ b/apple/OmnivoreKit/Sources/Views/Article/WebAppView.swift
@@ -129,7 +129,7 @@ public enum WebViewManager {
}
func fontSize() -> Int {
- let storedSize = UserDefaults.standard.integer(forKey: "preferredWebFontSize")
+ let storedSize = UserDefaults.standard.integer(forKey: UserDefaultKey.preferredWebFontSize.rawValue)
return storedSize <= 1 ? Int(NSFont.userFont(ofSize: 16)?.pointSize ?? 16) : storedSize
}
@@ -168,14 +168,19 @@ public enum WebViewManager {
context.coordinator.needsReload = false
}
+ if annotationSaveTransactionID != context.coordinator.lastSavedAnnotationID {
+ context.coordinator.lastSavedAnnotationID = annotationSaveTransactionID
+ (webView as? WebView)?.dispatchEvent(.saveAnnotation(annotation: annotation))
+ }
+
if sendIncreaseFontSignal {
sendIncreaseFontSignal = false
- (webView as? WebView)?.increaseFontSize()
+ (webView as? WebView)?.updateFontSize()
}
if sendDecreaseFontSignal {
sendDecreaseFontSignal = false
- (webView as? WebView)?.decreaseFontSize()
+ (webView as? WebView)?.updateFontSize()
}
}
}
diff --git a/apple/OmnivoreKit/Sources/Views/Article/WebView.swift b/apple/OmnivoreKit/Sources/Views/Article/WebView.swift
index 62e6ebd76..3828ea872 100644
--- a/apple/OmnivoreKit/Sources/Views/Article/WebView.swift
+++ b/apple/OmnivoreKit/Sources/Views/Article/WebView.swift
@@ -86,9 +86,9 @@ public final class WebView: WKWebView {
super.viewDidChangeEffectiveAppearance()
switch effectiveAppearance.bestMatch(from: [.aqua, .darkAqua]) {
case .some(.darkAqua):
- dispatchEvent("switchToDarkMode")
+ dispatchEvent(.updateColorMode(isDark: true))
default:
- dispatchEvent("switchToLightMode")
+ dispatchEvent(.updateColorMode(isDark: false))
}
}
#endif
diff --git a/apple/OmnivoreKit/Sources/Views/FontSizeAdjustmentPopoverView.swift b/apple/OmnivoreKit/Sources/Views/FontSizeAdjustmentPopoverView.swift
index 5746cd9c1..164c3fcfe 100644
--- a/apple/OmnivoreKit/Sources/Views/FontSizeAdjustmentPopoverView.swift
+++ b/apple/OmnivoreKit/Sources/Views/FontSizeAdjustmentPopoverView.swift
@@ -42,7 +42,7 @@ public struct WebPreferencesPopoverView: View {
@AppStorage(UserDefaultKey.preferredWebLineSpacing.rawValue) var storedLineSpacing = 150
@AppStorage(UserDefaultKey.preferredWebMaxWidthPercentage.rawValue) var storedMaxWidthPercentage = 100
@AppStorage(UserDefaultKey.preferredWebFont.rawValue) var preferredFont = WebFont.inter.rawValue
- @AppStorage(UserDefaultKey.prefersHighContrastWebFont.rawValue) var prefersHighContrastText = false
+ @AppStorage(UserDefaultKey.prefersHighContrastWebFont.rawValue) var prefersHighContrastText = true
public init(
updateFontFamilyAction: @escaping () -> Void,
@@ -81,7 +81,9 @@ public struct WebPreferencesPopoverView: View {
}
}
.listStyle(.plain)
- .navigationBarTitleDisplayMode(.inline)
+ #if os(iOS)
+ .navigationBarTitleDisplayMode(.inline)
+ #endif
.navigationTitle("Reader Font")
}
@@ -148,9 +150,11 @@ public struct WebPreferencesPopoverView: View {
}
.padding()
.navigationTitle("Reader Preferences")
- .navigationBarTitleDisplayMode(.inline)
+ #if os(iOS)
+ .navigationBarTitleDisplayMode(.inline)
+ #endif
.toolbar {
- ToolbarItem(placement: .navigationBarTrailing) {
+ ToolbarItem(placement: .barTrailing) {
Button(
action: dismissAction,
label: { Text("Done").foregroundColor(.appGrayTextContrast).padding() }
@@ -158,7 +162,9 @@ public struct WebPreferencesPopoverView: View {
}
}
}
- .navigationViewStyle(.stack)
+ #if os(iOS)
+ .navigationViewStyle(.stack)
+ #endif
.accentColor(.appGrayTextContrast)
}
}
diff --git a/apple/OmnivoreKit/Sources/Views/Resources/bundle.js b/apple/OmnivoreKit/Sources/Views/Resources/bundle.js
index 231a32b28..fb96702ce 100644
--- a/apple/OmnivoreKit/Sources/Views/Resources/bundle.js
+++ b/apple/OmnivoreKit/Sources/Views/Resources/bundle.js
@@ -1,2 +1,2 @@
/*! For license information please see bundle.js.LICENSE.txt */
-(()=>{var e,t,n={7162:(e,t,n)=>{e.exports=n(5047)},6279:function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),i="FormData"in e,a="ArrayBuffer"in e;if(a)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(e){return e&&l.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function c(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||s(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,n,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=p(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function x(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},v.call(b.prototype),v.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},x.error=function(){var e=new x(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];x.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new x(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function k(e,n){return new Promise((function(r,i){var a=new b(e,n);if(a.signal&&a.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function s(){l.abort()}l.onload=function(){var e,t,n={status:l.status,statusText:l.statusText,headers:(e=l.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};n.url="responseURL"in l?l.responseURL:n.headers.get("X-Request-URL");var o="response"in l?l.response:l.responseText;r(new x(o,n))},l.onerror=function(){i(new TypeError("Network request failed"))},l.ontimeout=function(){i(new TypeError("Network request failed"))},l.onabort=function(){i(new t.DOMException("Aborted","AbortError"))},l.open(a.method,a.url,!0),"include"===a.credentials?l.withCredentials=!0:"omit"===a.credentials&&(l.withCredentials=!1),"responseType"in l&&o&&(l.responseType="blob"),a.headers.forEach((function(e,t){l.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",s),l.onreadystatechange=function(){4===l.readyState&&a.signal.removeEventListener("abort",s)}),l.send(void 0===a._bodyInit?null:a._bodyInit)}))}k.polyfill=!0,e.fetch||(e.fetch=k,e.Headers=d,e.Request=b,e.Response=x),t.Headers=d,t.Request=b,t.Response=x,t.fetch=k,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=r;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t},1427:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,o){void 0===o&&(o=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var i=o;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===r&&(r=!0);var a=r,l=this.diff_commonPrefix(e,n),s=e.substring(0,l);e=e.substring(l),n=n.substring(l),l=this.diff_commonSuffix(e,n);var u=e.substring(e.length-l);e=e.substring(0,e.length-l),n=n.substring(0,n.length-l);var c=this.diff_compute_(e,n,a,i);return s&&c.unshift(new t.Diff(0,s)),u&&c.push(new t.Diff(0,u)),this.diff_cleanupMerge(c),c},t.prototype.diff_compute_=function(e,r,o,i){var a;if(!e)return[new t.Diff(1,r)];if(!r)return[new t.Diff(n,e)];var l=e.length>r.length?e:r,s=e.length>r.length?r:e,u=l.indexOf(s);if(-1!=u)return a=[new t.Diff(1,l.substring(0,u)),new t.Diff(0,s),new t.Diff(1,l.substring(u+s.length))],e.length>r.length&&(a[0][0]=a[2][0]=n),a;if(1==s.length)return[new t.Diff(n,e),new t.Diff(1,r)];var c=this.diff_halfMatch_(e,r);if(c){var f=c[0],d=c[1],h=c[2],p=c[3],g=c[4],m=this.diff_main(f,h,o,i),v=this.diff_main(d,p,o,i);return m.concat([new t.Diff(0,g)],v)}return o&&e.length>100&&r.length>100?this.diff_lineMode_(e,r,i):this.diff_bisect_(e,r,i)},t.prototype.diff_lineMode_=function(e,r,o){var i=this.diff_linesToChars_(e,r);e=i.chars1,r=i.chars2;var a=i.lineArray,l=this.diff_main(e,r,!1,o);this.diff_charsToLines_(l,a),this.diff_cleanupSemantic(l),l.push(new t.Diff(0,""));for(var s=0,u=0,c=0,f="",d="";s=1&&c>=1){l.splice(s-u-c,u+c),s=s-u-c;for(var h=this.diff_main(f,d,!1,o),p=h.length-1;p>=0;p--)l.splice(s,0,h[p]);s+=h.length}c=0,u=0,f="",d=""}s++}return l.pop(),l},t.prototype.diff_bisect_=function(e,r,o){for(var i=e.length,a=r.length,l=Math.ceil((i+a)/2),s=l,u=2*l,c=new Array(u),f=new Array(u),d=0;do);b++){for(var w=-b+g;w<=b-m;w+=2){for(var x=s+w,E=(O=w==-b||w!=b&&c[x-1]i)m+=2;else if(E>a)g+=2;else if(p&&(_=s+h-w)>=0&&_=(S=i-f[_]))return this.diff_bisectSplit_(e,r,O,E,o)}for(var k=-b+v;k<=b-y;k+=2){for(var S,_=s+k,C=(S=k==-b||k!=b&&f[_-1]i)y+=2;else if(C>a)v+=2;else if(!p){var O;if((x=s+h-k)>=0&&x=(S=i-S))return this.diff_bisectSplit_(e,r,O,E,o)}}}return[new t.Diff(n,e),new t.Diff(1,r)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,o){var i=e.substring(0,n),a=t.substring(0,r),l=e.substring(n),s=t.substring(r),u=this.diff_main(i,a,!1,o),c=this.diff_main(l,s,!1,o);return u.concat(c)},t.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function o(e){for(var t="",o=0,a=-1,l=n.length;ar?e=e.substring(n-r):nt.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,i,a,l,c]:null}var a,l,s,u,c,f=i(n,r,Math.ceil(n.length/4)),d=i(n,r,Math.ceil(n.length/2));return f||d?(a=d?f&&f[4].length>d[4].length?f:d:f,e.length>t.length?(l=a[0],s=a[1],u=a[2],c=a[3]):(u=a[0],c=a[1],l=a[2],s=a[3]),[l,s,u,c,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var r=!1,o=[],i=0,a=null,l=0,s=0,u=0,c=0,f=0;l0?o[i-1]:-1,s=0,u=0,c=0,f=0,a=null,r=!0)),l++;for(r&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),l=1;l=g?(p>=d.length/2||p>=h.length/2)&&(e.splice(l,0,new t.Diff(0,h.substring(0,p))),e[l-1][1]=d.substring(0,d.length-p),e[l+1][1]=h.substring(p),l++):(g>=d.length/2||g>=h.length/2)&&(e.splice(l,0,new t.Diff(0,d.substring(0,g))),e[l-1][0]=1,e[l-1][1]=h.substring(0,h.length-g),e[l+1][0]=n,e[l+1][1]=d.substring(g),l++),l++}l++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),o=n.charAt(0),i=r.match(t.nonAlphaNumericRegex_),a=o.match(t.nonAlphaNumericRegex_),l=i&&r.match(t.whitespaceRegex_),s=a&&o.match(t.whitespaceRegex_),u=l&&r.match(t.linebreakRegex_),c=s&&o.match(t.linebreakRegex_),f=u&&e.match(t.blanklineEndRegex_),d=c&&n.match(t.blanklineStartRegex_);return f||d?5:u||c?4:i&&!l&&s?3:l||s?2:i||a?1:0}for(var r=1;r=d&&(d=h,u=o,c=i,f=a)}e[r-1][1]!=u&&(u?e[r-1][1]=u:(e.splice(r-1,1),r--),e[r][1]=c,f?e[r+1][1]=f:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var r=!1,o=[],i=0,a=null,l=0,s=!1,u=!1,c=!1,f=!1;l0?o[i-1]:-1,c=f=!1),r=!0)),l++;r&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var r,o=0,i=0,a=0,l="",s="";o1?(0!==i&&0!==a&&(0!==(r=this.diff_commonPrefix(s,l))&&(o-i-a>0&&0==e[o-i-a-1][0]?e[o-i-a-1][1]+=s.substring(0,r):(e.splice(0,0,new t.Diff(0,s.substring(0,r))),o++),s=s.substring(r),l=l.substring(r)),0!==(r=this.diff_commonSuffix(s,l))&&(e[o][1]=s.substring(s.length-r)+e[o][1],s=s.substring(0,s.length-r),l=l.substring(0,l.length-r))),o-=i+a,e.splice(o,i+a),l.length&&(e.splice(o,0,new t.Diff(n,l)),o++),s.length&&(e.splice(o,0,new t.Diff(1,s)),o++),o++):0!==o&&0==e[o-1][0]?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,a=0,i=0,l="",s=""}""===e[e.length-1][1]&&e.pop();var u=!1;for(o=1;ot));r++)a=o,l=i;return e.length!=r&&e[r][0]===n?l:l+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,o=//g,a=/\n/g,l=0;l");switch(s){case 1:t[l]=''+u+"";break;case n:t[l]=''+u+"";break;case 0:t[l]=""+u+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),o=this;function i(e,r){var i=e/t.length,a=Math.abs(n-r);return o.Match_Distance?i+a/o.Match_Distance:a?1:i}var a=this.Match_Threshold,l=e.indexOf(t,n);-1!=l&&(a=Math.min(i(0,l),a),-1!=(l=e.lastIndexOf(t,n+t.length))&&(a=Math.min(i(0,l),a)));var s,u,c=1<=p;v--){var y=r[e.charAt(v-1)];if(m[v]=0===h?(m[v+1]<<1|1)&y:(m[v+1]<<1|1)&y|(f[v+1]|f[v])<<1|1|f[v+1],m[v]&c){var b=i(h,v-1);if(b<=a){if(a=b,!((l=v-1)>n))break;p=Math.max(1,2*n-l)}}}if(i(h+1,n)>a)break;f=m}return l},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&void 0===r&&void 0===o)a=e,i=this.diff_text1(a);else if("string"==typeof e&&r&&"object"==typeof r&&void 0===o)i=e,a=r;else{if("string"!=typeof e||"string"!=typeof r||!o||"object"!=typeof o)throw new Error("Unknown call format to patch_make.");i=e,a=o}if(0===a.length)return[];for(var l=[],s=new t.patch_obj,u=0,c=0,f=0,d=i,h=i,p=0;p=2*this.Patch_Margin&&u&&(this.patch_addContext_(s,d),l.push(s),s=new t.patch_obj,u=0,d=h,c=f)}1!==g&&(c+=m.length),g!==n&&(f+=m.length)}return u&&(this.patch_addContext_(s,d),l.push(s)),l},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;rthis.Match_MaxBits?-1!=(l=this.match_main(t,c.substring(0,this.Match_MaxBits),u))&&(-1==(f=this.match_main(t,c.substring(c.length-this.Match_MaxBits),u+c.length-this.Match_MaxBits))||l>=f)&&(l=-1):l=this.match_main(t,c,u),-1==l)i[a]=!1,o-=e[a].length2-e[a].length1;else if(i[a]=!0,o=l-u,c==(s=-1==f?t.substring(l,l+c.length):t.substring(l,f+this.Match_MaxBits)))t=t.substring(0,l)+this.diff_text2(e[a].diffs)+t.substring(l+c.length);else{var d=this.diff_main(c,s,!1);if(c.length>this.Match_MaxBits&&this.diff_levenshtein(d)/c.length>this.Patch_DeleteThreshold)i[a]=!1;else{this.diff_cleanupSemanticLossless(d);for(var h,p=0,g=0;ga[0][1].length){var l=n-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],i.start1-=l,i.start2-=l,i.length1+=l,i.length2+=l}return 0==(a=(i=e[e.length-1]).diffs).length||0!=a[a.length-1][0]?(a.push(new t.Diff(0,r)),i.length1+=n,i.length2+=n):n>a[a.length-1][1].length&&(l=n-a[a.length-1][1].length,a[a.length-1][1]+=r.substring(0,l),i.length1+=l,i.length2+=l),r},t.prototype.patch_splitMax=function(e){for(var r=this.Match_MaxBits,o=0;o2*r?(u.length1+=d.length,a+=d.length,c=!1,u.diffs.push(new t.Diff(f,d)),i.diffs.shift()):(d=d.substring(0,r-u.length1-this.Patch_Margin),u.length1+=d.length,a+=d.length,0===f?(u.length2+=d.length,l+=d.length):c=!1,u.diffs.push(new t.Diff(f,d)),d==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(d.length))}s=(s=this.diff_text2(u.diffs)).substring(s.length-this.Patch_Margin);var h=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);""!==h&&(u.length1+=h.length,u.length2+=h.length,0!==u.diffs.length&&0===u.diffs[u.diffs.length-1][0]?u.diffs[u.diffs.length-1][1]+=h:u.diffs.push(new t.Diff(0,h))),c||e.splice(++o,0,u)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n{"use strict";e.exports=function(e){var t=e.uri,n=e.name,r=e.type;this.uri=t,this.name=n,this.type=r}},2929:(e,t,n)=>{"use strict";var r=n(1278);e.exports=function e(t,n,o){var i;void 0===n&&(n=""),void 0===o&&(o=r);var a=new Map;function l(e,t){var n=a.get(t);n?n.push.apply(n,e):a.set(t,e)}if(o(t))i=null,l([n],t);else{var s=n?n+".":"";if("undefined"!=typeof FileList&&t instanceof FileList)i=Array.prototype.map.call(t,(function(e,t){return l([""+s+t],e),null}));else if(Array.isArray(t))i=t.map((function(t,n){var r=e(t,""+s+n,o);return r.files.forEach(l),r.clone}));else if(t&&t.constructor===Object)for(var u in i={},t){var c=e(t[u],""+s+u,o);c.files.forEach(l),i[u]=c.clone}else i=t}return{clone:i,files:a}}},9384:(e,t,n)=>{"use strict";t.ReactNativeFile=n(7570),t.extractFiles=n(2929),t.isExtractableFile=n(1278)},1278:(e,t,n)=>{"use strict";var r=n(7570);e.exports=function(e){return"undefined"!=typeof File&&e instanceof File||"undefined"!=typeof Blob&&e instanceof Blob||e instanceof r}},1688:e=>{e.exports="object"==typeof self?self.FormData:window.FormData},8749:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(9384),i=r(n(1688)),a=function(e){return o.isExtractableFile(e)||null!==e&&"object"==typeof e&&"function"==typeof e.pipe};t.default=function(e,t,n){var r=o.extractFiles({query:e,variables:t,operationName:n},"",a),l=r.clone,s=r.files;if(0===s.size){if(!Array.isArray(e))return JSON.stringify(l);if(void 0!==t&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");var u=e.reduce((function(e,n,r){return e.push({query:n,variables:t?t[r]:void 0}),e}),[]);return JSON.stringify(u)}var c=new("undefined"==typeof FormData?i.default:FormData);c.append("operations",JSON.stringify(l));var f={},d=0;return s.forEach((function(e){f[++d]=e})),c.append("map",JSON.stringify(f)),d=0,s.forEach((function(e,t){c.append(""+ ++d,t)})),c}},6647:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.prototype.toJSON;"function"==typeof t||(0,r.default)(0),e.prototype.inspect=t,o.default&&(e.prototype[o.default]=t)};var r=i(n(5006)),o=i(n(8019));function i(e){return e&&e.__esModule?e:{default:e}}},8048:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return a(e,[])};var r,o=(r=n(8019))&&r.__esModule?r:{default:r};function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){switch(i(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=function(e){var t=e[String(o.default)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:a(i,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,o=[],i=0;i1&&o.push("... ".concat(r," more items")),"["+o.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]":"{ "+n.map((function(n){return n+": "+a(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},5006:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}},8019:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=n},4560:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNode=function(e){return null!=e&&"string"==typeof e.kind},t.Token=t.Location=void 0;var r,o=(r=n(2678))&&r.__esModule?r:{default:r},i=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();t.Location=i,(0,o.default)(i);var a=function(){function e(e,t,n,r,o,i,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=o,this.value=a,this.prev=i,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();t.Token=a,(0,o.default)(a)},9501:(e,t)=>{"use strict";function n(e){for(var t=0;ta&&n(t[l-1]);)--l;return t.slice(a,l).join("\n")},t.getBlockStringIndentation=r,t.printBlockString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),o=" "===e[0]||"\t"===e[0],i='"'===e[e.length-1],a="\\"===e[e.length-1],l=!r||i||a||n,s="";return!l||r&&o||(s+="\n"+t),s+=t?e.replace(/\n/g,"\n"+t):e,l&&(s+="\n"),'"""'+s.replace(/"""/g,'\\"""')+'"""'}},3083:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.print=function(e){return(0,r.visit)(e,{leave:i})};var r=n(2624),o=n(9501),i={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return l(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=u("(",l(e.variableDefinitions,", "),")"),o=l(e.directives," "),i=e.selectionSet;return n||o||r||"query"!==t?l([t,l([n,r]),o,i]," "):i},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,o=e.directives;return t+": "+n+u(" = ",r)+u(" ",l(o," "))},SelectionSet:function(e){return s(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,o=e.directives,i=e.selectionSet,a=u("",t,": ")+n,s=a+u("(",l(r,", "),")");return s.length>80&&(s=a+u("(\n",c(l(r,"\n")),"\n)")),l([s,l(o," "),i]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+u(" ",l(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return l(["...",u("on ",t),l(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,o=e.directives,i=e.selectionSet;return"fragment ".concat(t).concat(u("(",l(r,", "),")")," ")+"on ".concat(n," ").concat(u("",l(o," ")," "))+i},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?(0,o.printBlockString)(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+l(e.values,", ")+"]"},ObjectValue:function(e){return"{"+l(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+u("(",l(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:a((function(e){var t=e.directives,n=e.operationTypes;return l(["schema",l(t," "),s(n)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:a((function(e){return l(["scalar",e.name,l(e.directives," ")]," ")})),ObjectTypeDefinition:a((function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["type",t,u("implements ",l(n," & ")),l(r," "),s(o)]," ")})),FieldDefinition:a((function(e){var t=e.name,n=e.arguments,r=e.type,o=e.directives;return t+(d(n)?u("(\n",c(l(n,"\n")),"\n)"):u("(",l(n,", "),")"))+": "+r+u(" ",l(o," "))})),InputValueDefinition:a((function(e){var t=e.name,n=e.type,r=e.defaultValue,o=e.directives;return l([t+": "+n,u("= ",r),l(o," ")]," ")})),InterfaceTypeDefinition:a((function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["interface",t,u("implements ",l(n," & ")),l(r," "),s(o)]," ")})),UnionTypeDefinition:a((function(e){var t=e.name,n=e.directives,r=e.types;return l(["union",t,l(n," "),r&&0!==r.length?"= "+l(r," | "):""]," ")})),EnumTypeDefinition:a((function(e){var t=e.name,n=e.directives,r=e.values;return l(["enum",t,l(n," "),s(r)]," ")})),EnumValueDefinition:a((function(e){return l([e.name,l(e.directives," ")]," ")})),InputObjectTypeDefinition:a((function(e){var t=e.name,n=e.directives,r=e.fields;return l(["input",t,l(n," "),s(r)]," ")})),DirectiveDefinition:a((function(e){var t=e.name,n=e.arguments,r=e.repeatable,o=e.locations;return"directive @"+t+(d(n)?u("(\n",c(l(n,"\n")),"\n)"):u("(",l(n,", "),")"))+(r?" repeatable":"")+" on "+l(o," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return l(["extend schema",l(t," "),s(n)]," ")},ScalarTypeExtension:function(e){return l(["extend scalar",e.name,l(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["extend type",t,u("implements ",l(n," & ")),l(r," "),s(o)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["extend interface",t,u("implements ",l(n," & ")),l(r," "),s(o)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return l(["extend union",t,l(n," "),r&&0!==r.length?"= "+l(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return l(["extend enum",t,l(n," "),s(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return l(["extend input",t,l(n," "),s(r)]," ")}};function a(e){return function(t){return l([t.description,e(t)],"\n")}}function l(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(n))&&void 0!==t?t:""}function s(e){return u("{\n",c(l(e,"\n")),"\n}")}function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+n:""}function c(e){return u(" ",e.replace(/\n/g,"\n "))}function f(e){return-1!==e.indexOf("\n")}function d(e){return null!=e&&e.some(f)}},2624:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,r=void 0,u=Array.isArray(e),c=[e],f=-1,d=[],h=void 0,p=void 0,g=void 0,m=[],v=[],y=e;do{var b=++f===c.length,w=b&&0!==d.length;if(b){if(p=0===v.length?void 0:m[m.length-1],h=g,g=v.pop(),w){if(u)h=h.slice();else{for(var x={},E=0,k=Object.keys(h);E{var r=n(7772).Symbol;e.exports=r},3366:(e,t,n)=>{var r=n(857),o=n(2107),i=n(7157),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},1704:(e,t,n)=>{var r=n(2153),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},1242:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},2107:(e,t,n)=>{var r=n(857),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[l]=n:delete e[l]),o}},7157:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},7772:(e,t,n)=>{var r=n(1242),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},2153:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},4073:(e,t,n)=>{var r=n(9259),o=n(1100),i=n(7642),a=Math.max,l=Math.min;e.exports=function(e,t,n){var s,u,c,f,d,h,p=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=s,r=u;return s=u=void 0,p=t,f=e.apply(r,n)}function b(e){return p=e,d=setTimeout(x,t),g?y(e):f}function w(e){var n=e-h;return void 0===h||n>=t||n<0||m&&e-p>=c}function x(){var e=o();if(w(e))return E(e);d=setTimeout(x,function(e){var n=t-(e-h);return m?l(n,c-(e-p)):n}(e))}function E(e){return d=void 0,v&&s?y(e):(s=u=void 0,f)}function k(){var e=o(),n=w(e);if(s=arguments,u=this,h=e,n){if(void 0===d)return b(h);if(m)return clearTimeout(d),d=setTimeout(x,t),y(h)}return void 0===d&&(d=setTimeout(x,t)),f}return t=i(t)||0,r(n)&&(g=!!n.leading,c=(m="maxWait"in n)?a(i(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==d&&clearTimeout(d),p=0,s=h=u=d=void 0},k.flush=function(){return void 0===d?f:E(o())},k}},9259:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},5125:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},4795:(e,t,n)=>{var r=n(3366),o=n(5125);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},1100:(e,t,n)=>{var r=n(7772);e.exports=function(){return r.Date.now()}},7642:(e,t,n)=>{var r=n(1704),o=n(9259),i=n(4795),a=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||s.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},104:(e,t,n)=>{"use strict";(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e})(n(2784)),(r=n(5977))&&r.__esModule,n(8467),n(3321),n(4329);var r,o,i=(n(1624),n(1119));null===(o=window.omnivoreEnv.__NEXT_IMAGE_OPTS)||void 0===o||o.experimentalLayoutRaw;window.omnivoreEnv.__NEXT_IMAGE_OPTS,new Set;new Map;"undefined"==typeof window&&(n.g.__NEXT_IMAGE_IMPORTED=!0);new Map([["default",function({config:e,src:t,width:n,quality:r}){return t.endsWith(".svg")&&!e.dangerouslyAllowSVG?t:`${i.normalizePathTrailingSlash(e.path)}?url=${encodeURIComponent(t)}&w=${n}&q=${r||75}`}],["imgix",function({config:e,src:t,width:n,quality:r}){const o=new URL(`${e.path}${a(t)}`),i=o.searchParams;return i.set("auto",i.get("auto")||"format"),i.set("fit",i.get("fit")||"max"),i.set("w",i.get("w")||n.toString()),r&&i.set("q",r.toString()),o.href}],["cloudinary",function({config:e,src:t,width:n,quality:r}){const o=["f_auto","c_limit","w_"+n,"q_"+(r||"auto")].join(",")+"/";return`${e.path}${o}${a(t)}`}],["akamai",function({config:e,src:t,width:n}){return`${e.path}${a(t)}?imwidth=${n}`}],["custom",function({src:e}){throw new Error(`Image with src "${e}" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader`)}]]);function a(e){return"/"===e[0]?e.slice(1):e}},4529:(e,t,n)=>{"use strict";var r;(r=n(2784))&&r.__esModule,n(6640),n(9518),n(3321)},1119:(e,t)=>{"use strict";function n(e){return e.endsWith("/")&&"/"!==e?e.slice(0,-1):e}Object.defineProperty(t,"__esModule",{value:!0}),t.removePathTrailingSlash=n,t.normalizePathTrailingSlash=void 0;const r=window.omnivoreEnv.__NEXT_TRAILING_SLASH?e=>/\.[^/]+\/?$/.test(e)?n(e):e.endsWith("/")?e:e+"/":n;t.normalizePathTrailingSlash=r},1976:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cancelIdleCallback=t.requestIdleCallback=void 0;const n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return setTimeout((function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1)};t.requestIdleCallback=n;const r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};t.cancelIdleCallback=r},7928:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.markAssetError=u,t.isAssetError=function(e){return e&&s in e},t.getClientBuildManifest=f,t.getMiddlewareManifest=function(){return self.__MIDDLEWARE_MANIFEST?Promise.resolve(self.__MIDDLEWARE_MANIFEST):c(new Promise((e=>{const t=self.__MIDDLEWARE_MANIFEST_CB;self.__MIDDLEWARE_MANIFEST_CB=()=>{e(self.__MIDDLEWARE_MANIFEST),t&&t()}})),i,u(new Error("Failed to load client middleware manifest")))},t.createRouteLoader=function(e){const t=new Map,n=new Map,r=new Map,s=new Map;function f(e){{let t=n.get(e);return t||(document.querySelector(`script[src^="${e}"]`)?Promise.resolve():(n.set(e,t=function(e,t){return new Promise(((n,r)=>{(t=document.createElement("script")).onload=n,t.onerror=()=>r(u(new Error(`Failed to load script: ${e}`))),t.crossOrigin=window.omnivoreEnv.__NEXT_CROSS_ORIGIN,t.src=e,document.body.appendChild(t)}))}(e)),t))}}function h(e){let t=r.get(e);return t||(r.set(e,t=fetch(e).then((t=>{if(!t.ok)throw new Error(`Failed to load stylesheet: ${e}`);return t.text().then((t=>({href:e,content:t})))})).catch((e=>{throw u(e)}))),t)}return{whenEntrypoint:e=>a(e,t),onEntrypoint(e,n){(n?Promise.resolve().then((()=>n())).then((e=>({component:e&&e.default||e,exports:e})),(e=>({error:e}))):Promise.resolve(void 0)).then((n=>{const r=t.get(e);r&&"resolve"in r?n&&(t.set(e,n),r.resolve(n)):(n?t.set(e,n):t.delete(e),s.delete(e))}))},loadRoute(n,r){return a(n,s,(()=>c(d(e,n).then((({scripts:e,css:r})=>Promise.all([t.has(n)?[]:Promise.all(e.map(f)),Promise.all(r.map(h))]))).then((e=>this.whenEntrypoint(n).then((t=>({entrypoint:t,styles:e[1]}))))),i,u(new Error(`Route did not complete loading: ${n}`))).then((({entrypoint:e,styles:t})=>{const n=Object.assign({styles:t},e);return"error"in e?e:n})).catch((e=>{if(r)throw e;return{error:e}})).finally((()=>{}))))},prefetch(t){let n;return(n=navigator.connection)&&(n.saveData||/2g/.test(n.effectiveType))?Promise.resolve():d(e,t).then((e=>Promise.all(l?e.scripts.map((e=>{return t=e,n="script",new Promise(((e,o)=>{const i=`\n link[rel="prefetch"][href^="${t}"],\n link[rel="preload"][href^="${t}"],\n script[src^="${t}"]`;if(document.querySelector(i))return e();(r=document.createElement("link")).as=n,r.rel="prefetch",r.crossOrigin=window.omnivoreEnv.__NEXT_CROSS_ORIGIN,r.onload=e,r.onerror=o,r.href=t,document.head.appendChild(r)}));var t,n,r})):[]))).then((()=>{o.requestIdleCallback((()=>this.loadRoute(t,!0).catch((()=>{}))))})).catch((()=>{}))}}},(r=n(9983))&&r.__esModule;var r,o=n(1976);const i=3800;function a(e,t,n){let r,o=t.get(e);if(o)return"future"in o?o.future:Promise.resolve(o);const i=new Promise((e=>{r=e}));return t.set(e,o={resolve:r,future:i}),n?n().then((e=>(r(e),e))).catch((n=>{throw t.delete(e),n})):i}const l=function(e){try{return e=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||e.relList.supports("prefetch")}catch(e){return!1}}(),s=Symbol("ASSET_LOAD_ERROR");function u(e){return Object.defineProperty(e,s,{})}function c(e,t,n){return new Promise(((r,i)=>{let a=!1;e.then((e=>{a=!0,r(e)})).catch(i),o.requestIdleCallback((()=>setTimeout((()=>{a||i(n)}),t)))}))}function f(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):c(new Promise((e=>{const t=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{e(self.__BUILD_MANIFEST),t&&t()}})),i,u(new Error("Failed to load client build manifest")))}function d(e,t){return f().then((n=>{if(!(t in n))throw u(new Error(`Failed to lookup route: ${t}`));const r=n[t].map((t=>e+"/_next/"+encodeURI(t)));return{scripts:r.filter((e=>e.endsWith(".js"))),css:r.filter((e=>e.endsWith(".css")))}}))}},9518:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Router",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"withRouter",{enumerable:!0,get:function(){return l.default}}),t.useRouter=function(){return r.default.useContext(i.RouterContext)},t.createRouter=function(...e){return u.router=new o.default(...e),u.readyCallbacks.forEach((e=>e())),u.readyCallbacks=[],u.router},t.makePublicRouterInstance=function(e){const t=e,n={};for(const e of c)"object"!=typeof t[e]?n[e]=t[e]:n[e]=Object.assign(Array.isArray(t[e])?[]:{},t[e]);return n.events=o.default.events,f.forEach((e=>{n[e]=(...n)=>t[e](...n)})),n},t.default=void 0;var r=s(n(2784)),o=s(n(6640)),i=n(6510),a=s(n(274)),l=s(n(9564));function s(e){return e&&e.__esModule?e:{default:e}}const u={router:null,readyCallbacks:[],ready(e){if(this.router)return e();"undefined"!=typeof window&&this.readyCallbacks.push(e)}},c=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],f=["push","replace","reload","back","prefetch","beforePopState"];function d(){if(!u.router)throw new Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n');return u.router}Object.defineProperty(u,"events",{get:()=>o.default.events}),c.forEach((e=>{Object.defineProperty(u,e,{get:()=>d()[e]})})),f.forEach((e=>{u[e]=(...t)=>d()[e](...t)})),["routeChangeStart","beforeHistoryChange","routeChangeComplete","routeChangeError","hashChangeStart","hashChangeComplete"].forEach((e=>{u.ready((()=>{o.default.events.on(e,((...t)=>{const n=`on${e.charAt(0).toUpperCase()}${e.substring(1)}`,r=u;if(r[n])try{r[n](...t)}catch(e){console.error(`Error when running the Router event: ${n}`),console.error(a.default(e)?`${e.message}\n${e.stack}`:e+"")}}))}))}));var h=u;t.default=h},3321:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useIntersection=function({rootRef:e,rootMargin:t,disabled:n}){const s=n||!i,u=r.useRef(),[c,f]=r.useState(!1),[d,h]=r.useState(e?e.current:null),p=r.useCallback((e=>{u.current&&(u.current(),u.current=void 0),s||c||e&&e.tagName&&(u.current=function(e,t,n){const{id:r,observer:o,elements:i}=function(e){const t={root:e.root||null,margin:e.rootMargin||""};let n,r=l.find((e=>e.root===t.root&&e.margin===t.margin));if(r?n=a.get(r):(n=a.get(t),l.push(t)),n)return n;const o=new Map,i=new IntersectionObserver((e=>{e.forEach((e=>{const t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)}))}),e);return a.set(t,n={id:t,observer:i,elements:o}),n}(n);return i.set(e,(e=>e&&f(e))),o.observe(e),function(){if(i.delete(e),o.unobserve(e),0===i.size){o.disconnect(),a.delete(r);let e=l.findIndex((e=>e.root===r.root&&e.margin===r.margin));e>-1&&l.splice(e,1)}}}(e,0,{root:d,rootMargin:t}))}),[s,d,t,c]);return r.useEffect((()=>{if(!i&&!c){const e=o.requestIdleCallback((()=>f(!0)));return()=>o.cancelIdleCallback(e)}}),[c]),r.useEffect((()=>{e&&h(e.current)}),[e]),[p,c]};var r=n(2784),o=n(1976);const i="undefined"!=typeof IntersectionObserver,a=new Map,l=[]},9564:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t){return o.default.createElement(e,Object.assign({router:i.useRouter()},t))}return t.getInitialProps=e.getInitialProps,t.origGetInitialProps=e.origGetInitialProps,t};var r,o=(r=n(2784))&&r.__esModule?r:{default:r},i=n(9518)},9264:(e,t)=>{"use strict";function n(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||95===s))break;a+=e[l++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=l}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,a="[^"+i(t.delimiter||"/#?")+"]+?",l=[],s=0,u=0,c="",f=function(e){if(u-1:void 0===E;o||(g+="(?:"+p+"(?="+h+"))?"),k||(g+="(?="+p+"|"+h+")")}return new RegExp(g,a(n))}function s(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=o,t.getProperError=function(e){return o(e)?e:new Error(r.isPlainObject(e)?JSON.stringify(e):e+"")};var r=n(9910);function o(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}},4863:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizePathSep=o,t.denormalizePagePath=function(e){return(e=o(e)).startsWith("/index/")&&!r.isDynamicRoute(e)?e=e.slice(6):"/index"===e&&(e="/"),e};var r=n(9150);function o(e){return e.replace(/\\/g,"/")}},1719:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.AmpStateContext=void 0;const o=((r=n(2784))&&r.__esModule?r:{default:r}).default.createContext({});t.AmpStateContext=o},9739:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInAmpMode=a,t.useAmp=function(){return a(o.default.useContext(i.AmpStateContext))};var r,o=(r=n(2784))&&r.__esModule?r:{default:r},i=n(1719);function a({ampFirst:e=!1,hybrid:t=!1,hasQuery:n=!1}={}){return e||t&&n}},8058:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeStringRegexp=function(e){return e.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")}},7177:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.HeadManagerContext=void 0;const o=((r=n(2784))&&r.__esModule?r:{default:r}).default.createContext({});t.HeadManagerContext=o},5977:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultHead=u,t.default=void 0;var r,o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(2784)),i=(r=n(1889))&&r.__esModule?r:{default:r},a=n(1719),l=n(7177),s=n(9739);function u(e=!1){const t=[o.default.createElement("meta",{charSet:"utf-8"})];return e||t.push(o.default.createElement("meta",{name:"viewport",content:"width=device-width"})),t}function c(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce(((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t)),[])):e.concat(t)}n(1624);const f=["name","httpEquiv","charSet","itemProp"];function d(e,t){return e.reduce(((e,t)=>{const n=o.default.Children.toArray(t.props.children);return e.concat(n)}),[]).reduce(c,[]).reverse().concat(u(t.inAmpMode)).filter(function(){const e=new Set,t=new Set,n=new Set,r={};return o=>{let i=!0,a=!1;if(o.key&&"number"!=typeof o.key&&o.key.indexOf("$")>0){a=!0;const t=o.key.slice(o.key.indexOf("$")+1);e.has(t)?i=!1:e.add(t)}switch(o.type){case"title":case"base":t.has(o.type)?i=!1:t.add(o.type);break;case"meta":for(let e=0,t=f.length;e{const r=e.key||n;if(window.omnivoreEnv.__NEXT_OPTIMIZE_FONTS&&!t.inAmpMode&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some((t=>e.props.href.startsWith(t)))){const t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,o.default.cloneElement(e,t)}return o.default.cloneElement(e,{key:r})}))}t.default=function({children:e}){const t=o.useContext(a.AmpStateContext),n=o.useContext(l.HeadManagerContext);return o.default.createElement(i.default,{reduceComponentsToState:d,headManager:n,inAmpMode:s.isInAmpMode(t)},e)}},927:(e,t)=>{"use strict";t.D=function(e,t,n){let r;if(e){n&&(n=n.toLowerCase());for(const a of e){var o,i;if(t===(null===(o=a.domain)||void 0===o?void 0:o.split(":")[0].toLowerCase())||n===a.defaultLocale.toLowerCase()||(null===(i=a.locales)||void 0===i?void 0:i.some((e=>e.toLowerCase()===n)))){r=a;break}}}return r}},816:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLocalePath=function(e,t){let n;const r=e.split("/");return(t||[]).some((t=>!(!r[1]||r[1].toLowerCase()!==t.toLowerCase()||(n=t,r.splice(1,1),e=r.join("/")||"/",0)))),{pathname:e,detectedLocale:n}}},4329:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageConfigContext=void 0;var r,o=(r=n(2784))&&r.__esModule?r:{default:r},i=n(8467);const a=o.default.createContext(i.imageConfigDefault);t.ImageConfigContext=a},8467:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.imageConfigDefault=t.VALID_LOADERS=void 0,t.VALID_LOADERS=["default","imgix","cloudinary","akamai","custom"];t.imageConfigDefault={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;"}},9910:(e,t)=>{"use strict";function n(e){return Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getObjectClassLabel=n,t.isPlainObject=function(e){if("[object Object]"!==n(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},7471:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=Object.create(null);return{on(t,n){(e[t]||(e[t]=[])).push(n)},off(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit(t,...n){(e[t]||[]).slice().map((e=>{e(...n)}))}}}},6510:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.RouterContext=void 0;const o=((r=n(2784))&&r.__esModule?r:{default:r}).default.createContext(null);t.RouterContext=o},6640:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDomainLocale=function(e,t,n,r){if(window.omnivoreEnv.__NEXT_I18N_SUPPORT){t=t||l.normalizeLocalePath(e,n).detectedLocale;const o=b(r,void 0,t);return!!o&&`http${o.http?"":"s"}://${o.domain}${w||""}${t===o.defaultLocale?"":`/${t}`}${e}`}return!1},t.addLocale=k,t.delLocale=S,t.hasBasePath=C,t.addBasePath=O,t.delBasePath=P,t.isLocalURL=T,t.interpolateAs=R,t.resolveHref=j,t.default=void 0;var r=n(1119),o=n(7928),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(274)),a=n(4863),l=n(816),s=y(n(7471)),u=n(1624),c=n(7482),f=n(1577),d=n(646),h=y(n(5317)),p=n(3107),g=n(4794),m=n(6555),v=n(3948);function y(e){return e&&e.__esModule?e:{default:e}}let b;window.omnivoreEnv.__NEXT_I18N_SUPPORT&&(b=n(927).D);const w=window.omnivoreEnv.__NEXT_ROUTER_BASEPATH||"";function x(){return Object.assign(new Error("Route Cancelled"),{cancelled:!0})}function E(e,t){if(!e.startsWith("/")||!t)return e;const n=_(e);return r.normalizePathTrailingSlash(`${t}${n}`)+e.slice(n.length)}function k(e,t,n){if(window.omnivoreEnv.__NEXT_I18N_SUPPORT){const r=_(e).toLowerCase(),o=t&&t.toLowerCase();return t&&t!==n&&!r.startsWith("/"+o+"/")&&r!=="/"+o?E(e,"/"+t):e}return e}function S(e,t){if(window.omnivoreEnv.__NEXT_I18N_SUPPORT){const n=_(e),r=n.toLowerCase(),o=t&&t.toLowerCase();return t&&(r.startsWith("/"+o+"/")||r==="/"+o)?(n.length===t.length+1?"/":"")+e.slice(t.length+1):e}return e}function _(e){const t=e.indexOf("?"),n=e.indexOf("#");return(t>-1||n>-1)&&(e=e.substring(0,t>-1?t:n)),e}function C(e){return(e=_(e))===w||e.startsWith(w+"/")}function O(e){return E(e,w)}function P(e){return(e=e.slice(w.length)).startsWith("/")||(e=`/${e}`),e}function T(e){if(e.startsWith("/")||e.startsWith("#")||e.startsWith("?"))return!0;try{const t=u.getLocationOrigin(),n=new URL(e,t);return n.origin===t&&C(n.pathname)}catch(e){return!1}}function R(e,t,n){let r="";const o=g.getRouteRegex(e),i=o.groups,a=(t!==e?p.getRouteMatcher(o)(t):"")||n;r=e;const l=Object.keys(i);return l.every((e=>{let t=a[e]||"";const{repeat:n,optional:o}=i[e];let l=`[${n?"...":""}${e}]`;return o&&(l=`${t?"":"/"}[${l}]`),n&&!Array.isArray(t)&&(t=[t]),(o||e in a)&&(r=r.replace(l,n?t.map((e=>encodeURIComponent(e))).join("/"):encodeURIComponent(t))||"/")}))||(r=""),{params:l,result:r}}function L(e,t){const n={};return Object.keys(e).forEach((r=>{t.includes(r)||(n[r]=e[r])})),n}function j(e,t,n){let o,i="string"==typeof t?t:m.formatWithValidation(t);const a=i.match(/^[a-zA-Z]{1,}:\/\//),l=a?i.slice(a[0].length):i;if((l.split("?")[0]||"").match(/(\/\/|\\)/)){console.error(`Invalid href passed to next/router: ${i}, repeated forward-slashes (//) or backslashes \\ are not valid in the href`);const e=u.normalizeRepeatedSlashes(l);i=(a?a[0]:"")+e}if(!T(i))return n?[i]:i;try{o=new URL(i.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){o=new URL("/","http://n")}try{const e=new URL(i,o);e.pathname=r.normalizePathTrailingSlash(e.pathname);let t="";if(c.isDynamicRoute(e.pathname)&&e.searchParams&&n){const n=d.searchParamsToUrlQuery(e.searchParams),{result:r,params:o}=R(e.pathname,e.pathname,n);r&&(t=m.formatWithValidation({pathname:r,hash:e.hash,query:L(n,o)}))}const a=e.origin===o.origin?e.href.slice(e.origin.length):e.href;return n?[a,t||a]:a}catch(e){return n?[i]:i}}function A(e){const t=u.getLocationOrigin();return e.startsWith(t)?e.substring(t.length):e}function M(e,t,n){let[r,o]=j(e,t,!0);const i=u.getLocationOrigin(),a=r.startsWith(i),l=o&&o.startsWith(i);r=A(r),o=o?A(o):o;const s=a?r:O(r),c=n?A(j(e,n)):o||r;return{url:s,as:l?c:O(c)}}function I(e,t){const n=r.removePathTrailingSlash(a.denormalizePagePath(e));return"/404"===n||"/_error"===n?e:(t.includes(n)||t.some((t=>{if(c.isDynamicRoute(t)&&g.getRouteRegex(t).re.test(n))return e=t,!0})),r.removePathTrailingSlash(e))}const D=window.omnivoreEnv.__NEXT_SCROLL_RESTORATION&&"undefined"!=typeof window&&"scrollRestoration"in window.history&&!!function(){try{let e="__next";return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){}}(),N=Symbol("SSG_DATA_NOT_FOUND");function F(e,t,n){return fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok){if(t>1&&r.status>=500)return F(e,t-1,n);if(404===r.status)return r.json().then((e=>{if(e.notFound)return{notFound:N};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return n.text?r.text():r.json()}))}function z(e,t,n,r,i){const{href:a}=new URL(e,window.location.href);return void 0!==r[a]?r[a]:r[a]=F(e,t?3:1,{text:n}).catch((e=>{throw t||o.markAssetError(e),e})).then((e=>(i||delete r[a],e))).catch((e=>{throw delete r[a],e}))}class ${constructor(e,t,n,{initialProps:o,pageLoader:i,App:a,wrapApp:l,Component:s,err:d,subscription:h,isFallback:p,locale:g,locales:v,defaultLocale:y,domainLocales:x,isPreview:E,isRsc:k}){this.sdc={},this.sdr={},this.sde={},this._idx=0,this.onPopState=e=>{const t=e.state;if(!t){const{pathname:e,query:t}=this;return void this.changeState("replaceState",m.formatWithValidation({pathname:O(e),query:t}),u.getURL())}if(!t.__N)return;let n;const{url:r,as:o,options:i,idx:a}=t;if(window.omnivoreEnv.__NEXT_SCROLL_RESTORATION&&D&&this._idx!==a){try{sessionStorage.setItem("__next_scroll_"+this._idx,JSON.stringify({x:self.pageXOffset,y:self.pageYOffset}))}catch{}try{const e=sessionStorage.getItem("__next_scroll_"+a);n=JSON.parse(e)}catch{n={x:0,y:0}}}this._idx=a;const{pathname:l}=f.parseRelativeUrl(r);this.isSsr&&o===O(this.asPath)&&l===O(this.pathname)||this._bps&&!this._bps(t)||this.change("replaceState",r,o,Object.assign({},i,{shallow:i.shallow&&this._shallow,locale:i.locale||this.defaultLocale}),n)};const S=r.removePathTrailingSlash(e);this.components={},"/_error"!==e&&(this.components[S]={Component:s,initial:!0,props:o,err:d,__N_SSG:o&&o.__N_SSG,__N_SSP:o&&o.__N_SSP,__N_RSC:!!k}),this.components["/_app"]={Component:a,styleSheets:[]},this.events=$.events,this.pageLoader=i;const _=c.isDynamicRoute(e)&&self.__NEXT_DATA__.autoExport;if(this.basePath=w,this.sub=h,this.clc=null,this._wrapApp=l,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!(!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp)&&(_||self.location.search||window.omnivoreEnv.__NEXT_HAS_REWRITES)),window.omnivoreEnv.__NEXT_I18N_SUPPORT&&(this.locales=v,this.defaultLocale=y,this.domainLocales=x,this.isLocaleDomain=!!b(x,self.location.hostname)),this.state={route:S,pathname:e,query:t,asPath:_?e:n,isPreview:!!E,locale:window.omnivoreEnv.__NEXT_I18N_SUPPORT?g:void 0,isFallback:p},"undefined"!=typeof window){if(!n.startsWith("//")){const r={locale:g};r._shouldResolveHref=n!==e,this.changeState("replaceState",m.formatWithValidation({pathname:O(e),query:t}),u.getURL(),r)}window.addEventListener("popstate",this.onPopState),window.omnivoreEnv.__NEXT_SCROLL_RESTORATION&&D&&(window.history.scrollRestoration="manual")}}reload(){window.location.reload()}back(){window.history.back()}push(e,t,n={}){if(window.omnivoreEnv.__NEXT_SCROLL_RESTORATION&&D)try{sessionStorage.setItem("__next_scroll_"+this._idx,JSON.stringify({x:self.pageXOffset,y:self.pageYOffset}))}catch{}return({url:e,as:t}=M(this,e,t)),this.change("pushState",e,t,n)}replace(e,t,n={}){return({url:e,as:t}=M(this,e,t)),this.change("replaceState",e,t,n)}async change(e,t,n,a,s){if(!T(t))return window.location.href=t,!1;const d=a._h||a._shouldResolveHref||_(t)===_(n),v={...this.state};a._h&&(this.isReady=!0);const y=v.locale;if(window.omnivoreEnv.__NEXT_I18N_SUPPORT){v.locale=!1===a.locale?this.defaultLocale:a.locale||v.locale,void 0===a.locale&&(a.locale=v.locale);const e=f.parseRelativeUrl(C(n)?P(n):n),r=l.normalizeLocalePath(e.pathname,this.locales);r.detectedLocale&&(v.locale=r.detectedLocale,e.pathname=O(e.pathname),n=m.formatWithValidation(e),t=O(l.normalizeLocalePath(C(t)?P(t):t,this.locales).pathname));let o=!1;var w;window.omnivoreEnv.__NEXT_I18N_SUPPORT&&((null===(w=this.locales)||void 0===w?void 0:w.includes(v.locale))||(e.pathname=k(e.pathname,v.locale),window.location.href=m.formatWithValidation(e),o=!0));const i=b(this.domainLocales,void 0,v.locale);if(window.omnivoreEnv.__NEXT_I18N_SUPPORT&&!o&&i&&this.isLocaleDomain&&self.location.hostname!==i.domain){const e=P(n);window.location.href=`http${i.http?"":"s"}://${i.domain}${O(`${v.locale===i.defaultLocale?"":`/${v.locale}`}${"/"===e?"":e}`||"/")}`,o=!0}if(o)return new Promise((()=>{}))}a._h||(this.isSsr=!1),u.ST&&performance.mark("routeChange");const{shallow:x=!1,scroll:E=!0}=a,j={shallow:x};this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,j),n=O(k(C(n)?P(n):n,a.locale,this.defaultLocale));const A=S(C(n)?P(n):n,v.locale);this._inFlightRoute=n;let D=y!==v.locale;if(!a._h&&this.onlyAHashChange(A)&&!D)return v.asPath=A,$.events.emit("hashChangeStart",n,j),this.changeState(e,t,n,{...a,scroll:!1}),E&&this.scrollToHash(A),this.set(v,this.components[v.route],null),$.events.emit("hashChangeComplete",n,j),!0;let F,z,B=f.parseRelativeUrl(t),{pathname:U,query:W}=B;try{[F,{__rewrites:z}]=await Promise.all([this.pageLoader.getPageList(),o.getClientBuildManifest(),this.pageLoader.getMiddlewareList()])}catch(e){return window.location.href=n,!1}this.urlIsNew(A)||D||(e="replaceState");let H=n;if(U=U?r.removePathTrailingSlash(P(U)):U,d&&"/_error"!==U)if(a._shouldResolveHref=!0,window.omnivoreEnv.__NEXT_HAS_REWRITES&&n.startsWith("/")){const e=h.default(O(k(A,v.locale)),F,z,W,(e=>I(e,F)),this.locales);if(e.externalDest)return location.href=n,!0;H=e.asPath,e.matchedPage&&e.resolvedHref&&(U=e.resolvedHref,B.pathname=O(U),t=m.formatWithValidation(B))}else B.pathname=I(U,F),B.pathname!==U&&(U=B.pathname,B.pathname=O(U),t=m.formatWithValidation(B));if(!T(n))return window.location.href=n,!1;if(H=S(P(H),v.locale),(!a.shallow||1===a._h)&&(1!==a._h||c.isDynamicRoute(r.removePathTrailingSlash(U)))){const r=await this._preflightRequest({as:n,cache:!0,pages:F,pathname:U,query:W,locale:v.locale,isPreview:v.isPreview});if("rewrite"===r.type)W={...W,...r.parsedAs.query},H=r.asPath,U=r.resolvedHref,B.pathname=r.resolvedHref,t=m.formatWithValidation(B);else{if("redirect"===r.type&&r.newAs)return this.change(e,r.newUrl,r.newAs,a);if("redirect"===r.type&&r.destination)return window.location.href=r.destination,new Promise((()=>{}));if("refresh"===r.type&&n!==window.location.pathname)return window.location.href=n,new Promise((()=>{}))}}const V=r.removePathTrailingSlash(U);if(c.isDynamicRoute(V)){const e=f.parseRelativeUrl(H),r=e.pathname,o=g.getRouteRegex(V),i=p.getRouteMatcher(o)(r),a=V===r,l=a?R(V,r,W):{};if(!i||a&&!l.result){const e=Object.keys(o.groups).filter((e=>!W[e]));if(e.length>0)throw new Error((a?`The provided \`href\` (${t}) value is missing query values (${e.join(", ")}) to be interpolated properly. `:`The provided \`as\` value (${r}) is incompatible with the \`href\` value (${V}). `)+"Read more: https://nextjs.org/docs/messages/"+(a?"href-interpolation-failed":"incompatible-href-as"))}else a?n=m.formatWithValidation(Object.assign({},e,{pathname:l.result,query:L(W,l.params)})):Object.assign(W,i)}$.events.emit("routeChangeStart",n,j);try{var q,X;let r=await this.getRouteInfo(V,U,W,n,H,j,v.locale,v.isPreview),{error:o,props:i,__N_SSG:l,__N_SSP:u}=r;if((l||u)&&i){if(i.pageProps&&i.pageProps.__N_REDIRECT){const t=i.pageProps.__N_REDIRECT;if(t.startsWith("/")&&!1!==i.pageProps.__N_REDIRECT_BASE_PATH){const n=f.parseRelativeUrl(t);n.pathname=I(n.pathname,F);const{url:r,as:o}=M(this,t,t);return this.change(e,r,o,a)}return window.location.href=t,new Promise((()=>{}))}if(v.isPreview=!!i.__N_PREVIEW,i.notFound===N){let e;try{await this.fetchComponent("/404"),e="/404"}catch(t){e="/_error"}r=await this.getRouteInfo(e,e,W,n,H,{shallow:!1},v.locale,v.isPreview)}}$.events.emit("beforeHistoryChange",n,j),this.changeState(e,t,n,a),a._h&&"/_error"===U&&500===(null===(q=self.__NEXT_DATA__.props)||void 0===q||null===(X=q.pageProps)||void 0===X?void 0:X.statusCode)&&(null==i?void 0:i.pageProps)&&(i.pageProps.statusCode=500);const c=a.shallow&&v.route===V;var K;const d=(null!==(K=a.scroll)&&void 0!==K?K:!c)?{x:0,y:0}:null;if(await this.set({...v,route:V,pathname:U,query:W,asPath:A,isFallback:!1},r,null!=s?s:d).catch((e=>{if(!e.cancelled)throw e;o=o||e})),o)throw $.events.emit("routeChangeError",o,A,j),o;return window.omnivoreEnv.__NEXT_I18N_SUPPORT&&v.locale&&(document.documentElement.lang=v.locale),$.events.emit("routeChangeComplete",n,j),!0}catch(e){if(i.default(e)&&e.cancelled)return!1;throw e}}changeState(e,t,n,r={}){"pushState"===e&&u.getURL()===n||(this._shallow=r.shallow,window.history[e]({url:t,as:n,options:r,__N:!0,idx:this._idx="pushState"!==e?this._idx:this._idx+1},"",n))}async handleRouteInfoError(e,t,n,r,a,l){if(e.cancelled)throw e;if(o.isAssetError(e)||l)throw $.events.emit("routeChangeError",e,r,a),window.location.href=r,x();try{let r,o,i;void 0!==r&&void 0!==o||({page:r,styleSheets:o}=await this.fetchComponent("/_error"));const a={props:i,Component:r,styleSheets:o,err:e,error:e};if(!a.props)try{a.props=await this.getInitialProps(r,{err:e,pathname:t,query:n})}catch(e){console.error("Error in error page `getInitialProps`: ",e),a.props={}}return a}catch(e){return this.handleRouteInfoError(i.default(e)?e:new Error(e+""),t,n,r,a,!0)}}async getRouteInfo(e,t,n,r,o,a,l,s){try{const i=this.components[e];if(a.shallow&&i&&this.route===e)return i;let u;i&&!("initial"in i)&&(u=i);const c=u||await this.fetchComponent(e).then((e=>({Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP,__N_RSC:!!e.mod.__next_rsc__}))),{Component:f,__N_SSG:d,__N_SSP:h,__N_RSC:p}=c;let g;(d||h||p)&&(g=this.pageLoader.getDataHref({href:m.formatWithValidation({pathname:t,query:n}),asPath:o,ssg:d,rsc:p,locale:l}));const v=await this._getData((()=>d||h?z(g,this.isSsr,!1,d?this.sdc:this.sdr,!!d&&!s):this.getInitialProps(f,{pathname:t,query:n,asPath:r,locale:l,locales:this.locales,defaultLocale:this.defaultLocale})));if(p){const{fresh:e,data:t}=await this._getData((()=>this._getFlightData(g)));v.pageProps=Object.assign(v.pageProps,{__flight_serialized__:t,__flight_fresh__:e})}return c.props=v,this.components[e]=c,c}catch(e){return this.handleRouteInfoError(i.getProperError(e),t,n,r,a)}}set(e,t,n){return this.state=e,this.sub(t,this.components["/_app"].Component,n)}beforePopState(e){this._bps=e}onlyAHashChange(e){if(!this.asPath)return!1;const[t,n]=this.asPath.split("#"),[r,o]=e.split("#");return!(!o||t!==r||n!==o)||t===r&&n!==o}scrollToHash(e){const[,t=""]=e.split("#");if(""===t||"top"===t)return void window.scrollTo(0,0);const n=document.getElementById(t);if(n)return void n.scrollIntoView();const r=document.getElementsByName(t)[0];r&&r.scrollIntoView()}urlIsNew(e){return this.asPath!==e}async prefetch(e,t=e,n={}){let i=f.parseRelativeUrl(e),{pathname:a,query:s}=i;if(window.omnivoreEnv.__NEXT_I18N_SUPPORT&&!1===n.locale){a=l.normalizeLocalePath(a,this.locales).pathname,i.pathname=a,e=m.formatWithValidation(i);let r=f.parseRelativeUrl(t);const o=l.normalizeLocalePath(r.pathname,this.locales);r.pathname=o.pathname,n.locale=o.detectedLocale||this.defaultLocale,t=m.formatWithValidation(r)}const u=await this.pageLoader.getPageList();let c=t;if(window.omnivoreEnv.__NEXT_HAS_REWRITES&&t.startsWith("/")){let n;({__rewrites:n}=await o.getClientBuildManifest());const r=h.default(O(k(t,this.locale)),u,n,i.query,(e=>I(e,u)),this.locales);if(r.externalDest)return;c=S(P(r.asPath),this.locale),r.matchedPage&&r.resolvedHref&&(a=r.resolvedHref,i.pathname=a,e=m.formatWithValidation(i))}else i.pathname=I(i.pathname,u),i.pathname!==a&&(a=i.pathname,i.pathname=a,e=m.formatWithValidation(i));const d=await this._preflightRequest({as:O(t),cache:!0,pages:u,pathname:a,query:s,locale:this.locale,isPreview:this.isPreview});"rewrite"===d.type&&(i.pathname=d.resolvedHref,a=d.resolvedHref,s={...s,...d.parsedAs.query},c=d.asPath,e=m.formatWithValidation(i));const p=r.removePathTrailingSlash(a);await Promise.all([this.pageLoader._isSsg(p).then((t=>!!t&&z(this.pageLoader.getDataHref({href:e,asPath:c,ssg:!0,locale:void 0!==n.locale?n.locale:this.locale}),!1,!1,this.sdc,!0))),this.pageLoader[n.priority?"loadPage":"prefetch"](p)])}async fetchComponent(e){let t=!1;const n=this.clc=()=>{t=!0},r=()=>{if(t){const t=new Error(`Abort fetching component for route: "${e}"`);throw t.cancelled=!0,t}n===this.clc&&(this.clc=null)};try{const t=await this.pageLoader.loadPage(e);return r(),t}catch(e){throw r(),e}}_getData(e){let t=!1;const n=()=>{t=!0};return this.clc=n,e().then((e=>{if(n===this.clc&&(this.clc=null),t){const e=new Error("Loading initial props cancelled");throw e.cancelled=!0,e}return e}))}_getFlightData(e){return z(e,!0,!0,this.sdc,!1).then((e=>({fresh:!0,data:e})))}async _preflightRequest(e){const t=_(e.as),n=S(C(t)?P(t):t,e.locale),o=(await this.pageLoader.getMiddlewareList()).map((([e,t])=>({page:e,ssr:t}))),i=v.getRoutingItems(e.pages,o);let a,s=!1;for(const e of i)if(e.match(n)){e.isMiddleware&&(s=!0);break}if(!s)return{type:"next"};try{a=await this._getPreflightData({preflightHref:e.as,shouldCache:e.cache,isPreview:e.isPreview})}catch(t){return{type:"redirect",destination:e.as}}if(a.rewrite){if(!a.rewrite.startsWith("/"))return{type:"redirect",destination:e.as};const t=f.parseRelativeUrl(l.normalizeLocalePath(C(a.rewrite)?P(a.rewrite):a.rewrite,this.locales).pathname),n=r.removePathTrailingSlash(t.pathname);let o,i;return e.pages.includes(n)?(o=!0,i=n):(i=I(n,e.pages),i!==t.pathname&&e.pages.includes(i)&&(o=!0)),{type:"rewrite",asPath:t.pathname,parsedAs:t,matchedPage:o,resolvedHref:i}}if(a.redirect){if(a.redirect.startsWith("/")){const e=r.removePathTrailingSlash(l.normalizeLocalePath(C(a.redirect)?P(a.redirect):a.redirect,this.locales).pathname),{url:t,as:n}=M(this,e,e);return{type:"redirect",newUrl:t,newAs:n}}return{type:"redirect",destination:a.redirect}}return a.refresh&&!a.ssr?{type:"refresh"}:{type:"next"}}_getPreflightData(e){const{preflightHref:t,shouldCache:n=!1,isPreview:r}=e,{href:o}=new URL(t,window.location.href);return!r&&n&&this.sde[o]?Promise.resolve(this.sde[o]):fetch(t,{method:"HEAD",credentials:"same-origin",headers:{"x-middleware-preflight":"1"}}).then((e=>{if(!e.ok)throw new Error("Failed to preflight request");return{cache:e.headers.get("x-middleware-cache"),redirect:e.headers.get("Location"),refresh:e.headers.has("x-middleware-refresh"),rewrite:e.headers.get("x-middleware-rewrite"),ssr:!!e.headers.get("x-middleware-ssr")}})).then((e=>(n&&"no-cache"!==e.cache&&(this.sde[o]=e),e))).catch((e=>{throw delete this.sde[o],e}))}getInitialProps(e,t){const{Component:n}=this.components["/_app"],r=this._wrapApp(n);return t.AppTree=r,u.loadGetInitialProps(n,{AppTree:r,Component:e,router:this,ctx:t})}abortComponentLoad(e,t){this.clc&&($.events.emit("routeChangeError",x(),e,t),this.clc(),this.clc=null)}get route(){return this.state.route}get pathname(){return this.state.pathname}get query(){return this.state.query}get asPath(){return this.state.asPath}get locale(){return this.state.locale}get isFallback(){return this.state.isFallback}get isPreview(){return this.state.isPreview}}t.default=$,$.events=s.default()},6555:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatUrl=i,t.formatWithValidation=function(e){return i(e)},t.urlObjectKeys=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(646));const o=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:n}=e,i=e.protocol||"",a=e.pathname||"",l=e.hash||"",s=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:n&&(u=t+(~n.indexOf(":")?`[${n}]`:n),e.port&&(u+=":"+e.port)),s&&"object"==typeof s&&(s=String(r.urlQueryToSearchParams(s)));let c=e.search||s&&`?${s}`||"";return i&&!i.endsWith(":")&&(i+=":"),e.slashes||(!i||o.test(i))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),l&&"#"!==l[0]&&(l="#"+l),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${i}${u}${a}${c}${l}`}t.urlObjectKeys=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"]},9983:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=""){return("/"===e?"/index":/^\/index(\/|$)/.test(e)?`/index${e}`:`${e}`)+t}},2763:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMiddlewareRegex=function(e,t=!0){const n=r.getParametrizedRoute(e),i=o.test(e)?"(?!/api(?:/|$))":"";let a=t?"(?!_next($|/)).*":"",l=t?"(?:(/.*)?)":"";return"routeKeys"in n?"/"===n.parameterizedRoute?{groups:{},namedRegex:`^/${a}$`,re:new RegExp(`^/${a}$`),routeKeys:{}}:{groups:n.groups,namedRegex:`^${i}${n.namedParameterizedRoute}${l}$`,re:new RegExp(`^${i}${n.parameterizedRoute}${l}$`),routeKeys:n.routeKeys}:"/"===n.parameterizedRoute?{groups:{},re:new RegExp(`^/${a}$`)}:{groups:{},re:new RegExp(`^${i}${n.parameterizedRoute}${l}$`)}};var r=n(4794);const o=/^\/\[[^/]+?\](?=\/|$)/},9150:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getMiddlewareRegex",{enumerable:!0,get:function(){return r.getMiddlewareRegex}}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o.getRouteMatcher}}),Object.defineProperty(t,"getRouteRegex",{enumerable:!0,get:function(){return i.getRouteRegex}}),Object.defineProperty(t,"getRoutingItems",{enumerable:!0,get:function(){return a.getRoutingItems}}),Object.defineProperty(t,"RoutingItem",{enumerable:!0,get:function(){return a.RoutingItem}}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return l.getSortedRoutes}}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return s.isDynamicRoute}});var r=n(2763),o=n(3107),i=n(4794),a=n(3948),l=n(9036),s=n(7482)},7482:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDynamicRoute=function(e){return n.test(e)};const n=/\/\[[^/]+?\](?=\/|$)/},1577:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseRelativeUrl=function(e,t){const n=new URL("undefined"==typeof window?"http://n":r.getLocationOrigin()),i=t?new URL(t,n):n,{pathname:a,searchParams:l,search:s,hash:u,href:c,origin:f}=new URL(e,i);if(f!==n.origin)throw new Error(`invariant: invalid relative URL, router received ${e}`);return{pathname:a,query:o.searchParamsToUrlQuery(l),search:s,hash:u,href:c.slice(n.origin.length)}};var r=n(1624),o=n(646)},2011:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseUrl=function(e){if(e.startsWith("/"))return o.parseRelativeUrl(e);const t=new URL(e);return{hash:t.hash,hostname:t.hostname,href:t.href,pathname:t.pathname,port:t.port,protocol:t.protocol,query:r.searchParamsToUrlQuery(t.searchParams),search:t.search}};var r=n(646),o=n(1577)},1095:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.customRouteMatcherOptions=t.matcherOptions=t.pathToRegexp=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(9264));t.pathToRegexp=r;const o={sensitive:!1,delimiter:"/"};t.matcherOptions=o;const i={...o,strict:!0};t.customRouteMatcherOptions=i,t.default=(e=!1)=>(t,n)=>{const a=[];let l=r.pathToRegexp(t,a,e?i:o);if(n){const e=n(l.source);l=new RegExp(e,l.flags)}const s=r.regexpToFunction(l,a);return(t,n)=>{const r=null!=t&&s(t);if(!r)return!1;if(e)for(const e of a)"number"==typeof e.name&&delete r.params[e.name];return{...n,...r.params}}}},9716:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchHas=function(e,t,n){const r={};return!!t.every((t=>{let o,i=t.key;switch(t.type){case"header":i=i.toLowerCase(),o=e.headers[i];break;case"cookie":o=e.cookies[t.key];break;case"query":o=n[i];break;case"host":{const{host:t}=(null==e?void 0:e.headers)||{};o=null==t?void 0:t.split(":")[0].toLowerCase();break}}if(!t.value&&o)return r[function(e){let t="";for(let n=0;n64&&r<91||r>96&&r<123)&&(t+=e[n])}return t}(i)]=o,!0;if(o){const e=new RegExp(`^${t.value}$`),n=Array.isArray(o)?o.slice(-1)[0].match(e):o.match(e);if(n)return Array.isArray(n)&&(n.groups?Object.keys(n.groups).forEach((e=>{r[e]=n.groups[e]})):"host"===t.type&&n[0]&&(r.host=n[0])),!0}return!1}))&&r},t.compileNonPath=a,t.prepareDestination=function(e){const t=Object.assign({},e.query);delete t.__nextLocale,delete t.__nextDefaultLocale;let n=e.destination;for(const r of Object.keys({...e.params,...t}))s=r,n=n.replace(new RegExp(`:${o.escapeStringRegexp(s)}`,"g"),`__ESC_COLON_${s}`);var s;const u=i.parseUrl(n),c=u.query,f=l(`${u.pathname}${u.hash||""}`),d=l(u.hostname||""),h=[],p=[];r.pathToRegexp(f,h),r.pathToRegexp(d,p);const g=[];h.forEach((e=>g.push(e.name))),p.forEach((e=>g.push(e.name)));const m=r.compile(f,{validate:!1}),v=r.compile(d,{validate:!1});for(const[t,n]of Object.entries(c))Array.isArray(n)?c[t]=n.map((t=>a(l(t),e.params))):c[t]=a(l(n),e.params);let y,b=Object.keys(e.params).filter((e=>"nextInternalLocale"!==e));if(e.appendParamsToQuery&&!b.some((e=>g.includes(e))))for(const t of b)t in c||(c[t]=e.params[t]);try{y=m(e.params);const[t,n]=y.split("#");u.hostname=v(e.params),u.pathname=t,u.hash=`${n?"#":""}${n||""}`,delete u.search}catch(e){if(e.message.match(/Expected .*? to not repeat, but got an array/))throw new Error("To use a multi-match in the destination you must add `*` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match");throw e}return u.query={...t,...u.query},{newUrl:y,parsedDestination:u}};var r=n(9264),o=n(8058),i=n(2011);function a(e,t){if(!e.includes(":"))return e;for(const n of Object.keys(t))e.includes(`:${n}`)&&(e=e.replace(new RegExp(`:${n}\\*`,"g"),`:${n}--ESCAPED_PARAM_ASTERISKS`).replace(new RegExp(`:${n}\\?`,"g"),`:${n}--ESCAPED_PARAM_QUESTION`).replace(new RegExp(`:${n}\\+`,"g"),`:${n}--ESCAPED_PARAM_PLUS`).replace(new RegExp(`:${n}(?!\\w)`,"g"),`--ESCAPED_PARAM_COLON${n}`));return e=e.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g,"\\$1").replace(/--ESCAPED_PARAM_PLUS/g,"+").replace(/--ESCAPED_PARAM_COLON/g,":").replace(/--ESCAPED_PARAM_QUESTION/g,"?").replace(/--ESCAPED_PARAM_ASTERISKS/g,"*"),r.compile(`/${e}`,{validate:!1})(t).slice(1)}function l(e){return e.replace(/__ESC_COLON_/gi,":")}},646:(e,t)=>{"use strict";function n(e){return"string"==typeof e||"number"==typeof e&&!isNaN(e)||"boolean"==typeof e?String(e):""}Object.defineProperty(t,"__esModule",{value:!0}),t.searchParamsToUrlQuery=function(e){const t={};return e.forEach(((e,n)=>{void 0===t[n]?t[n]=e:Array.isArray(t[n])?t[n].push(e):t[n]=[t[n],e]})),t},t.urlQueryToSearchParams=function(e){const t=new URLSearchParams;return Object.entries(e).forEach((([e,r])=>{Array.isArray(r)?r.forEach((r=>t.append(e,n(r)))):t.set(e,n(r))})),t},t.assign=function(e,...t){return t.forEach((t=>{Array.from(t.keys()).forEach((t=>e.delete(t))),t.forEach(((t,n)=>e.append(n,t)))})),e}},5317:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,o,f){let d,h=!1,p=!1,g=s.parseRelativeUrl(e),m=a.removePathTrailingSlash(l.normalizeLocalePath(u.delBasePath(g.pathname),f).pathname);const v=n=>{let s=c(n.source)(g.pathname);if(n.has&&s){const e=i.matchHas({headers:{host:document.location.hostname},cookies:document.cookie.split("; ").reduce(((e,t)=>{const[n,...r]=t.split("=");return e[n]=r.join("="),e}),{})},n.has,g.query);e?Object.assign(s,e):s=!1}if(s){if(!n.destination)return p=!0,!0;const c=i.prepareDestination({appendParamsToQuery:!0,destination:n.destination,params:s,query:r});if(g=c.parsedDestination,e=c.newUrl,Object.assign(r,c.parsedDestination.query),m=a.removePathTrailingSlash(l.normalizeLocalePath(u.delBasePath(e),f).pathname),t.includes(m))return h=!0,d=m,!0;if(d=o(m),d!==e&&t.includes(d))return h=!0,!0}};let y=!1;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRouteMatcher=function(e){const{re:t,groups:n}=e;return e=>{const o=t.exec(e);if(!o)return!1;const i=e=>{try{return decodeURIComponent(e)}catch(e){throw new r.DecodeError("failed to decode param")}},a={};return Object.keys(n).forEach((e=>{const t=n[e],r=o[t.pos];void 0!==r&&(a[e]=~r.indexOf("/")?r.split("/").map((e=>i(e))):t.repeat?[i(r)]:i(r))})),a}};var r=n(1624)},4794:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getParametrizedRoute=i,t.getRouteRegex=function(e){const t=i(e);return"routeKeys"in t?{re:new RegExp(`^${t.parameterizedRoute}(?:/)?$`),groups:t.groups,routeKeys:t.routeKeys,namedRegex:`^${t.namedParameterizedRoute}(?:/)?$`}:{re:new RegExp(`^${t.parameterizedRoute}(?:/)?$`),groups:t.groups}};var r=n(8058);function o(e){const t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));const n=e.startsWith("...");return n&&(e=e.slice(3)),{key:e,repeat:n,optional:t}}function i(e){const t=(e.replace(/\/$/,"")||"/").slice(1).split("/"),n={};let i=1;const a=t.map((e=>{if(e.startsWith("[")&&e.endsWith("]")){const{key:t,optional:r,repeat:a}=o(e.slice(1,-1));return n[t]={pos:i++,repeat:a,optional:r},a?r?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}return`/${r.escapeStringRegexp(e)}`})).join("");if("undefined"==typeof window){let e=97,i=1;const l=()=>{let t="";for(let n=0;n122&&(i++,e=97);return t},s={};return{parameterizedRoute:a,namedParameterizedRoute:t.map((e=>{if(e.startsWith("[")&&e.endsWith("]")){const{key:t,optional:n,repeat:r}=o(e.slice(1,-1));let i=t.replace(/\W/g,""),a=!1;return(0===i.length||i.length>30)&&(a=!0),isNaN(parseInt(i.slice(0,1)))||(a=!0),a&&(i=l()),s[i]=t,r?n?`(?:/(?<${i}>.+?))?`:`/(?<${i}>.+?)`:`/(?<${i}>[^/]+?)`}return`/${r.escapeStringRegexp(e)}`})).join(""),groups:n,routeKeys:s}}return{parameterizedRoute:a,groups:n}}},3948:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRoutingItems=function(e,t){const n=t.map((e=>`${e.page}/_middleware`)),s=new Map(t.map((e=>[e.page,e])));return a.getSortedRoutes([...e,...n]).map((e=>{if(e.endsWith(l)){const t=e.slice(0,-l.length)||"/",{ssr:n}=s.get(t);return{match:o.getRouteMatcher(r.getMiddlewareRegex(t,!n)),page:t,ssr:n,isMiddleware:!0}}return{match:o.getRouteMatcher(i.getRouteRegex(e)),page:e}}))};var r=n(2763),o=n(3107),i=n(4794),a=n(9036);const l="/_middleware"},9036:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSortedRoutes=function(e){const t=new n;return e.forEach((e=>t.insert(e))),t.smoosh()};class n{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e="/"){const t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1),this.isMiddleware&&t.splice(t.indexOf("_middleware"),1);const n=t.map((t=>this.children.get(t)._smoosh(`${e}${t}/`))).reduce(((e,t)=>[...e,...t]),[]);if(null!==this.slugName&&n.push(...this.children.get("[]")._smoosh(`${e}[${this.slugName}]/`)),!this.placeholder){const t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw new Error(`You cannot define a route with the same specificity as a optional catch-all route ("${t}" and "${t}[[...${this.optionalRestSlugName}]]").`);n.unshift(t)}return this.isMiddleware&&n.unshift(...this.children.get("_middleware")._smoosh(`${e}_middleware/`)),null!==this.restSlugName&&n.push(...this.children.get("[...]")._smoosh(`${e}[...${this.restSlugName}]/`)),null!==this.optionalRestSlugName&&n.push(...this.children.get("[[...]]")._smoosh(`${e}[[...${this.optionalRestSlugName}]]/`)),n}_insert(e,t,r){if(0===e.length)return void(this.placeholder=!1);if(r)throw new Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let i=o.slice(1,-1),a=!1;if(i.startsWith("[")&&i.endsWith("]")&&(i=i.slice(1,-1),a=!0),i.startsWith("...")&&(i=i.substring(3),r=!0),i.startsWith("[")||i.endsWith("]"))throw new Error(`Segment names may not start or end with extra brackets ('${i}').`);if(i.startsWith("."))throw new Error(`Segment names may not start with erroneous periods ('${i}').`);function l(e,n){if(null!==e&&e!==n)throw new Error(`You cannot use different slug names for the same dynamic path ('${e}' !== '${n}').`);t.forEach((e=>{if(e===n)throw new Error(`You cannot have the same slug name "${n}" repeat within a single dynamic path`);if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw new Error(`You cannot have the slug names "${e}" and "${n}" differ only by non-word symbols within a single dynamic path`)})),t.push(n)}if(r)if(a){if(null!=this.restSlugName)throw new Error(`You cannot use both an required and optional catch-all route at the same level ("[...${this.restSlugName}]" and "${e[0]}" ).`);l(this.optionalRestSlugName,i),this.optionalRestSlugName=i,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw new Error(`You cannot use both an optional and required catch-all route at the same level ("[[...${this.optionalRestSlugName}]]" and "${e[0]}").`);l(this.restSlugName,i),this.restSlugName=i,o="[...]"}else{if(a)throw new Error(`Optional route parameters are not yet supported ("${e[0]}").`);l(this.slugName,i),this.slugName=i,o="[]"}}else"_middleware"===o&&1===e.length&&(this.isMiddleware=!0);this.children.has(o)||this.children.set(o,new n),this.children.get(o)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null,this.isMiddleware=!1}}},1889:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(2784));const o="undefined"==typeof window;class i extends r.Component{constructor(e){super(e),this.emitChange=()=>{this._hasHeadManager&&this.props.headManager.updateHead(this.props.reduceComponentsToState([...this.props.headManager.mountedInstances],this.props))},this._hasHeadManager=this.props.headManager&&this.props.headManager.mountedInstances,o&&this._hasHeadManager&&(this.props.headManager.mountedInstances.add(this),this.emitChange())}componentDidMount(){this._hasHeadManager&&this.props.headManager.mountedInstances.add(this),this.emitChange()}componentDidUpdate(){this.emitChange()}componentWillUnmount(){this._hasHeadManager&&this.props.headManager.mountedInstances.delete(this),this.emitChange()}render(){return null}}t.default=i},1624:(e,t)=>{"use strict";function n(){const{protocol:e,hostname:t,port:n}=window.location;return`${e}//${t}${n?":"+n:""}`}function r(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function o(e){return e.finished||e.headersSent}Object.defineProperty(t,"__esModule",{value:!0}),t.execOnce=function(e){let t,n=!1;return(...r)=>(n||(n=!0,t=e(...r)),t)},t.getLocationOrigin=n,t.getURL=function(){const{href:e}=window.location,t=n();return e.substring(t.length)},t.getDisplayName=r,t.isResSent=o,t.normalizeRepeatedSlashes=function(e){const t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")},t.loadGetInitialProps=async function e(t,n){const i=n.res||n.ctx&&n.ctx.res;if(!t.getInitialProps)return n.ctx&&n.Component?{pageProps:await e(n.Component,n.ctx)}:{};const a=await t.getInitialProps(n);if(i&&o(i))return a;if(!a){const e=`"${r(t)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`;throw new Error(e)}return a},t.ST=t.SP=t.warnOnce=void 0,t.warnOnce=e=>{};const i="undefined"!=typeof performance;t.SP=i;const a=i&&"function"==typeof performance.mark&&"function"==typeof performance.measure;t.ST=a;class l extends Error{}t.DecodeError=l},6577:(e,t,n)=>{n(104)},9097:(e,t,n)=>{n(4529)},5632:(e,t,n)=>{e.exports=n(9518)},7320:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,l,s=o(e),u=1;u{"use strict";var r=n(2784),o=n(7320),i=n(4616);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nt}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!h.call(g,e)||!h.call(p,e)&&(d.test(e)?g[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,b);v[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,b);v[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,b);v[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),v.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var x=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,k=60106,S=60107,_=60108,C=60114,O=60109,P=60110,T=60112,R=60113,L=60120,j=60115,A=60116,M=60121,I=60128,D=60129,N=60130,F=60131;if("function"==typeof Symbol&&Symbol.for){var z=Symbol.for;E=z("react.element"),k=z("react.portal"),S=z("react.fragment"),_=z("react.strict_mode"),C=z("react.profiler"),O=z("react.provider"),P=z("react.context"),T=z("react.forward_ref"),R=z("react.suspense"),L=z("react.suspense_list"),j=z("react.memo"),A=z("react.lazy"),M=z("react.block"),z("react.scope"),I=z("react.opaque.id"),D=z("react.debug_trace_mode"),N=z("react.offscreen"),F=z("react.legacy_hidden")}var $,B="function"==typeof Symbol&&Symbol.iterator;function U(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=B&&e[B]||e["@@iterator"])?e:null}function W(e){if(void 0===$)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);$=t&&t[1]||""}return"\n"+$+e}var H=!1;function V(e,t){if(!e||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var o=e.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,l=i.length-1;1<=a&&0<=l&&o[a]!==i[l];)l--;for(;1<=a&&0<=l;a--,l--)if(o[a]!==i[l]){if(1!==a||1!==l)do{if(a--,0>--l||o[a]!==i[l])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=l);break}}}finally{H=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?W(e):""}function q(e){switch(e.tag){case 5:return W(e.type);case 16:return W("Lazy");case 13:return W("Suspense");case 19:return W("SuspenseList");case 0:case 2:case 15:return V(e.type,!1);case 11:return V(e.type.render,!1);case 22:return V(e.type._render,!1);case 1:return V(e.type,!0);default:return""}}function X(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case S:return"Fragment";case k:return"Portal";case C:return"Profiler";case _:return"StrictMode";case R:return"Suspense";case L:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case P:return(e.displayName||"Context")+".Consumer";case O:return(e._context.displayName||"Context")+".Provider";case T:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case j:return X(e.type);case M:return X(e._render);case A:t=e._payload,e=e._init;try{return X(e(t))}catch(e){}}return null}function K(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Y(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function G(e){e._valueTracker||(e._valueTracker=function(e){var t=Y(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Y(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Z(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=K(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=K(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,K(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&Z(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ie(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:K(n)}}function ue(e,t){var n=K(t.value),r=K(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml";function de(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function he(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?de(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var pe,ge,me=(ge=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((pe=pe||document.createElement("div")).innerHTML="",t=pe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ge(e,t)}))}:ge);function ve(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ye={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},be=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ye.hasOwnProperty(e)&&ye[e]?(""+t).trim():t+"px"}function xe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(ye).forEach((function(e){be.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ye[t]=ye[e]}))}));var Ee=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ke(e,t){if(t){if(Ee[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function Se(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function _e(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,Oe=null,Pe=null;function Te(e){if(e=Jr(e)){if("function"!=typeof Ce)throw Error(a(280));var t=e.stateNode;t&&(t=to(t),Ce(e.stateNode,e.type,t))}}function Re(e){Oe?Pe?Pe.push(e):Pe=[e]:Oe=e}function Le(){if(Oe){var e=Oe,t=Pe;if(Pe=Oe=null,Te(e),t)for(e=0;e(r=31-Wt(r))?0:1<n;n++)t.push(e);return t}function Ut(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Wt(t)]=n}var Wt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Ht(e)/Vt|0)|0},Ht=Math.log,Vt=Math.LN2,qt=i.unstable_UserBlockingPriority,Xt=i.unstable_runWithPriority,Kt=!0;function Yt(e,t,n,r){De||Me();var o=Qt,i=De;De=!0;try{Ae(o,e,t,n,r)}finally{(De=i)||Fe()}}function Gt(e,t,n,r){Xt(qt,Qt.bind(null,e,t,n,r))}function Qt(e,t,n,r){var o;if(Kt)if((o=0==(4&t))&&0=Mn),Nn=String.fromCharCode(32),Fn=!1;function zn(e,t){switch(e){case"keyup":return-1!==jn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $n(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Bn=!1,Un={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Un[e.type]:"textarea"===t}function Hn(e,t,n,r){Re(r),0<(t=Ar(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Vn=null,qn=null;function Xn(e){_r(e,0)}function Kn(e){if(Q(eo(e)))return e}function Yn(e,t){if("change"===e)return t}var Gn=!1;if(f){var Qn;if(f){var Zn="oninput"in document;if(!Zn){var Jn=document.createElement("div");Jn.setAttribute("oninput","return;"),Zn="function"==typeof Jn.oninput}Qn=Zn}else Qn=!1;Gn=Qn&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function fr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?fr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dr(){for(var e=window,t=Z();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Z((e=t.contentWindow).document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var pr=f&&"documentMode"in document&&11>=document.documentMode,gr=null,mr=null,vr=null,yr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;yr||null==gr||gr!==Z(r)||(r="selectionStart"in(r=gr)&&hr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},vr&&sr(vr,r)||(vr=r,0<(r=Ar(mr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}Mt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Mt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Mt(At,2);for(var wr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),xr=0;xroo||(e.current=ro[oo],ro[oo]=null,oo--)}function lo(e,t){oo++,ro[oo]=e.current,e.current=t}var so={},uo=io(so),co=io(!1),fo=so;function ho(e,t){var n=e.type.contextTypes;if(!n)return so;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function po(e){return null!=e.childContextTypes}function go(){ao(co),ao(uo)}function mo(e,t,n){if(uo.current!==so)throw Error(a(168));lo(uo,t),lo(co,n)}function vo(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,X(t)||"Unknown",i));return o({},n,r)}function yo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||so,fo=uo.current,lo(uo,e),lo(co,co.current),!0}function bo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=vo(e,t,fo),r.__reactInternalMemoizedMergedChildContext=e,ao(co),ao(uo),lo(uo,e)):ao(co),lo(co,n)}var wo=null,xo=null,Eo=i.unstable_runWithPriority,ko=i.unstable_scheduleCallback,So=i.unstable_cancelCallback,_o=i.unstable_shouldYield,Co=i.unstable_requestPaint,Oo=i.unstable_now,Po=i.unstable_getCurrentPriorityLevel,To=i.unstable_ImmediatePriority,Ro=i.unstable_UserBlockingPriority,Lo=i.unstable_NormalPriority,jo=i.unstable_LowPriority,Ao=i.unstable_IdlePriority,Mo={},Io=void 0!==Co?Co:function(){},Do=null,No=null,Fo=!1,zo=Oo(),$o=1e4>zo?Oo:function(){return Oo()-zo};function Bo(){switch(Po()){case To:return 99;case Ro:return 98;case Lo:return 97;case jo:return 96;case Ao:return 95;default:throw Error(a(332))}}function Uo(e){switch(e){case 99:return To;case 98:return Ro;case 97:return Lo;case 96:return jo;case 95:return Ao;default:throw Error(a(332))}}function Wo(e,t){return e=Uo(e),Eo(e,t)}function Ho(e,t,n){return e=Uo(e),ko(e,t,n)}function Vo(){if(null!==No){var e=No;No=null,So(e)}qo()}function qo(){if(!Fo&&null!==Do){Fo=!0;var e=0;try{var t=Do;Wo(99,(function(){for(;eg?(m=f,f=null):m=f.sibling;var v=h(o,f,l[g],s);if(null===v){null===f&&(f=m);break}e&&f&&null===v.alternate&&t(o,f),a=i(v,a,g),null===c?u=v:c.sibling=v,c=v,f=m}if(g===l.length)return n(o,f),u;if(null===f){for(;gm?(v=g,g=null):v=g.sibling;var b=h(o,g,y.value,u);if(null===b){null===g&&(g=v);break}e&&g&&null===b.alternate&&t(o,g),l=i(b,l,m),null===f?c=b:f.sibling=b,f=b,g=v}if(y.done)return n(o,g),c;if(null===g){for(;!y.done;m++,y=s.next())null!==(y=d(o,y.value,u))&&(l=i(y,l,m),null===f?c=y:f.sibling=y,f=y);return c}for(g=r(o,g);!y.done;m++,y=s.next())null!==(y=p(g,o,m,y.value,u))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),l=i(y,l,m),null===f?c=y:f.sibling=y,f=y);return e&&g.forEach((function(e){return t(o,e)})),c}return function(e,r,i,s){var u="object"==typeof i&&null!==i&&i.type===S&&null===i.key;u&&(i=i.props.children);var c="object"==typeof i&&null!==i;if(c)switch(i.$$typeof){case E:e:{for(c=i.key,u=r;null!==u;){if(u.key===c){if(7===u.tag){if(i.type===S){n(e,u.sibling),(r=o(u,i.props.children)).return=e,e=r;break e}}else if(u.elementType===i.type){n(e,u.sibling),(r=o(u,i.props)).ref=wi(e,u,i),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}i.type===S?((r=Us(i.props.children,e.mode,s,i.key)).return=e,e=r):((s=Bs(i.type,i.key,i.props,null,e.mode,s)).ref=wi(e,r,i),s.return=e,e=s)}return l(e);case k:e:{for(u=i.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Vs(i,e.mode,s)).return=e,e=r}return l(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Hs(i,e.mode,s)).return=e,e=r),l(e);if(bi(i))return g(e,r,i,s);if(U(i))return m(e,r,i,s);if(c&&xi(e,i),void 0===i&&!u)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,X(e.type)||"Component"))}return n(e,r)}}var ki=Ei(!0),Si=Ei(!1),_i={},Ci=io(_i),Oi=io(_i),Pi=io(_i);function Ti(e){if(e===_i)throw Error(a(174));return e}function Ri(e,t){switch(lo(Pi,t),lo(Oi,e),lo(Ci,_i),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:he(null,"");break;default:t=he(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ao(Ci),lo(Ci,t)}function Li(){ao(Ci),ao(Oi),ao(Pi)}function ji(e){Ti(Pi.current);var t=Ti(Ci.current),n=he(t,e.type);t!==n&&(lo(Oi,e),lo(Ci,n))}function Ai(e){Oi.current===e&&(ao(Ci),ao(Oi))}var Mi=io(0);function Ii(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Di=null,Ni=null,Fi=!1;function zi(e,t){var n=Fs(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function $i(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Bi(e){if(Fi){var t=Ni;if(t){var n=t;if(!$i(e,t)){if(!(t=Hr(n.nextSibling))||!$i(e,t))return e.flags=-1025&e.flags|2,Fi=!1,void(Di=e);zi(Di,n)}Di=e,Ni=Hr(t.firstChild)}else e.flags=-1025&e.flags|2,Fi=!1,Di=e}}function Ui(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Di=e}function Wi(e){if(e!==Di)return!1;if(!Fi)return Ui(e),Fi=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!$r(t,e.memoizedProps))for(t=Ni;t;)zi(e,t),t=Hr(t.nextSibling);if(Ui(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ni=Hr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ni=null}}else Ni=Di?Hr(e.stateNode.nextSibling):null;return!0}function Hi(){Ni=Di=null,Fi=!1}var Vi=[];function qi(){for(var e=0;ei))throw Error(a(301));i+=1,Zi=Qi=null,t.updateQueue=null,Xi.current=La,e=n(r,o)}while(ea)}if(Xi.current=Pa,t=null!==Qi&&null!==Qi.next,Yi=0,Zi=Qi=Gi=null,Ji=!1,t)throw Error(a(300));return e}function oa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Zi?Gi.memoizedState=Zi=e:Zi=Zi.next=e,Zi}function ia(){if(null===Qi){var e=Gi.alternate;e=null!==e?e.memoizedState:null}else e=Qi.next;var t=null===Zi?Gi.memoizedState:Zi.next;if(null!==t)Zi=t,Qi=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Qi=e).memoizedState,baseState:Qi.baseState,baseQueue:Qi.baseQueue,queue:Qi.queue,next:null},null===Zi?Gi.memoizedState=Zi=e:Zi=Zi.next=e}return Zi}function aa(e,t){return"function"==typeof t?t(e):t}function la(e){var t=ia(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Qi,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var l=o.next;o.next=i.next,i.next=l}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var s=l=i=null,u=o;do{var c=u.lane;if((Yi&c)===c)null!==s&&(s=s.next={lane:0,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),r=u.eagerReducer===e?u.eagerState:e(r,u.action);else{var f={lane:c,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===s?(l=s=f,i=r):s=s.next=f,Gi.lanes|=c,Il|=c}u=u.next}while(null!==u&&u!==o);null===s?i=r:s.next=l,ar(r,t.memoizedState)||(Aa=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=s,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function sa(e){var t=ia(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var l=o=o.next;do{i=e(i,l.action),l=l.next}while(l!==o);ar(i,t.memoizedState)||(Aa=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ua(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(null!==o?e=o===r:(e=e.mutableReadLanes,(e=(Yi&e)===e)&&(t._workInProgressVersionPrimary=r,Vi.push(t))),e)return n(t._source);throw Vi.push(t),Error(a(350))}function ca(e,t,n,r){var o=Ol;if(null===o)throw Error(a(349));var i=t._getVersion,l=i(t._source),s=Xi.current,u=s.useState((function(){return ua(o,t,n)})),c=u[1],f=u[0];u=Zi;var d=e.memoizedState,h=d.refs,p=h.getSnapshot,g=d.source;d=d.subscribe;var m=Gi;return e.memoizedState={refs:h,source:t,subscribe:r},s.useEffect((function(){h.getSnapshot=n,h.setSnapshot=c;var e=i(t._source);if(!ar(l,e)){e=n(t._source),ar(f,e)||(c(e),e=ls(m),o.mutableReadLanes|=e&o.pendingLanes),e=o.mutableReadLanes,o.entangledLanes|=e;for(var r=o.entanglements,a=e;0n?98:n,(function(){e(!0)})),Wo(97<\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),"select"===n&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[Kr]=t,e[Yr]=r,Ha(e,t),t.stateNode=e,u=Se(n,r),n){case"dialog":Cr("cancel",e),Cr("close",e),i=r;break;case"iframe":case"object":case"embed":Cr("load",e),i=r;break;case"video":case"audio":for(i=0;i$l&&(t.flags|=64,l=!0,el(r,!1),t.lanes=33554432)}else{if(!l)if(null!==(e=Ii(u))){if(t.flags|=64,l=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),el(r,!0),null===r.tail&&"hidden"===r.tailMode&&!u.alternate&&!Fi)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*$o()-r.renderingStartTime>$l&&1073741824!==n&&(t.flags|=64,l=!0,el(r,!1),t.lanes=33554432);r.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=r.last)?n.sibling=u:t.child=u,r.last=u)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=$o(),n.sibling=null,t=Mi.current,lo(Mi,l?1&t|2:1&t),n):null;case 23:case 24:return vs(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function nl(e){switch(e.tag){case 1:po(e.type)&&go();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Li(),ao(co),ao(uo),qi(),0!=(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Ai(e),null;case 13:return ao(Mi),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ao(Mi),null;case 4:return Li(),null;case 10:return ei(e),null;case 23:case 24:return vs(),null;default:return null}}function rl(e,t){try{var n="",r=t;do{n+=q(r),r=r.return}while(r);var o=n}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:o}}function ol(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}Ha=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Va=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ti(Ci.current);var a,l=null;switch(n){case"input":i=J(e,i),r=J(e,r),l=[];break;case"option":i=ie(e,i),r=ie(e,r),l=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),l=[];break;case"textarea":i=le(e,i),r=le(e,r),l=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Dr)}for(f in ke(n,r),n=null,i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&null!=i[f])if("style"===f){var u=i[f];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(s.hasOwnProperty(f)?l||(l=[]):(l=l||[]).push(f,null));for(f in r){var c=r[f];if(u=null!=i?i[f]:void 0,r.hasOwnProperty(f)&&c!==u&&(null!=c||null!=u))if("style"===f)if(u){for(a in u)!u.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&u[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(l||(l=[]),l.push(f,n)),n=c;else"dangerouslySetInnerHTML"===f?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(l=l||[]).push(f,c)):"children"===f?"string"!=typeof c&&"number"!=typeof c||(l=l||[]).push(f,""+c):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(s.hasOwnProperty(f)?(null!=c&&"onScroll"===f&&Cr("scroll",e),l||u===c||(l=[])):"object"==typeof c&&null!==c&&c.$$typeof===I?c.toString():(l=l||[]).push(f,c))}n&&(l=l||[]).push("style",n);var f=l;(t.updateQueue=f)&&(t.flags|=4)}},qa=function(e,t,n,r){n!==r&&(t.flags|=4)};var il="function"==typeof WeakMap?WeakMap:Map;function al(e,t,n){(n=li(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Vl=r),ol(0,t)},n}function ll(e,t,n){(n=li(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return ol(0,t),r(o)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===ql?ql=new Set([this]):ql.add(this),ol(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var sl="function"==typeof WeakSet?WeakSet:Set;function ul(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Ms(e,t)}else t.current=null}function cl(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Ko(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Wr(t.stateNode.containerInfo))}throw Error(a(163))}function fl(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var o=e;r=o.next,0!=(4&(o=o.tag))&&0!=(1&o)&&(Ls(n,e),Rs(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Ko(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&fi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}fi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&zr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&xt(n)))))}throw Error(a(163))}function dl(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=null!=o&&o.hasOwnProperty("display")?o.display:null,r.style.display=we("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function hl(e,t){if(xo&&"function"==typeof xo.onCommitFiberUnmount)try{xo.onCommitFiberUnmount(wo,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,void 0!==o)if(0!=(4&r))Ls(t,n);else{r=t;try{o()}catch(e){Ms(r,e)}}n=n.next}while(n!==e)}break;case 1:if(ul(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Ms(t,e)}break;case 5:ul(t);break;case 4:bl(e,t)}}function pl(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function gl(e){return 5===e.tag||3===e.tag||4===e.tag}function ml(e){e:{for(var t=e.return;null!==t;){if(gl(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ve(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||gl(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?vl(e,n,t):yl(e,n,t)}function vl(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Dr));else if(4!==r&&null!==(e=e.child))for(vl(e,t,n),e=e.sibling;null!==e;)vl(e,t,n),e=e.sibling}function yl(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(yl(e,t,n),e=e.sibling;null!==e;)yl(e,t,n),e=e.sibling}function bl(e,t){for(var n,r,o=t,i=!1;;){if(!i){i=o.return;e:for(;;){if(null===i)throw Error(a(160));switch(n=i.stateNode,i.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}i=i.return}i=!0}if(5===o.tag||6===o.tag){e:for(var l=e,s=o,u=s;;)if(hl(l,u),null!==u.child&&4!==u.tag)u.child.return=u,u=u.child;else{if(u===s)break e;for(;null===u.sibling;){if(null===u.return||u.return===s)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}r?(l=n,s=o.stateNode,8===l.nodeType?l.parentNode.removeChild(s):l.removeChild(s)):n.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){n=o.stateNode.containerInfo,r=!0,o.child.return=o,o=o.child;continue}}else if(hl(e,o),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(i=!1)}o.sibling.return=o.return,o=o.sibling}}function wl(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3==(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Yr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Se(e,o),t=Se(e,r),o=0;oo&&(o=l),n&=~i}if(n=o,10<(n=(120>(n=$o()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*kl(n/1960))-n)){e.timeoutHandle=Br(Cs.bind(null,e),n);break}Cs(e);break;default:throw Error(a(329))}}return cs(e,$o()),e.callbackNode===t?fs.bind(null,e):null}function ds(e,t){for(t&=~Nl,t&=~Dl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0 component higher in the tree to provide a loading indicator or placeholder to display.")}5!==jl&&(jl=2),s=rl(s,l),d=a;do{switch(d.tag){case 3:i=s,d.flags|=4096,t&=-t,d.lanes|=t,ui(d,al(0,i,t));break e;case 1:i=s;var x=d.type,E=d.stateNode;if(0==(64&d.flags)&&("function"==typeof x.getDerivedStateFromError||null!==E&&"function"==typeof E.componentDidCatch&&(null===ql||!ql.has(E)))){d.flags|=4096,t&=-t,d.lanes|=t,ui(d,ll(d,i,t));break e}}d=d.return}while(null!==d)}_s(n)}catch(e){t=e,Pl===n&&null!==n&&(Pl=n=n.return);continue}break}}function ws(){var e=Sl.current;return Sl.current=Pa,null===e?Pa:e}function xs(e,t){var n=Cl;Cl|=16;var r=ws();for(Ol===e&&Tl===t||ys(e,t);;)try{Es();break}catch(t){bs(e,t)}if(Jo(),Cl=n,Sl.current=r,null!==Pl)throw Error(a(261));return Ol=null,Tl=0,jl}function Es(){for(;null!==Pl;)Ss(Pl)}function ks(){for(;null!==Pl&&!_o();)Ss(Pl)}function Ss(e){var t=Ul(e.alternate,e,Rl);e.memoizedProps=e.pendingProps,null===t?_s(e):Pl=t,_l.current=null}function _s(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=tl(n,t,Rl)))return void(Pl=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&Rl)||0==(4&n.mode)){for(var r=0,o=n.child;null!==o;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1l&&(s=l,l=E,E=s),s=cr(b,E),i=cr(b,l),s&&i&&(1!==x.rangeCount||x.anchorNode!==s.node||x.anchorOffset!==s.offset||x.focusNode!==i.node||x.focusOffset!==i.offset)&&((w=w.createRange()).setStart(s.node,s.offset),x.removeAllRanges(),E>l?(x.addRange(w),x.extend(i.node,i.offset)):(w.setEnd(i.node,i.offset),x.addRange(w))))),w=[];for(x=b;x=x.parentNode;)1===x.nodeType&&w.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"==typeof b.focus&&b.focus(),b=0;b$o()-zl?ys(e,0):Nl|=n),cs(e,t)}function Ds(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Bo()?1:2:(0===ns&&(ns=Ml),0===(t=$t(62914560&~ns))&&(t=4194304))),n=as(),null!==(e=us(e,t))&&(Ut(e,t,n),cs(e,n))}function Ns(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Fs(e,t,n,r){return new Ns(e,t,n,r)}function zs(e){return!(!(e=e.prototype)||!e.isReactComponent)}function $s(e,t){var n=e.alternate;return null===n?((n=Fs(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Bs(e,t,n,r,o,i){var l=2;if(r=e,"function"==typeof e)zs(e)&&(l=1);else if("string"==typeof e)l=5;else e:switch(e){case S:return Us(n.children,o,i,t);case D:l=8,o|=16;break;case _:l=8,o|=1;break;case C:return(e=Fs(12,n,t,8|o)).elementType=C,e.type=C,e.lanes=i,e;case R:return(e=Fs(13,n,t,o)).type=R,e.elementType=R,e.lanes=i,e;case L:return(e=Fs(19,n,t,o)).elementType=L,e.lanes=i,e;case N:return Ws(n,o,i,t);case F:return(e=Fs(24,n,t,o)).elementType=F,e.lanes=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case O:l=10;break e;case P:l=9;break e;case T:l=11;break e;case j:l=14;break e;case A:l=16,r=null;break e;case M:l=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Fs(l,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Us(e,t,n,r){return(e=Fs(7,e,r,t)).lanes=n,e}function Ws(e,t,n,r){return(e=Fs(23,e,r,t)).elementType=N,e.lanes=n,e}function Hs(e,t,n){return(e=Fs(6,e,null,t)).lanes=n,e}function Vs(e,t,n){return(t=Fs(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function qs(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Bt(0),this.expirationTimes=Bt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bt(0),this.mutableSourceEagerHydrationData=null}function Xs(e,t,n){var r=3{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(2967)},1837:(e,t,n)=>{"use strict";n(7320);var r=n(2784),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,i={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)l.call(t,r)&&!s.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:u,ref:c,props:i,_owner:a.current}}t.jsx=u,t.jsxs=u},3426:(e,t,n)=>{"use strict";var r=n(7320),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,l=60110,s=60112;t.Suspense=60113;var u=60115,c=60116;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;o=f("react.element"),i=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),l=f("react.context"),s=f("react.forward_ref"),t.Suspense=f("react.suspense"),u=f("react.memo"),c=f("react.lazy")}var d="function"==typeof Symbol&&Symbol.iterator;function h(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n{"use strict";e.exports=n(3426)},2322:(e,t,n)=>{"use strict";e.exports=n(1837)},5047:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),a=new P(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw i;return R()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=_(a,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var s=c(e,t,n);if("normal"===s.type){if(r=n.done?p:d,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=p,n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f="suspendedStart",d="suspendedYield",h="executing",p="completed",g={};function m(){}function v(){}function y(){}var b={};s(b,i,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(T([])));x&&x!==n&&r.call(x,i)&&(b=x);var E=y.prototype=m.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,i,a,l){var s=c(e[o],e,i);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(f).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,l)}))}l(s.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function _(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,_(e,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=c(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function T(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},6475:(e,t)=>{"use strict";var n,r,o,i;if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,c=null,f=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(f,0),e}};n=function(e){null!==u?setTimeout(n,0,e):(u=e,setTimeout(f,0))},r=function(e,t){c=setTimeout(e,t)},o=function(){clearTimeout(c)},t.unstable_shouldYield=function(){return!1},i=t.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var p=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,m=null,v=-1,y=5,b=0;t.unstable_shouldYield=function(){return t.unstable_now()>=b},i=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,o=e[r];if(!(void 0!==o&&0<_(o,t)))break e;e[r]=t,e[n]=o,n=r}}function k(e){return void 0===(e=e[0])?null:e}function S(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r_(a,n))void 0!==s&&0>_(s,a)?(e[r]=s,e[l]=n,r=l):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==s&&0>_(s,n)))break e;e[r]=s,e[l]=n,r=l}}}return t}return null}function _(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],O=[],P=1,T=null,R=3,L=!1,j=!1,A=!1;function M(e){for(var t=k(O);null!==t;){if(null===t.callback)S(O);else{if(!(t.startTime<=e))break;S(O),t.sortIndex=t.expirationTime,E(C,t)}t=k(O)}}function I(e){if(A=!1,M(e),!j)if(null!==k(C))j=!0,n(D);else{var t=k(O);null!==t&&r(I,t.startTime-e)}}function D(e,n){j=!1,A&&(A=!1,o()),L=!0;var i=R;try{for(M(n),T=k(C);null!==T&&(!(T.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=T.callback;if("function"==typeof a){T.callback=null,R=T.priorityLevel;var l=a(T.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?T.callback=l:T===k(C)&&S(C),M(n)}else S(C);T=k(C)}if(null!==T)var s=!0;else{var u=k(O);null!==u&&r(I,u.startTime-n),s=!1}return s}finally{T=null,R=i,L=!1}}var N=i;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){j||L||(j=!0,n(D))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return k(C)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=N,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,i,a){var l=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0l?(e.sortIndex=a,E(O,e),null===k(C)&&e===k(O)&&(A?o():A=!0,r(I,a-l))):(e.sortIndex=s,E(C,e),j||L||(j=!0,n(D))),e},t.unstable_wrapCallback=function(e){var t=R;return function(){var n=R;R=t;try{return e.apply(this,arguments)}finally{R=n}}}},4616:(e,t,n)=>{"use strict";e.exports=n(6475)},2778:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".article-inner-css * {\n max-width: 100%;\n}\n\n:root {\n color-scheme: light dark;\n}\n\n.highlight {\n color: var(--colors-highlightText);\n background-color: var(--colors-highlightBackground);\n cursor: pointer;\n}\n\n.highlight_with_note {\n color: var(--colors-highlightText);\n border-bottom: 2px var(--colors-highlightBackground) solid;\n border-radius: 2px;\n cursor: pointer;\n}\n\n.article-inner-css .highlight_with_note .highlight_note_button {\n display: unset !important;\n margin: 0px !important;\n max-width: unset !important;\n height: unset !important;\n padding: 0px 8px;\n cursor: pointer;\n}\n/* \non smaller screens we display the note icon\n@media (max-width: 768px) {\n .highlight_with_note.last_element:after { \n content: url(/static/icons/highlight-note-icon.svg);\n padding: 0 3px;\n cursor: pointer;\n }\n} */\n\n.article-inner-css h1,\n.article-inner-css h2,\n.article-inner-css h3,\n.article-inner-css h4,\n.article-inner-css h5,\n.article-inner-css h6 {\n margin-block-start: 0.83em;\n margin-block-end: 0.83em;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n line-height: var(--line-height);\n font-size: var(--text-font-size);\n color: var(--headers-color);\n font-weight: bold;\n}\n.article-inner-css h1 {\n font-size: 1.5em !important;\n line-height: 1.4em !important;\n}\n.article-inner-css h2 {\n font-size: 1.43em !important;\n}\n.article-inner-css h3 {\n font-size: 1.25em !important;\n}\n.article-inner-css h4,\n.article-inner-css h5,\n.article-inner-css h6 {\n font-size: 1em !important;\n margin: 1em 0 !important;\n}\n\n.article-inner-css .scrollable {\n overflow: auto;\n}\n\n.article-inner-css div {\n line-height: var(--line-height);\n /* font-size: var(--text-font-size); */\n color: var(--font-color);\n}\n\n.article-inner-css p {\n font-family: var(--text-font-family);\n font-style: normal;\n font-weight: normal;\n\n color: var(--font-color);\n\n display: block;\n margin-block-start: 1em;\n margin-block-end: 1em;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n\n > img {\n display: block;\n margin: 0.5em auto !important;\n max-width: 100% !important;\n }\n\n > iframe {\n width: 100%;\n height: 350px;\n }\n}\n\n.article-inner-css section {\n line-height: 1.65em;\n font-size: var(--text-font-size);\n}\n\n.article-inner-css blockquote {\n display: block;\n border-left: 1px solid var(--font-color-transparent);\n padding-left: 16px;\n font-style: italic;\n margin-inline-start: 0px;\n > * {\n font-style: italic;\n }\n p:last-of-type {\n margin-bottom: 0;\n }\n}\n\n.article-inner-css a {\n color: var(--font-color-readerFont);\n}\n\n.article-inner-css .highlight a {\n color: var(--colors-highlightText);\n}\n\n.article-inner-css figure {\n * {\n color: var(--font-color-transparent);\n }\n\n margin: 30px 0;\n font-size: 0.75em;\n line-height: 1.5em;\n\n figcaption {\n color: var(--font-color);\n opacity: 0.7;\n margin: 10px 20px 10px 0;\n }\n\n figcaption * {\n color: var(--font-color);\n opacity: 0.7;\n }\n figcaption a {\n color: var(--font-color);\n /* margin: 10px 20px 10px 0; */\n opacity: 0.6;\n }\n\n > div {\n max-width: 100%;\n }\n}\n\n.article-inner-css figure[aria-label='media'] {\n margin: var(--figure-margin);\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.article-inner-css hr {\n margin-bottom: var(--hr-margin);\n border: none;\n}\n\n.article-inner-css table {\n display: block;\n word-break: normal;\n white-space: nowrap;\n border: 1px solid rgb(216, 216, 216);\n border-spacing: 0;\n border-collapse: collapse;\n font-size: 0.8rem;\n margin: auto;\n line-height: 1.5em;\n font-size: 0.9em;\n max-width: -moz-fit-content;\n max-width: fit-content;\n margin: 0 auto;\n overflow-x: auto;\n caption {\n margin: 0.5em 0;\n }\n th {\n border: 1px solid rgb(216, 216, 216);\n background-color: var(--table-header-color);\n padding: 5px;\n }\n td {\n border: 1px solid rgb(216, 216, 216);\n padding: 0.5em;\n padding: 5px;\n }\n\n p {\n margin: 0;\n padding: 0;\n }\n\n img {\n display: block;\n margin: 0.5em auto !important;\n max-width: 100% !important;\n }\n}\n\n.article-inner-css ul,\n.article-inner-css ol {\n margin-block-start: 1em;\n margin-block-end: 1em;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n padding-inline-start: 40px;\n margin-top: 18px;\n\n font-family: var(--text-font-family);\n font-style: normal;\n font-weight: normal;\n\n line-height: var(--line-height);\n font-size: var(--text-font-size);\n\n color: var(--font-color);\n}\n\n.article-inner-css li {\n word-break: break-word;\n ol,\n ul {\n margin: 0;\n }\n}\n\n.article-inner-css sup,\n.article-inner-css sub {\n position: relative;\n a {\n color: inherit;\n pointer-events: none;\n }\n}\n\n.article-inner-css sup {\n top: -0.3em;\n}\n\n.article-inner-css sub {\n bottom: 0.3em;\n}\n\n.article-inner-css cite {\n font-style: normal;\n}\n\n.article-inner-css .page {\n width: 100%;\n}\n\n/* Collapse excess whitespace. */\n.page p > p:empty,\n.page div > p:empty,\n.page p > div:empty,\n.page div > div:empty,\n.page p + br,\n.page p > br:only-child,\n.page div > br:only-child,\n.page img + br {\n display: none;\n}\n\n.article-inner-css video {\n max-width: 100%;\n}\n\n.article-inner-css dl {\n display: block;\n margin-block-start: 1em;\n margin-block-end: 1em;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n}\n\n.article-inner-css dd {\n display: block;\n margin-inline-start: 40px;\n}\n\n.article-inner-css pre,\n.article-inner-css code {\n vertical-align: bottom;\n word-wrap: initial;\n font-family: 'SF Mono', monospace !important;\n white-space: pre;\n direction: ltr;\n unicode-bidi: embed;\n color: var(--font-color);\n max-width: -moz-fit-content;\n margin: 0;\n overflow-x: auto;\n word-wrap: normal;\n border-radius: 4px;\n}\n\n.article-inner-css img {\n display: block;\n margin: 0.5em auto !important;\n max-width: 100% !important;\n height: auto;\n}\n\n.article-inner-css .page {\n text-align: start;\n word-wrap: break-word;\n\n font-size: var(--text-font-size);\n line-height: var(--line-height);\n}\n\n.article-inner-css .omnivore-instagram-embed {\n img {\n margin: 0 !important;\n }\n}\n\n\n",""]);const l=a},7420:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,"html,\nbody {\n padding: 0;\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,\n Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n line-height: 1.6;\n font-size: 18px;\n}\n\n.disable-webkit-callout {\n -webkit-touch-callout: none;\n}\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\ndiv#appleid-signin {\n min-width: 300px;\n min-height: 40px;\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 200;\n font-style: normal;\n src: url(Inter-ExtraLight-200.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 300;\n font-style: normal;\n src: url(Inter-Light-300.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 400;\n font-style: normal;\n src: url(Inter-Regular-400.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 500;\n font-style: normal;\n src: url(Inter-Medium-500.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 600;\n font-style: normal;\n src: url(Inter-SemiBold-600.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 700;\n font-style: normal;\n src: url(Inter-Bold-700.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 800;\n font-style: normal;\n src: url(Inter-ExtraBold-800.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 900;\n font-style: normal;\n src: url(Inter-Black-900.ttf);\n}\n\n@font-face {\n font-family: 'Lora';\n font-weight: 400;\n font-style: normal;\n src: url(Lora-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Lora';\n font-weight: 700;\n font-style: normal;\n src: url(Lora-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Lora';\n font-weight: 400;\n font-style: italic;\n src: url(Lora-Italic.ttf);\n}\n\n@font-face {\n font-family: 'Merriweather';\n font-weight: 400;\n font-style: normal;\n src: url(Merriweather-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Merriweather';\n font-weight: 700;\n font-style: normal;\n src: url(Merriweather-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Merriweather';\n font-weight: 400;\n font-style: italic;\n src: url(Merriweather-Italic.ttf);\n}\n\n@font-face {\n font-family: 'Open Sans';\n font-weight: 400;\n font-style: normal;\n src: url(OpenSans-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Open Sans';\n font-weight: 700;\n font-style: normal;\n src: url(OpenSans-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Open Sans';\n font-weight: 400;\n font-style: italic;\n src: url(OpenSans-Italic.ttf);\n}\n\n@font-face {\n font-family: 'Roboto';\n font-weight: 400;\n font-style: normal;\n src: url(Roboto-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Roboto';\n font-weight: 700;\n font-style: normal;\n src: url(Roboto-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Roboto';\n font-weight: 400;\n font-style: italic;\n src: url(Roboto-Italic.ttf);\n}\n\n@font-face {\n font-family: 'Crimson Text';\n font-weight: 400;\n font-style: normal;\n src: url(CrimsonText-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Crimson Text';\n font-weight: 700;\n font-style: normal;\n src: url(CrimsonText-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Crimson Text';\n font-weight: 400;\n font-style: italic;\n src: url(CrimsonText-Italic.ttf);\n}\n\n@font-face {\n font-family: 'OpenDyslexic';\n font-weight: 400;\n font-style: normal;\n src: url(OpenDyslexicAlta-Regular.otf);\n}\n\n@font-face {\n font-family: 'OpenDyslexic';\n font-weight: 700;\n font-style: normal;\n src: url(OpenDyslexicAlta-Bold.otf);\n}\n\n@font-face {\n font-family: 'OpenDyslexic';\n font-weight: 400;\n font-style: italic;\n src: url(OpenDyslexicAlta-Italic.otf);\n}\n\n@font-face {\n font-family: 'Source Serif Pro';\n font-weight: 400;\n font-style: normal;\n src: url(SourceSerifPro-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Source Serif Pro';\n font-weight: 700;\n font-style: normal;\n src: url(SourceSerifPro-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Source Serif Pro';\n font-weight: 400;\n font-style: italic;\n src: url(SourceSerifPro-Italic.ttf);\n}\n\n@font-face {\n font-family: 'SF Mono';\n font-weight: 400;\n font-style: normal;\n src: url(SFMonoRegular.otf);\n}\n\n.dropdown-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n vertical-align: middle;\n border-style: solid;\n border-width: 4px 4px 0;\n border-right-color: transparent;\n border-bottom-color: transparent;\n border-left-color: transparent;\n}\n\n.slider {\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n height: 1px;\n background: var(--colors-grayBorderHover);\n}\n\n.slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 16px !important;\n height: 16px;\n border-radius: 50%;\n background: var(--colors-utilityTextContrast);\n cursor: pointer;\n}\n\n.slider::-moz-range-thumb {\n -webkit-appearance: none;\n width: 16px !important;\n height: 16px;\n border-radius: 50%;\n background: var(--colors-utilityTextContrast);\n cursor: pointer;\n}\n\ninput[type=range]::-webkit-slider-thumb {\n -webkit-appearance: none;\n border: none;\n height: 16px;\n width: 16px;\n border-radius: 50%;\n background: var(--colors-grayTextContrast);\n}\n\nbutton {\n padding: 0px;\n margin: 0px;\n}",""]);const l=a},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var l=0;l0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},3379:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={id:e,exports:{}};return n[e].call(i.exports,i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var l=2&r&&n;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,o.d(i,a),i},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}var n,r,i,a=o(7162),l=o.n(a),s=o(2784),u=o.t(s,2),c=o(8316),f="colors",d="sizes",h="space",p={gap:h,gridGap:h,columnGap:h,gridColumnGap:h,rowGap:h,gridRowGap:h,inset:h,insetBlock:h,insetBlockEnd:h,insetBlockStart:h,insetInline:h,insetInlineEnd:h,insetInlineStart:h,margin:h,marginTop:h,marginRight:h,marginBottom:h,marginLeft:h,marginBlock:h,marginBlockEnd:h,marginBlockStart:h,marginInline:h,marginInlineEnd:h,marginInlineStart:h,padding:h,paddingTop:h,paddingRight:h,paddingBottom:h,paddingLeft:h,paddingBlock:h,paddingBlockEnd:h,paddingBlockStart:h,paddingInline:h,paddingInlineEnd:h,paddingInlineStart:h,top:h,right:h,bottom:h,left:h,scrollMargin:h,scrollMarginTop:h,scrollMarginRight:h,scrollMarginBottom:h,scrollMarginLeft:h,scrollMarginX:h,scrollMarginY:h,scrollMarginBlock:h,scrollMarginBlockEnd:h,scrollMarginBlockStart:h,scrollMarginInline:h,scrollMarginInlineEnd:h,scrollMarginInlineStart:h,scrollPadding:h,scrollPaddingTop:h,scrollPaddingRight:h,scrollPaddingBottom:h,scrollPaddingLeft:h,scrollPaddingX:h,scrollPaddingY:h,scrollPaddingBlock:h,scrollPaddingBlockEnd:h,scrollPaddingBlockStart:h,scrollPaddingInline:h,scrollPaddingInlineEnd:h,scrollPaddingInlineStart:h,fontSize:"fontSizes",background:f,backgroundColor:f,backgroundImage:f,borderImage:f,border:f,borderBlock:f,borderBlockEnd:f,borderBlockStart:f,borderBottom:f,borderBottomColor:f,borderColor:f,borderInline:f,borderInlineEnd:f,borderInlineStart:f,borderLeft:f,borderLeftColor:f,borderRight:f,borderRightColor:f,borderTop:f,borderTopColor:f,caretColor:f,color:f,columnRuleColor:f,fill:f,outline:f,outlineColor:f,stroke:f,textDecorationColor:f,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:d,minBlockSize:d,maxBlockSize:d,inlineSize:d,minInlineSize:d,maxInlineSize:d,width:d,minWidth:d,maxWidth:d,height:d,minHeight:d,maxHeight:d,flexBasis:d,gridTemplateColumns:d,gridTemplateRows:d,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},g=(e,t)=>"function"==typeof t?{"()":Function.prototype.toString.call(t)}:t,m=()=>{const e=Object.create(null);return(t,n,...r)=>{const o=(e=>JSON.stringify(e,g))(t);return o in e?e[o]:e[o]=n(t,...r)}},v=Symbol.for("sxs.internal"),y=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),b=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:w}=Object.prototype,x=e=>e.includes("-")?e:e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),E=/\s+(?![^()]*\))/,k=e=>t=>e(..."string"==typeof t?String(t).split(E):[t]),S={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backdropFilter:e=>({WebkitBackdropFilter:e,backdropFilter:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),boxDecorationBreak:e=>({WebkitBoxDecorationBreak:e,boxDecorationBreak:e}),clipPath:e=>({WebkitClipPath:e,clipPath:e}),content:e=>({content:e.includes('"')||e.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e)?e:`"${e}"`}),hyphens:e=>({WebkitHyphens:e,hyphens:e}),maskImage:e=>({WebkitMaskImage:e,maskImage:e}),maskSize:e=>({WebkitMaskSize:e,maskSize:e}),tabSize:e=>({MozTabSize:e,tabSize:e}),textSizeAdjust:e=>({WebkitTextSizeAdjust:e,textSizeAdjust:e}),userSelect:e=>({WebkitUserSelect:e,userSelect:e}),marginBlock:k(((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e}))),marginInline:k(((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e}))),maxSize:k(((e,t)=>({maxBlockSize:e,maxInlineSize:t||e}))),minSize:k(((e,t)=>({minBlockSize:e,minInlineSize:t||e}))),paddingBlock:k(((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e}))),paddingInline:k(((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e})))},_=/([\d.]+)([^]*)/,C=(e,t)=>e.length?e.reduce(((e,n)=>(e.push(...t.map((e=>e.includes("&")?e.replace(/&/g,/[ +>|~]/.test(n)&&/&.*&/.test(e)?`:is(${n})`:n):n+" "+e))),e)),[]):t,O=(e,t)=>e in P&&"string"==typeof t?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,((t,n,r,o)=>n+("stretch"===r?`-moz-available${o};${x(e)}:${n}-webkit-fill-available`:`-moz-fit-content${o};${x(e)}:${n}fit-content`)+o)):String(t),P={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},T=e=>e?e+"-":"",R=(e,t,n)=>e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,((e,r,o,i,a)=>"$"==i==!!o?e:(r||"--"==i?"calc(":"")+"var(--"+("$"===i?T(t)+(a.includes("$")?"":T(n))+a.replace(/\$/g,"-"):a)+")"+(r||"--"==i?"*"+(r||"")+(o||"1")+")":""))),L=/\s*,\s*(?![^()]*\))/,j=Object.prototype.toString,A=(e,t,n,r,o)=>{let i,a,l;const s=(e,t,n)=>{let u,c;const f=e=>{for(u in e){const p=64===u.charCodeAt(0),g=p&&Array.isArray(e[u])?e[u]:[e[u]];for(c of g){const e=/[A-Z]/.test(h=u)?h:h.replace(/-[^]/g,(e=>e[1].toUpperCase())),g="object"==typeof c&&c&&c.toString===j&&(!r.utils[e]||!t.length);if(e in r.utils&&!g){const t=r.utils[e];if(t!==a){a=t,f(t(c)),a=null;continue}}else if(e in S){const t=S[e];if(t!==l){l=t,f(t(c)),l=null;continue}}if(p&&(d=u.slice(1)in r.media?"@media "+r.media[u.slice(1)]:u,u=d.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,((e,t,n,r,o,i)=>{const a=_.test(t),l=.0625*(a?-1:1),[s,u]=a?[r,t]:[t,r];return"("+("="===n[0]?"":">"===n[0]===a?"max-":"min-")+s+":"+("="!==n[0]&&1===n.length?u.replace(_,((e,t,r)=>Number(t)+l*(">"===n?1:-1)+r)):u)+(o?") and ("+(">"===o[0]?"min-":"max-")+s+":"+(1===o.length?i.replace(_,((e,t,n)=>Number(t)+l*(">"===o?-1:1)+n)):i):"")+")"}))),g){const e=p?n.concat(u):[...n],r=p?[...t]:C(t,u.split(L));void 0!==i&&o(M(...i)),i=void 0,s(c,r,e)}else void 0===i&&(i=[[],t,n]),u=p||36!==u.charCodeAt(0)?u:`--${T(r.prefix)}${u.slice(1).replace(/\$/g,"-")}`,c=g?c:"number"==typeof c?c&&e in I?String(c)+"px":String(c):R(O(e,null==c?"":c),r.prefix,r.themeMap[e]),i[0].push(`${p?`${u} `:`${x(u)}:`}${c}`)}}var d,h};f(e),void 0!==i&&o(M(...i)),i=void 0};s(e,t,n)},M=(e,t,n)=>`${n.map((e=>`${e}{`)).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(n.length?n.length+1:0).join("}")}`,I={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},D=e=>String.fromCharCode(e+(e>25?39:97)),N=e=>(e=>{let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=D(t%52)+n;return D(t%52)+n})(((e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e})(5381,JSON.stringify(e))>>>0),F=["themed","global","styled","onevar","resonevar","allvar","inline"],z=e=>{if(e.href&&!e.href.startsWith(location.origin))return!1;try{return!!e.cssRules}catch(e){return!1}},$=e=>{let t;const n=()=>{const{cssRules:e}=t.sheet;return[].map.call(e,((n,r)=>{const{cssText:o}=n;let i="";if(o.startsWith("--sxs"))return"";if(e[r-1]&&(i=e[r-1].cssText).startsWith("--sxs")){if(!n.cssRules.length)return"";for(const e in t.rules)if(t.rules[e].group===n)return`--sxs{--sxs:${[...t.rules[e].cache].join(" ")}}${o}`;return n.cssRules.length?`${i}${o}`:""}return o})).join("")},r=()=>{if(t){const{rules:e,sheet:n}=t;if(!n.deleteRule){for(;3===Object(Object(n.cssRules)[0]).type;)n.cssRules.splice(0,1);n.cssRules=[]}for(const t in e)delete e[t]}const o=Object(e).styleSheets||[];for(const e of o)if(z(e)){for(let o=0,i=e.cssRules;i[o];++o){const a=Object(i[o]);if(1!==a.type)continue;const l=Object(i[o+1]);if(4!==l.type)continue;++o;const{cssText:s}=a;if(!s.startsWith("--sxs"))continue;const u=s.slice(14,-3).trim().split(/\s+/),c=F[u[0]];c&&(t||(t={sheet:e,reset:r,rules:{},toString:n}),t.rules[c]={group:l,index:o,cache:new Set(u)})}if(t)break}if(!t){const o=(e,t)=>({type:t,cssRules:[],insertRule(e,t){this.cssRules.splice(t,0,o(e,{import:3,undefined:1}[(e.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return"@media{}"===e?`@media{${[].map.call(this.cssRules,(e=>e.cssText)).join("")}}`:e}});t={sheet:e?(e.head||e).appendChild(document.createElement("style")).sheet:o("","text/css"),rules:{},reset:r,toString:n}}const{sheet:i,rules:a}=t;for(let e=F.length-1;e>=0;--e){const t=F[e];if(!a[t]){const n=F[e+1],r=a[n]?a[n].index:i.cssRules.length;i.insertRule("@media{}",r),i.insertRule(`--sxs{--sxs:${e}}`,r),a[t]={group:i.cssRules[r+1],index:r,cache:new Set([e])}}B(a[t])}};return r(),t},B=e=>{const t=e.group;let n=t.cssRules.length;e.apply=e=>{try{t.insertRule(e,n),++n}catch(e){}}},U=Symbol(),W=m(),H=(e,t)=>W(e,(()=>(...n)=>{let r={type:null,composers:new Set};for(const t of n)if(null!=t)if(t[v]){null==r.type&&(r.type=t[v].type);for(const e of t[v].composers)r.composers.add(e)}else t.constructor!==Object||t.$$typeof?null==r.type&&(r.type=t):r.composers.add(V(t,e));return null==r.type&&(r.type="span"),r.composers.size||r.composers.add(["PJLV",{},[],[],{},[]]),q(e,r,t)})),V=({variants:e,compoundVariants:t,defaultVariants:n,...r},o)=>{const i=`${T(o.prefix)}c-${N(r)}`,a=[],l=[],s=Object.create(null),u=[];for(const e in n)s[e]=String(n[e]);if("object"==typeof e&&e)for(const t in e){c=s,f=t,w.call(c,f)||(s[t]="undefined");const n=e[t];for(const e in n){const r={[t]:String(e)};"undefined"===String(e)&&u.push(t);const o=n[e],i=[r,o,!b(o)];a.push(i)}}var c,f;if("object"==typeof t&&t)for(const e of t){let{css:t,...n}=e;t="object"==typeof t&&t||{};for(const e in n)n[e]=String(n[e]);const r=[n,t,!b(t)];l.push(r)}return[i,r,a,l,s,u]},q=(e,t,n)=>{const[r,o,i,a]=X(t.composers),l="function"==typeof t.type||t.type.$$typeof?(e=>{function t(){for(let n=0;nt.rules[e]={apply:n=>t[U].push([e,n])})),t})(n):null,s=(l||n).rules,u=`.${r}${o.length>1?`:where(.${o.slice(1).join(".")})`:""}`,c=c=>{c="object"==typeof c&&c||Y;const{css:f,...d}=c,h={};for(const e in i)if(delete d[e],e in c){let t=c[e];"object"==typeof t&&t?h[e]={"@initial":i[e],...t}:(t=String(t),h[e]="undefined"!==t||a.has(e)?t:i[e])}else h[e]=i[e];const p=new Set([...o]);for(const[r,o,i,a]of t.composers){n.rules.styled.cache.has(r)||(n.rules.styled.cache.add(r),A(o,[`.${r}`],[],e,(e=>{s.styled.apply(e)})));const t=K(i,h,e.media),l=K(a,h,e.media,!0);for(const o of t)if(void 0!==o)for(const[t,i,a]of o){const o=`${r}-${N(i)}-${t}`;p.add(o);const l=(a?n.rules.resonevar:n.rules.onevar).cache,u=a?s.resonevar:s.onevar;l.has(o)||(l.add(o),A(i,[`.${o}`],[],e,(e=>{u.apply(e)})))}for(const t of l)if(void 0!==t)for(const[o,i]of t){const t=`${r}-${N(i)}-${o}`;p.add(t),n.rules.allvar.cache.has(t)||(n.rules.allvar.cache.add(t),A(i,[`.${t}`],[],e,(e=>{s.allvar.apply(e)})))}}if("object"==typeof f&&f){const t=`${r}-i${N(f)}-css`;p.add(t),n.rules.inline.cache.has(t)||(n.rules.inline.cache.add(t),A(f,[`.${t}`],[],e,(e=>{s.inline.apply(e)})))}for(const e of String(c.className||"").trim().split(/\s+/))e&&p.add(e);const g=d.className=[...p].join(" ");return{type:t.type,className:g,selector:u,props:d,toString:()=>g,deferredInjector:l}};return y(c,{className:r,selector:u,[v]:t,toString:()=>(n.rules.styled.cache.has(r)||c(),r)})},X=e=>{let t="";const n=[],r={},o=[];for(const[i,,,,a,l]of e){""===t&&(t=i),n.push(i),o.push(...l);for(const e in a){const t=a[e];(void 0===r[e]||"undefined"!==t||l.includes(t))&&(r[e]=t)}}return[t,n,r,new Set(o)]},K=(e,t,n,r)=>{const o=[];e:for(let[i,a,l]of e){if(l)continue;let e,s=0,u=!1;for(e in i){const r=i[e];let o=t[e];if(o!==r){if("object"!=typeof o||!o)continue e;{let e,t,i=0;for(const a in o){if(r===String(o[a])){if("@initial"!==a){const e=a.slice(1);(t=t||[]).push(e in n?n[e]:a.replace(/^@media ?/,"")),u=!0}s+=i,e=!0}++i}if(t&&t.length&&(a={["@media "+t.join(", ")]:a}),!e)continue e}}}(o[s]=o[s]||[]).push([r?"cv":`${e}-${i[e]}`,a,u])}return o},Y={},G=m(),Q=(e,t)=>G(e,(()=>(...n)=>{const r=()=>{for(let r of n){r="object"==typeof r&&r||{};let n=N(r);if(!t.rules.global.cache.has(n)){if(t.rules.global.cache.add(n),"@import"in r){let e=[].indexOf.call(t.sheet.cssRules,t.rules.themed.group)-1;for(let n of[].concat(r["@import"]))n=n.includes('"')||n.includes("'")?n:`"${n}"`,t.sheet.insertRule(`@import ${n};`,e++);delete r["@import"]}A(r,[],[],e,(e=>{t.rules.global.apply(e)}))}}return""};return y(r,{toString:r})})),Z=m(),J=(e,t)=>Z(e,(()=>n=>{const r=`${T(e.prefix)}k-${N(n)}`,o=()=>{if(!t.rules.global.cache.has(r)){t.rules.global.cache.add(r);const o=[];A(n,[],[],e,(e=>o.push(e)));const i=`@keyframes ${r}{${o.join("")}}`;t.rules.global.apply(i)}return r};return y(o,{get name(){return o()},toString:o})})),ee=class{constructor(e,t,n,r){this.token=null==e?"":String(e),this.value=null==t?"":String(t),this.scale=null==n?"":String(n),this.prefix=null==r?"":String(r)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+T(this.prefix)+T(this.scale)+this.token}toString(){return this.computedValue}},te=m(),ne=(e,t)=>te(e,(()=>(n,r)=>{r="object"==typeof n&&n||Object(r);const o=`.${n=(n="string"==typeof n?n:"")||`${T(e.prefix)}t-${N(r)}`}`,i={},a=[];for(const t in r){i[t]={};for(const n in r[t]){const o=`--${T(e.prefix)}${t}-${n}`,l=R(String(r[t][n]),e.prefix,t);i[t][n]=new ee(n,l,t,e.prefix),a.push(`${o}:${l}`)}}const l=()=>{if(a.length&&!t.rules.themed.cache.has(n)){t.rules.themed.cache.add(n);const o=`${r===e.theme?":root,":""}.${n}{${a.join(";")}}`;t.rules.themed.apply(o)}return n};return{...i,get className(){return l()},selector:o,toString:l}})),re=m(),oe=m(),ie=e=>{const t=(e=>{let t=!1;const n=re(e,(e=>{t=!0;const n="prefix"in(e="object"==typeof e&&e||{})?String(e.prefix):"",r="object"==typeof e.media&&e.media||{},o="object"==typeof e.root?e.root||null:globalThis.document||null,i="object"==typeof e.theme&&e.theme||{},a={prefix:n,media:r,theme:i,themeMap:"object"==typeof e.themeMap&&e.themeMap||{...p},utils:"object"==typeof e.utils&&e.utils||{}},l=$(o),s={css:H(a,l),globalCss:Q(a,l),keyframes:J(a,l),createTheme:ne(a,l),reset(){l.reset(),s.theme.toString()},theme:{},sheet:l,config:a,prefix:n,getCssText:l.toString,toString:l.toString};return String(s.theme=s.createTheme(i)),s}));return t||n.reset(),n})(e);return t.styled=(({config:e,sheet:t})=>oe(e,(()=>{const n=H(e,t);return(...e)=>{const t=n(...e),r=t[v].type,o=s.forwardRef(((e,n)=>{const o=e&&e.as||r,{props:i,deferredInjector:a}=t(e);return delete i.as,i.ref=n,a?s.createElement(s.Fragment,null,s.createElement(o,i),s.createElement(a,null)):s.createElement(o,i)}));return o.className=t.className,o.displayName=`Styled.${r.displayName||r.name||r}`,o.selector=t.selector,o.toString=()=>t.selector,o[v]=t[v],o}})))(t),t},ae=()=>n||(n=ie()),le=(...e)=>ae().createTheme(...e),se=(...e)=>ae().keyframes(...e),ue=(...e)=>ae().styled(...e);(i=r||(r={})).Lighter="White",i.Light="LightGray",i.Dark="Gray",i.Darker="Dark";var ce=ie({utils:{bg:function(e){return{backgroundColor:e}},p:function(e){return{padding:e}},pt:function(e){return{paddingTop:e}},pb:function(e){return{paddingBottom:e}},pl:function(e){return{paddingLeft:e}},pr:function(e){return{paddingRight:e}},px:function(e){return{paddingLeft:e,paddingRight:e}},py:function(e){return{paddingTop:e,paddingBottom:e}},m:function(e){return{margin:e}},mt:function(e){return{marginTop:e}},mb:function(e){return{marginBottom:e}},ml:function(e){return{marginLeft:e}},mr:function(e){return{marginRight:e}},mx:function(e){return{marginLeft:e,marginRight:e}},my:function(e){return{marginTop:e,marginBottom:e}}},theme:{fonts:{inter:"Inter, sans-serif"},fontSizes:{1:"0.75em",2:"0.875em",3:"1em",4:"1.25em",5:"1.5em",6:"2em"},space:{1:"0.25em",2:"0.5em",3:"1em",4:"2em",5:"4em",6:"8em"},sizes:{1:"0.25em",2:"0.5em",3:"1em",4:"2em",5:"4em",6:"8em"},radii:{1:"0.125em",2:"0.25em",3:"0.5em",round:"9999px"},fontWeights:{},lineHeights:{},letterSpacings:{},borderWidths:{},borderStyles:{},shadows:{panelShadow:"0px 4px 18px rgba(120, 123, 134, 0.12)",cardBoxShadow:"0px 0px 4px 0px rgba(0, 0, 0, 0.1)"},zIndices:{},transitions:{},colors:{grayBase:"#F8F8F8",grayBg:"#FFFFFF",grayBgActive:"#e6e6e6",grayBorder:"rgba(0, 0, 0, 0.06)",grayTextContrast:"#3A3939",graySolid:"#9C9B9A",grayBgSubtle:"hsl(0 0% 97.3%)",grayBgHover:"hsl(0 0% 93.0%)",grayLine:"hsl(0 0% 88.7%)",grayBorderHover:"hsl(0 0% 78.0%)",grayText:"hsl(0 0% 43.5%)",highlightBackground:"rgba(255, 210, 52, 0.65)",highlight:"#FFD234",highlightText:"#3D3D3D",error:"#FA5E4A",omnivoreRed:"#FA5E4A;",omnivoreGray:"#3D3D3D",omnivoreOrange:"#FF9B3E",omnivorePeach:"rgb(255, 212, 146)",omnivoreYellow:"rgb(255, 234, 159)",omnivoreLightGray:"rgb(125, 125, 125)",omnivoreCtaYellow:"rgb(255, 210, 52)",readerBg:"#E5E5E5",readerFont:"#3D3D3D",readerFontHighContrast:"black",readerFontTransparent:"rgba(61,61,61,0.65)",readerHeader:"3D3D3D",readerTableHeader:"#FFFFFF",avatarBg:"#FFFFFF",avatarFont:"#0A0806",labelButtonsBg:"#F5F5F4",tooltipIcons:"#FDFAEC",textDefault:"rgba(10, 8, 6, 0.8)",textSubtle:"rgba(10, 8, 6, 0.65)",textNonEssential:"rgba(10, 8, 6, 0.4)",overlay:"rgba(63, 62, 60, 0.2)"}},media:{xsmDown:"(max-width: 375px)",smDown:"(max-width: 575px)",mdDown:"(max-width: 768px)",lgDown:"(max-width: 992px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)"}}),fe=ce.styled,de=(ce.css,ce.theme),he=(ce.getCssText,ce.globalCss),pe=ce.keyframes,ge=(ce.config,{colors:{grayBase:"#252525",grayBg:"#3B3938",grayBgActive:"#4f4d4c",grayTextContrast:"#D8D7D7",grayBorder:"rgba(255, 255, 255, 0.06)",graySolid:"#9C9B9A",grayBgSubtle:"hsl(0 0% 9.8%)",grayBgHover:"hsl(0 0% 13.8%)",grayLine:"hsl(0 0% 19.9%)",grayBorderHover:"hsl(0 0% 31.2%)",grayText:"hsl(0 0% 62.8%)",highlightBackground:"#867740",highlight:"#FFD234",highlightText:"white",error:"#FA5E4A",readerBg:"#303030",readerFont:"#b9b9b9",readerFontHighContrast:"white",readerFontTransparent:"rgba(185,185,185,0.65)",readerHeader:"#b9b9b9",readerTableHeader:"#FFFFFF",tooltipIcons:"#5F5E58",avatarBg:"#000000",avatarFont:"rgba(255, 255, 255, 0.8)",textDefault:"rgba(255, 255, 255, 0.8)",textSubtle:"rgba(255, 255, 255, 0.65)",textNonEssential:"rgba(10, 8, 6, 0.4)",overlay:"rgba(10, 8, 6, 0.65)",labelButtonsBg:"#5F5E58"},shadows:{cardBoxShadow:"0px 0px 9px -2px rgba(255, 255, 255, 0.09), 0px 7px 12px rgba(255, 255, 255, 0.07)"}}),me=le(r.Dark,ge),ve=le(r.Darker,ge),ye=le(r.Lighter,{});function be(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function we(...e){return s.useCallback(be(...e),e)}function xe(){return xe=Object.assign||function(e){for(var t=1;t{const{children:n,...r}=e;return s.Children.toArray(n).some(_e)?s.createElement(s.Fragment,null,s.Children.map(n,(e=>_e(e)?s.createElement(ke,xe({},r,{ref:t}),e.props.children):e))):s.createElement(ke,xe({},r,{ref:t}),n)}));Ee.displayName="Slot";const ke=s.forwardRef(((e,t)=>{const{children:n,...r}=e;return s.isValidElement(n)?s.cloneElement(n,{...Ce(r,n.props),ref:be(t,n.ref)}):s.Children.count(n)>1?s.Children.only(null):null}));ke.displayName="SlotClone";const Se=({children:e})=>s.createElement(s.Fragment,null,e);function _e(e){return s.isValidElement(e)&&e.type===Se}function Ce(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?n[r]=(...e)=>{null==i||i(...e),null==o||o(...e)}:"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const Oe=["a","button","div","h2","h3","img","li","nav","p","span","svg","ul"].reduce(((e,t)=>({...e,[t]:s.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?Ee:t;return s.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.as&&console.error(Pe),s.createElement(i,xe({},o,{ref:n}))}))})),{}),Pe="Warning: The `as` prop has been removed in favour of `asChild`. For details, see https://radix-ui.com/docs/primitives/overview/styling#changing-the-rendered-element",Te="horizontal",Re=["horizontal","vertical"],Le=s.forwardRef(((e,t)=>{const{decorative:n,orientation:r=Te,...o}=e,i=je(r)?r:Te,a=n?{role:"none"}:{"aria-orientation":"vertical"===i?i:void 0,role:"separator"};return s.createElement(Oe.div,xe({"data-orientation":i},a,o,{ref:t}))}));function je(e){return Re.includes(e)}Le.propTypes={orientation(e,t,n){const r=e[t],o=String(r);return r&&!je(r)?new Error(function(e,t){return`Invalid prop \`orientation\` of value \`${e}\` supplied to \`${t}\`, expected one of:\n - horizontal\n - vertical\n\nDefaulting to \`${Te}\`.`}(o,n)):null}};const Ae=Le;var Me=o(2322),Ie={alignment:{start:{alignItems:"flex-start"},center:{alignItems:"center"},end:{alignItems:"end"}},distribution:{around:{justifyContent:"space-around"},between:{justifyContent:"space-between"},evenly:{justifyContent:"space-evenly"},start:{justifyContent:"flex-start"},center:{justifyContent:"center"},end:{justifyContent:"flex-end"}}},De=fe("div",{}),Ne=fe("span",{}),Fe=fe("a",{}),ze=fe("blockquote",{}),$e=fe(De,{display:"flex",flexDirection:"row",variants:Ie,defaultVariants:{alignment:"start",distribution:"around"}}),Be=fe(De,{display:"flex",flexDirection:"column",variants:Ie,defaultVariants:{alignment:"start",distribution:"around"}}),Ue=fe(Ae,{backgroundColor:"$grayLine","&[data-orientation=horizontal]":{height:1,width:"100%"},"&[data-orientation=vertical]":{height:"100%",width:1}}),We=["omnivore-highlight-id","data-twitter-tweet-id","data-instagram-id"];function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]i||setTimeout(r,l,o)},onDiscarded:vt,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:$t?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:$t?5e3:3e3,compare:function(e,t){return Ot(e)==Ot(t)},isPaused:function(){return!1},cache:Gt,mutate:Qt,fallback:{}},It),Jt=(0,s.createContext)({}),en=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},tn={dedupe:!0},nn=(bt.defineProperty((function(e){var t=e.value,n=function(e,t){var n=Et(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=Et(o,a))}return n}((0,s.useContext)(Jt),t),r=t&&t.provider,o=(0,s.useState)((function(){return r?Kt(r(n.cache||Gt),t):yt}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),Ft((function(){return o?o[2]:yt}),[]),(0,s.createElement)(Jt.Provider,Et(e,{value:n}))}),"default",{value:Zt}),function(e,t,n){var r=n.cache,o=n.compare,i=n.fallbackData,a=n.suspense,l=n.revalidateOnMount,u=n.refreshInterval,c=n.refreshWhenHidden,f=n.refreshWhenOffline,d=Ut.get(r),h=d[0],p=d[1],g=d[2],m=d[3],v=Bt(e),y=v[0],b=v[1],w=v[2],x=(0,s.useRef)(!1),E=(0,s.useRef)(!1),k=(0,s.useRef)(y),S=(0,s.useRef)(t),_=(0,s.useRef)(n),C=function(){return _.current},O=function(){return C().isVisible()&&C().isOnline()},P=function(e){return r.set(w,Et(r.get(w),e))},T=r.get(y),R=wt(i)?n.fallback[y]:i,L=wt(T)?R:T,j=r.get(w)||{},A=j.error,M=!x.current,I=function(){return M&&!wt(l)?l:!C().isPaused()&&(a?!wt(L)&&n.revalidateIfStale:wt(L)||n.revalidateIfStale)},D=!(!y||!t)&&(!!j.isValidating||M&&I()),N=function(e,t){var n=(0,s.useState)({})[1],r=(0,s.useRef)(e),o=(0,s.useRef)({data:!1,error:!1,isValidating:!1}),i=(0,s.useCallback)((function(e){var i=!1,a=r.current;for(var l in e){var s=l;a[s]!==e[s]&&(a[s]=e[s],o.current[s]&&(i=!0))}i&&!t.current&&n({})}),[]);return Ft((function(){r.current=e})),[r,o.current,i]}({data:L,error:A,isValidating:D},E),F=N[0],z=N[1],$=N[2],B=(0,s.useCallback)((function(e){return rt(void 0,void 0,void 0,(function(){var t,i,a,l,s,u,c,f,d,h,p,v,w;return ot(this,(function(_){switch(_.label){case 0:if(t=S.current,!y||!t||E.current||C().isPaused())return[2,!1];l=!0,s=e||{},u=!m[y]||!s.dedupe,c=function(){return!E.current&&y===k.current&&x.current},f=function(){var e=m[y];e&&e[1]===a&&delete m[y]},d={isValidating:!1},h=function(){P({isValidating:!1}),c()&&$(d)},P({isValidating:!0}),$({isValidating:!0}),_.label=1;case 1:return _.trys.push([1,3,,4]),u&&(Wt(r,y,F.current.data,F.current.error,!0),n.loadingTimeout&&!r.get(y)&&setTimeout((function(){l&&c()&&C().onLoadingSlow(y,n)}),n.loadingTimeout),m[y]=[t.apply(void 0,b),Vt()]),w=m[y],i=w[0],a=w[1],[4,i];case 2:return i=_.sent(),u&&setTimeout(f,n.dedupingInterval),m[y]&&m[y][1]===a?(P({error:yt}),d.error=yt,p=g[y],!wt(p)&&(a<=p[0]||a<=p[1]||0===p[1])?(h(),u&&c()&&C().onDiscarded(y),[2,!1]):(o(F.current.data,i)?d.data=F.current.data:d.data=i,o(r.get(y),i)||r.set(y,i),u&&c()&&C().onSuccess(i,y,n),[3,4])):(u&&c()&&C().onDiscarded(y),[2,!1]);case 3:return v=_.sent(),f(),C().isPaused()||(P({error:v}),d.error=v,u&&c()&&(C().onError(v,y,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||xt(n.shouldRetryOnError)&&n.shouldRetryOnError(v))&&O()&&C().onErrorRetry(v,y,n,B,{retryCount:(s.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return l=!1,h(),c()&&u&&Wt(r,y,d.data,d.error,!1),[2,!0]}}))}))}),[y]),U=(0,s.useCallback)(qt.bind(yt,r,(function(){return k.current})),[]);if(Ft((function(){S.current=t,_.current=n})),Ft((function(){if(y){var e=y!==k.current,t=B.bind(yt,tn),n=0,r=en(y,p,(function(e,t,n){$(Et({error:t,isValidating:n},o(F.current.data,e)?yt:{data:e}))})),i=en(y,h,(function(e){if(0==e){var r=Date.now();C().revalidateOnFocus&&r>n&&O()&&(n=r+C().focusThrottleInterval,t())}else if(1==e)C().revalidateOnReconnect&&O()&&t();else if(2==e)return B()}));return E.current=!1,k.current=y,x.current=!0,e&&$({data:L,error:A,isValidating:D}),I()&&(wt(L)||Nt?t():(a=t,St()&&typeof window.requestAnimationFrame!=kt?window.requestAnimationFrame(a):setTimeout(a,1))),function(){E.current=!0,r(),i()}}var a}),[y,B]),Ft((function(){var e;function t(){var t=xt(u)?u(L):u;t&&-1!==e&&(e=setTimeout(n,t))}function n(){F.current.error||!c&&!C().isVisible()||!f&&!C().isOnline()?t():B(tn).then(t)}return t(),function(){e&&(clearTimeout(e),e=-1)}}),[u,c,f,B]),(0,s.useDebugValue)(L),a&&wt(L)&&y)throw S.current=t,_.current=n,E.current=!1,wt(A)?B(tn):A;return{mutate:U,get data(){return z.data=!0,L},get error(){return z.error=!0,A},get isValidating(){return z.isValidating=!0,D}}},{prod:{webBaseURL:null!==(it=window.omnivoreEnv.NEXT_PUBLIC_BASE_URL)&&void 0!==it?it:"",serverBaseURL:null!==(at=window.omnivoreEnv.NEXT_PUBLIC_SERVER_BASE_URL)&&void 0!==at?at:"",highlightsBaseURL:null!==(lt=window.omnivoreEnv.NEXT_PUBLIC_HIGHLIGHTS_BASE_URL)&&void 0!==lt?lt:""},dev:{webBaseURL:null!==(st=window.omnivoreEnv.NEXT_PUBLIC_DEV_BASE_URL)&&void 0!==st?st:"",serverBaseURL:null!==(ut=window.omnivoreEnv.NEXT_PUBLIC_DEV_SERVER_BASE_URL)&&void 0!==ut?ut:"",highlightsBaseURL:null!==(ct=window.omnivoreEnv.NEXT_PUBLIC_DEV_HIGHLIGHTS_BASE_URL)&&void 0!==ct?ct:""},demo:{webBaseURL:null!==(ft=window.omnivoreEnv.NEXT_PUBLIC_DEMO_BASE_URL)&&void 0!==ft?ft:"",serverBaseURL:null!==(dt=window.omnivoreEnv.NEXT_PUBLIC_DEMO_SERVER_BASE_URL)&&void 0!==dt?dt:"",highlightsBaseURL:null!==(ht=window.omnivoreEnv.NEXT_PUBLIC_DEMO_HIGHLIGHTS_BASE_URL)&&void 0!==ht?ht:""},local:{webBaseURL:null!==(pt=window.omnivoreEnv.NEXT_PUBLIC_LOCAL_BASE_URL)&&void 0!==pt?pt:"",serverBaseURL:null!==(gt=window.omnivoreEnv.NEXT_PUBLIC_LOCAL_SERVER_BASE_URL)&&void 0!==gt?gt:"",highlightsBaseURL:null!==(mt=window.omnivoreEnv.NEXT_PUBLIC_LOCAL_HIGHLIGHTS_BASE_URL)&&void 0!==mt?mt:""}});function rn(e){var t=nn[an].serverBaseURL;if(0==t.length)throw new Error("Couldn't find environment variable for server base url in ".concat(e," environment"));return t}var on,an=window.omnivoreEnv.NEXT_PUBLIC_APP_ENV||"prod",ln=(window.omnivoreEnv.SENTRY_DSN||window.omnivoreEnv.NEXT_PUBLIC_SENTRY_DSN,window.omnivoreEnv.NEXT_PUBLIC_PSPDFKIT_LICENSE_KEY,window.omnivoreEnv.SSO_JWT_SECRET,"".concat(nn[an].serverBaseURL,"local"==an?"/api/auth/gauth-redirect-localhost":"/api/auth/vercel/gauth-redirect"),"".concat(nn[an].serverBaseURL,"local"==an?"/api/auth/apple-redirect-localhost":"/api/auth/vercel/apple-redirect"),window.omnivoreEnv.NEXT_PUBLIC_INTERCOM_APP_ID,window.omnivoreEnv.NEXT_PUBLIC_SEGMENT_API_KEY,"prod"==an?window.omnivoreEnv.NEXT_PUBLIC_GOOGLE_ID:window.omnivoreEnv.NEXT_PUBLIC_DEV_GOOGLE_ID,"".concat(rn(an),"/api/graphql")),sn="".concat(rn(an),"/api");function un(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function cn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){un(i,r,o,a,l,"next",e)}function l(e){un(i,r,o,a,l,"throw",e)}a(void 0)}))}}function fn(){var e,t,n=(null===(e=window)||void 0===e?void 0:e.localStorage.getItem("authToken"))||void 0,r=(null===(t=window)||void 0===t?void 0:t.localStorage.getItem("pendingUserAuth"))||void 0;return n?{authorization:n}:r?{pendingUserAuth:r}:{}}function dn(e,t){return hn(e,t,!1)}function hn(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];n&&pn();var r=new nt.GraphQLClient(ln,{credentials:"include",mode:"cors"});return r.request(e,t,fn())}function pn(){return gn.apply(this,arguments)}function gn(){return(gn=cn(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"!=typeof window){e.next=2;break}return e.abrupt("return");case 2:if(!window.localStorage.getItem("authVerified")){e.next=4;break}return e.abrupt("return");case 4:return e.prev=4,e.next=7,fetch("".concat(sn,"/auth/verify"),{credentials:"include",mode:"cors",headers:fn()});case 7:if(200===(t=e.sent).status){e.next=10;break}return e.abrupt("return");case 10:return e.next=12,t.json();case 12:n=e.sent,r=n.authStatus,e.t0=r,e.next="AUTHENTICATED"===e.t0?17:"PENDING_USER"===e.t0?19:"NOT_AUTHENTICATED"===e.t0?21:22;break;case 17:return window.localStorage.setItem("authVerified","true"),e.abrupt("break",22);case 19:return"/confirm-profile"!==window.location.pathname&&(window.location.href="/confirm-profile"),e.abrupt("break",22);case 21:"/login"!==window.location.pathname&&(window.location.href="/login?errorCodes=AUTH_FAILED");case 22:e.next=27;break;case 24:return e.prev=24,e.t1=e.catch(4),e.abrupt("return");case 27:case"end":return e.stop()}}),e,null,[[4,24]])})))).apply(this,arguments)}(function(e){if(0==nn[an].highlightsBaseURL.length)throw new Error("Couldn't find environment variable for highlights base url in ".concat(e," environment"))})(an),function(e){if(0==nn[an].webBaseURL.length)throw new Error("Couldn't find environment variable for web base url in ".concat(e," environment"))}(an);var mn,vn,yn,bn=(0,nt.gql)(on||(mn=["\n query GetUserPersonalization {\n getUserPersonalization {\n ... on GetUserPersonalizationSuccess {\n userPersonalization {\n id\n theme\n margin\n fontSize\n fontFamily\n libraryLayoutType\n librarySortOrder\n }\n }\n ... on GetUserPersonalizationError {\n errorCodes\n }\n }\n }\n"],vn||(vn=mn.slice(0)),on=Object.freeze(Object.defineProperties(mn,{raw:{value:Object.freeze(vn)}}))));function wn(e){Qt(bn,{getUserPersonalization:{userPersonalization:e}},!1)}function xn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function En(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function kn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){En(i,r,o,a,l,"next",e)}function l(e){En(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Sn(e){return _n.apply(this,arguments)}function _n(){return _n=kn(regeneratorRuntime.mark((function e(t){var n,r,o,i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,nt.gql)(yn||(yn=xn(["\n mutation SetUserPersonalization($input: SetUserPersonalizationInput!) {\n setUserPersonalization(input: $input) {\n ... on SetUserPersonalizationSuccess {\n updatedUserPersonalization {\n id\n theme\n fontSize\n fontFamily\n margin\n libraryLayoutType\n librarySortOrder\n }\n }\n ... on SetUserPersonalizationError {\n errorCodes\n }\n }\n }\n "]))),e.prev=1,e.next=4,hn(n,{input:t});case 4:if(o=e.sent,null==(i=o)||null===(r=i.setUserPersonalization)||void 0===r||!r.updatedUserPersonalization){e.next=9;break}return wn(i.setUserPersonalization.updatedUserPersonalization),e.abrupt("return",null===(a=i.setUserPersonalization)||void 0===a?void 0:a.updatedUserPersonalization);case 9:return e.abrupt("return",void 0);case 12:return e.prev=12,e.t0=e.catch(1),e.abrupt("return",void 0);case 15:case"end":return e.stop()}}),e,null,[[1,12]])}))),_n.apply(this,arguments)}var Cn="theme";function On(e){"undefined"!=typeof window&&(Pn(e),Sn({theme:e}))}function Pn(e){"undefined"!=typeof window&&window.localStorage.setItem(Cn,e),document.body.classList.remove(ye,r.Light,me,ve),document.body.classList.add(e)}function Tn(){switch(function(){if("undefined"!=typeof window)return window.localStorage.getItem(Cn)}()){case r.Light:return"Light";case r.Dark:return"Dark";case r.Darker:return"Darker";case r.Lighter:return"Lighter";default:return""}}function Rn(){var e=Tn();return"Dark"===e||"Darker"===e}var Ln=o(4073),jn=o.n(Ln);function An(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function Mn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return In(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?In(e,t):void 0}}(e,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 In(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0;)r();return n.shift(),n.forEach((function(e,t){e.setAttribute("data-omnivore-anchor-idx",(t+1).toString())})),n}(e.current),r=new IntersectionObserver((function(e){var n=0,r=1e5;if(e.forEach((function(e){var t=e.target.getAttribute("data-omnivore-anchor-idx")||"0";e.isIntersecting&&1===e.intersectionRatio&&e.boundingClientRect.top0){for(var o=n;o-1>0;){var i=document.querySelector("[data-omnivore-anchor-idx='".concat((o-1).toString(),"']"));if(!i)throw new Error("Unable to find previous intersection element!");var a=i.getBoundingClientRect();if(!(a.top>=0&&a.left>=0&&a.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&a.right<=(window.innerWidth||document.documentElement.clientWidth)))break;o-=1}t(o)}}),{root:null,rootMargin:"0px",threshold:[1]});return null==n||n.forEach((function(e){r.observe(e)})),function(){r.disconnect()}}),[e,t])}(h,l);var p=(0,s.useMemo)((function(){return jn()((function(e){console.log("setReadingProgress",e),o(e)}),2e3)}),[]);(0,s.useEffect)((function(){return function(){p.cancel()}}),[]),(0,s.useEffect)((function(){var t;(t=regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.articleMutations.articleReadingProgressMutation({id:e.articleId,readingProgressPercent:r>100?100:r,readingProgressAnchorIndex:a});case 4:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(e){An(i,r,o,a,l,"next",e)}function l(e){An(i,r,o,a,l,"throw",e)}a(void 0)}))})()}),[e.articleId,r]),(0,s.useEffect)((function(){var e,t;void 0!==(null===(e=window)||void 0===e?void 0:e.webkit)&&(null===(t=window.webkit.messageHandlers.readingProgressUpdate)||void 0===t||t.postMessage({progress:r}))}),[r]),function(e,t){var n,r,o=(0,s.useRef)(void 0),i=(n=(0,s.useState)({x:0,y:0}),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(n,r)||function(e,t){if(e){if("string"==typeof e)return He(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?He(e,t):void 0}}(n,r)||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.")}()),a=i[0],l=i[1];(0,s.useEffect)((function(){var t=function(){var t,n,r,i,a,s,u={x:null!==(t=null!==(n=window.document.documentElement.scrollLeft)&&void 0!==n?n:null===(r=window)||void 0===r?void 0:r.scrollX)&&void 0!==t?t:0,y:null!==(i=null!==(a=window.document.documentElement.scrollTop)&&void 0!==a?a:null===(s=window)||void 0===s?void 0:s.scrollY)&&void 0!==i?i:0};e(),l(u),o.current=void 0},n=function(){void 0===o.current&&(o.current=setTimeout(t,1e3))};return window.addEventListener("scroll",n),function(){return window.removeEventListener("scroll",n)}}),[a,1e3,e])}((function(e){if(window&&window.document.scrollingElement){var t=window.scrollY/window.document.scrollingElement.scrollHeight;p(100*(t>.92?1:t))}}));var g=(0,s.useCallback)((function(e,t){if(t){var n=t.clientWidth+140;if(!e.closest("blockquote, table")){var r=parseFloat(e.getAttribute("width")||"");(r=isNaN(r)?e.naturalWidth:r)>n&&(e.style.setProperty("width","".concat(Math.min(r,n),"px")),e.style.setProperty("max-width","unset"),e.style.setProperty("margin-left","-".concat(Math.round(70),"px")))}}}),[]);(0,s.useEffect)((function(){if("undefined"!=typeof window&&e.highlightReady){if(!f)return;if(d(!1),e.initialReadingProgress&&e.initialReadingProgress>=98)return;var t=e.highlightHref.current?document.querySelector('[omnivore-highlight-id="'.concat(e.highlightHref.current,'"]')):document.querySelector("[data-omnivore-anchor-idx='".concat(e.initialAnchorIndex.toString(),"']"));if(t){var n=function(e){var t=0;if(e.offsetParent){do{t+=e.offsetTop}while(e=e.offsetParent);return t}return 0}(t);window.document.documentElement.scroll(0,n-100)}}}),[e.highlightReady,e.initialAnchorIndex,e.initialReadingProgress,f]),(0,s.useEffect)((function(){var e,t;"function"==typeof(null===(e=window)||void 0===e||null===(t=e.MathJax)||void 0===t?void 0:t.typeset)&&window.MathJax.typeset(),Array.from(document.getElementsByClassName("tweet-placeholder")).forEach((function(e){(0,c.render)((0,Me.jsx)(tt,{tweetId:e.getAttribute("data-tweet-id")||"",options:{theme:Rn()?"dark":"light",align:"center"}}),e)}))}),[]);var m=(0,s.useCallback)((function(){var e,t=null===(e=h.current)||void 0===e?void 0:e.querySelectorAll("img");null==t||t.forEach((function(e){g(e,h.current)}))}),[g]);return(0,s.useEffect)((function(){return window.addEventListener("load",m),function(){window.removeEventListener("load",m)}}),[m]),(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)("link",{rel:"stylesheet",href:"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.4.0/styles/".concat(t,".min.css")}),(0,Me.jsx)(De,{ref:h,css:{maxWidth:"100%"},className:"article-inner-css","data-testid":"article-inner",dangerouslySetInnerHTML:{__html:e.content}})]})}var Nn=fe("p",{fontFamily:"Inter",fontWeight:"normal",lineHeight:"120%",color:"$grayTextContrast",variants:{style:{body:{fontSize:"$2",lineHeight:"1.25"},logoTitle:{fontFamily:"Inter",fontWeight:700,fontSize:"18px",textTransform:"uppercase",letterSpacing:"0.15em"},bodyBold:{fontWeight:"bold",fontSize:"$2",lineHeight:"1.25"},headline:{fontSize:"$4","@md":{fontSize:"$6"}},fixedHeadline:{fontSize:"24px",fontWeight:"500"},subHeadline:{fontSize:"$5"},boldHeadline:{fontWeight:"bold",fontSize:"$4","@md":{fontSize:"$6"},margin:0},modalHeadline:{fontWeight:"500",fontSize:"16px",lineHeight:"1",color:"$grayText",margin:0},modalTitle:{fontSize:"29px",lineHeight:"37.7px",color:"$textDefault",margin:0},boldText:{fontWeight:"600",fontSize:"16px",lineHeight:"1",color:"$textDefault"},shareHighlightModalAnnotation:{fontSize:"18px",lineHeight:"23.4px",color:"$textSubtle",m:0},footnote:{fontSize:"$1"},shareTitle:{fontSize:"$1",fontWeight:"600",color:"$grayText"},shareSubtitle:{fontSize:"$1",color:"$grayText"},listTitle:{fontSize:"16px",fontWeight:"500",color:"$grayTextContrast",lineHeight:"1.5",wordBreak:"break-word"},caption:{color:"$grayText",fontSize:"12px",lineHeight:"1.5",wordBreak:"break-word"},captionLink:{fontSize:"$2",textDecoration:"underline",lineHeight:"1.5",cursor:"pointer"},highlightTitleAndAuthor:{fontSize:"18px",fontStyle:"italic",lineHeight:"22.5px",letterSpacing:"0.01em",margin:"0px",color:"$textSubtle"},highlightTitle:{fontSize:"14px",fontWeight:"400",lineHeight:"1.5",margin:"0px",color:"$omnivoreGray"},navLink:{m:0,fontSize:"$1",fontWeight:400,color:"$graySolid",cursor:"pointer","&:hover":{opacity:.7}},controlButton:{color:"$grayText",fontWeight:"500",fontFamily:"inter",fontSize:"14px"},menuTitle:{fontSize:13,pt:"0px",m:"0px",borderRadius:3,cursor:"default",color:"$grayText"},error:{color:"$error",fontSize:"$2",lineHeight:"1.25"}}},defaultVariants:{style:"footnote"}});function Fn(e){var t,n,r,o=e.style||"footnote";return(0,Me.jsx)(De,{children:(0,Me.jsxs)(Nn,{style:o,css:{wordBreak:"break-word"},children:[(n=e.href,r=e.author,r?"".concat(function(e){return"by ".concat("string"==typeof(t=e)?t.replace(/(<([^>]+)>)/gi,""):"");var t}(r),", ").concat(new URL(n).hostname):new URL(n).origin)," ",(0,Me.jsx)("span",{style:{position:"relative",bottom:1},children:"• "})," ",(t=e.rawDisplayDate,new Intl.DateTimeFormat("en-US",{dateStyle:"long"}).format(new Date(t)))," ",!e.hideButton&&(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)("span",{style:{position:"relative",bottom:1},children:"• "})," ",(0,Me.jsx)(Fe,{href:e.href,target:"_blank",rel:"noreferrer",css:{textDecoration:"underline",color:"$grayTextContrast"},children:"See original"})]})]})})}fe("li",{fontFamily:"Inter",fontWeight:"normal",lineHeight:"1.35",color:"$grayTextContrast"}),fe("ul",{fontFamily:"Inter",fontWeight:"normal",lineHeight:"1.35",color:"$grayTextContrast"}),fe("img",{}),fe("a",{textDecoration:"none"}),fe("mark",{});var zn=o(1427);function $n(e,t){for(var n=0,r=e.length-1;n=e[l+1]))return l;n=l+1}}throw new Error("Unable to find text node")}var Bn="omnivore-highlight-id",Un="omnivore-highlight-note-id",Wn="omnivore_highlight",Hn="article-container",Vn=/^(a|b|basefont|bdo|big|em|font|i|s|small|span|strike|strong|su[bp]|tt|u|code|mark)$/i,qn=new RegExp("<".concat(Wn,">([\\s\\S]*)<\\/").concat(Wn,">"),"i"),Xn=2e3;function Kn(e,t,n,r,o){var i,a=Jn({patch:e}),l=a.prefix,s=a.suffix,u=a.highlightTextStart,c=a.highlightTextEnd,f=a.textNodes,d=a.textNodeIndex,h="";if(tr(t).length)return{prefix:l,suffix:s,quote:h,startLocation:u,endLocation:c};for(var p=function(){var e=er({textNodes:f,startingTextNodeIndex:d,highlightTextStart:u,highlightTextEnd:c}),a=e.node,l=e.textPartsToHighlight,s=e.startsParagraph,p=a.parentNode,g=a.nextSibling;null==p||p.removeChild(a),l.forEach((function(e,a){var l=e.highlight,u=e.text.replace(/\n/g,""),c=document.createTextNode(u);if(l){u&&(s&&!a&&h&&(h+="\n"),h+=u);var f=document.createElement("span");return f.className=n?"highlight_with_note":"highlight",f.setAttribute(Bn,t),r&&f.setAttribute("style","background-color: ".concat(r," !important")),o&&f.setAttribute("title",o),f.appendChild(c),i=f,null==p?void 0:p.insertBefore(f,g)}return null==p?void 0:p.insertBefore(c,g)})),d++};c>f[d].startIndex;)p();if(n&&i){i.classList.add("last_element");var g=function(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.setAttribute("viewBox","0 0 14 14"),t.setAttribute("width","14"),t.setAttribute("height","14"),t.setAttribute("fill","none");var n=document.createElementNS(e,"path");return n.setAttribute("d","M1 5.66602C1 3.7804 1 2.83759 1.58579 2.2518C2.17157 1.66602 3.11438 1.66602 5 1.66602H9C10.8856 1.66602 11.8284 1.66602 12.4142 2.2518C13 2.83759 13 3.7804 13 5.66602V7.66601C13 9.55163 13 10.4944 12.4142 11.0802C11.8284 11.666 10.8856 11.666 9 11.666H4.63014C4.49742 11.666 4.43106 11.666 4.36715 11.6701C3.92582 11.6984 3.50632 11.8722 3.17425 12.1642C3.12616 12.2065 3.07924 12.2534 2.98539 12.3473V12.3473C2.75446 12.5782 2.639 12.6937 2.55914 12.7475C1.96522 13.1481 1.15512 12.8125 1.01838 12.1093C1 12.0148 1 11.8515 1 11.5249V5.66602Z"),n.setAttribute("stroke","rgba(255, 210, 52, 0.8)"),n.setAttribute("stroke-width","1.8"),n.setAttribute("stroke-linejoin","round"),t.appendChild(n),t}();g.setAttribute(Un,t);var m=document.createElement("div");m.className="highlight_note_button",m.appendChild(g),m.setAttribute(Un,t),m.setAttribute("width","14px"),m.setAttribute("height","14px"),i.appendChild(m)}return{prefix:l,suffix:s,quote:h,startLocation:u,endLocation:c}}function Yn(e){var t=document.getElementById(Hn);if(!t)throw new Error("Unable to find article content element");var n=new Range,r=new Range,o=new Range;o.selectNode(t),n.setStart(o.startContainer,o.startOffset),n.setEnd(e.startContainer,e.startOffset),r.setStart(e.endContainer,e.endOffset),r.setEnd(o.endContainer,o.endOffset);var i="".concat(n.toString(),"<").concat(Wn,">").concat(e.toString(),"").concat(Wn,">").concat(r.toString()),a=new zn.diff_match_patch,l=a.patch_toText(a.patch_make(o.toString(),i));if(!l)throw new Error("Invalid patch");return l}function Gn(e){var t=Yn(e),n=Zn(t);return[n.highlightTextStart,n.highlightTextEnd]}var Qn=function(e){var t=(null==e?void 0:e.current)||document.getElementById(Hn);if(!t)throw new Error("Unable to find article content element");var n=0,r="",o=!1,i=[];return t.childNodes.forEach((function e(t){var a;t.nodeType===Node.TEXT_NODE?(i.push({startIndex:n,node:t,startsParagraph:o}),n+=(null===(a=t.nodeValue)||void 0===a?void 0:a.length)||0,r+=t.nodeValue,o=!1):(Vn.test(t.tagName)||(o=!0),t.childNodes.forEach(e))})),i.push({startIndex:n,node:document.createTextNode("")}),{textNodes:i,articleText:r}},Zn=function(e){if(!e)throw new Error("Invalid patch");var t,n=Qn().articleText,r=new zn.diff_match_patch,o=r.patch_apply(r.patch_fromText(e),n);if(o[1][0])t=qn.exec(o[0]);else{r.Match_Threshold=.5,r.Match_Distance=4e3;var i=r.patch_apply(r.patch_fromText(e),n);if(!i[1][0])throw new Error("Unable to find the highlight");t=qn.exec(i[0])}if(!t)throw new Error("Unable to find the highlight from patch");var a=t.index;return{highlightTextStart:a,highlightTextEnd:a+t[1].length,matchingHighlightContent:t}};function Jn(e){var t=e.patch;if(!t)throw new Error("Invalid patch");var n=Qn().textNodes,r=Zn(t),o=r.highlightTextStart,i=r.highlightTextEnd,a=$n(n.map((function(e){return e.startIndex})),o),l=$n(n.map((function(e){return e.startIndex})),i);return{prefix:nr({textNodes:n,startingTextNodeIndex:a,startingOffset:o-n[a].startIndex,side:"prefix"}),suffix:nr({textNodes:n,startingTextNodeIndex:l,startingOffset:i-n[l].startIndex,side:"suffix"}),highlightTextStart:o,highlightTextEnd:i,textNodes:n,textNodeIndex:a}}var er=function(e){var t=e.textNodes,n=e.startingTextNodeIndex,r=e.highlightTextStart,o=e.highlightTextEnd,i=t[n],a=i.node,l=i.startIndex,s=i.startsParagraph,u=a.nodeValue||"",c=r-l,f=o-l,d=[];return c>0&&d.push({text:u.substring(0,c),highlight:!1}),d.push({text:u.substring(c,f),highlight:!0}),f<=u.length&&d.push({text:u.substring(f),highlight:!1}),{node:a,textPartsToHighlight:d,startsParagraph:s}},tr=function(e){return Array.from(document.querySelectorAll("[".concat(Bn,"='").concat(e,"']")))},nr=function(e){var t,n=e.textNodes,r=e.startingTextNodeIndex,o=e.startingOffset,i="prefix"===e.side,a=r,l=function e(){var t=n[a+=i?-1:1],r=t.node,o=t.startsParagraph,l=r.nodeValue||"";return i?o||l.length>Xn?l:e()+l:!n[a+1]||n[a+1].startsParagraph||l.length>Xn?l:l+e()},s=n[r],u=s.startsParagraph,c=s.node.nodeValue||"",f=i?c.substring(0,o):c.substring(o);return(t=i?u?f:l()+f:!n[a+1]||n[a+1].startsParagraph?f:f+l()).length<=Xn?t:i?t.slice(t.length-Xn):t.substring(0,Xn)},rr=function(e){var t=Jn({patch:e}),n=t.highlightTextStart;return t.highlightTextEnd-n<2e3};function or(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function ir(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){or(i,r,o,a,l,"next",e)}function l(e){or(i,r,o,a,l,"throw",e)}a(void 0)}))}}function ar(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return lr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lr(e,t):void 0}}(e,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 lr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&a<=0,s=o.startContainer===t.focusNode&&o.endOffset===t.anchorOffset,e.abrupt("return",l?{range:o,isReverseSelected:s,selection:t}:void 0);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var cr=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("undefined"==typeof window||!e)return{left:0,top:0,right:0,bottom:0,width:0,height:0};var n=e.getClientRects();if(!n||!n.length)return{left:0,top:0,right:0,bottom:0,width:0,height:0};var r=n[t?0:n.length-1];return{left:window.scrollX+r.left,top:window.scrollY+r.top,right:window.scrollX+r.right,bottom:window.scrollY+r.bottom,width:r.width,height:r.height}},fr=fe("button",{fontFamily:"inter",fontSize:"$2",lineHeight:"1.25",color:"$grayText",variants:{style:{ctaYellow:{borderRadius:"$3",px:"$3",py:"$2",border:"1px solid $yellow3",bg:"$yellow3","&:hover":{bg:"$yellow4",border:"1px solid $grayBorderHover"}},ctaDarkYellow:{border:0,fontSize:"14px",fontWeight:500,fontStyle:"normal",fontFamily:"Inter",borderRadius:"8px",cursor:"pointer",color:"$omnivoreGray",bg:"$omnivoreCtaYellow",p:"10px 12px"},ctaLightGray:{border:0,fontSize:"14px",fontWeight:500,fontStyle:"normal",fontFamily:"Inter",borderRadius:"8px",cursor:"pointer",color:"$grayTextContrast",p:"10px 12px",bg:"rgb(125, 125, 125, 0.1)","&:hover":{bg:"rgb(47, 47, 47, 0.1)",".ctaButtonIcon":{visibility:"visible"}},".ctaButtonIcon":{visibility:"hidden"}},ctaGray:{border:0,fontSize:"14px",fontWeight:500,fontStyle:"normal",fontFamily:"Inter",borderRadius:"8px",cursor:"pointer",color:"$omnivoreGray",bg:"$grayBgActive",p:"10px 12px"},ctaWhite:{borderRadius:"$3",px:"$3",py:"$2",cursor:"pointer",border:"1px solid $grayBgSubtle",bg:"$grayBgSubtle","&:hover":{border:"1px solid $grayBorderHover"}},modalOption:{style:"ghost",height:"52px",width:"100%",textAlign:"left",verticalAlign:"middle",color:"#0A0806",backgroundColor:"unset",outlineColor:"rgba(0, 0, 0, 0)",border:"1px solid rgba(0, 0, 0, 0.06)",cursor:"pointer","&:focus":{outline:"none"}},ctaModal:{height:"32px",verticalAlign:"middle",color:"$textDefault",backgroundColor:"$grayBase",fontWeight:"600",padding:"0px 12px",fontSize:"16px",border:"1px solid $grayBorder",cursor:"pointer",borderRadius:"8px","&:focus":{outline:"none"}},ctaSecondary:{color:"$grayText",border:"none",bg:"transparent","&:hover":{opacity:.8}},ctaPill:{borderRadius:"$3",px:"$3",py:"$2",border:"1px solid $grayBorder",bg:"$grayBgActive","&:hover":{bg:"$grayBgHover",border:"1px solid $grayBorderHover"}},circularIcon:{mx:"$1",display:"flex",alignItems:"center",fontWeight:500,height:44,width:44,borderRadius:"50%",justifyContent:"center",textAlign:"center",background:"$grayBase",cursor:"pointer",border:"none",opacity:.9,"&:hover":{opacity:1}},squareIcon:{mx:"$1",display:"flex",alignItems:"center",fontWeight:500,height:44,width:44,justifyContent:"center",textAlign:"center",background:"$grayBase",cursor:"pointer",border:"none",borderRight:"1px solid $grayText",opacity:.9,"&:hover":{opacity:1}},plainIcon:{bg:"transparent",border:"none",cursor:"pointer","&:hover":{opacity:.8}},articleActionIcon:{bg:"transparent",border:"none",cursor:"pointer","&:hover":{opacity:.8}},ghost:{color:"transparent",border:"none",bg:"transparent","&:hover":{opacity:.8}},themeSwitch:{p:"0px",m:"4px",ml:"0px",width:"24px",height:"24px",fontSize:"14px",borderRadius:"4px",border:"1px solid rgb(243, 243, 243)","&:hover":{transform:"scale(1.2)"}}}},defaultVariants:{style:"ctaWhite"}}),dr=new WeakMap,hr=new WeakMap,pr={},gr=0,mr=function(e,t,n){void 0===t&&(t=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e)),void 0===n&&(n="data-aria-hidden");var r=Array.isArray(e)?e:[e];pr[n]||(pr[n]=new WeakMap);var o=pr[n],i=[],a=new Set,l=function(e){e&&!a.has(e)&&(a.add(e),l(e.parentNode))};r.forEach(l);var s=function(e){!e||r.indexOf(e)>=0||Array.prototype.forEach.call(e.children,(function(e){if(a.has(e))s(e);else{var t=e.getAttribute("aria-hidden"),r=null!==t&&"false"!==t,l=(dr.get(e)||0)+1,u=(o.get(e)||0)+1;dr.set(e,l),o.set(e,u),i.push(e),1===l&&r&&hr.set(e,!0),1===u&&e.setAttribute(n,"true"),r||e.setAttribute("aria-hidden","true")}}))};return s(t),a.clear(),gr++,function(){i.forEach((function(e){var t=dr.get(e)-1,r=o.get(e)-1;dr.set(e,t),o.set(e,r),t||(hr.has(e)||e.removeAttribute("aria-hidden"),hr.delete(e)),r||e.removeAttribute(n)})),--gr||(dr=new WeakMap,dr=new WeakMap,hr=new WeakMap,pr={})}},vr=function(){return vr=Object.assign||function(e){for(var t,n=1,r=arguments.length;nr[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Ir=function(e,t){return"v"===e?function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowY&&!(t.overflowY===t.overflowX&&"visible"===t.overflowY)}(t):function(e){var t=window.getComputedStyle(e);return"range"===e.type||"hidden"!==t.overflowX&&!(t.overflowY===t.overflowX&&"visible"===t.overflowX)}(t)},Dr=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},Nr=!1;if("undefined"!=typeof window)try{var Fr=Object.defineProperty({},"passive",{get:function(){return Nr=!0,!0}});window.addEventListener("test",Fr,Fr),window.removeEventListener("test",Fr,Fr)}catch(e){Nr=!1}var zr=!!Nr&&{passive:!1},$r=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Br=function(e){return[e.deltaX,e.deltaY]},Ur=function(e){return e&&"current"in e?e.current:e},Wr=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},Hr=0,Vr=[];const qr=(Xr=function(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),o=s.useState(Hr++)[0],i=s.useState((function(){return Or()}))[0],a=s.useRef(e);s.useEffect((function(){a.current=e}),[e]),s.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-"+o);var t=[e.lockRef.current].concat((e.shards||[]).map(Ur)).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-"+o)})),function(){document.body.classList.remove("block-interactivity-"+o),t.forEach((function(e){return e.classList.remove("allow-interactivity-"+o)}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=s.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!a.current.allowPinchZoom;var o,i=$r(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-i[0],u="deltaY"in e?e.deltaY:l[1]-i[1],c=e.target,f=Math.abs(s)>Math.abs(u)?"h":"v",d=Mr(f,c);if(!d)return!0;if(d?o=f:(o="v"===f?"h":"v",d=Mr(f,c)),!d)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=o),!o)return!0;var h=r.current||o;return function(e,t,n,r,o){var i=r,a=n.target,l=t.contains(a),s=!1,u=i>0,c=0,f=0;do{var d=Dr(e,a),h=d[0],p=d[1]-d[2]-h;(h||p)&&Ir(e,a)&&(c+=p,f+=h),a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&(0===c||!1)||!u&&(0===f||!1))&&(s=!0),s}(h,t,e,"h"===h?s:u)}),[]),u=s.useCallback((function(e){var n=e;if(Vr.length&&Vr[Vr.length-1]===i){var r="deltaY"in n?Br(n):$r(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)n.preventDefault();else if(!o){var s=(a.current.shards||[]).map(Ur).filter(Boolean).filter((function(e){return e.contains(n.target)}));(s.length>0?l(n,s[0]):!a.current.noIsolation)&&n.preventDefault()}}}),[]),c=s.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),f=s.useCallback((function(e){n.current=$r(e),r.current=void 0}),[]),d=s.useCallback((function(t){c(t.type,Br(t),t.target,l(t,e.lockRef.current))}),[]),h=s.useCallback((function(t){c(t.type,$r(t),t.target,l(t,e.lockRef.current))}),[]);s.useEffect((function(){return Vr.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",u,zr),document.addEventListener("touchmove",u,zr),document.addEventListener("touchstart",f,zr),function(){Vr=Vr.filter((function(e){return e!==i})),document.removeEventListener("wheel",u,zr),document.removeEventListener("touchmove",u,zr),document.removeEventListener("touchstart",f,zr)}}),[]);var p=e.removeScrollBar,g=e.inert;return s.createElement(s.Fragment,null,g?s.createElement(i,{styles:Wr(o)}):null,p?s.createElement(Ar,{gapMode:"margin"}):null)},Er.useMedium(Xr),_r);var Xr,Kr=s.forwardRef((function(e,t){return s.createElement(Sr,vr({},e,{ref:t,sideCar:qr}))}));Kr.classNames=Sr.classNames;const Yr=Kr,Gr=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?s.useLayoutEffect:()=>{},Qr=u["useId".toString()]||(()=>{});let Zr=0;function Jr(e){const[t,n]=s.useState(Qr());return Gr((()=>{e||n((e=>null!=e?e:String(Zr++)))}),[e]),e||(t?`radix-${t}`:"")}const eo=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=s.useState(),r=s.useRef({}),o=s.useRef(e),i=s.useRef("none"),a=e?"mounted":"unmounted",[l,u]=function(e,t){return s.useReducer(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect((()=>{const e=to(r.current);i.current="mounted"===l?e:"none"}),[l]),Gr((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=to(t);if(e)u("MOUNT");else if("none"===a||"none"===(null==t?void 0:t.display))u("UNMOUNT");else{const e=r!==a;u(n&&e?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,u]),Gr((()=>{if(t){const e=e=>{const n=to(r.current).includes(e.animationName);e.target===t&&n&&u("ANIMATION_END")},n=e=>{e.target===t&&(i.current=to(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:s.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):s.Children.only(n),i=we(r.ref,o.ref);return"function"==typeof n||r.isPresent?s.cloneElement(o,{ref:i}):null};function to(e){return(null==e?void 0:e.animationName)||"none"}eo.displayName="Presence";let no=0;function ro(){s.useEffect((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:oo()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:oo()),no++,()=>{1===no&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),no--}}),[])}function oo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const io=["a","button","div","h2","h3","img","li","nav","p","span","svg","ul"].reduce(((e,t)=>({...e,[t]:s.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?Ee:t;return s.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.as&&console.error(ao),s.createElement(i,xe({},o,{ref:n}))}))})),{}),ao="Warning: The `as` prop has been removed in favour of `asChild`. For details, see https://radix-ui.com/docs/primitives/overview/styling#changing-the-rendered-element",lo=s.forwardRef(((e,t)=>{var n,r;const{containerRef:o,style:i,...a}=e,l=null!==(n=null==o?void 0:o.current)&&void 0!==n?n:null===globalThis||void 0===globalThis||null===(r=globalThis.document)||void 0===r?void 0:r.body,[,u]=s.useState({});return Gr((()=>{u({})}),[]),l?c.createPortal(s.createElement(io.div,xe({"data-radix-portal":""},a,{ref:t,style:l===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...i}:void 0})),l):null}));function so(e){const t=s.useRef(e);return s.useEffect((()=>{t.current=e})),s.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}const uo={bubbles:!1,cancelable:!0},co=s.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,u]=s.useState(null),c=so(o),f=so(i),d=s.useRef(null),h=we(t,(e=>u(e))),p=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect((()=>{if(r){function e(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:go(d.current,{select:!0})}function t(e){!p.paused&&l&&(l.contains(e.relatedTarget)||go(d.current,{select:!0}))}return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,l,p.paused]),s.useEffect((()=>{if(l){mo.add(p);const e=document.activeElement;if(!l.contains(e)){const t=new Event("focusScope.autoFocusOnMount",uo);l.addEventListener("focusScope.autoFocusOnMount",c),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(go(r,{select:t}),document.activeElement!==n)return}(fo(l).filter((e=>"A"!==e.tagName)),{select:!0}),document.activeElement===e&&go(l))}return()=>{l.removeEventListener("focusScope.autoFocusOnMount",c),setTimeout((()=>{const t=new Event("focusScope.autoFocusOnUnmount",uo);l.addEventListener("focusScope.autoFocusOnUnmount",f),l.dispatchEvent(t),t.defaultPrevented||go(null!=e?e:document.body,{select:!0}),l.removeEventListener("focusScope.autoFocusOnUnmount",f),mo.remove(p)}),0)}}}),[l,c,f,p]);const g=s.useCallback((e=>{if(!n&&!r)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=fo(e);return[ho(t,e),ho(t.reverse(),e)]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&go(i,{select:!0})):(e.preventDefault(),n&&go(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return s.createElement(io.div,xe({tabIndex:-1},a,{ref:h,onKeyDown:g}))}));function fo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ho(e,t){for(const n of e)if(!po(n,{upTo:t}))return n}function po(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function go(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const mo=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=vo(e,t),e.unshift(t)},remove(t){var n;e=vo(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function vo(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function yo(e){const t=so(e);s.useEffect((()=>{const e=e=>{"Escape"===e.key&&t(e)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[t])}let bo,wo=0;function xo(e,t){const n=s.createContext(t);function r(e){const{children:t,...r}=e,o=s.useMemo((()=>r),Object.values(r));return s.createElement(n.Provider,{value:o},t)}return r.displayName=e+"Provider",[r,function(r){const o=s.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}function Eo(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>s.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return s.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=s.createContext(r),i=n.length;function a(t){const{scope:n,children:r,...a}=t,l=(null==n?void 0:n[e][i])||o,u=s.useMemo((()=>a),Object.values(a));return s.createElement(l.Provider,{value:u},r)}return n=[...n,r],a.displayName=t+"Provider",[a,function(n,a){const l=(null==a?void 0:a[e][i])||o,u=s.useContext(l);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},ko(r,...t)]}function ko(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return s.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function So(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}const[_o,Co]=Io(),[Oo,Po]=Do(),[To,Ro]=Io(),[Lo,jo]=Do(),Ao=s.forwardRef(((e,t)=>{const n=0===Po(),r=s.createElement(Mo,xe({},e,{ref:t}));return n?s.createElement(_o,null,s.createElement(To,null,r)):r})),Mo=s.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...u}=e,c=Co(),f=Po()+1,d=f===c,h=Ro(n),p=jo()+(n?1:0),g=p{const e=e=>{const r="mouse"===e.pointerType;t.current=!r,n.current=r&&0===e.button},r=()=>{t.current=!1,n.current=!1};return document.addEventListener("pointerdown",e),document.addEventListener("pointerup",r),()=>{document.removeEventListener("pointerdown",e),document.removeEventListener("pointerup",r)}}),[]),Gr((()=>{if(e){function r(){wo--,0===wo&&(document.body.style.pointerEvents=bo)}return 0===wo&&(bo=document.body.style.pointerEvents),document.body.style.pointerEvents="none",wo++,()=>{t.current?document.addEventListener("click",r,{once:!0}):n.current?document.addEventListener("pointerup",r,{once:!0}):r()}}}),[e])})({disabled:n}),yo((e=>{d&&(null==r||r(e),e.defaultPrevented||null==l||l())}));const{onPointerDownCapture:m}=function(e){const t=so((e=>{g||(null==o||o(e),null==a||a(e),e.defaultPrevented||null==l||l())})),n=s.useRef(!1);return s.useEffect((()=>{const e=e=>{const r=e.target;if(r&&!n.current){const n=new CustomEvent("dismissableLayer.pointerDownOutside",{bubbles:!1,cancelable:!0,detail:{originalEvent:e}});r.addEventListener("dismissableLayer.pointerDownOutside",t,{once:!0}),r.dispatchEvent(n)}n.current=!1},r=window.setTimeout((()=>{document.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(r),document.removeEventListener("pointerdown",e)}}),[t]),{onPointerDownCapture:()=>n.current=!0}}(),{onBlurCapture:v,onFocusCapture:y}=function(e){const t=so((e=>{null==i||i(e),null==a||a(e),e.defaultPrevented||null==l||l()})),n=s.useRef(!1);return s.useEffect((()=>{const e=e=>{const r=e.target;if(r&&!n.current){const n=new CustomEvent("dismissableLayer.focusOutside",{bubbles:!1,cancelable:!0,detail:{originalEvent:e}});r.addEventListener("dismissableLayer.focusOutside",t,{once:!0}),r.dispatchEvent(n)}};return document.addEventListener("focusin",e),()=>document.removeEventListener("focusin",e)}),[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(),b=h>0&&!g;return s.createElement(Oo,{runningCount:f},s.createElement(Lo,{runningCount:p},s.createElement(io.div,xe({},u,{ref:t,style:{pointerEvents:b?"auto":void 0,...u.style},onPointerDownCapture:So(e.onPointerDownCapture,m),onBlurCapture:So(e.onBlurCapture,v),onFocusCapture:So(e.onFocusCapture,y)}))))}));function Io(e){const[t,n]=xo("TotalLayerCount",{total:0,onTotalIncrease:()=>{},onTotalDecrease:()=>{}});return[({children:e})=>{const[n,r]=s.useState(0);return s.createElement(t,{total:n,onTotalIncrease:s.useCallback((()=>r((e=>e+1))),[]),onTotalDecrease:s.useCallback((()=>r((e=>e-1))),[])},e)},function(e=!0){const{total:t,onTotalIncrease:r,onTotalDecrease:o}=n("TotalLayerCountConsumer");return s.useLayoutEffect((()=>{if(e)return r(),()=>o()}),[e,r,o]),t}]}function Do(e){const[t,n]=xo("RunningLayerCount",{count:0});return[e=>{const{children:n,runningCount:r}=e;return s.createElement(t,{count:r},n)},function(){return n("RunningLayerCountConsumer").count||0}]}const No=s.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return s.createElement(io.svg,xe({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:s.createElement("polygon",{points:"0,0 30,0 15,10"}))}));function Fo(e){const[t,n]=s.useState(void 0);return s.useEffect((()=>{if(e){const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else{const t=e.getBoundingClientRect();o=t.width,i=t.height}n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>{n(void 0),t.unobserve(e)}}}),[e]),t}let zo;const $o=new Map;function Bo(){const e=[];$o.forEach(((t,n)=>{const r=n.getBoundingClientRect();var o,i;i=r,((o=t.rect).width!==i.width||o.height!==i.height||o.top!==i.top||o.right!==i.right||o.bottom!==i.bottom||o.left!==i.left)&&(t.rect=r,e.push(t))})),e.forEach((e=>{e.callbacks.forEach((t=>t(e.rect)))})),zo=requestAnimationFrame(Bo)}function Uo(e){const[t,n]=s.useState();return s.useEffect((()=>{if(e){const t=function(e,t){const n=$o.get(e);return void 0===n?($o.set(e,{rect:{},callbacks:[t]}),1===$o.size&&(zo=requestAnimationFrame(Bo))):(n.callbacks.push(t),t(e.getBoundingClientRect())),()=>{const n=$o.get(e);if(void 0===n)return;const r=n.callbacks.indexOf(t);r>-1&&n.callbacks.splice(r,1),0===n.callbacks.length&&($o.delete(e),0===$o.size&&cancelAnimationFrame(zo))}}(e,n);return()=>{n(void 0),t()}}}),[e]),t}function Wo({anchorRect:e,popperSize:t,arrowSize:n,arrowOffset:r=0,side:o,sideOffset:i=0,align:a,alignOffset:l=0,shouldAvoidCollisions:s=!0,collisionBoundariesRect:u,collisionTolerance:c=0}){if(!e||!t||!u)return{popperStyles:Xo,arrowStyles:Ko};const f=function(e,t,n=0,r=0,o){const i=o?o.height:0,a=Ho(t,e,"x"),l=Ho(t,e,"y"),s=l.before-n-i,u=l.after+n+i,c=a.before-n-i,f=a.after+n+i;return{top:{start:{x:a.start+r,y:s},center:{x:a.center,y:s},end:{x:a.end-r,y:s}},right:{start:{x:f,y:l.start+r},center:{x:f,y:l.center},end:{x:f,y:l.end-r}},bottom:{start:{x:a.start+r,y:u},center:{x:a.center,y:u},end:{x:a.end-r,y:u}},left:{start:{x:c,y:l.start+r},center:{x:c,y:l.center},end:{x:c,y:l.end-r}}}}(t,e,i,l,n),d=f[o][a];if(!1===s){const e=Vo(d);let i=Ko;return n&&(i=Yo({popperSize:t,arrowSize:n,arrowOffset:r,side:o,align:a})),{popperStyles:{...e,"--radix-popper-transform-origin":qo(t,o,a,r,n)},arrowStyles:i,placedSide:o,placedAlign:a}}const h=DOMRect.fromRect({...t,...d}),p=(g=u,m=c,DOMRect.fromRect({width:g.width-2*m,height:g.height-2*m,x:g.left+m,y:g.top+m}));var g,m;const v=Zo(h,p),y=f[Qo(o)][a],b=function(e,t,n){const r=Qo(e);return t[e]&&!n[r]?r:e}(o,v,Zo(DOMRect.fromRect({...t,...y}),p)),w=function(e,t,n,r,o){const i="top"===n||"bottom"===n,a=i?"left":"top",l=i?"right":"bottom",s=i?"width":"height",u=t[s]>e[s];return"start"!==r&&"center"!==r||!(o[a]&&u||o[l]&&!u)?"end"!==r&&"center"!==r||!(o[l]&&u||o[a]&&!u)?r:"start":"end"}(t,e,o,a,v),x=Vo(f[b][w]);let E=Ko;return n&&(E=Yo({popperSize:t,arrowSize:n,arrowOffset:r,side:b,align:w})),{popperStyles:{...x,"--radix-popper-transform-origin":qo(t,b,w,r,n)},arrowStyles:E,placedSide:b,placedAlign:w}}function Ho(e,t,n){const r=e["x"===n?"left":"top"],o="x"===n?"width":"height",i=e[o],a=t[o];return{before:r-a,start:r,center:r+(i-a)/2,end:r+i-a,after:r+i}}function Vo(e){return{position:"absolute",top:0,left:0,minWidth:"max-content",willChange:"transform",transform:`translate3d(${Math.round(e.x+window.scrollX)}px, ${Math.round(e.y+window.scrollY)}px, 0)`}}function qo(e,t,n,r,o){const i="top"===t||"bottom"===t,a=o?o.width:0,l=o?o.height:0,s=a/2+r;let u="",c="";return i?(u={start:`${s}px`,center:"center",end:e.width-s+"px"}[n],c="top"===t?`${e.height+l}px`:-l+"px"):(u="left"===t?`${e.width+l}px`:-l+"px",c={start:`${s}px`,center:"center",end:e.height-s+"px"}[n]),`${u} ${c}`}const Xo={position:"fixed",top:0,left:0,opacity:0,transform:"translate3d(0, -200%, 0)"},Ko={position:"absolute",opacity:0};function Yo({popperSize:e,arrowSize:t,arrowOffset:n,side:r,align:o}){const i=(e.width-t.width)/2,a=(e.height-t.width)/2,l={top:0,right:90,bottom:180,left:-90}[r],s=Math.max(t.width,t.height),u={width:`${s}px`,height:`${s}px`,transform:`rotate(${l}deg)`,willChange:"transform",position:"absolute",[r]:"100%",direction:Go(r,o)};return"top"!==r&&"bottom"!==r||("start"===o&&(u.left=`${n}px`),"center"===o&&(u.left=`${i}px`),"end"===o&&(u.right=`${n}px`)),"left"!==r&&"right"!==r||("start"===o&&(u.top=`${n}px`),"center"===o&&(u.top=`${a}px`),"end"===o&&(u.bottom=`${n}px`)),u}function Go(e,t){return("top"!==e&&"right"!==e||"end"!==t)&&("bottom"!==e&&"left"!==e||"end"===t)?"ltr":"rtl"}function Qo(e){return{top:"bottom",right:"left",bottom:"top",left:"right"}[e]}function Zo(e,t){return{top:e.topt.right,bottom:e.bottom>t.bottom,left:e.left{const{__scopePopper:n,virtualRef:r,...o}=e,i=ni("PopperAnchor",n),a=s.useRef(null),l=we(t,a);return s.useEffect((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:s.createElement(io.div,xe({},o,{ref:l}))})),[oi,ii]=Jo("PopperContent"),ai=s.forwardRef(((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o,align:i="center",alignOffset:a,collisionTolerance:l,avoidCollisions:u=!0,...c}=e,f=ni("PopperContent",n),[d,h]=s.useState(),p=Uo(f.anchor),[g,m]=s.useState(null),v=Fo(g),[y,b]=s.useState(null),w=Fo(y),x=we(t,(e=>m(e))),E=function(){const[e,t]=s.useState(void 0);return s.useEffect((()=>{let e;function n(){t({width:window.innerWidth,height:window.innerHeight})}function r(){window.clearTimeout(e),e=window.setTimeout(n,100)}return n(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)}),[]),e}(),k=E?DOMRect.fromRect({...E,x:0,y:0}):void 0,{popperStyles:S,arrowStyles:_,placedSide:C,placedAlign:O}=Wo({anchorRect:p,popperSize:v,arrowSize:w,arrowOffset:d,side:r,sideOffset:o,align:i,alignOffset:a,shouldAvoidCollisions:u,collisionBoundariesRect:k,collisionTolerance:l}),P=void 0!==C;return s.createElement("div",{style:S,"data-radix-popper-content-wrapper":""},s.createElement(oi,{scope:n,arrowStyles:_,onArrowChange:b,onArrowOffsetChange:h},s.createElement(io.div,xe({"data-side":C,"data-align":O},c,{style:{...c.style,animation:P?void 0:"none"},ref:x}))))})),li=s.forwardRef((function(e,t){const{__scopePopper:n,offset:r,...o}=e,i=ii("PopperArrow",n),{onArrowOffsetChange:a}=i;return s.useEffect((()=>a(r)),[a,r]),s.createElement("span",{style:{...i.arrowStyles,pointerEvents:"none"}},s.createElement("span",{ref:i.onArrowChange,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},s.createElement(No,xe({},o,{ref:t,style:{...o.style,display:"block"}}))))})),si=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return s.createElement(ti,{scope:t,anchor:r,onAnchorChange:o},n)},ui=ri,ci=ai,fi=li;function di({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[r,o]=function({defaultProp:e,onChange:t}){const n=s.useState(e),[r]=n,o=s.useRef(r),i=so(t);return s.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,l=so(n);return[a,s.useCallback((t=>{if(i){const n=t,r="function"==typeof t?n(e):t;r!==e&&l(r)}else o(t)}),[i,e,o,l])]}const[hi,pi]=Eo("Popover",[ei]),gi=ei(),[mi,vi]=hi("Popover"),yi=s.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=vi("PopoverAnchor",n),i=gi(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=o;return s.useEffect((()=>(a(),()=>l())),[a,l]),s.createElement(ui,xe({},i,r,{ref:t}))})),bi=s.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=vi("PopoverContent",e.__scopePopover);return s.createElement(eo,{present:n||o.open},o.modal?s.createElement(wi,xe({},r,{ref:t})):s.createElement(xi,xe({},r,{ref:t})))})),wi=s.forwardRef(((e,t)=>{const{allowPinchZoom:n,portalled:r=!0,...o}=e,i=vi("PopoverContent",e.__scopePopover),a=s.useRef(null),l=we(t,a),u=s.useRef(!1);s.useEffect((()=>{const e=a.current;if(e)return mr(e)}),[]);const c=r?lo:s.Fragment;return s.createElement(c,null,s.createElement(Yr,{allowPinchZoom:n},s.createElement(Ei,xe({},o,{ref:l,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:So(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),u.current||null===(t=i.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:So(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;u.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:So(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})}))))})),xi=s.forwardRef(((e,t)=>{const{portalled:n=!0,...r}=e,o=vi("PopoverContent",e.__scopePopover),i=s.useRef(!1),a=n?lo:s.Fragment;return s.createElement(a,null,s.createElement(Ei,xe({},r,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n,r;null===(n=e.onCloseAutoFocus)||void 0===n||n.call(e,t),t.defaultPrevented||(i.current||null===(r=o.triggerRef.current)||void 0===r||r.focus(),t.preventDefault()),i.current=!1},onInteractOutside:t=>{var n,r;null===(n=e.onInteractOutside)||void 0===n||n.call(e,t),t.defaultPrevented||(i.current=!0);const a=t.target;(null===(r=o.triggerRef.current)||void 0===r?void 0:r.contains(a))&&t.preventDefault()}})))})),Ei=s.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:f,...d}=e,h=vi("PopoverContent",n),p=gi(n);return ro(),s.createElement(co,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},s.createElement(Ao,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1)},s.createElement(ci,xe({"data-state":ki(h.open),role:"dialog",id:h.contentId},p,d,{ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))}));function ki(e){return e?"open":"closed"}const Si=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,l=gi(t),u=s.useRef(null),[c,f]=s.useState(!1),[d=!1,h]=di({prop:r,defaultProp:o,onChange:i});return s.createElement(si,l,s.createElement(mi,{scope:t,contentId:Jr(),triggerRef:u,open:d,onOpenChange:h,onOpenToggle:s.useCallback((()=>h((e=>!e))),[h]),hasCustomAnchor:c,onCustomAnchorAdd:s.useCallback((()=>f(!0)),[]),onCustomAnchorRemove:s.useCallback((()=>f(!1)),[]),modal:a},n))},_i=yi,Ci=bi,Oi=s.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=gi(n);return s.createElement(fi,xe({},o,r,{ref:t}))}));function Pi(e){var t=fe(_i,{position:"absolute",left:e.xAnchorCoordinate,top:e.yAnchorCoordinate}),n=fe(Oi,{fill:"$grayBase"});return(0,Me.jsxs)(Si,{defaultOpen:!0,modal:!0,children:[(0,Me.jsx)(t,{}),(0,Me.jsxs)(Ci,{onOpenAutoFocus:function(t){e.preventAutoFocus&&t.preventDefault()},children:[e.children,(0,Me.jsx)(n,{})]})]})}function Ti(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ri(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Ri(e,t){if(e){if("string"==typeof e)return Li(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Li(e,t):void 0}}function Li(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1)){var r,o=Ti(e.split("|"));try{for(o.s();!(r=o.n()).done;){var a=r.value;i({type:Ii.SET_KEY_UP,key:a})}}catch(e){o.e(e)}finally{o.f()}}})))}})),r}),[t]),l=(0,s.useCallback)((function(e){var t=e.target;if(e.key){var n=e.key.toLowerCase();void 0!==o[n]&&(!1===o[n]&&i({type:Ii.SET_KEY_DOWN,key:n}),a(Ai(Ai({},o),{},Mi({},n,!0)),Di.includes(t.tagName))&&e.preventDefault())}}),[a,o]),u=(0,s.useCallback)((function(e){if(e.key){var t=e.key.toLowerCase();void 0!==o[t]&&!0===o[t]&&setTimeout((function(){return i({type:Ii.SET_KEY_UP,key:t})}),800)}}),[o]),(0,s.useEffect)((function(){if("undefined"!=typeof window)return window.addEventListener("keydown",l,!0),function(){return window.removeEventListener("keydown",l,!0)}}),[l]),(0,s.useEffect)((function(){if("undefined"!=typeof window)return window.addEventListener("keyup",u,!0),function(){return window.removeEventListener("keyup",u,!0)}}),[u]);var h=fe("div",{width:"1px",maxWidth:"1px",height:"100%",background:"$grayBorder"});return(0,Me.jsxs)($e,{distribution:"evenly",alignment:"center",css:{height:"100%",alignItems:"center",width:e.isTouchscreenDevice?"100%":"auto"},children:[e.isNewHighlight?(0,Me.jsx)(fr,{style:"plainIcon",title:"Create Highlight",onClick:function(){return e.handleButtonClick("create")},css:{flexDirection:"column",height:"100%",m:0,p:0,pt:"6px",alignItems:"baseline"},children:(0,Me.jsxs)($e,{css:{height:"100%",alignItems:"center"},children:[(0,Me.jsx)(zi,{size:28,strokeColor:de.colors.readerFont.toString()}),(0,Me.jsx)(Nn,{style:"body",css:{pb:"4px",pl:"12px",m:"0px",color:"$readerFont",fontWeight:"400",fontSize:"16px"},children:"Highlight"})]})}):(0,Me.jsx)(fr,{style:"plainIcon",title:"Remove Highlight",onClick:function(){return e.handleButtonClick("delete")},css:{color:"$readerFont",height:"100%",m:0,p:0,pt:"6px"},children:(0,Me.jsx)(Bi,{size:28,strokeColor:de.colors.readerFont.toString()})}),(0,Me.jsx)(h,{}),(0,Me.jsx)(fr,{style:"plainIcon",title:"Add Note to Highlight",onClick:function(){return e.handleButtonClick("comment")},css:{color:"$readerFont",height:"100%",m:0,p:0,pt:"6px"},children:(0,Me.jsx)($i,{size:28,strokeColor:de.colors.readerFont.toString()})})]})}function Ki(e,t){e.forEach((function(e){var t,n=(t=e,Array.from(document.querySelectorAll("[".concat(Bn,"='").concat(t,"']")))),r=function(e){return Array.from(document.querySelectorAll("[".concat(Un,"='").concat(e,"']")))}(e);r.forEach((function(e){e.remove()})),n.forEach((function(e){if("IMG"===e.nodeName)e.classList.remove("highlight-image");else if(e.childNodes){for(;e.hasChildNodes();){var t=e.firstChild;if(t){if(e.removeChild(t),!e.parentNode)throw new Error("highlight span has no parent node");e.parentNode.insertBefore(t,e.nextSibling)}}e.remove()}else{var n,r=document.createTextNode(e.textContent||"");null===(n=e.parentElement)||void 0===n||n.replaceChild(r,e)}}))}))}var Yi=new Uint8Array(16);function Gi(){if(!Ni&&!(Ni="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ni(Yi)}const Qi=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Zi=function(e){return"string"==typeof e&&Qi.test(e)};for(var Ji=[],ea=0;ea<256;++ea)Ji.push((ea+256).toString(16).substr(1));const ta=function(e,t,n){var r=(e=e||{}).random||(e.rng||Gi)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Ji[e[t+0]]+Ji[e[t+1]]+Ji[e[t+2]]+Ji[e[t+3]]+"-"+Ji[e[t+4]]+Ji[e[t+5]]+"-"+Ji[e[t+6]]+Ji[e[t+7]]+"-"+Ji[e[t+8]]+Ji[e[t+9]]+"-"+Ji[e[t+10]]+Ji[e[t+11]]+Ji[e[t+12]]+Ji[e[t+13]]+Ji[e[t+14]]+Ji[e[t+15]]).toLowerCase();if(!Zi(n))throw TypeError("Stringified UUID is invalid");return n}(r)};let na=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),"");function ra(e){var t=e.startContainer.nodeValue,n=e.endContainer.nodeValue,r=ia(e.startOffset,!1,t),o=ia(e.endOffset,!0,n);try{e.setStart(e.startContainer,r),e.setEnd(e.endContainer,o)}catch(e){console.warn("Unable to snap selection to the next word")}}var oa=function(e){return!!e&&/\s/.test(e)};function ia(e,t,n){if(!n)return e;var r=n.split(""),o=e;if(t){if(oa(r[o-1]))return o-1;for(;o0;){if(oa(r[o-1]))return o;o--}}return o}function aa(e){return function(e){if(Array.isArray(e))return la(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return la(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?la(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function la(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,o=t.selection,i=o.range,a=o.selection,ra(i),l=ta(),s=Yn(i),rr(s)){e.next=9;break}return e.abrupt("return",{errorMessage:"Highlight is too long"});case 9:if(a.isCollapsed||a.collapseToStart(),u=[],t.annotation&&u.push(t.annotation),r&&(t.selection.overlapHighlights.forEach((function(e){var n=t.existingHighlights.find((function(t){return t.id===e})),r=null==n?void 0:n.annotation;r&&u.push(r)})),Ki(t.selection.overlapHighlights,t.highlightStartEndOffsets)),c=Kn(s,l,u.length>0),f={prefix:c.prefix,suffix:c.suffix,quote:c.quote,id:l,shortId:na(8),patch:s,annotation:u.length>0?u.join("\n"):void 0,articleId:t.articleId},h=t.existingHighlights,!r){e.next=23;break}return e.next=19,n.mergeHighlightMutation(ua(ua({},f),{},{overlapHighlightIdList:t.selection.overlapHighlights}));case 19:d=e.sent,h=t.existingHighlights.filter((function(e){return!t.selection.overlapHighlights.includes(e.id)})),e.next=26;break;case 23:return e.next=25,n.createHighlightMutation(f);case 25:d=e.sent;case 26:if(!d){e.next=31;break}return p=[].concat(aa(h),[d]),e.abrupt("return",{highlights:p,newHighlightIndex:p.length>0?p.length-1:void 0});case 31:return e.abrupt("return",{highlights:t.existingHighlights,errorMessage:"Could not create highlight"});case 32:case"end":return e.stop()}}),e)})))).apply(this,arguments)}const ga=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>({...e,[t]:s.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?Ee:t;return s.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),s.createElement(i,xe({},o,{ref:n}))}))})),{}),ma=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=s.useState(),r=s.useRef({}),o=s.useRef(e),i=s.useRef("none"),a=e?"mounted":"unmounted",[l,u]=function(e,t){return s.useReducer(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect((()=>{const e=va(r.current);i.current="mounted"===l?e:"none"}),[l]),Gr((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=va(t);if(e)u("MOUNT");else if("none"===a||"none"===(null==t?void 0:t.display))u("UNMOUNT");else{const e=r!==a;u(n&&e?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,u]),Gr((()=>{if(t){const e=e=>{const n=va(r.current).includes(e.animationName);e.target===t&&n&&u("ANIMATION_END")},n=e=>{e.target===t&&(i.current=va(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:s.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):s.Children.only(n),i=we(r.ref,o.ref);return"function"==typeof n||r.isPresent?s.cloneElement(o,{ref:i}):null};function va(e){return(null==e?void 0:e.animationName)||"none"}ma.displayName="Presence";const ya={bubbles:!1,cancelable:!0},ba=s.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,u]=s.useState(null),c=so(o),f=so(i),d=s.useRef(null),h=we(t,(e=>u(e))),p=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect((()=>{if(r){function e(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:ka(d.current,{select:!0})}function t(e){!p.paused&&l&&(l.contains(e.relatedTarget)||ka(d.current,{select:!0}))}return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,l,p.paused]),s.useEffect((()=>{if(l){Sa.add(p);const e=document.activeElement;if(!l.contains(e)){const t=new Event("focusScope.autoFocusOnMount",ya);l.addEventListener("focusScope.autoFocusOnMount",c),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ka(r,{select:t}),document.activeElement!==n)return}(wa(l).filter((e=>"A"!==e.tagName)),{select:!0}),document.activeElement===e&&ka(l))}return()=>{l.removeEventListener("focusScope.autoFocusOnMount",c),setTimeout((()=>{const t=new Event("focusScope.autoFocusOnUnmount",ya);l.addEventListener("focusScope.autoFocusOnUnmount",f),l.dispatchEvent(t),t.defaultPrevented||ka(null!=e?e:document.body,{select:!0}),l.removeEventListener("focusScope.autoFocusOnUnmount",f),Sa.remove(p)}),0)}}}),[l,c,f,p]);const g=s.useCallback((e=>{if(!n&&!r)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=wa(e);return[xa(t,e),xa(t.reverse(),e)]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&ka(i,{select:!0})):(e.preventDefault(),n&&ka(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return s.createElement(ga.div,xe({tabIndex:-1},a,{ref:h,onKeyDown:g}))}));function wa(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xa(e,t){for(const n of e)if(!Ea(n,{upTo:t}))return n}function Ea(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function ka(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const Sa=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=_a(e,t),e.unshift(t)},remove(t){var n;e=_a(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function _a(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}let Ca,Oa=0;const Pa=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ta=s.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...u}=e,c=s.useContext(Pa),[f,d]=s.useState(null),[,h]=s.useState({}),p=we(t,(e=>d(e))),g=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(m),y=f?g.indexOf(f):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,w=y>=v,x=function(e){const t=so((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));w&&!n&&(null==o||o(e),null==a||a(e),e.defaultPrevented||null==l||l())})),n=s.useRef(!1);return s.useEffect((()=>{const e=e=>{e.target&&!n.current&&La("dismissableLayer.pointerDownOutside",t,{originalEvent:e}),n.current=!1},r=window.setTimeout((()=>{document.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(r),document.removeEventListener("pointerdown",e)}}),[t]),{onPointerDownCapture:()=>n.current=!0}}(),E=function(e){const t=so((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==i||i(e),null==a||a(e),e.defaultPrevented||null==l||l())})),n=s.useRef(!1);return s.useEffect((()=>{const e=e=>{e.target&&!n.current&&La("dismissableLayer.focusOutside",t,{originalEvent:e})};return document.addEventListener("focusin",e),()=>document.removeEventListener("focusin",e)}),[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}();return yo((e=>{y===c.layers.size-1&&(null==r||r(e),e.defaultPrevented||null==l||l())})),function({disabled:e}){const t=s.useRef(!1);Gr((()=>{if(e){function n(){Oa--,0===Oa&&(document.body.style.pointerEvents=Ca)}function r(e){t.current="mouse"!==e.pointerType}return 0===Oa&&(Ca=document.body.style.pointerEvents),document.body.style.pointerEvents="none",Oa++,document.addEventListener("pointerup",r),()=>{t.current?document.addEventListener("click",n,{once:!0}):n(),document.removeEventListener("pointerup",r)}}}),[e])}({disabled:n}),s.useEffect((()=>{f&&(n&&c.layersWithOutsidePointerEventsDisabled.add(f),c.layers.add(f),Ra())}),[f,n,c]),s.useEffect((()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),Ra())}),[f,c]),s.useEffect((()=>{const e=()=>h({});return document.addEventListener("dismissableLayer.update",e),()=>document.removeEventListener("dismissableLayer.update",e)}),[]),s.createElement(ga.div,xe({},u,{ref:p,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:So(e.onFocusCapture,E.onFocusCapture),onBlurCapture:So(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:So(e.onPointerDownCapture,x.onPointerDownCapture)}))}));function Ra(){const e=new Event("dismissableLayer.update");document.dispatchEvent(e)}function La(e,t,n){const r=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});return t&&r.addEventListener(e,t,{once:!0}),!r.dispatchEvent(o)}const ja=u["useId".toString()]||(()=>{});let Aa=0;function Ma(e){const[t,n]=s.useState(ja());return Gr((()=>{e||n((e=>null!=e?e:String(Aa++)))}),[e]),e||(t?`radix-${t}`:"")}const[Ia,Da]=Eo("Dialog"),[Na,Fa]=Ia("Dialog"),za=s.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=Fa("DialogOverlay",e.__scopeDialog);return o.modal?s.createElement(ma,{present:n||o.open},s.createElement($a,xe({},r,{ref:t}))):null})),$a=s.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Fa("DialogOverlay",n);return s.createElement(Yr,{as:Ee,allowPinchZoom:o.allowPinchZoom,shards:[o.contentRef]},s.createElement(ga.div,xe({"data-state":Va(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))})),Ba=s.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=Fa("DialogContent",e.__scopeDialog);return s.createElement(ma,{present:n||o.open},o.modal?s.createElement(Ua,xe({},r,{ref:t})):s.createElement(Wa,xe({},r,{ref:t})))})),Ua=s.forwardRef(((e,t)=>{const n=Fa("DialogContent",e.__scopeDialog),r=s.useRef(null),o=we(t,n.contentRef,r);return s.useEffect((()=>{const e=r.current;if(e)return mr(e)}),[]),s.createElement(Ha,xe({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:So(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:So(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:So(e.onFocusOutside,(e=>e.preventDefault()))}))})),Wa=s.forwardRef(((e,t)=>{const n=Fa("DialogContent",e.__scopeDialog),r=s.useRef(!1);return s.createElement(Ha,xe({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current||null===(i=n.triggerRef.current)||void 0===i||i.focus(),t.preventDefault()),r.current=!1},onInteractOutside:t=>{var o,i;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0);const a=t.target;(null===(i=n.triggerRef.current)||void 0===i?void 0:i.contains(a))&&t.preventDefault()}}))})),Ha=s.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,l=Fa("DialogContent",n),u=we(t,s.useRef(null));return ro(),s.createElement(s.Fragment,null,s.createElement(ba,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},s.createElement(Ta,xe({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Va(l.open)},a,{ref:u,onDismiss:()=>l.onOpenChange(!1)}))),!1)}));function Va(e){return e?"open":"closed"}const[qa,Xa]=xo("DialogTitleWarning",{contentName:"DialogContent",titleName:"DialogTitle",docsSlug:"dialog"}),Ka=za,Ya=Ba;var Ga,Qa=fe((e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0,allowPinchZoom:l}=e,u=s.useRef(null),c=s.useRef(null),[f=!1,d]=di({prop:r,defaultProp:o,onChange:i});return s.createElement(Na,{scope:t,triggerRef:u,contentRef:c,contentId:Ma(),titleId:Ma(),descriptionId:Ma(),open:f,onOpenChange:d,onOpenToggle:s.useCallback((()=>d((e=>!e))),[d]),modal:a,allowPinchZoom:l},n)}),{}),Za=pe({"0%":{opacity:0},"100%":{opacity:1}}),Ja=fe(Ka,{backgroundColor:"$overlay",width:"100vw",height:"100vh",position:"fixed",inset:0,"@media (prefers-reduced-motion: no-preference)":{animation:"".concat(Za," 150ms cubic-bezier(0.16, 1, 0.3, 1)")}}),el=(pe({"0%":{opacity:0,transform:"translate(-50%, -48%) scale(.96)"},"100%":{opacity:1,transform:"translate(-50%, -50%) scale(1)"}}),fe(Ya,{backgroundColor:"$grayBg",borderRadius:6,boxShadow:de.shadows.cardBoxShadow.toString(),position:"fixed","&:focus":{outline:"none"}})),tl=fe(el,{top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"90vw",maxWidth:"600px",maxHeight:"85vh","@smDown":{maxWidth:"95%",width:"95%"}}),nl=fe("textarea",{outline:"none",border:"none",overflow:"auto",resize:"none",background:"unset",color:"$grayText",fontSize:"$3",fontFamily:"inter",lineHeight:"1.35","&::placeholder":{opacity:.7}});function rl(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ol(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function il(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ol(i,r,o,a,l,"next",e)}function l(e){ol(i,r,o,a,l,"throw",e)}a(void 0)}))}}function al(e){return ll.apply(this,arguments)}function ll(){return ll=il(regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,nt.gql)(Ga||(Ga=rl(["\n mutation UpdateHighlight($input: UpdateHighlightInput!) {\n updateHighlight(input: $input) {\n ... on UpdateHighlightSuccess {\n highlight {\n id\n }\n }\n\n ... on UpdateHighlightError {\n errorCodes\n }\n }\n }\n "]))),e.prev=1,e.next=4,hn(n,{input:t});case 4:return r=e.sent,o=r,e.abrupt("return",null==o?void 0:o.updateHighlight.highlight.id);case 9:return e.prev=9,e.t0=e.catch(1),e.abrupt("return",void 0);case 12:case"end":return e.stop()}}),e,null,[[1,9]])}))),ll.apply(this,arguments)}fe(nl,{borderRadius:"6px",border:"1px solid $grayBorder",p:"$3",fontSize:"$1"});let sl,ul,cl,fl={data:""},dl=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||fl,hl=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,pl=/\/\*[^]*?\*\/|\s\s+|\n/g,gl=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?gl(a,i):i+"{"+gl(a,"k"==i[1]?"":t)+"}":"object"==typeof a?r+=gl(a,t?t.replace(/([^,])+/g,(e=>i.replace(/(^:.*)|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=gl.p?gl.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},ml={},vl=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+vl(e[n]);return t}return e},yl=(e,t,n,r,o)=>{let i=vl(e),a=ml[i]||(ml[i]=(e=>{let t=0,n=11;for(;t>>0;return"go"+n})(i));if(!ml[a]){let t=i!==e?e:(e=>{let t,n=[{}];for(;t=hl.exec(e.replace(pl,""));)t[4]?n.shift():t[3]?n.unshift(n[0][t[3]]=n[0][t[3]]||{}):n[0][t[1]]=t[2];return n[0]})(e);ml[a]=gl(o?{["@keyframes "+a]:t}:t,n?"":"."+a)}return((e,t,n)=>{-1==t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(ml[a],t,r),a},bl=(e,t,n)=>e.reduce(((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":gl(e,""):!1===e?"":e}return e+r+(null==i?"":i)}),"");function wl(e){let t=this||{},n=e.call?e(t.p):e;return yl(n.unshift?n.raw?bl(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,dl(t.target),t.g,t.o,t.k)}function xl(){return xl=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}var Nl=(0,s.forwardRef)((function(e,t){var n=e.alt,r=e.color,o=e.size,i=e.weight,a=e.mirrored,l=e.children,u=e.renderPath,c=Dl(e,["alt","color","size","weight","mirrored","children","renderPath"]),f=(0,s.useContext)(Ml),d=f.color,h=void 0===d?"currentColor":d,p=f.size,g=f.weight,m=void 0===g?"regular":g,v=f.mirrored,y=void 0!==v&&v,b=Dl(f,["color","size","weight","mirrored"]);return s.createElement("svg",Object.assign({ref:t,xmlns:"http://www.w3.org/2000/svg",width:null!=o?o:p,height:null!=o?o:p,fill:null!=r?r:h,viewBox:"0 0 256 256",transform:a||y?"scale(-1, 1)":void 0},b,c),!!n&&s.createElement("title",null,n),l,s.createElement("rect",{width:"256",height:"256",fill:"none"}),u(null!=i?i:m,null!=r?r:h))}));Nl.displayName="IconBase";const Fl=Nl;var zl=new Map;zl.set("bold",(function(e){return s.createElement(s.Fragment,null,s.createElement("polyline",{points:"172 104 113.3 160 84 132",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}))})),zl.set("duotone",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",opacity:"0.2"}),s.createElement("polyline",{points:"172 104 113.3 160 84 132",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))})),zl.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.2,104.2,0,0,0,128,24Zm49.5,85.8-58.6,56a8.1,8.1,0,0,1-5.6,2.2,7.7,7.7,0,0,1-5.5-2.2l-29.3-28a8,8,0,1,1,11-11.6l23.8,22.7,53.2-50.7a8,8,0,0,1,11,11.6Z"}))})),zl.set("light",(function(e){return s.createElement(s.Fragment,null,s.createElement("polyline",{points:"172 104 113.3 160 84 132",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}))})),zl.set("thin",(function(e){return s.createElement(s.Fragment,null,s.createElement("polyline",{points:"172 104 113.3 160 84 132",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}))})),zl.set("regular",(function(e){return s.createElement(s.Fragment,null,s.createElement("polyline",{points:"172 104 113.3 160 84 132",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))}));var $l=function(e,t){return Il(e,t,zl)},Bl=(0,s.forwardRef)((function(e,t){return s.createElement(Fl,Object.assign({ref:t},e,{renderPath:$l}))}));Bl.displayName="CheckCircle";const Ul=Bl;var Wl=new Map;Wl.set("bold",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("line",{x1:"128",y1:"80",x2:"128",y2:"132",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("circle",{cx:"128",cy:"172",r:"16"}))})),Wl.set("duotone",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",opacity:"0.2"}),s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeMiterlimit:"10",strokeWidth:"16"}),s.createElement("line",{x1:"128",y1:"80",x2:"128",y2:"136",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("circle",{cx:"128",cy:"172",r:"12"}))})),Wl.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.2,104.2,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"}))})),Wl.set("light",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("line",{x1:"128",y1:"80",x2:"128",y2:"136",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("circle",{cx:"128",cy:"172",r:"10"}))})),Wl.set("thin",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("line",{x1:"128",y1:"80",x2:"128",y2:"136",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("circle",{cx:"128",cy:"172",r:"8"}))})),Wl.set("regular",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeMiterlimit:"10",strokeWidth:"16"}),s.createElement("line",{x1:"128",y1:"80",x2:"128",y2:"136",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("circle",{cx:"128",cy:"172",r:"12"}))}));var Hl=function(e,t){return Il(e,t,Wl)},Vl=(0,s.forwardRef)((function(e,t){return s.createElement(Fl,Object.assign({ref:t},e,{renderPath:Hl}))}));Vl.displayName="WarningCircle";const ql=Vl;var Xl=new Map;Xl.set("bold",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"200",y1:"56",x2:"56",y2:"200",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("line",{x1:"200",y1:"200",x2:"56",y2:"56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}))})),Xl.set("duotone",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"200",y1:"56",x2:"56",y2:"200",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"200",y1:"200",x2:"56",y2:"56",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))})),Xl.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M139.3,128l66.4-66.3a8.1,8.1,0,0,0-11.4-11.4L128,116.7,61.7,50.3A8.1,8.1,0,0,0,50.3,61.7L116.7,128,50.3,194.3a8.1,8.1,0,0,0,0,11.4,8.2,8.2,0,0,0,11.4,0L128,139.3l66.3,66.4a8.2,8.2,0,0,0,11.4,0,8.1,8.1,0,0,0,0-11.4Z"}))})),Xl.set("light",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"200",y1:"56",x2:"56",y2:"200",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("line",{x1:"200",y1:"200",x2:"56",y2:"56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}))})),Xl.set("thin",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"200",y1:"56",x2:"56",y2:"200",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("line",{x1:"200",y1:"200",x2:"56",y2:"56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}))})),Xl.set("regular",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"200",y1:"56",x2:"56",y2:"200",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"200",y1:"200",x2:"56",y2:"56",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))}));var Kl=function(e,t){return Il(e,t,Xl)},Yl=(0,s.forwardRef)((function(e,t){return s.createElement(Fl,Object.assign({ref:t},e,{renderPath:Kl}))}));Yl.displayName="X";const Gl=Yl;function Ql(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zl(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2])||arguments[2],r=(0,s.useCallback)((function(r){var o=r.key.toLowerCase();if(e&&"enter"===o){if(n&&!r.metaKey&&!r.ctrlKey)return;e()}else t&&"escape"===o&&t()}),[t,e]);(0,s.useEffect)((function(){if("undefined"!=typeof window)return window.addEventListener("keydown",r),function(){window.removeEventListener("keydown",r)}}),[r])}((function(){p()}),void 0,!0),e.highlight&&(c=null===(r=e.highlight)||void 0===r?void 0:r.updatedAt,f="Updated ",(d=Math.ceil((new Date).valueOf()-new Date(c).valueOf())/1e3)<60?"".concat(f," a few seconds ago"):d<3600?"".concat(f," ").concat(Math.floor(d/60)," minutes ago"):d<86400?"".concat(f," ").concat(Math.floor(d/3600)," hours ago"):d<604800?"".concat(f," ").concat(Math.floor(d/86400)," days ago"):d<2592e3?"".concat(f," ").concat(Math.floor(d/604800)," weeks ago"):d<31536e3?"".concat(f," ").concat(Math.floor(d/2592e3)," months ago"):d<31536e4?"".concat(f," ").concat(Math.floor(d/31536e3)," years ago"):d<31536e5&&"".concat(f," ").concat(Math.floor(d/31536e4)," decades ago"));var c,f,d,h=(0,s.useCallback)((function(e){u(e.target.value)}),[u]),p=(0,s.useCallback)(us(regeneratorRuntime.mark((function t(){var n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l==(null===(n=e.highlight)||void 0===n?void 0:n.annotation)||null===(r=e.highlight)||void 0===r||!r.id){t.next=5;break}return t.next=3,al({highlightId:null===(o=e.highlight)||void 0===o?void 0:o.id,annotation:l});case 3:t.sent?(e.onUpdate(as(as({},e.highlight),{},{annotation:l})),e.onOpenChange(!1)):rs("Error updating your note",{position:"bottom-right"});case 5:if(e.highlight||!e.createHighlightForNote){t.next=12;break}return t.next=8,e.createHighlightForNote(l);case 8:t.sent?e.onOpenChange(!0):rs("Error saving highlight",{position:"bottom-right"}),t.next=13;break;case 12:e.onOpenChange(!1);case 13:case"end":return t.stop()}}),t)}))),[l,e]);return(0,Me.jsxs)(Qa,{defaultOpen:!0,onOpenChange:e.onOpenChange,children:[(0,Me.jsx)(Ja,{}),(0,Me.jsx)(tl,{css:{overflow:"auto"},onPointerDownOutside:function(e){e.preventDefault()},children:(0,Me.jsxs)(Be,{children:[(0,Me.jsxs)($e,{distribution:"between",alignment:"center",css:{width:"100%"},children:[(0,Me.jsx)(Nn,{style:"modalHeadline",css:{p:"16px"},children:"Notes"}),(0,Me.jsx)(fr,{css:{pt:"16px",pr:"16px"},style:"ghost",onClick:function(){e.onOpenChange(!1)},children:(0,Me.jsx)(os,{size:20,strokeColor:de.colors.grayText.toString()})})]}),(0,Me.jsx)(Ne,{css:{width:"100%",height:"1px",opacity:"0.2",backgroundColor:de.colors.grayText.toString()}}),(0,Me.jsx)(nl,{css:{mt:"$2",width:"95%",p:"0px",height:"$6",marginLeft:"16px"},autoFocus:!0,placeholder:"Add your note here",value:l,onChange:h,maxLength:4e3}),(0,Me.jsx)(Ne,{css:{width:"100%",height:"1px",opacity:"0.2",backgroundColor:de.colors.grayText.toString()}}),(0,Me.jsx)($e,{alignment:"end",distribution:"end",css:{width:"100%",padding:"22px 22px 20px 0"},children:(0,Me.jsx)(fr,{style:"ctaDarkYellow",onClick:p,children:"Save"})})]})})]})}function ds(e){var t,n=(0,s.useMemo)((function(){return e.highlight.quote.split("\n")}),[e.highlight.quote]),r=null!==(t=e.highlight.annotation)&&void 0!==t?t:"",o=fe(ze,{margin:"0px 24px 16px 24px",fontSize:"18px",lineHeight:"27px",color:"$textDefault",cursor:"pointer"});return(0,Me.jsxs)(Be,{css:{width:"100%",boxSizing:"border-box"},children:[r&&(0,Me.jsx)(De,{css:{p:"16px",m:"16px",ml:"24px",mr:"24px",borderRadius:"6px",bg:"$grayBase"},children:(0,Me.jsx)(Nn,{style:"shareHighlightModalAnnotation",children:r})}),(0,Me.jsxs)(o,{onClick:function(){e.scrollToHighlight&&e.scrollToHighlight(e.highlight.id)},children:[e.highlight.prefix,(0,Me.jsx)(Ne,{css:{bg:"$highlightBackground",p:"1px",borderRadius:"2px"},children:n.map((function(e,t){return(0,Me.jsxs)(s.Fragment,{children:[e,t!==n.length-1&&(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)("br",{}),(0,Me.jsx)("br",{})]})]},t)}))}),e.highlight.suffix]}),(0,Me.jsx)(De,{css:{p:"24px",pt:"0",width:"100%",boxSizing:"border-box"},children:e.author&&e.title&&(0,Me.jsx)(Nn,{style:"highlightTitleAndAuthor",children:e.title+e.author})})]})}function hs(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function ps(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){hs(i,r,o,a,l,"next",e)}function l(e){hs(i,r,o,a,l,"throw",e)}a(void 0)}))}}function gs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ns.createElement(ga.span,xe({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),bs=s.forwardRef(((e,t)=>{var n,r;const{containerRef:o,style:i,...a}=e,l=null!==(n=null==o?void 0:o.current)&&void 0!==n?n:null===globalThis||void 0===globalThis||null===(r=globalThis.document)||void 0===r?void 0:r.body,[,u]=s.useState({});return Gr((()=>{u({})}),[]),l?c.createPortal(s.createElement(ga.div,xe({"data-radix-portal":""},a,{ref:t,style:l===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...i}:void 0})),l):null})),ws=s.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return s.createElement(ga.svg,xe({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:s.createElement("polygon",{points:"0,0 30,0 15,10"}))}));function xs(e){const[t,n]=s.useState(void 0);return s.useEffect((()=>{if(e){const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else{const t=e.getBoundingClientRect();o=t.width,i=t.height}n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const[Es,ks]=Eo("Popper"),[Ss,_s]=Es("Popper"),Cs=s.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=_s("PopperAnchor",n),a=s.useRef(null),l=we(t,a);return s.useEffect((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:s.createElement(ga.div,xe({},o,{ref:l}))})),[Os,Ps]=Es("PopperContent"),Ts=s.forwardRef(((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o,align:i="center",alignOffset:a,collisionTolerance:l,avoidCollisions:u=!0,...c}=e,f=_s("PopperContent",n),[d,h]=s.useState(),p=Uo(f.anchor),[g,m]=s.useState(null),v=xs(g),[y,b]=s.useState(null),w=xs(y),x=we(t,(e=>m(e))),E=function(){const[e,t]=s.useState(void 0);return s.useEffect((()=>{let e;function n(){t({width:window.innerWidth,height:window.innerHeight})}function r(){window.clearTimeout(e),e=window.setTimeout(n,100)}return n(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)}),[]),e}(),k=E?DOMRect.fromRect({...E,x:0,y:0}):void 0,{popperStyles:S,arrowStyles:_,placedSide:C,placedAlign:O}=Wo({anchorRect:p,popperSize:v,arrowSize:w,arrowOffset:d,side:r,sideOffset:o,align:i,alignOffset:a,shouldAvoidCollisions:u,collisionBoundariesRect:k,collisionTolerance:l}),P=void 0!==C;return s.createElement("div",{style:S,"data-radix-popper-content-wrapper":""},s.createElement(Os,{scope:n,arrowStyles:_,onArrowChange:b,onArrowOffsetChange:h},s.createElement(ga.div,xe({"data-side":C,"data-align":O},c,{style:{...c.style,animation:P?void 0:"none"},ref:x}))))})),Rs=s.forwardRef((function(e,t){const{__scopePopper:n,offset:r,...o}=e,i=Ps("PopperArrow",n),{onArrowOffsetChange:a}=i;return s.useEffect((()=>a(r)),[a,r]),s.createElement("span",{style:{...i.arrowStyles,pointerEvents:"none"}},s.createElement("span",{ref:i.onArrowChange,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},s.createElement(ws,xe({},o,{ref:t,style:{...o.style,display:"block"}}))))})),Ls=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return s.createElement(Ss,{scope:t,anchor:r,onAnchorChange:o},n)},js=Cs,As=Ts,Ms=Rs;function Is(e){const t=s.useRef({value:e,previous:e});return s.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}const[Ds,Ns]=Eo("Tooltip",[ks]),Fs=ks(),[zs,$s]=Ds("TooltipProvider",{isOpenDelayed:!0,delayDuration:700,onOpen:()=>{},onClose:()=>{}}),[Bs,Us]=Ds("Tooltip"),Ws=s.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Us("TooltipTrigger",n),i=Fs(n),a=we(t,o.onTriggerChange),l=s.useRef(!1),u=s.useCallback((()=>l.current=!1),[]);return s.useEffect((()=>()=>document.removeEventListener("mouseup",u)),[u]),s.createElement(js,xe({asChild:!0},i),s.createElement(ga.button,xe({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:a,onMouseEnter:So(e.onMouseEnter,o.onTriggerEnter),onMouseLeave:So(e.onMouseLeave,o.onClose),onMouseDown:So(e.onMouseDown,(()=>{o.onClose(),l.current=!0,document.addEventListener("mouseup",u,{once:!0})})),onFocus:So(e.onFocus,(()=>{l.current||o.onOpen()})),onBlur:So(e.onBlur,o.onClose),onClick:So(e.onClick,(e=>{0===e.detail&&o.onClose()}))})))})),Hs=s.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=Us("TooltipContent",e.__scopeTooltip);return s.createElement(ma,{present:n||o.open},s.createElement(Vs,xe({ref:t},r)))})),Vs=s.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,portalled:i=!0,...a}=e,l=Us("TooltipContent",n),u=Fs(n),c=i?bs:s.Fragment,{onClose:f}=l;return yo((()=>f())),s.useEffect((()=>(document.addEventListener("tooltip.open",f),()=>document.removeEventListener("tooltip.open",f))),[f]),s.createElement(c,null,s.createElement(qs,{__scopeTooltip:n}),s.createElement(As,xe({"data-state":l.stateAttribute},u,a,{ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),s.createElement(Se,null,r),s.createElement(ys,{id:l.contentId,role:"tooltip"},o||r)))}));function qs(e){const{__scopeTooltip:t}=e,n=Us("CheckTriggerMoved",t),r=Uo(n.trigger),o=null==r?void 0:r.left,i=Is(o),a=null==r?void 0:r.top,l=Is(a),u=n.onClose;return s.useEffect((()=>{(void 0!==i&&i!==o||void 0!==l&&l!==a)&&u()}),[u,i,l,o,a]),null}const Xs=Ws,Ks=Hs,Ys=s.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Fs(n);return s.createElement(Ms,xe({},o,r,{ref:t}))}));var Gs=["children","active","tooltipContent","tooltipSide","arrowStyles"];function Qs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zs(e){for(var t=1;t{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,delayDuration:a}=e,l=$s("Tooltip",t),u=Fs(t),[c,f]=s.useState(null),d=Ma(),h=s.useRef(0),p=null!=a?a:l.delayDuration,g=s.useRef(!1),{onOpen:m,onClose:v}=l,[y=!1,b]=di({prop:r,defaultProp:o,onChange:e=>{e&&(document.dispatchEvent(new CustomEvent("tooltip.open")),m()),null==i||i(e)}}),w=s.useMemo((()=>y?g.current?"delayed-open":"instant-open":"closed"),[y]),x=s.useCallback((()=>{window.clearTimeout(h.current),g.current=!1,b(!0)}),[b]),E=s.useCallback((()=>{window.clearTimeout(h.current),h.current=window.setTimeout((()=>{g.current=!0,b(!0)}),p)}),[p,b]);return s.useEffect((()=>()=>window.clearTimeout(h.current)),[]),s.createElement(Ls,u,s.createElement(Bs,{scope:t,contentId:d,open:y,stateAttribute:w,trigger:c,onTriggerChange:f,onTriggerEnter:s.useCallback((()=>{l.isOpenDelayed?E():x()}),[l.isOpenDelayed,E,x]),onOpen:s.useCallback(x,[x]),onClose:s.useCallback((()=>{window.clearTimeout(h.current),b(!1),v()}),[b,v])},n))},iu=Xs,au=nu,lu=ru,su={backgroundColor:"#F9D354",color:"#0A0806"},uu={fill:"#F9D354"},cu=function(e){var t=e.children,n=e.active,r=e.tooltipContent,o=e.tooltipSide,i=e.arrowStyles,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Gs);return(0,Me.jsxs)(ou,{open:n,children:[(0,Me.jsx)(iu,{asChild:!0,children:t}),(0,Me.jsxs)(au,Zs(Zs({sideOffset:5,side:o,style:su},a),{},{children:[r,(0,Me.jsx)(lu,{style:null!=i?i:uu})]}))]})},fu=new Map;fu.set("bold",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("path",{d:"M168,88H152a23.9,23.9,0,0,0-24,24V224",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("line",{x1:"96",y1:"144",x2:"160",y2:"144",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}))})),fu.set("duotone",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",opacity:"0.2"}),s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("path",{d:"M168,88H152a23.9,23.9,0,0,0-24,24V224",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"96",y1:"144",x2:"160",y2:"144",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))})),fu.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M232,128a104.3,104.3,0,0,1-91.5,103.3,4.1,4.1,0,0,1-4.5-4V152h24a8,8,0,0,0,8-8.5,8.2,8.2,0,0,0-8.3-7.5H136V112a16,16,0,0,1,16-16h16a8,8,0,0,0,8-8.5,8.2,8.2,0,0,0-8.3-7.5H152a32,32,0,0,0-32,32v24H96a8,8,0,0,0-8,8.5,8.2,8.2,0,0,0,8.3,7.5H120v75.3a4,4,0,0,1-4.4,4C62.8,224.9,22,179,24.1,124.1A104,104,0,0,1,232,128Z"}))})),fu.set("light",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("path",{d:"M168,88H152a23.9,23.9,0,0,0-24,24V224",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("line",{x1:"96",y1:"144",x2:"160",y2:"144",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}))})),fu.set("thin",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("path",{d:"M168,88H152a23.9,23.9,0,0,0-24,24V224",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("line",{x1:"96",y1:"144",x2:"160",y2:"144",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}))})),fu.set("regular",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("path",{d:"M168,88H152a23.9,23.9,0,0,0-24,24V224",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"96",y1:"144",x2:"160",y2:"144",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))}));var du=function(e,t){return Il(e,t,fu)},hu=(0,s.forwardRef)((function(e,t){return s.createElement(Fl,Object.assign({ref:t},e,{renderPath:du}))}));hu.displayName="FacebookLogo";const pu=hu;var gu=new Map;gu.set("bold",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}))})),gu.set("duotone",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",opacity:"0.2"}),s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))})),gu.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M245.7,77.7l-30.2,30.1C209.5,177.7,150.5,232,80,232c-14.5,0-26.5-2.3-35.6-6.8-7.3-3.7-10.3-7.6-11.1-8.8a8,8,0,0,1,3.9-11.9c.2-.1,23.8-9.1,39.1-26.4a108.6,108.6,0,0,1-24.7-24.4c-13.7-18.6-28.2-50.9-19.5-99.1a8.1,8.1,0,0,1,5.5-6.2,8,8,0,0,1,8.1,1.9c.3.4,33.6,33.2,74.3,43.8V88a48.3,48.3,0,0,1,48.6-48,48.2,48.2,0,0,1,41,24H240a8,8,0,0,1,7.4,4.9A8.4,8.4,0,0,1,245.7,77.7Z"}))})),gu.set("light",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}))})),gu.set("thin",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}))})),gu.set("regular",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))}));var mu=function(e,t){return Il(e,t,gu)},vu=(0,s.forwardRef)((function(e,t){return s.createElement(Fl,Object.assign({ref:t},e,{renderPath:mu}))}));vu.displayName="TwitterLogo";const yu=vu;function bu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nt.start?1:0})).forEach((function(e){f>=e.start&&d<=e.end?p=!0:f<=e.end&&e.start<=d&&g.push(e)})),m=null,!g.length){t.next=21;break}if(x=!1,f<=g[0].start?(v=a.startContainer,y=a.startOffset):(E=tr(g[0].id),v=E.shift(),y=0),d>=g[g.length-1].end?(b=a.endContainer,w=a.endOffset):(k=tr(g[g.length-1].id),b=k.pop(),w=0,x=!0),v&&b){t.next=18;break}throw new Error("Failed to query node for computing new merged range");case 18:(m=new Range).setStart(v,y),x?m.setEndAfter(b):m.setEnd(b,w);case 21:if(!p){t.next=23;break}return t.abrupt("return",setTimeout((function(){o(null)}),100));case 23:return t.abrupt("return",o({selection:s,mouseEvent:n,range:null!==(r=m)&&void 0!==r?r:a,focusPosition:{x:h[l?"left":"right"],y:h[l?"top":"bottom"],isReverseSelected:l},overlapHighlights:g.map((function(e){return e.id}))}));case 24:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),[e]);return(0,s.useEffect)((function(){return document.addEventListener("mouseup",i),document.addEventListener("touchend",i),document.addEventListener("contextmenu",i),function(){document.removeEventListener("mouseup",i),document.removeEventListener("touchend",i),document.removeEventListener("contextmenu",i)}}),[e,i,false]),[r,o]}(e.highlightLocations),h=Nu(d,2),p=h[0],g=h[1],m=(0,s.useMemo)((function(){var e;return"undefined"!=typeof window&&!(!Ui()&&!(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document))&&"function"==typeof(null===(e=navigator)||void 0===e?void 0:e.share)}),[]),v=(0,s.useCallback)(function(){var t=Du(regeneratorRuntime.mark((function t(o){var i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=o||(null==c?void 0:c.id)){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,e.articleMutations.deleteHighlightMutation(i);case 5:t.sent?(Ki(n.map((function(e){return e.id})),e.highlightLocations),r(n.filter((function(e){return e.id!==i}))),f(void 0)):console.error("Failed to delete highlight");case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),[c,n,e.highlightLocations]),y=(0,s.useCallback)((function(t){Ki([t.id],e.highlightLocations);var o,i=n.filter((function(e){return e.id!==t.id}));r([].concat(function(e){if(Array.isArray(e))return zu(e)}(o=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||Fu(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[t]))}),[n,e.highlightLocations]),b=(0,s.useCallback)((function(t){var n;null===(n=navigator)||void 0===n||n.share({title:e.articleTitle,url:"".concat(e.highlightsBaseURL,"/").concat(t)}).then((function(){f(void 0)})).catch((function(e){console.log(e),f(void 0)}))}),[e.articleTitle,e.highlightsBaseURL]),w=(0,s.useCallback)((function(t){var n,r,o,i,l,s,u;void 0!==(null===(n=window)||void 0===n||null===(r=n.webkit)||void 0===r?void 0:r.messageHandlers.highlightAction)&&e.highlightBarDisabled?null===(o=window)||void 0===o||null===(i=o.webkit)||void 0===i||null===(l=i.messageHandlers.highlightAction)||void 0===l||l.postMessage({actionID:"annotate",annotation:null!==(s=null===(u=t.highlight)||void 0===u?void 0:u.annotation)&&void 0!==s?s:""}):(t.createHighlightForNote=function(){var e=Du(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.selectionData){e.next=2;break}return e.abrupt("return",void 0);case 2:return e.next=4,x(t.selectionData,n);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),a(t))}),[e.highlightBarDisabled]),x=function(){var t=Du(regeneratorRuntime.mark((function t(o,i){var l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ha({selection:o,articleId:e.articleId,existingHighlights:n,highlightStartEndOffsets:e.highlightLocations,annotation:i},e.articleMutations);case 2:if((l=t.sent).highlights&&0!=l.highlights.length){t.next=6;break}return console.error("Failed to create highlight"),t.abrupt("return",void 0);case 6:if(g(null),r(l.highlights),void 0!==l.newHighlightIndex){t.next=11;break}return a({highlightModalAction:"none"}),t.abrupt("return",void 0);case 11:return t.abrupt("return",l.highlights[l.newHighlightIndex]);case 12:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),E=(0,s.useCallback)(function(){var e=Du(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(p){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,x(p,n);case 4:e.sent||rs("Error saving highlight",{position:"bottom-right"});case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),[b,n,w,e.articleId,p,g,m,e.highlightLocations]),k=(0,s.useCallback)((function(e){var t=e.target,r=e.pageX,o=e.pageY;if(t&&(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE)if(l.current={pageX:r,pageY:o},t.hasAttribute(Bn)){var i=t.getAttribute(Bn),a=n.find((function(e){return e.id===i}));if(a){var s,u,c,d=t.getBoundingClientRect();null===(s=window)||void 0===s||null===(u=s.webkit)||void 0===u||null===(c=u.messageHandlers.viewerAction)||void 0===c||c.postMessage({actionID:"showMenu",rectX:d.x,rectY:d.y,rectWidth:d.width,rectHeight:d.height}),f(a)}}else if(t.hasAttribute(Un)){var h=t.getAttribute(Un),p=n.find((function(e){return e.id===h}));w({highlight:p,highlightModalAction:"addComment"})}else f(void 0)}),[n,e.highlightLocations]);(0,s.useEffect)((function(){if("undefined"!=typeof window)return document.addEventListener("click",k),function(){return document.removeEventListener("click",k)}}),[k]);var S,_,C,O,P,T,R=(0,s.useCallback)((function(t){switch(t){case"delete":v();break;case"create":E("none");break;case"comment":e.highlightBarDisabled||c?w({highlight:c,highlightModalAction:"addComment"}):w({highlight:void 0,selectionData:p||void 0,highlightModalAction:"addComment"});break;case"share":var n,r,o;e.isAppleAppEmbed&&(null===(n=window)||void 0===n||null===(r=n.webkit)||void 0===r||null===(o=r.messageHandlers.highlightAction)||void 0===o||o.postMessage({actionID:"share",highlightID:null==c?void 0:c.id})),c?m?b(c.shortId):a({highlight:c,highlightModalAction:"share"}):E("share");break;case"unshare":console.log("unshare")}}),[E,c,b,w,e.highlightBarDisabled,e.isAppleAppEmbed,v,m]);return(0,s.useEffect)((function(){var t=function(){R("comment")},n=function(){R("create")},r=function(){R("share")},o=function(){R("delete")},i=function(){f(void 0)},a=function(){var e=Du(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!c){e.next=4;break}return e.next=3,navigator.clipboard.writeText(c.quote);case 3:f(void 0);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),l=function(){var t=Du(regeneratorRuntime.mark((function t(n){var r,o,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!c){t.next=9;break}return i=null!==(r=n.annotation)&&void 0!==r?r:"",t.next=4,e.articleMutations.updateHighlightMutation({highlightId:c.id,annotation:null!==(o=n.annotation)&&void 0!==o?o:""});case 4:t.sent?y(Au(Au({},c),{},{annotation:i})):console.log("failed to change annotation for highlight with id",c.id),f(void 0),t.next=10;break;case 9:E("none",n.annotation);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return document.addEventListener("annotate",t),document.addEventListener("highlight",n),document.addEventListener("share",r),document.addEventListener("remove",o),document.addEventListener("copyHighlight",a),document.addEventListener("dismissHighlight",i),document.addEventListener("saveAnnotation",l),function(){document.removeEventListener("annotate",t),document.removeEventListener("highlight",n),document.removeEventListener("share",r),document.removeEventListener("remove",o),document.removeEventListener("copyHighlight",a),document.removeEventListener("dismissHighlight",i),document.removeEventListener("saveAnnotation",l)}})),"addComment"==(null==i?void 0:i.highlightModalAction)?(0,Me.jsx)(fs,{highlight:i.highlight,author:e.articleAuthor,title:e.articleTitle,onUpdate:y,onOpenChange:function(){return a({highlightModalAction:"none"})},createHighlightForNote:null==i?void 0:i.createHighlightForNote}):"share"==(null==i?void 0:i.highlightModalAction)&&i.highlight?(0,Me.jsx)(xu,{url:"".concat(e.highlightsBaseURL,"/").concat(i.highlight.shortId),title:e.articleTitle,author:e.articleAuthor,highlight:i.highlight,onOpenChange:function(){a({highlightModalAction:"none"})}}):e.highlightBarDisabled||!c&&!p?e.showHighlightsModal?(0,Me.jsx)(Tu,{highlights:n,onOpenChange:function(){return e.setShowHighlightsModal(!1)},scrollToHighlight:function(t){var n=document.querySelector('[omnivore-highlight-id="'.concat(t,'"]'));n&&(n.scrollIntoView({block:"center",behavior:"smooth"}),window.location.hash="#".concat(t),e.setShowHighlightsModal(!1))},deleteHighlightAction:function(e){v(e)}}):(0,Me.jsx)(Me.Fragment,{}):(0,Me.jsx)(Me.Fragment,{children:(0,Me.jsx)(qi,{anchorCoordinates:{pageX:null!==(S=null!==(_=null===(C=l.current)||void 0===C?void 0:C.pageX)&&void 0!==_?_:null==p?void 0:p.focusPosition.x)&&void 0!==S?S:0,pageY:null!==(O=null!==(P=null===(T=l.current)||void 0===T?void 0:T.pageY)&&void 0!==P?P:null==p?void 0:p.focusPosition.y)&&void 0!==O?O:0},isNewHighlight:!!p,handleButtonClick:R,isSharedToFeed:null!=(null==c?void 0:c.sharedAt),isTouchscreenDevice:!0})})}function Bu(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function Uu(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Bu(i,r,o,a,l,"next",e)}function l(e){Bu(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Wu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n>16&255,n>>8&255,255&n]);return(0,Me.jsx)(fr,{style:"plainIcon",onClick:function(t){r.push('/home?q=label:"'.concat(e.text,'"')),t.stopPropagation()},children:(0,Me.jsx)(Ne,{css:{display:"inline-table",margin:"4px",borderRadius:"32px",color:e.color,fontSize:"12px",fontWeight:"bold",padding:"2px 5px 2px 5px",whiteSpace:"nowrap",cursor:"pointer",backgroundClip:"padding-box",border:"1px solid rgba(".concat(o[0],", ").concat(o[1],", ").concat(o[2],", 0.7)"),backgroundColor:"rgba(".concat(o[0],", ").concat(o[1],", ").concat(o[2],", 0.08)")},children:e.text})})}function Qu(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function Zu(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Qu(i,r,o,a,l,"next",e)}function l(e){Qu(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Ju(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ec(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ec(e,t):void 0}}(e,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 ec(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=100&&r<=300&&k(r)},n=function(e){var t,n,r=null!==(t=null!==(n=e.maxWidthPercentage)&&void 0!==n?n:b)&&void 0!==t?t:100;r>=40&&r<=100&&w(r)},o=function(t){var n,r,o,i=null!==(n=null!==(r=null!==(o=t.fontFamily)&&void 0!==o?o:_)&&void 0!==r?r:e.fontFamily)&&void 0!==n?n:"inter";console.log("setting font fam to",t.fontFamily),C(i)},i=function(){var e=Zu(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n="high"==t.fontContrast,T(n);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),a=function(){var e=Zu(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(r=null!==(n=t.fontSize)&&void 0!==n?n:18)>=10&&r<=28&&N(r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),l=function(e){var t;Pn(null!==(t=e.isDark)&&void 0!==t&&t?r.Dark:r.Light)},s=function(){navigator.share&&navigator.share({title:e.article.title,url:e.article.originalArticleUrl})};return document.addEventListener("updateFontFamily",o),document.addEventListener("updateLineHeight",t),document.addEventListener("updateMaxWidthPercentage",n),document.addEventListener("updateFontSize",a),document.addEventListener("updateColorMode",l),document.addEventListener("handleFontContrastChange",i),document.addEventListener("share",s),function(){document.removeEventListener("updateFontFamily",o),document.removeEventListener("updateLineHeight",t),document.removeEventListener("updateMaxWidthPercentage",n),document.removeEventListener("updateFontSize",a),document.removeEventListener("updateColorMode",l),document.removeEventListener("handleFontContrastChange",i),document.removeEventListener("share",s)}}));var F={fontSize:m,margin:null!==(o=e.margin)&&void 0!==o?o:360,maxWidthPercentage:null!=b?b:e.maxWidthPercentage,lineHeight:null!==(i=null!=E?E:e.lineHeight)&&void 0!==i?i:150,fontFamily:null!==(a=null!=_?_:e.fontFamily)&&void 0!==a?a:"inter",readerFontColor:P?de.colors.readerFontHighContrast.toString():de.colors.readerFont.toString(),readerFontColorTransparent:de.colors.readerFontTransparent.toString(),readerTableHeaderColor:de.colors.readerTableHeader.toString(),readerHeadersColor:de.colors.readerHeader.toString()};return(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsxs)(De,{id:"article-container",css:{padding:"16px",maxWidth:"".concat(null!==(l=F.maxWidthPercentage)&&void 0!==l?l:100,"%"),background:e.isAppleAppEmbed?"unset":de.colors.grayBg.toString(),"--text-font-family":F.fontFamily,"--text-font-size":"".concat(F.fontSize,"px"),"--line-height":"".concat(F.lineHeight,"%"),"--blockquote-padding":"0.5em 1em","--blockquote-icon-font-size":"1.3rem","--figure-margin":"1.6rem auto","--hr-margin":"1em","--font-color":F.readerFontColor,"--font-color-transparent":F.readerFontColorTransparent,"--table-header-color":F.readerTableHeaderColor,"--headers-color":F.readerHeadersColor,"@sm":{"--blockquote-padding":"1em 2em","--blockquote-icon-font-size":"1.7rem","--figure-margin":"2.6875rem auto","--hr-margin":"2em",margin:"30px 0px"},"@md":{maxWidth:F.maxWidthPercentage?"".concat(F.maxWidthPercentage,"%"):1024-F.margin}},children:[(0,Me.jsxs)(Be,{alignment:"start",distribution:"start",children:[(0,Me.jsx)(Nn,{style:"boldHeadline","data-testid":"article-headline",css:{fontFamily:F.fontFamily},children:e.article.title}),(0,Me.jsx)(Fn,{rawDisplayDate:null!==(u=e.article.publishedAt)&&void 0!==u?u:e.article.createdAt,author:e.article.author,href:e.article.url}),e.labels?(0,Me.jsx)(Ne,{css:{pb:"16px",width:"100%","&:empty":{display:"none"}},children:null===(c=e.labels)||void 0===c?void 0:c.map((function(e){return(0,Me.jsx)(Gu,{text:e.name,color:e.color},e.id)}))}):null]}),(0,Me.jsx)(Dn,{highlightReady:j,highlightHref:R,articleId:e.article.id,content:e.article.content,initialAnchorIndex:e.article.readingProgressAnchorIndex,articleMutations:e.articleMutations}),(0,Me.jsxs)(fr,{style:"ghost",css:{p:0,my:"$4",color:"$error",fontSize:"$1","&:hover":{opacity:.8}},onClick:function(){return p(!0)},children:["Report issues with this page -",">"]}),(0,Me.jsx)(De,{css:{height:"100px"}})]}),(0,Me.jsx)($u,{highlightLocations:I,highlights:e.article.highlights,articleTitle:e.article.title,articleAuthor:null!==(f=e.article.author)&&void 0!==f?f:"",articleId:e.article.id,isAppleAppEmbed:e.isAppleAppEmbed,highlightsBaseURL:e.highlightsBaseURL,highlightBarDisabled:e.highlightBarDisabled,showHighlightsModal:e.showHighlightsModal,setShowHighlightsModal:e.setShowHighlightsModal,articleMutations:e.articleMutations}),h?(0,Me.jsx)(Hu,{onCommit:function(t){!function(e){Ku.apply(this,arguments)}({pageId:e.article.id,itemUrl:e.article.url,reportTypes:["CONTENT_DISPLAY"],reportComment:t})},onOpenChange:function(e){return p(e)}}):null]})}var nc=o(3379),rc=o.n(nc),oc=o(7795),ic=o.n(oc),ac=o(569),lc=o.n(ac),sc=o(3565),uc=o.n(sc),cc=o(9216),fc=o.n(cc),dc=o(4589),hc=o.n(dc),pc=o(7420),gc={};gc.styleTagTransform=hc(),gc.setAttributes=uc(),gc.insert=lc().bind(null,"head"),gc.domAPI=ic(),gc.insertStyleElement=fc(),rc()(pc.Z,gc),pc.Z&&pc.Z.locals&&pc.Z.locals;var mc=o(2778),vc={};function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bc(t){for(var n=1;n0&&void 0!==arguments[0])||arguments[0];if("undefined"!=typeof window){var t=window.localStorage.getItem(Cn);t&&Object.values(r).includes(t)&&(e?On(t):Pn(t))}}(!1),(0,Me.jsx)(Me.Fragment,{children:(0,Me.jsx)(De,{css:{overflowY:"auto",height:"100%",width:"100vw"},children:(0,Me.jsx)(Be,{alignment:"center",distribution:"center",className:"disable-webkit-callout",children:(0,Me.jsx)(tc,{article:window.omnivoreArticle,labels:window.omnivoreArticle.labels,isAppleAppEmbed:!0,highlightBarDisabled:!0,highlightsBaseURL:"https://example.com",fontSize:null!==(e=window.fontSize)&&void 0!==e?e:18,fontFamily:null!==(t=window.fontFamily)&&void 0!==t?t:"inter",margin:window.margin,maxWidthPercentage:window.maxWidthPercentage,lineHeight:window.lineHeight,articleMutations:{createHighlightMutation:function(e){return wc("createHighlight",e)},deleteHighlightMutation:function(e){return wc("deleteHighlight",{highlightId:e})},mergeHighlightMutation:function(e){return wc("mergeHighlight",e)},updateHighlightMutation:function(e){return wc("updateHighlight",e)},articleReadingProgressMutation:function(e){return wc("articleReadingProgress",e)}}})})})})};c.render((0,Me.jsx)(xc,{}),document.getElementById("root"))})()})();
\ No newline at end of file
+(()=>{var e,t,n={7162:(e,t,n)=>{e.exports=n(5047)},6279:function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),i="FormData"in e,a="ArrayBuffer"in e;if(a)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(e){return e&&l.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function c(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||s(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,n,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=p(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function x(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},v.call(b.prototype),v.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},x.error=function(){var e=new x(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];x.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new x(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function k(e,n){return new Promise((function(r,i){var a=new b(e,n);if(a.signal&&a.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function s(){l.abort()}l.onload=function(){var e,t,n={status:l.status,statusText:l.statusText,headers:(e=l.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};n.url="responseURL"in l?l.responseURL:n.headers.get("X-Request-URL");var o="response"in l?l.response:l.responseText;r(new x(o,n))},l.onerror=function(){i(new TypeError("Network request failed"))},l.ontimeout=function(){i(new TypeError("Network request failed"))},l.onabort=function(){i(new t.DOMException("Aborted","AbortError"))},l.open(a.method,a.url,!0),"include"===a.credentials?l.withCredentials=!0:"omit"===a.credentials&&(l.withCredentials=!1),"responseType"in l&&o&&(l.responseType="blob"),a.headers.forEach((function(e,t){l.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",s),l.onreadystatechange=function(){4===l.readyState&&a.signal.removeEventListener("abort",s)}),l.send(void 0===a._bodyInit?null:a._bodyInit)}))}k.polyfill=!0,e.fetch||(e.fetch=k,e.Headers=d,e.Request=b,e.Response=x),t.Headers=d,t.Request=b,t.Response=x,t.fetch=k,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=r;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t},1427:e=>{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,o){void 0===o&&(o=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var i=o;if(null==e||null==n)throw new Error("Null input. (diff_main)");if(e==n)return e?[new t.Diff(0,e)]:[];void 0===r&&(r=!0);var a=r,l=this.diff_commonPrefix(e,n),s=e.substring(0,l);e=e.substring(l),n=n.substring(l),l=this.diff_commonSuffix(e,n);var u=e.substring(e.length-l);e=e.substring(0,e.length-l),n=n.substring(0,n.length-l);var c=this.diff_compute_(e,n,a,i);return s&&c.unshift(new t.Diff(0,s)),u&&c.push(new t.Diff(0,u)),this.diff_cleanupMerge(c),c},t.prototype.diff_compute_=function(e,r,o,i){var a;if(!e)return[new t.Diff(1,r)];if(!r)return[new t.Diff(n,e)];var l=e.length>r.length?e:r,s=e.length>r.length?r:e,u=l.indexOf(s);if(-1!=u)return a=[new t.Diff(1,l.substring(0,u)),new t.Diff(0,s),new t.Diff(1,l.substring(u+s.length))],e.length>r.length&&(a[0][0]=a[2][0]=n),a;if(1==s.length)return[new t.Diff(n,e),new t.Diff(1,r)];var c=this.diff_halfMatch_(e,r);if(c){var f=c[0],d=c[1],h=c[2],p=c[3],g=c[4],m=this.diff_main(f,h,o,i),v=this.diff_main(d,p,o,i);return m.concat([new t.Diff(0,g)],v)}return o&&e.length>100&&r.length>100?this.diff_lineMode_(e,r,i):this.diff_bisect_(e,r,i)},t.prototype.diff_lineMode_=function(e,r,o){var i=this.diff_linesToChars_(e,r);e=i.chars1,r=i.chars2;var a=i.lineArray,l=this.diff_main(e,r,!1,o);this.diff_charsToLines_(l,a),this.diff_cleanupSemantic(l),l.push(new t.Diff(0,""));for(var s=0,u=0,c=0,f="",d="";s=1&&c>=1){l.splice(s-u-c,u+c),s=s-u-c;for(var h=this.diff_main(f,d,!1,o),p=h.length-1;p>=0;p--)l.splice(s,0,h[p]);s+=h.length}c=0,u=0,f="",d=""}s++}return l.pop(),l},t.prototype.diff_bisect_=function(e,r,o){for(var i=e.length,a=r.length,l=Math.ceil((i+a)/2),s=l,u=2*l,c=new Array(u),f=new Array(u),d=0;do);b++){for(var w=-b+g;w<=b-m;w+=2){for(var x=s+w,E=(O=w==-b||w!=b&&c[x-1]i)m+=2;else if(E>a)g+=2;else if(p&&(_=s+h-w)>=0&&_=(S=i-f[_]))return this.diff_bisectSplit_(e,r,O,E,o)}for(var k=-b+v;k<=b-y;k+=2){for(var S,_=s+k,C=(S=k==-b||k!=b&&f[_-1]i)y+=2;else if(C>a)v+=2;else if(!p){var O;if((x=s+h-k)>=0&&x=(S=i-S))return this.diff_bisectSplit_(e,r,O,E,o)}}}return[new t.Diff(n,e),new t.Diff(1,r)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,o){var i=e.substring(0,n),a=t.substring(0,r),l=e.substring(n),s=t.substring(r),u=this.diff_main(i,a,!1,o),c=this.diff_main(l,s,!1,o);return u.concat(c)},t.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function o(e){for(var t="",o=0,a=-1,l=n.length;ar?e=e.substring(n-r):nt.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length=e.length?[r,i,a,l,c]:null}var a,l,s,u,c,f=i(n,r,Math.ceil(n.length/4)),d=i(n,r,Math.ceil(n.length/2));return f||d?(a=d?f&&f[4].length>d[4].length?f:d:f,e.length>t.length?(l=a[0],s=a[1],u=a[2],c=a[3]):(u=a[0],c=a[1],l=a[2],s=a[3]),[l,s,u,c,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var r=!1,o=[],i=0,a=null,l=0,s=0,u=0,c=0,f=0;l0?o[i-1]:-1,s=0,u=0,c=0,f=0,a=null,r=!0)),l++;for(r&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),l=1;l=g?(p>=d.length/2||p>=h.length/2)&&(e.splice(l,0,new t.Diff(0,h.substring(0,p))),e[l-1][1]=d.substring(0,d.length-p),e[l+1][1]=h.substring(p),l++):(g>=d.length/2||g>=h.length/2)&&(e.splice(l,0,new t.Diff(0,d.substring(0,g))),e[l-1][0]=1,e[l-1][1]=h.substring(0,h.length-g),e[l+1][0]=n,e[l+1][1]=d.substring(g),l++),l++}l++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),o=n.charAt(0),i=r.match(t.nonAlphaNumericRegex_),a=o.match(t.nonAlphaNumericRegex_),l=i&&r.match(t.whitespaceRegex_),s=a&&o.match(t.whitespaceRegex_),u=l&&r.match(t.linebreakRegex_),c=s&&o.match(t.linebreakRegex_),f=u&&e.match(t.blanklineEndRegex_),d=c&&n.match(t.blanklineStartRegex_);return f||d?5:u||c?4:i&&!l&&s?3:l||s?2:i||a?1:0}for(var r=1;r=d&&(d=h,u=o,c=i,f=a)}e[r-1][1]!=u&&(u?e[r-1][1]=u:(e.splice(r-1,1),r--),e[r][1]=c,f?e[r+1][1]=f:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var r=!1,o=[],i=0,a=null,l=0,s=!1,u=!1,c=!1,f=!1;l0?o[i-1]:-1,c=f=!1),r=!0)),l++;r&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var r,o=0,i=0,a=0,l="",s="";o1?(0!==i&&0!==a&&(0!==(r=this.diff_commonPrefix(s,l))&&(o-i-a>0&&0==e[o-i-a-1][0]?e[o-i-a-1][1]+=s.substring(0,r):(e.splice(0,0,new t.Diff(0,s.substring(0,r))),o++),s=s.substring(r),l=l.substring(r)),0!==(r=this.diff_commonSuffix(s,l))&&(e[o][1]=s.substring(s.length-r)+e[o][1],s=s.substring(0,s.length-r),l=l.substring(0,l.length-r))),o-=i+a,e.splice(o,i+a),l.length&&(e.splice(o,0,new t.Diff(n,l)),o++),s.length&&(e.splice(o,0,new t.Diff(1,s)),o++),o++):0!==o&&0==e[o-1][0]?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,a=0,i=0,l="",s=""}""===e[e.length-1][1]&&e.pop();var u=!1;for(o=1;ot));r++)a=o,l=i;return e.length!=r&&e[r][0]===n?l:l+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,o=//g,a=/\n/g,l=0;l");switch(s){case 1:t[l]=''+u+"";break;case n:t[l]=''+u+"";break;case 0:t[l]=""+u+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var r=this.match_alphabet_(t),o=this;function i(e,r){var i=e/t.length,a=Math.abs(n-r);return o.Match_Distance?i+a/o.Match_Distance:a?1:i}var a=this.Match_Threshold,l=e.indexOf(t,n);-1!=l&&(a=Math.min(i(0,l),a),-1!=(l=e.lastIndexOf(t,n+t.length))&&(a=Math.min(i(0,l),a)));var s,u,c=1<=p;v--){var y=r[e.charAt(v-1)];if(m[v]=0===h?(m[v+1]<<1|1)&y:(m[v+1]<<1|1)&y|(f[v+1]|f[v])<<1|1|f[v+1],m[v]&c){var b=i(h,v-1);if(b<=a){if(a=b,!((l=v-1)>n))break;p=Math.max(1,2*n-l)}}}if(i(h+1,n)>a)break;f=m}return l},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&void 0===r&&void 0===o)a=e,i=this.diff_text1(a);else if("string"==typeof e&&r&&"object"==typeof r&&void 0===o)i=e,a=r;else{if("string"!=typeof e||"string"!=typeof r||!o||"object"!=typeof o)throw new Error("Unknown call format to patch_make.");i=e,a=o}if(0===a.length)return[];for(var l=[],s=new t.patch_obj,u=0,c=0,f=0,d=i,h=i,p=0;p=2*this.Patch_Margin&&u&&(this.patch_addContext_(s,d),l.push(s),s=new t.patch_obj,u=0,d=h,c=f)}1!==g&&(c+=m.length),g!==n&&(f+=m.length)}return u&&(this.patch_addContext_(s,d),l.push(s)),l},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;rthis.Match_MaxBits?-1!=(l=this.match_main(t,c.substring(0,this.Match_MaxBits),u))&&(-1==(f=this.match_main(t,c.substring(c.length-this.Match_MaxBits),u+c.length-this.Match_MaxBits))||l>=f)&&(l=-1):l=this.match_main(t,c,u),-1==l)i[a]=!1,o-=e[a].length2-e[a].length1;else if(i[a]=!0,o=l-u,c==(s=-1==f?t.substring(l,l+c.length):t.substring(l,f+this.Match_MaxBits)))t=t.substring(0,l)+this.diff_text2(e[a].diffs)+t.substring(l+c.length);else{var d=this.diff_main(c,s,!1);if(c.length>this.Match_MaxBits&&this.diff_levenshtein(d)/c.length>this.Patch_DeleteThreshold)i[a]=!1;else{this.diff_cleanupSemanticLossless(d);for(var h,p=0,g=0;ga[0][1].length){var l=n-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],i.start1-=l,i.start2-=l,i.length1+=l,i.length2+=l}return 0==(a=(i=e[e.length-1]).diffs).length||0!=a[a.length-1][0]?(a.push(new t.Diff(0,r)),i.length1+=n,i.length2+=n):n>a[a.length-1][1].length&&(l=n-a[a.length-1][1].length,a[a.length-1][1]+=r.substring(0,l),i.length1+=l,i.length2+=l),r},t.prototype.patch_splitMax=function(e){for(var r=this.Match_MaxBits,o=0;o2*r?(u.length1+=d.length,a+=d.length,c=!1,u.diffs.push(new t.Diff(f,d)),i.diffs.shift()):(d=d.substring(0,r-u.length1-this.Patch_Margin),u.length1+=d.length,a+=d.length,0===f?(u.length2+=d.length,l+=d.length):c=!1,u.diffs.push(new t.Diff(f,d)),d==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(d.length))}s=(s=this.diff_text2(u.diffs)).substring(s.length-this.Patch_Margin);var h=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);""!==h&&(u.length1+=h.length,u.length2+=h.length,0!==u.diffs.length&&0===u.diffs[u.diffs.length-1][0]?u.diffs[u.diffs.length-1][1]+=h:u.diffs.push(new t.Diff(0,h))),c||e.splice(++o,0,u)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n{"use strict";e.exports=function(e){var t=e.uri,n=e.name,r=e.type;this.uri=t,this.name=n,this.type=r}},2929:(e,t,n)=>{"use strict";var r=n(1278);e.exports=function e(t,n,o){var i;void 0===n&&(n=""),void 0===o&&(o=r);var a=new Map;function l(e,t){var n=a.get(t);n?n.push.apply(n,e):a.set(t,e)}if(o(t))i=null,l([n],t);else{var s=n?n+".":"";if("undefined"!=typeof FileList&&t instanceof FileList)i=Array.prototype.map.call(t,(function(e,t){return l([""+s+t],e),null}));else if(Array.isArray(t))i=t.map((function(t,n){var r=e(t,""+s+n,o);return r.files.forEach(l),r.clone}));else if(t&&t.constructor===Object)for(var u in i={},t){var c=e(t[u],""+s+u,o);c.files.forEach(l),i[u]=c.clone}else i=t}return{clone:i,files:a}}},9384:(e,t,n)=>{"use strict";t.ReactNativeFile=n(7570),t.extractFiles=n(2929),t.isExtractableFile=n(1278)},1278:(e,t,n)=>{"use strict";var r=n(7570);e.exports=function(e){return"undefined"!=typeof File&&e instanceof File||"undefined"!=typeof Blob&&e instanceof Blob||e instanceof r}},1688:e=>{e.exports="object"==typeof self?self.FormData:window.FormData},8749:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(9384),i=r(n(1688)),a=function(e){return o.isExtractableFile(e)||null!==e&&"object"==typeof e&&"function"==typeof e.pipe};t.default=function(e,t,n){var r=o.extractFiles({query:e,variables:t,operationName:n},"",a),l=r.clone,s=r.files;if(0===s.size){if(!Array.isArray(e))return JSON.stringify(l);if(void 0!==t&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");var u=e.reduce((function(e,n,r){return e.push({query:n,variables:t?t[r]:void 0}),e}),[]);return JSON.stringify(u)}var c=new("undefined"==typeof FormData?i.default:FormData);c.append("operations",JSON.stringify(l));var f={},d=0;return s.forEach((function(e){f[++d]=e})),c.append("map",JSON.stringify(f)),d=0,s.forEach((function(e,t){c.append(""+ ++d,t)})),c}},6647:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.prototype.toJSON;"function"==typeof t||(0,r.default)(0),e.prototype.inspect=t,o.default&&(e.prototype[o.default]=t)};var r=i(n(5006)),o=i(n(8019));function i(e){return e&&e.__esModule?e:{default:e}}},8048:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return a(e,[])};var r,o=(r=n(8019))&&r.__esModule?r:{default:r};function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){switch(i(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=function(e){var t=e[String(o.default)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:a(i,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,o=[],i=0;i1&&o.push("... ".concat(r," more items")),"["+o.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]":"{ "+n.map((function(n){return n+": "+a(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},5006:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}},8019:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=n},4560:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNode=function(e){return null!=e&&"string"==typeof e.kind},t.Token=t.Location=void 0;var r,o=(r=n(2678))&&r.__esModule?r:{default:r},i=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();t.Location=i,(0,o.default)(i);var a=function(){function e(e,t,n,r,o,i,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=o,this.value=a,this.prev=i,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();t.Token=a,(0,o.default)(a)},9501:(e,t)=>{"use strict";function n(e){for(var t=0;ta&&n(t[l-1]);)--l;return t.slice(a,l).join("\n")},t.getBlockStringIndentation=r,t.printBlockString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),o=" "===e[0]||"\t"===e[0],i='"'===e[e.length-1],a="\\"===e[e.length-1],l=!r||i||a||n,s="";return!l||r&&o||(s+="\n"+t),s+=t?e.replace(/\n/g,"\n"+t):e,l&&(s+="\n"),'"""'+s.replace(/"""/g,'\\"""')+'"""'}},3083:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.print=function(e){return(0,r.visit)(e,{leave:i})};var r=n(2624),o=n(9501),i={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return l(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=u("(",l(e.variableDefinitions,", "),")"),o=l(e.directives," "),i=e.selectionSet;return n||o||r||"query"!==t?l([t,l([n,r]),o,i]," "):i},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,o=e.directives;return t+": "+n+u(" = ",r)+u(" ",l(o," "))},SelectionSet:function(e){return s(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,o=e.directives,i=e.selectionSet,a=u("",t,": ")+n,s=a+u("(",l(r,", "),")");return s.length>80&&(s=a+u("(\n",c(l(r,"\n")),"\n)")),l([s,l(o," "),i]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+u(" ",l(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return l(["...",u("on ",t),l(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,o=e.directives,i=e.selectionSet;return"fragment ".concat(t).concat(u("(",l(r,", "),")")," ")+"on ".concat(n," ").concat(u("",l(o," ")," "))+i},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?(0,o.printBlockString)(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+l(e.values,", ")+"]"},ObjectValue:function(e){return"{"+l(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+u("(",l(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:a((function(e){var t=e.directives,n=e.operationTypes;return l(["schema",l(t," "),s(n)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:a((function(e){return l(["scalar",e.name,l(e.directives," ")]," ")})),ObjectTypeDefinition:a((function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["type",t,u("implements ",l(n," & ")),l(r," "),s(o)]," ")})),FieldDefinition:a((function(e){var t=e.name,n=e.arguments,r=e.type,o=e.directives;return t+(d(n)?u("(\n",c(l(n,"\n")),"\n)"):u("(",l(n,", "),")"))+": "+r+u(" ",l(o," "))})),InputValueDefinition:a((function(e){var t=e.name,n=e.type,r=e.defaultValue,o=e.directives;return l([t+": "+n,u("= ",r),l(o," ")]," ")})),InterfaceTypeDefinition:a((function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["interface",t,u("implements ",l(n," & ")),l(r," "),s(o)]," ")})),UnionTypeDefinition:a((function(e){var t=e.name,n=e.directives,r=e.types;return l(["union",t,l(n," "),r&&0!==r.length?"= "+l(r," | "):""]," ")})),EnumTypeDefinition:a((function(e){var t=e.name,n=e.directives,r=e.values;return l(["enum",t,l(n," "),s(r)]," ")})),EnumValueDefinition:a((function(e){return l([e.name,l(e.directives," ")]," ")})),InputObjectTypeDefinition:a((function(e){var t=e.name,n=e.directives,r=e.fields;return l(["input",t,l(n," "),s(r)]," ")})),DirectiveDefinition:a((function(e){var t=e.name,n=e.arguments,r=e.repeatable,o=e.locations;return"directive @"+t+(d(n)?u("(\n",c(l(n,"\n")),"\n)"):u("(",l(n,", "),")"))+(r?" repeatable":"")+" on "+l(o," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return l(["extend schema",l(t," "),s(n)]," ")},ScalarTypeExtension:function(e){return l(["extend scalar",e.name,l(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["extend type",t,u("implements ",l(n," & ")),l(r," "),s(o)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return l(["extend interface",t,u("implements ",l(n," & ")),l(r," "),s(o)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return l(["extend union",t,l(n," "),r&&0!==r.length?"= "+l(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return l(["extend enum",t,l(n," "),s(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return l(["extend input",t,l(n," "),s(r)]," ")}};function a(e){return function(t){return l([t.description,e(t)],"\n")}}function l(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(n))&&void 0!==t?t:""}function s(e){return u("{\n",c(l(e,"\n")),"\n}")}function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+n:""}function c(e){return u(" ",e.replace(/\n/g,"\n "))}function f(e){return-1!==e.indexOf("\n")}function d(e){return null!=e&&e.some(f)}},2624:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,r=void 0,u=Array.isArray(e),c=[e],f=-1,d=[],h=void 0,p=void 0,g=void 0,m=[],v=[],y=e;do{var b=++f===c.length,w=b&&0!==d.length;if(b){if(p=0===v.length?void 0:m[m.length-1],h=g,g=v.pop(),w){if(u)h=h.slice();else{for(var x={},E=0,k=Object.keys(h);E{var r=n(7772).Symbol;e.exports=r},3366:(e,t,n)=>{var r=n(857),o=n(2107),i=n(7157),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},1704:(e,t,n)=>{var r=n(2153),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},1242:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},2107:(e,t,n)=>{var r=n(857),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[l]=n:delete e[l]),o}},7157:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},7772:(e,t,n)=>{var r=n(1242),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},2153:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},4073:(e,t,n)=>{var r=n(9259),o=n(1100),i=n(7642),a=Math.max,l=Math.min;e.exports=function(e,t,n){var s,u,c,f,d,h,p=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=s,r=u;return s=u=void 0,p=t,f=e.apply(r,n)}function b(e){return p=e,d=setTimeout(x,t),g?y(e):f}function w(e){var n=e-h;return void 0===h||n>=t||n<0||m&&e-p>=c}function x(){var e=o();if(w(e))return E(e);d=setTimeout(x,function(e){var n=t-(e-h);return m?l(n,c-(e-p)):n}(e))}function E(e){return d=void 0,v&&s?y(e):(s=u=void 0,f)}function k(){var e=o(),n=w(e);if(s=arguments,u=this,h=e,n){if(void 0===d)return b(h);if(m)return clearTimeout(d),d=setTimeout(x,t),y(h)}return void 0===d&&(d=setTimeout(x,t)),f}return t=i(t)||0,r(n)&&(g=!!n.leading,c=(m="maxWait"in n)?a(i(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==d&&clearTimeout(d),p=0,s=h=u=d=void 0},k.flush=function(){return void 0===d?f:E(o())},k}},9259:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},5125:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},4795:(e,t,n)=>{var r=n(3366),o=n(5125);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},1100:(e,t,n)=>{var r=n(7772);e.exports=function(){return r.Date.now()}},7642:(e,t,n)=>{var r=n(1704),o=n(9259),i=n(4795),a=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||s.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},104:(e,t,n)=>{"use strict";(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e})(n(2784)),(r=n(5977))&&r.__esModule,n(8467),n(3321),n(4329);var r,o,i=(n(1624),n(1119));null===(o=window.omnivoreEnv.__NEXT_IMAGE_OPTS)||void 0===o||o.experimentalLayoutRaw;window.omnivoreEnv.__NEXT_IMAGE_OPTS,new Set;new Map;"undefined"==typeof window&&(n.g.__NEXT_IMAGE_IMPORTED=!0);new Map([["default",function({config:e,src:t,width:n,quality:r}){return t.endsWith(".svg")&&!e.dangerouslyAllowSVG?t:`${i.normalizePathTrailingSlash(e.path)}?url=${encodeURIComponent(t)}&w=${n}&q=${r||75}`}],["imgix",function({config:e,src:t,width:n,quality:r}){const o=new URL(`${e.path}${a(t)}`),i=o.searchParams;return i.set("auto",i.get("auto")||"format"),i.set("fit",i.get("fit")||"max"),i.set("w",i.get("w")||n.toString()),r&&i.set("q",r.toString()),o.href}],["cloudinary",function({config:e,src:t,width:n,quality:r}){const o=["f_auto","c_limit","w_"+n,"q_"+(r||"auto")].join(",")+"/";return`${e.path}${o}${a(t)}`}],["akamai",function({config:e,src:t,width:n}){return`${e.path}${a(t)}?imwidth=${n}`}],["custom",function({src:e}){throw new Error(`Image with src "${e}" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader`)}]]);function a(e){return"/"===e[0]?e.slice(1):e}},4529:(e,t,n)=>{"use strict";var r;(r=n(2784))&&r.__esModule,n(6640),n(9518),n(3321)},1119:(e,t)=>{"use strict";function n(e){return e.endsWith("/")&&"/"!==e?e.slice(0,-1):e}Object.defineProperty(t,"__esModule",{value:!0}),t.removePathTrailingSlash=n,t.normalizePathTrailingSlash=void 0;const r=window.omnivoreEnv.__NEXT_TRAILING_SLASH?e=>/\.[^/]+\/?$/.test(e)?n(e):e.endsWith("/")?e:e+"/":n;t.normalizePathTrailingSlash=r},1976:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cancelIdleCallback=t.requestIdleCallback=void 0;const n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return setTimeout((function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1)};t.requestIdleCallback=n;const r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};t.cancelIdleCallback=r},7928:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.markAssetError=u,t.isAssetError=function(e){return e&&s in e},t.getClientBuildManifest=f,t.getMiddlewareManifest=function(){return self.__MIDDLEWARE_MANIFEST?Promise.resolve(self.__MIDDLEWARE_MANIFEST):c(new Promise((e=>{const t=self.__MIDDLEWARE_MANIFEST_CB;self.__MIDDLEWARE_MANIFEST_CB=()=>{e(self.__MIDDLEWARE_MANIFEST),t&&t()}})),i,u(new Error("Failed to load client middleware manifest")))},t.createRouteLoader=function(e){const t=new Map,n=new Map,r=new Map,s=new Map;function f(e){{let t=n.get(e);return t||(document.querySelector(`script[src^="${e}"]`)?Promise.resolve():(n.set(e,t=function(e,t){return new Promise(((n,r)=>{(t=document.createElement("script")).onload=n,t.onerror=()=>r(u(new Error(`Failed to load script: ${e}`))),t.crossOrigin=window.omnivoreEnv.__NEXT_CROSS_ORIGIN,t.src=e,document.body.appendChild(t)}))}(e)),t))}}function h(e){let t=r.get(e);return t||(r.set(e,t=fetch(e).then((t=>{if(!t.ok)throw new Error(`Failed to load stylesheet: ${e}`);return t.text().then((t=>({href:e,content:t})))})).catch((e=>{throw u(e)}))),t)}return{whenEntrypoint:e=>a(e,t),onEntrypoint(e,n){(n?Promise.resolve().then((()=>n())).then((e=>({component:e&&e.default||e,exports:e})),(e=>({error:e}))):Promise.resolve(void 0)).then((n=>{const r=t.get(e);r&&"resolve"in r?n&&(t.set(e,n),r.resolve(n)):(n?t.set(e,n):t.delete(e),s.delete(e))}))},loadRoute(n,r){return a(n,s,(()=>c(d(e,n).then((({scripts:e,css:r})=>Promise.all([t.has(n)?[]:Promise.all(e.map(f)),Promise.all(r.map(h))]))).then((e=>this.whenEntrypoint(n).then((t=>({entrypoint:t,styles:e[1]}))))),i,u(new Error(`Route did not complete loading: ${n}`))).then((({entrypoint:e,styles:t})=>{const n=Object.assign({styles:t},e);return"error"in e?e:n})).catch((e=>{if(r)throw e;return{error:e}})).finally((()=>{}))))},prefetch(t){let n;return(n=navigator.connection)&&(n.saveData||/2g/.test(n.effectiveType))?Promise.resolve():d(e,t).then((e=>Promise.all(l?e.scripts.map((e=>{return t=e,n="script",new Promise(((e,o)=>{const i=`\n link[rel="prefetch"][href^="${t}"],\n link[rel="preload"][href^="${t}"],\n script[src^="${t}"]`;if(document.querySelector(i))return e();(r=document.createElement("link")).as=n,r.rel="prefetch",r.crossOrigin=window.omnivoreEnv.__NEXT_CROSS_ORIGIN,r.onload=e,r.onerror=o,r.href=t,document.head.appendChild(r)}));var t,n,r})):[]))).then((()=>{o.requestIdleCallback((()=>this.loadRoute(t,!0).catch((()=>{}))))})).catch((()=>{}))}}},(r=n(9983))&&r.__esModule;var r,o=n(1976);const i=3800;function a(e,t,n){let r,o=t.get(e);if(o)return"future"in o?o.future:Promise.resolve(o);const i=new Promise((e=>{r=e}));return t.set(e,o={resolve:r,future:i}),n?n().then((e=>(r(e),e))).catch((n=>{throw t.delete(e),n})):i}const l=function(e){try{return e=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||e.relList.supports("prefetch")}catch(e){return!1}}(),s=Symbol("ASSET_LOAD_ERROR");function u(e){return Object.defineProperty(e,s,{})}function c(e,t,n){return new Promise(((r,i)=>{let a=!1;e.then((e=>{a=!0,r(e)})).catch(i),o.requestIdleCallback((()=>setTimeout((()=>{a||i(n)}),t)))}))}function f(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):c(new Promise((e=>{const t=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{e(self.__BUILD_MANIFEST),t&&t()}})),i,u(new Error("Failed to load client build manifest")))}function d(e,t){return f().then((n=>{if(!(t in n))throw u(new Error(`Failed to lookup route: ${t}`));const r=n[t].map((t=>e+"/_next/"+encodeURI(t)));return{scripts:r.filter((e=>e.endsWith(".js"))),css:r.filter((e=>e.endsWith(".css")))}}))}},9518:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Router",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"withRouter",{enumerable:!0,get:function(){return l.default}}),t.useRouter=function(){return r.default.useContext(i.RouterContext)},t.createRouter=function(...e){return u.router=new o.default(...e),u.readyCallbacks.forEach((e=>e())),u.readyCallbacks=[],u.router},t.makePublicRouterInstance=function(e){const t=e,n={};for(const e of c)"object"!=typeof t[e]?n[e]=t[e]:n[e]=Object.assign(Array.isArray(t[e])?[]:{},t[e]);return n.events=o.default.events,f.forEach((e=>{n[e]=(...n)=>t[e](...n)})),n},t.default=void 0;var r=s(n(2784)),o=s(n(6640)),i=n(6510),a=s(n(274)),l=s(n(9564));function s(e){return e&&e.__esModule?e:{default:e}}const u={router:null,readyCallbacks:[],ready(e){if(this.router)return e();"undefined"!=typeof window&&this.readyCallbacks.push(e)}},c=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],f=["push","replace","reload","back","prefetch","beforePopState"];function d(){if(!u.router)throw new Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n');return u.router}Object.defineProperty(u,"events",{get:()=>o.default.events}),c.forEach((e=>{Object.defineProperty(u,e,{get:()=>d()[e]})})),f.forEach((e=>{u[e]=(...t)=>d()[e](...t)})),["routeChangeStart","beforeHistoryChange","routeChangeComplete","routeChangeError","hashChangeStart","hashChangeComplete"].forEach((e=>{u.ready((()=>{o.default.events.on(e,((...t)=>{const n=`on${e.charAt(0).toUpperCase()}${e.substring(1)}`,r=u;if(r[n])try{r[n](...t)}catch(e){console.error(`Error when running the Router event: ${n}`),console.error(a.default(e)?`${e.message}\n${e.stack}`:e+"")}}))}))}));var h=u;t.default=h},3321:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useIntersection=function({rootRef:e,rootMargin:t,disabled:n}){const s=n||!i,u=r.useRef(),[c,f]=r.useState(!1),[d,h]=r.useState(e?e.current:null),p=r.useCallback((e=>{u.current&&(u.current(),u.current=void 0),s||c||e&&e.tagName&&(u.current=function(e,t,n){const{id:r,observer:o,elements:i}=function(e){const t={root:e.root||null,margin:e.rootMargin||""};let n,r=l.find((e=>e.root===t.root&&e.margin===t.margin));if(r?n=a.get(r):(n=a.get(t),l.push(t)),n)return n;const o=new Map,i=new IntersectionObserver((e=>{e.forEach((e=>{const t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)}))}),e);return a.set(t,n={id:t,observer:i,elements:o}),n}(n);return i.set(e,(e=>e&&f(e))),o.observe(e),function(){if(i.delete(e),o.unobserve(e),0===i.size){o.disconnect(),a.delete(r);let e=l.findIndex((e=>e.root===r.root&&e.margin===r.margin));e>-1&&l.splice(e,1)}}}(e,0,{root:d,rootMargin:t}))}),[s,d,t,c]);return r.useEffect((()=>{if(!i&&!c){const e=o.requestIdleCallback((()=>f(!0)));return()=>o.cancelIdleCallback(e)}}),[c]),r.useEffect((()=>{e&&h(e.current)}),[e]),[p,c]};var r=n(2784),o=n(1976);const i="undefined"!=typeof IntersectionObserver,a=new Map,l=[]},9564:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t){return o.default.createElement(e,Object.assign({router:i.useRouter()},t))}return t.getInitialProps=e.getInitialProps,t.origGetInitialProps=e.origGetInitialProps,t};var r,o=(r=n(2784))&&r.__esModule?r:{default:r},i=n(9518)},9264:(e,t)=>{"use strict";function n(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||95===s))break;a+=e[l++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=l}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,o=void 0===r?"./":r,a="[^"+i(t.delimiter||"/#?")+"]+?",l=[],s=0,u=0,c="",f=function(e){if(u-1:void 0===E;o||(g+="(?:"+p+"(?="+h+"))?"),k||(g+="(?="+p+"|"+h+")")}return new RegExp(g,a(n))}function s(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=o,t.getProperError=function(e){return o(e)?e:new Error(r.isPlainObject(e)?JSON.stringify(e):e+"")};var r=n(9910);function o(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}},4863:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizePathSep=o,t.denormalizePagePath=function(e){return(e=o(e)).startsWith("/index/")&&!r.isDynamicRoute(e)?e=e.slice(6):"/index"===e&&(e="/"),e};var r=n(9150);function o(e){return e.replace(/\\/g,"/")}},1719:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.AmpStateContext=void 0;const o=((r=n(2784))&&r.__esModule?r:{default:r}).default.createContext({});t.AmpStateContext=o},9739:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInAmpMode=a,t.useAmp=function(){return a(o.default.useContext(i.AmpStateContext))};var r,o=(r=n(2784))&&r.__esModule?r:{default:r},i=n(1719);function a({ampFirst:e=!1,hybrid:t=!1,hasQuery:n=!1}={}){return e||t&&n}},8058:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeStringRegexp=function(e){return e.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")}},7177:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.HeadManagerContext=void 0;const o=((r=n(2784))&&r.__esModule?r:{default:r}).default.createContext({});t.HeadManagerContext=o},5977:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultHead=u,t.default=void 0;var r,o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(2784)),i=(r=n(1889))&&r.__esModule?r:{default:r},a=n(1719),l=n(7177),s=n(9739);function u(e=!1){const t=[o.default.createElement("meta",{charSet:"utf-8"})];return e||t.push(o.default.createElement("meta",{name:"viewport",content:"width=device-width"})),t}function c(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce(((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t)),[])):e.concat(t)}n(1624);const f=["name","httpEquiv","charSet","itemProp"];function d(e,t){return e.reduce(((e,t)=>{const n=o.default.Children.toArray(t.props.children);return e.concat(n)}),[]).reduce(c,[]).reverse().concat(u(t.inAmpMode)).filter(function(){const e=new Set,t=new Set,n=new Set,r={};return o=>{let i=!0,a=!1;if(o.key&&"number"!=typeof o.key&&o.key.indexOf("$")>0){a=!0;const t=o.key.slice(o.key.indexOf("$")+1);e.has(t)?i=!1:e.add(t)}switch(o.type){case"title":case"base":t.has(o.type)?i=!1:t.add(o.type);break;case"meta":for(let e=0,t=f.length;e{const r=e.key||n;if(window.omnivoreEnv.__NEXT_OPTIMIZE_FONTS&&!t.inAmpMode&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some((t=>e.props.href.startsWith(t)))){const t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,o.default.cloneElement(e,t)}return o.default.cloneElement(e,{key:r})}))}t.default=function({children:e}){const t=o.useContext(a.AmpStateContext),n=o.useContext(l.HeadManagerContext);return o.default.createElement(i.default,{reduceComponentsToState:d,headManager:n,inAmpMode:s.isInAmpMode(t)},e)}},927:(e,t)=>{"use strict";t.D=function(e,t,n){let r;if(e){n&&(n=n.toLowerCase());for(const a of e){var o,i;if(t===(null===(o=a.domain)||void 0===o?void 0:o.split(":")[0].toLowerCase())||n===a.defaultLocale.toLowerCase()||(null===(i=a.locales)||void 0===i?void 0:i.some((e=>e.toLowerCase()===n)))){r=a;break}}}return r}},816:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLocalePath=function(e,t){let n;const r=e.split("/");return(t||[]).some((t=>!(!r[1]||r[1].toLowerCase()!==t.toLowerCase()||(n=t,r.splice(1,1),e=r.join("/")||"/",0)))),{pathname:e,detectedLocale:n}}},4329:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageConfigContext=void 0;var r,o=(r=n(2784))&&r.__esModule?r:{default:r},i=n(8467);const a=o.default.createContext(i.imageConfigDefault);t.ImageConfigContext=a},8467:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.imageConfigDefault=t.VALID_LOADERS=void 0,t.VALID_LOADERS=["default","imgix","cloudinary","akamai","custom"];t.imageConfigDefault={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;"}},9910:(e,t)=>{"use strict";function n(e){return Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getObjectClassLabel=n,t.isPlainObject=function(e){if("[object Object]"!==n(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},7471:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=Object.create(null);return{on(t,n){(e[t]||(e[t]=[])).push(n)},off(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit(t,...n){(e[t]||[]).slice().map((e=>{e(...n)}))}}}},6510:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.RouterContext=void 0;const o=((r=n(2784))&&r.__esModule?r:{default:r}).default.createContext(null);t.RouterContext=o},6640:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDomainLocale=function(e,t,n,r){if(window.omnivoreEnv.__NEXT_I18N_SUPPORT){t=t||l.normalizeLocalePath(e,n).detectedLocale;const o=b(r,void 0,t);return!!o&&`http${o.http?"":"s"}://${o.domain}${w||""}${t===o.defaultLocale?"":`/${t}`}${e}`}return!1},t.addLocale=k,t.delLocale=S,t.hasBasePath=C,t.addBasePath=O,t.delBasePath=P,t.isLocalURL=T,t.interpolateAs=R,t.resolveHref=j,t.default=void 0;var r=n(1119),o=n(7928),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(274)),a=n(4863),l=n(816),s=y(n(7471)),u=n(1624),c=n(7482),f=n(1577),d=n(646),h=y(n(5317)),p=n(3107),g=n(4794),m=n(6555),v=n(3948);function y(e){return e&&e.__esModule?e:{default:e}}let b;window.omnivoreEnv.__NEXT_I18N_SUPPORT&&(b=n(927).D);const w=window.omnivoreEnv.__NEXT_ROUTER_BASEPATH||"";function x(){return Object.assign(new Error("Route Cancelled"),{cancelled:!0})}function E(e,t){if(!e.startsWith("/")||!t)return e;const n=_(e);return r.normalizePathTrailingSlash(`${t}${n}`)+e.slice(n.length)}function k(e,t,n){if(window.omnivoreEnv.__NEXT_I18N_SUPPORT){const r=_(e).toLowerCase(),o=t&&t.toLowerCase();return t&&t!==n&&!r.startsWith("/"+o+"/")&&r!=="/"+o?E(e,"/"+t):e}return e}function S(e,t){if(window.omnivoreEnv.__NEXT_I18N_SUPPORT){const n=_(e),r=n.toLowerCase(),o=t&&t.toLowerCase();return t&&(r.startsWith("/"+o+"/")||r==="/"+o)?(n.length===t.length+1?"/":"")+e.slice(t.length+1):e}return e}function _(e){const t=e.indexOf("?"),n=e.indexOf("#");return(t>-1||n>-1)&&(e=e.substring(0,t>-1?t:n)),e}function C(e){return(e=_(e))===w||e.startsWith(w+"/")}function O(e){return E(e,w)}function P(e){return(e=e.slice(w.length)).startsWith("/")||(e=`/${e}`),e}function T(e){if(e.startsWith("/")||e.startsWith("#")||e.startsWith("?"))return!0;try{const t=u.getLocationOrigin(),n=new URL(e,t);return n.origin===t&&C(n.pathname)}catch(e){return!1}}function R(e,t,n){let r="";const o=g.getRouteRegex(e),i=o.groups,a=(t!==e?p.getRouteMatcher(o)(t):"")||n;r=e;const l=Object.keys(i);return l.every((e=>{let t=a[e]||"";const{repeat:n,optional:o}=i[e];let l=`[${n?"...":""}${e}]`;return o&&(l=`${t?"":"/"}[${l}]`),n&&!Array.isArray(t)&&(t=[t]),(o||e in a)&&(r=r.replace(l,n?t.map((e=>encodeURIComponent(e))).join("/"):encodeURIComponent(t))||"/")}))||(r=""),{params:l,result:r}}function L(e,t){const n={};return Object.keys(e).forEach((r=>{t.includes(r)||(n[r]=e[r])})),n}function j(e,t,n){let o,i="string"==typeof t?t:m.formatWithValidation(t);const a=i.match(/^[a-zA-Z]{1,}:\/\//),l=a?i.slice(a[0].length):i;if((l.split("?")[0]||"").match(/(\/\/|\\)/)){console.error(`Invalid href passed to next/router: ${i}, repeated forward-slashes (//) or backslashes \\ are not valid in the href`);const e=u.normalizeRepeatedSlashes(l);i=(a?a[0]:"")+e}if(!T(i))return n?[i]:i;try{o=new URL(i.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){o=new URL("/","http://n")}try{const e=new URL(i,o);e.pathname=r.normalizePathTrailingSlash(e.pathname);let t="";if(c.isDynamicRoute(e.pathname)&&e.searchParams&&n){const n=d.searchParamsToUrlQuery(e.searchParams),{result:r,params:o}=R(e.pathname,e.pathname,n);r&&(t=m.formatWithValidation({pathname:r,hash:e.hash,query:L(n,o)}))}const a=e.origin===o.origin?e.href.slice(e.origin.length):e.href;return n?[a,t||a]:a}catch(e){return n?[i]:i}}function A(e){const t=u.getLocationOrigin();return e.startsWith(t)?e.substring(t.length):e}function M(e,t,n){let[r,o]=j(e,t,!0);const i=u.getLocationOrigin(),a=r.startsWith(i),l=o&&o.startsWith(i);r=A(r),o=o?A(o):o;const s=a?r:O(r),c=n?A(j(e,n)):o||r;return{url:s,as:l?c:O(c)}}function I(e,t){const n=r.removePathTrailingSlash(a.denormalizePagePath(e));return"/404"===n||"/_error"===n?e:(t.includes(n)||t.some((t=>{if(c.isDynamicRoute(t)&&g.getRouteRegex(t).re.test(n))return e=t,!0})),r.removePathTrailingSlash(e))}const D=window.omnivoreEnv.__NEXT_SCROLL_RESTORATION&&"undefined"!=typeof window&&"scrollRestoration"in window.history&&!!function(){try{let e="__next";return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){}}(),N=Symbol("SSG_DATA_NOT_FOUND");function F(e,t,n){return fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok){if(t>1&&r.status>=500)return F(e,t-1,n);if(404===r.status)return r.json().then((e=>{if(e.notFound)return{notFound:N};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return n.text?r.text():r.json()}))}function z(e,t,n,r,i){const{href:a}=new URL(e,window.location.href);return void 0!==r[a]?r[a]:r[a]=F(e,t?3:1,{text:n}).catch((e=>{throw t||o.markAssetError(e),e})).then((e=>(i||delete r[a],e))).catch((e=>{throw delete r[a],e}))}class ${constructor(e,t,n,{initialProps:o,pageLoader:i,App:a,wrapApp:l,Component:s,err:d,subscription:h,isFallback:p,locale:g,locales:v,defaultLocale:y,domainLocales:x,isPreview:E,isRsc:k}){this.sdc={},this.sdr={},this.sde={},this._idx=0,this.onPopState=e=>{const t=e.state;if(!t){const{pathname:e,query:t}=this;return void this.changeState("replaceState",m.formatWithValidation({pathname:O(e),query:t}),u.getURL())}if(!t.__N)return;let n;const{url:r,as:o,options:i,idx:a}=t;if(window.omnivoreEnv.__NEXT_SCROLL_RESTORATION&&D&&this._idx!==a){try{sessionStorage.setItem("__next_scroll_"+this._idx,JSON.stringify({x:self.pageXOffset,y:self.pageYOffset}))}catch{}try{const e=sessionStorage.getItem("__next_scroll_"+a);n=JSON.parse(e)}catch{n={x:0,y:0}}}this._idx=a;const{pathname:l}=f.parseRelativeUrl(r);this.isSsr&&o===O(this.asPath)&&l===O(this.pathname)||this._bps&&!this._bps(t)||this.change("replaceState",r,o,Object.assign({},i,{shallow:i.shallow&&this._shallow,locale:i.locale||this.defaultLocale}),n)};const S=r.removePathTrailingSlash(e);this.components={},"/_error"!==e&&(this.components[S]={Component:s,initial:!0,props:o,err:d,__N_SSG:o&&o.__N_SSG,__N_SSP:o&&o.__N_SSP,__N_RSC:!!k}),this.components["/_app"]={Component:a,styleSheets:[]},this.events=$.events,this.pageLoader=i;const _=c.isDynamicRoute(e)&&self.__NEXT_DATA__.autoExport;if(this.basePath=w,this.sub=h,this.clc=null,this._wrapApp=l,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!(!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp)&&(_||self.location.search||window.omnivoreEnv.__NEXT_HAS_REWRITES)),window.omnivoreEnv.__NEXT_I18N_SUPPORT&&(this.locales=v,this.defaultLocale=y,this.domainLocales=x,this.isLocaleDomain=!!b(x,self.location.hostname)),this.state={route:S,pathname:e,query:t,asPath:_?e:n,isPreview:!!E,locale:window.omnivoreEnv.__NEXT_I18N_SUPPORT?g:void 0,isFallback:p},"undefined"!=typeof window){if(!n.startsWith("//")){const r={locale:g};r._shouldResolveHref=n!==e,this.changeState("replaceState",m.formatWithValidation({pathname:O(e),query:t}),u.getURL(),r)}window.addEventListener("popstate",this.onPopState),window.omnivoreEnv.__NEXT_SCROLL_RESTORATION&&D&&(window.history.scrollRestoration="manual")}}reload(){window.location.reload()}back(){window.history.back()}push(e,t,n={}){if(window.omnivoreEnv.__NEXT_SCROLL_RESTORATION&&D)try{sessionStorage.setItem("__next_scroll_"+this._idx,JSON.stringify({x:self.pageXOffset,y:self.pageYOffset}))}catch{}return({url:e,as:t}=M(this,e,t)),this.change("pushState",e,t,n)}replace(e,t,n={}){return({url:e,as:t}=M(this,e,t)),this.change("replaceState",e,t,n)}async change(e,t,n,a,s){if(!T(t))return window.location.href=t,!1;const d=a._h||a._shouldResolveHref||_(t)===_(n),v={...this.state};a._h&&(this.isReady=!0);const y=v.locale;if(window.omnivoreEnv.__NEXT_I18N_SUPPORT){v.locale=!1===a.locale?this.defaultLocale:a.locale||v.locale,void 0===a.locale&&(a.locale=v.locale);const e=f.parseRelativeUrl(C(n)?P(n):n),r=l.normalizeLocalePath(e.pathname,this.locales);r.detectedLocale&&(v.locale=r.detectedLocale,e.pathname=O(e.pathname),n=m.formatWithValidation(e),t=O(l.normalizeLocalePath(C(t)?P(t):t,this.locales).pathname));let o=!1;var w;window.omnivoreEnv.__NEXT_I18N_SUPPORT&&((null===(w=this.locales)||void 0===w?void 0:w.includes(v.locale))||(e.pathname=k(e.pathname,v.locale),window.location.href=m.formatWithValidation(e),o=!0));const i=b(this.domainLocales,void 0,v.locale);if(window.omnivoreEnv.__NEXT_I18N_SUPPORT&&!o&&i&&this.isLocaleDomain&&self.location.hostname!==i.domain){const e=P(n);window.location.href=`http${i.http?"":"s"}://${i.domain}${O(`${v.locale===i.defaultLocale?"":`/${v.locale}`}${"/"===e?"":e}`||"/")}`,o=!0}if(o)return new Promise((()=>{}))}a._h||(this.isSsr=!1),u.ST&&performance.mark("routeChange");const{shallow:x=!1,scroll:E=!0}=a,j={shallow:x};this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,j),n=O(k(C(n)?P(n):n,a.locale,this.defaultLocale));const A=S(C(n)?P(n):n,v.locale);this._inFlightRoute=n;let D=y!==v.locale;if(!a._h&&this.onlyAHashChange(A)&&!D)return v.asPath=A,$.events.emit("hashChangeStart",n,j),this.changeState(e,t,n,{...a,scroll:!1}),E&&this.scrollToHash(A),this.set(v,this.components[v.route],null),$.events.emit("hashChangeComplete",n,j),!0;let F,z,B=f.parseRelativeUrl(t),{pathname:U,query:W}=B;try{[F,{__rewrites:z}]=await Promise.all([this.pageLoader.getPageList(),o.getClientBuildManifest(),this.pageLoader.getMiddlewareList()])}catch(e){return window.location.href=n,!1}this.urlIsNew(A)||D||(e="replaceState");let H=n;if(U=U?r.removePathTrailingSlash(P(U)):U,d&&"/_error"!==U)if(a._shouldResolveHref=!0,window.omnivoreEnv.__NEXT_HAS_REWRITES&&n.startsWith("/")){const e=h.default(O(k(A,v.locale)),F,z,W,(e=>I(e,F)),this.locales);if(e.externalDest)return location.href=n,!0;H=e.asPath,e.matchedPage&&e.resolvedHref&&(U=e.resolvedHref,B.pathname=O(U),t=m.formatWithValidation(B))}else B.pathname=I(U,F),B.pathname!==U&&(U=B.pathname,B.pathname=O(U),t=m.formatWithValidation(B));if(!T(n))return window.location.href=n,!1;if(H=S(P(H),v.locale),(!a.shallow||1===a._h)&&(1!==a._h||c.isDynamicRoute(r.removePathTrailingSlash(U)))){const r=await this._preflightRequest({as:n,cache:!0,pages:F,pathname:U,query:W,locale:v.locale,isPreview:v.isPreview});if("rewrite"===r.type)W={...W,...r.parsedAs.query},H=r.asPath,U=r.resolvedHref,B.pathname=r.resolvedHref,t=m.formatWithValidation(B);else{if("redirect"===r.type&&r.newAs)return this.change(e,r.newUrl,r.newAs,a);if("redirect"===r.type&&r.destination)return window.location.href=r.destination,new Promise((()=>{}));if("refresh"===r.type&&n!==window.location.pathname)return window.location.href=n,new Promise((()=>{}))}}const V=r.removePathTrailingSlash(U);if(c.isDynamicRoute(V)){const e=f.parseRelativeUrl(H),r=e.pathname,o=g.getRouteRegex(V),i=p.getRouteMatcher(o)(r),a=V===r,l=a?R(V,r,W):{};if(!i||a&&!l.result){const e=Object.keys(o.groups).filter((e=>!W[e]));if(e.length>0)throw new Error((a?`The provided \`href\` (${t}) value is missing query values (${e.join(", ")}) to be interpolated properly. `:`The provided \`as\` value (${r}) is incompatible with the \`href\` value (${V}). `)+"Read more: https://nextjs.org/docs/messages/"+(a?"href-interpolation-failed":"incompatible-href-as"))}else a?n=m.formatWithValidation(Object.assign({},e,{pathname:l.result,query:L(W,l.params)})):Object.assign(W,i)}$.events.emit("routeChangeStart",n,j);try{var q,X;let r=await this.getRouteInfo(V,U,W,n,H,j,v.locale,v.isPreview),{error:o,props:i,__N_SSG:l,__N_SSP:u}=r;if((l||u)&&i){if(i.pageProps&&i.pageProps.__N_REDIRECT){const t=i.pageProps.__N_REDIRECT;if(t.startsWith("/")&&!1!==i.pageProps.__N_REDIRECT_BASE_PATH){const n=f.parseRelativeUrl(t);n.pathname=I(n.pathname,F);const{url:r,as:o}=M(this,t,t);return this.change(e,r,o,a)}return window.location.href=t,new Promise((()=>{}))}if(v.isPreview=!!i.__N_PREVIEW,i.notFound===N){let e;try{await this.fetchComponent("/404"),e="/404"}catch(t){e="/_error"}r=await this.getRouteInfo(e,e,W,n,H,{shallow:!1},v.locale,v.isPreview)}}$.events.emit("beforeHistoryChange",n,j),this.changeState(e,t,n,a),a._h&&"/_error"===U&&500===(null===(q=self.__NEXT_DATA__.props)||void 0===q||null===(X=q.pageProps)||void 0===X?void 0:X.statusCode)&&(null==i?void 0:i.pageProps)&&(i.pageProps.statusCode=500);const c=a.shallow&&v.route===V;var K;const d=(null!==(K=a.scroll)&&void 0!==K?K:!c)?{x:0,y:0}:null;if(await this.set({...v,route:V,pathname:U,query:W,asPath:A,isFallback:!1},r,null!=s?s:d).catch((e=>{if(!e.cancelled)throw e;o=o||e})),o)throw $.events.emit("routeChangeError",o,A,j),o;return window.omnivoreEnv.__NEXT_I18N_SUPPORT&&v.locale&&(document.documentElement.lang=v.locale),$.events.emit("routeChangeComplete",n,j),!0}catch(e){if(i.default(e)&&e.cancelled)return!1;throw e}}changeState(e,t,n,r={}){"pushState"===e&&u.getURL()===n||(this._shallow=r.shallow,window.history[e]({url:t,as:n,options:r,__N:!0,idx:this._idx="pushState"!==e?this._idx:this._idx+1},"",n))}async handleRouteInfoError(e,t,n,r,a,l){if(e.cancelled)throw e;if(o.isAssetError(e)||l)throw $.events.emit("routeChangeError",e,r,a),window.location.href=r,x();try{let r,o,i;void 0!==r&&void 0!==o||({page:r,styleSheets:o}=await this.fetchComponent("/_error"));const a={props:i,Component:r,styleSheets:o,err:e,error:e};if(!a.props)try{a.props=await this.getInitialProps(r,{err:e,pathname:t,query:n})}catch(e){console.error("Error in error page `getInitialProps`: ",e),a.props={}}return a}catch(e){return this.handleRouteInfoError(i.default(e)?e:new Error(e+""),t,n,r,a,!0)}}async getRouteInfo(e,t,n,r,o,a,l,s){try{const i=this.components[e];if(a.shallow&&i&&this.route===e)return i;let u;i&&!("initial"in i)&&(u=i);const c=u||await this.fetchComponent(e).then((e=>({Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP,__N_RSC:!!e.mod.__next_rsc__}))),{Component:f,__N_SSG:d,__N_SSP:h,__N_RSC:p}=c;let g;(d||h||p)&&(g=this.pageLoader.getDataHref({href:m.formatWithValidation({pathname:t,query:n}),asPath:o,ssg:d,rsc:p,locale:l}));const v=await this._getData((()=>d||h?z(g,this.isSsr,!1,d?this.sdc:this.sdr,!!d&&!s):this.getInitialProps(f,{pathname:t,query:n,asPath:r,locale:l,locales:this.locales,defaultLocale:this.defaultLocale})));if(p){const{fresh:e,data:t}=await this._getData((()=>this._getFlightData(g)));v.pageProps=Object.assign(v.pageProps,{__flight_serialized__:t,__flight_fresh__:e})}return c.props=v,this.components[e]=c,c}catch(e){return this.handleRouteInfoError(i.getProperError(e),t,n,r,a)}}set(e,t,n){return this.state=e,this.sub(t,this.components["/_app"].Component,n)}beforePopState(e){this._bps=e}onlyAHashChange(e){if(!this.asPath)return!1;const[t,n]=this.asPath.split("#"),[r,o]=e.split("#");return!(!o||t!==r||n!==o)||t===r&&n!==o}scrollToHash(e){const[,t=""]=e.split("#");if(""===t||"top"===t)return void window.scrollTo(0,0);const n=document.getElementById(t);if(n)return void n.scrollIntoView();const r=document.getElementsByName(t)[0];r&&r.scrollIntoView()}urlIsNew(e){return this.asPath!==e}async prefetch(e,t=e,n={}){let i=f.parseRelativeUrl(e),{pathname:a,query:s}=i;if(window.omnivoreEnv.__NEXT_I18N_SUPPORT&&!1===n.locale){a=l.normalizeLocalePath(a,this.locales).pathname,i.pathname=a,e=m.formatWithValidation(i);let r=f.parseRelativeUrl(t);const o=l.normalizeLocalePath(r.pathname,this.locales);r.pathname=o.pathname,n.locale=o.detectedLocale||this.defaultLocale,t=m.formatWithValidation(r)}const u=await this.pageLoader.getPageList();let c=t;if(window.omnivoreEnv.__NEXT_HAS_REWRITES&&t.startsWith("/")){let n;({__rewrites:n}=await o.getClientBuildManifest());const r=h.default(O(k(t,this.locale)),u,n,i.query,(e=>I(e,u)),this.locales);if(r.externalDest)return;c=S(P(r.asPath),this.locale),r.matchedPage&&r.resolvedHref&&(a=r.resolvedHref,i.pathname=a,e=m.formatWithValidation(i))}else i.pathname=I(i.pathname,u),i.pathname!==a&&(a=i.pathname,i.pathname=a,e=m.formatWithValidation(i));const d=await this._preflightRequest({as:O(t),cache:!0,pages:u,pathname:a,query:s,locale:this.locale,isPreview:this.isPreview});"rewrite"===d.type&&(i.pathname=d.resolvedHref,a=d.resolvedHref,s={...s,...d.parsedAs.query},c=d.asPath,e=m.formatWithValidation(i));const p=r.removePathTrailingSlash(a);await Promise.all([this.pageLoader._isSsg(p).then((t=>!!t&&z(this.pageLoader.getDataHref({href:e,asPath:c,ssg:!0,locale:void 0!==n.locale?n.locale:this.locale}),!1,!1,this.sdc,!0))),this.pageLoader[n.priority?"loadPage":"prefetch"](p)])}async fetchComponent(e){let t=!1;const n=this.clc=()=>{t=!0},r=()=>{if(t){const t=new Error(`Abort fetching component for route: "${e}"`);throw t.cancelled=!0,t}n===this.clc&&(this.clc=null)};try{const t=await this.pageLoader.loadPage(e);return r(),t}catch(e){throw r(),e}}_getData(e){let t=!1;const n=()=>{t=!0};return this.clc=n,e().then((e=>{if(n===this.clc&&(this.clc=null),t){const e=new Error("Loading initial props cancelled");throw e.cancelled=!0,e}return e}))}_getFlightData(e){return z(e,!0,!0,this.sdc,!1).then((e=>({fresh:!0,data:e})))}async _preflightRequest(e){const t=_(e.as),n=S(C(t)?P(t):t,e.locale),o=(await this.pageLoader.getMiddlewareList()).map((([e,t])=>({page:e,ssr:t}))),i=v.getRoutingItems(e.pages,o);let a,s=!1;for(const e of i)if(e.match(n)){e.isMiddleware&&(s=!0);break}if(!s)return{type:"next"};try{a=await this._getPreflightData({preflightHref:e.as,shouldCache:e.cache,isPreview:e.isPreview})}catch(t){return{type:"redirect",destination:e.as}}if(a.rewrite){if(!a.rewrite.startsWith("/"))return{type:"redirect",destination:e.as};const t=f.parseRelativeUrl(l.normalizeLocalePath(C(a.rewrite)?P(a.rewrite):a.rewrite,this.locales).pathname),n=r.removePathTrailingSlash(t.pathname);let o,i;return e.pages.includes(n)?(o=!0,i=n):(i=I(n,e.pages),i!==t.pathname&&e.pages.includes(i)&&(o=!0)),{type:"rewrite",asPath:t.pathname,parsedAs:t,matchedPage:o,resolvedHref:i}}if(a.redirect){if(a.redirect.startsWith("/")){const e=r.removePathTrailingSlash(l.normalizeLocalePath(C(a.redirect)?P(a.redirect):a.redirect,this.locales).pathname),{url:t,as:n}=M(this,e,e);return{type:"redirect",newUrl:t,newAs:n}}return{type:"redirect",destination:a.redirect}}return a.refresh&&!a.ssr?{type:"refresh"}:{type:"next"}}_getPreflightData(e){const{preflightHref:t,shouldCache:n=!1,isPreview:r}=e,{href:o}=new URL(t,window.location.href);return!r&&n&&this.sde[o]?Promise.resolve(this.sde[o]):fetch(t,{method:"HEAD",credentials:"same-origin",headers:{"x-middleware-preflight":"1"}}).then((e=>{if(!e.ok)throw new Error("Failed to preflight request");return{cache:e.headers.get("x-middleware-cache"),redirect:e.headers.get("Location"),refresh:e.headers.has("x-middleware-refresh"),rewrite:e.headers.get("x-middleware-rewrite"),ssr:!!e.headers.get("x-middleware-ssr")}})).then((e=>(n&&"no-cache"!==e.cache&&(this.sde[o]=e),e))).catch((e=>{throw delete this.sde[o],e}))}getInitialProps(e,t){const{Component:n}=this.components["/_app"],r=this._wrapApp(n);return t.AppTree=r,u.loadGetInitialProps(n,{AppTree:r,Component:e,router:this,ctx:t})}abortComponentLoad(e,t){this.clc&&($.events.emit("routeChangeError",x(),e,t),this.clc(),this.clc=null)}get route(){return this.state.route}get pathname(){return this.state.pathname}get query(){return this.state.query}get asPath(){return this.state.asPath}get locale(){return this.state.locale}get isFallback(){return this.state.isFallback}get isPreview(){return this.state.isPreview}}t.default=$,$.events=s.default()},6555:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatUrl=i,t.formatWithValidation=function(e){return i(e)},t.urlObjectKeys=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(646));const o=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:n}=e,i=e.protocol||"",a=e.pathname||"",l=e.hash||"",s=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:n&&(u=t+(~n.indexOf(":")?`[${n}]`:n),e.port&&(u+=":"+e.port)),s&&"object"==typeof s&&(s=String(r.urlQueryToSearchParams(s)));let c=e.search||s&&`?${s}`||"";return i&&!i.endsWith(":")&&(i+=":"),e.slashes||(!i||o.test(i))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),l&&"#"!==l[0]&&(l="#"+l),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${i}${u}${a}${c}${l}`}t.urlObjectKeys=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"]},9983:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=""){return("/"===e?"/index":/^\/index(\/|$)/.test(e)?`/index${e}`:`${e}`)+t}},2763:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMiddlewareRegex=function(e,t=!0){const n=r.getParametrizedRoute(e),i=o.test(e)?"(?!/api(?:/|$))":"";let a=t?"(?!_next($|/)).*":"",l=t?"(?:(/.*)?)":"";return"routeKeys"in n?"/"===n.parameterizedRoute?{groups:{},namedRegex:`^/${a}$`,re:new RegExp(`^/${a}$`),routeKeys:{}}:{groups:n.groups,namedRegex:`^${i}${n.namedParameterizedRoute}${l}$`,re:new RegExp(`^${i}${n.parameterizedRoute}${l}$`),routeKeys:n.routeKeys}:"/"===n.parameterizedRoute?{groups:{},re:new RegExp(`^/${a}$`)}:{groups:{},re:new RegExp(`^${i}${n.parameterizedRoute}${l}$`)}};var r=n(4794);const o=/^\/\[[^/]+?\](?=\/|$)/},9150:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getMiddlewareRegex",{enumerable:!0,get:function(){return r.getMiddlewareRegex}}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o.getRouteMatcher}}),Object.defineProperty(t,"getRouteRegex",{enumerable:!0,get:function(){return i.getRouteRegex}}),Object.defineProperty(t,"getRoutingItems",{enumerable:!0,get:function(){return a.getRoutingItems}}),Object.defineProperty(t,"RoutingItem",{enumerable:!0,get:function(){return a.RoutingItem}}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return l.getSortedRoutes}}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return s.isDynamicRoute}});var r=n(2763),o=n(3107),i=n(4794),a=n(3948),l=n(9036),s=n(7482)},7482:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDynamicRoute=function(e){return n.test(e)};const n=/\/\[[^/]+?\](?=\/|$)/},1577:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseRelativeUrl=function(e,t){const n=new URL("undefined"==typeof window?"http://n":r.getLocationOrigin()),i=t?new URL(t,n):n,{pathname:a,searchParams:l,search:s,hash:u,href:c,origin:f}=new URL(e,i);if(f!==n.origin)throw new Error(`invariant: invalid relative URL, router received ${e}`);return{pathname:a,query:o.searchParamsToUrlQuery(l),search:s,hash:u,href:c.slice(n.origin.length)}};var r=n(1624),o=n(646)},2011:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseUrl=function(e){if(e.startsWith("/"))return o.parseRelativeUrl(e);const t=new URL(e);return{hash:t.hash,hostname:t.hostname,href:t.href,pathname:t.pathname,port:t.port,protocol:t.protocol,query:r.searchParamsToUrlQuery(t.searchParams),search:t.search}};var r=n(646),o=n(1577)},1095:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.customRouteMatcherOptions=t.matcherOptions=t.pathToRegexp=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(9264));t.pathToRegexp=r;const o={sensitive:!1,delimiter:"/"};t.matcherOptions=o;const i={...o,strict:!0};t.customRouteMatcherOptions=i,t.default=(e=!1)=>(t,n)=>{const a=[];let l=r.pathToRegexp(t,a,e?i:o);if(n){const e=n(l.source);l=new RegExp(e,l.flags)}const s=r.regexpToFunction(l,a);return(t,n)=>{const r=null!=t&&s(t);if(!r)return!1;if(e)for(const e of a)"number"==typeof e.name&&delete r.params[e.name];return{...n,...r.params}}}},9716:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchHas=function(e,t,n){const r={};return!!t.every((t=>{let o,i=t.key;switch(t.type){case"header":i=i.toLowerCase(),o=e.headers[i];break;case"cookie":o=e.cookies[t.key];break;case"query":o=n[i];break;case"host":{const{host:t}=(null==e?void 0:e.headers)||{};o=null==t?void 0:t.split(":")[0].toLowerCase();break}}if(!t.value&&o)return r[function(e){let t="";for(let n=0;n64&&r<91||r>96&&r<123)&&(t+=e[n])}return t}(i)]=o,!0;if(o){const e=new RegExp(`^${t.value}$`),n=Array.isArray(o)?o.slice(-1)[0].match(e):o.match(e);if(n)return Array.isArray(n)&&(n.groups?Object.keys(n.groups).forEach((e=>{r[e]=n.groups[e]})):"host"===t.type&&n[0]&&(r.host=n[0])),!0}return!1}))&&r},t.compileNonPath=a,t.prepareDestination=function(e){const t=Object.assign({},e.query);delete t.__nextLocale,delete t.__nextDefaultLocale;let n=e.destination;for(const r of Object.keys({...e.params,...t}))s=r,n=n.replace(new RegExp(`:${o.escapeStringRegexp(s)}`,"g"),`__ESC_COLON_${s}`);var s;const u=i.parseUrl(n),c=u.query,f=l(`${u.pathname}${u.hash||""}`),d=l(u.hostname||""),h=[],p=[];r.pathToRegexp(f,h),r.pathToRegexp(d,p);const g=[];h.forEach((e=>g.push(e.name))),p.forEach((e=>g.push(e.name)));const m=r.compile(f,{validate:!1}),v=r.compile(d,{validate:!1});for(const[t,n]of Object.entries(c))Array.isArray(n)?c[t]=n.map((t=>a(l(t),e.params))):c[t]=a(l(n),e.params);let y,b=Object.keys(e.params).filter((e=>"nextInternalLocale"!==e));if(e.appendParamsToQuery&&!b.some((e=>g.includes(e))))for(const t of b)t in c||(c[t]=e.params[t]);try{y=m(e.params);const[t,n]=y.split("#");u.hostname=v(e.params),u.pathname=t,u.hash=`${n?"#":""}${n||""}`,delete u.search}catch(e){if(e.message.match(/Expected .*? to not repeat, but got an array/))throw new Error("To use a multi-match in the destination you must add `*` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match");throw e}return u.query={...t,...u.query},{newUrl:y,parsedDestination:u}};var r=n(9264),o=n(8058),i=n(2011);function a(e,t){if(!e.includes(":"))return e;for(const n of Object.keys(t))e.includes(`:${n}`)&&(e=e.replace(new RegExp(`:${n}\\*`,"g"),`:${n}--ESCAPED_PARAM_ASTERISKS`).replace(new RegExp(`:${n}\\?`,"g"),`:${n}--ESCAPED_PARAM_QUESTION`).replace(new RegExp(`:${n}\\+`,"g"),`:${n}--ESCAPED_PARAM_PLUS`).replace(new RegExp(`:${n}(?!\\w)`,"g"),`--ESCAPED_PARAM_COLON${n}`));return e=e.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g,"\\$1").replace(/--ESCAPED_PARAM_PLUS/g,"+").replace(/--ESCAPED_PARAM_COLON/g,":").replace(/--ESCAPED_PARAM_QUESTION/g,"?").replace(/--ESCAPED_PARAM_ASTERISKS/g,"*"),r.compile(`/${e}`,{validate:!1})(t).slice(1)}function l(e){return e.replace(/__ESC_COLON_/gi,":")}},646:(e,t)=>{"use strict";function n(e){return"string"==typeof e||"number"==typeof e&&!isNaN(e)||"boolean"==typeof e?String(e):""}Object.defineProperty(t,"__esModule",{value:!0}),t.searchParamsToUrlQuery=function(e){const t={};return e.forEach(((e,n)=>{void 0===t[n]?t[n]=e:Array.isArray(t[n])?t[n].push(e):t[n]=[t[n],e]})),t},t.urlQueryToSearchParams=function(e){const t=new URLSearchParams;return Object.entries(e).forEach((([e,r])=>{Array.isArray(r)?r.forEach((r=>t.append(e,n(r)))):t.set(e,n(r))})),t},t.assign=function(e,...t){return t.forEach((t=>{Array.from(t.keys()).forEach((t=>e.delete(t))),t.forEach(((t,n)=>e.append(n,t)))})),e}},5317:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,o,f){let d,h=!1,p=!1,g=s.parseRelativeUrl(e),m=a.removePathTrailingSlash(l.normalizeLocalePath(u.delBasePath(g.pathname),f).pathname);const v=n=>{let s=c(n.source)(g.pathname);if(n.has&&s){const e=i.matchHas({headers:{host:document.location.hostname},cookies:document.cookie.split("; ").reduce(((e,t)=>{const[n,...r]=t.split("=");return e[n]=r.join("="),e}),{})},n.has,g.query);e?Object.assign(s,e):s=!1}if(s){if(!n.destination)return p=!0,!0;const c=i.prepareDestination({appendParamsToQuery:!0,destination:n.destination,params:s,query:r});if(g=c.parsedDestination,e=c.newUrl,Object.assign(r,c.parsedDestination.query),m=a.removePathTrailingSlash(l.normalizeLocalePath(u.delBasePath(e),f).pathname),t.includes(m))return h=!0,d=m,!0;if(d=o(m),d!==e&&t.includes(d))return h=!0,!0}};let y=!1;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRouteMatcher=function(e){const{re:t,groups:n}=e;return e=>{const o=t.exec(e);if(!o)return!1;const i=e=>{try{return decodeURIComponent(e)}catch(e){throw new r.DecodeError("failed to decode param")}},a={};return Object.keys(n).forEach((e=>{const t=n[e],r=o[t.pos];void 0!==r&&(a[e]=~r.indexOf("/")?r.split("/").map((e=>i(e))):t.repeat?[i(r)]:i(r))})),a}};var r=n(1624)},4794:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getParametrizedRoute=i,t.getRouteRegex=function(e){const t=i(e);return"routeKeys"in t?{re:new RegExp(`^${t.parameterizedRoute}(?:/)?$`),groups:t.groups,routeKeys:t.routeKeys,namedRegex:`^${t.namedParameterizedRoute}(?:/)?$`}:{re:new RegExp(`^${t.parameterizedRoute}(?:/)?$`),groups:t.groups}};var r=n(8058);function o(e){const t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));const n=e.startsWith("...");return n&&(e=e.slice(3)),{key:e,repeat:n,optional:t}}function i(e){const t=(e.replace(/\/$/,"")||"/").slice(1).split("/"),n={};let i=1;const a=t.map((e=>{if(e.startsWith("[")&&e.endsWith("]")){const{key:t,optional:r,repeat:a}=o(e.slice(1,-1));return n[t]={pos:i++,repeat:a,optional:r},a?r?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}return`/${r.escapeStringRegexp(e)}`})).join("");if("undefined"==typeof window){let e=97,i=1;const l=()=>{let t="";for(let n=0;n122&&(i++,e=97);return t},s={};return{parameterizedRoute:a,namedParameterizedRoute:t.map((e=>{if(e.startsWith("[")&&e.endsWith("]")){const{key:t,optional:n,repeat:r}=o(e.slice(1,-1));let i=t.replace(/\W/g,""),a=!1;return(0===i.length||i.length>30)&&(a=!0),isNaN(parseInt(i.slice(0,1)))||(a=!0),a&&(i=l()),s[i]=t,r?n?`(?:/(?<${i}>.+?))?`:`/(?<${i}>.+?)`:`/(?<${i}>[^/]+?)`}return`/${r.escapeStringRegexp(e)}`})).join(""),groups:n,routeKeys:s}}return{parameterizedRoute:a,groups:n}}},3948:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRoutingItems=function(e,t){const n=t.map((e=>`${e.page}/_middleware`)),s=new Map(t.map((e=>[e.page,e])));return a.getSortedRoutes([...e,...n]).map((e=>{if(e.endsWith(l)){const t=e.slice(0,-l.length)||"/",{ssr:n}=s.get(t);return{match:o.getRouteMatcher(r.getMiddlewareRegex(t,!n)),page:t,ssr:n,isMiddleware:!0}}return{match:o.getRouteMatcher(i.getRouteRegex(e)),page:e}}))};var r=n(2763),o=n(3107),i=n(4794),a=n(9036);const l="/_middleware"},9036:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSortedRoutes=function(e){const t=new n;return e.forEach((e=>t.insert(e))),t.smoosh()};class n{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e="/"){const t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1),this.isMiddleware&&t.splice(t.indexOf("_middleware"),1);const n=t.map((t=>this.children.get(t)._smoosh(`${e}${t}/`))).reduce(((e,t)=>[...e,...t]),[]);if(null!==this.slugName&&n.push(...this.children.get("[]")._smoosh(`${e}[${this.slugName}]/`)),!this.placeholder){const t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw new Error(`You cannot define a route with the same specificity as a optional catch-all route ("${t}" and "${t}[[...${this.optionalRestSlugName}]]").`);n.unshift(t)}return this.isMiddleware&&n.unshift(...this.children.get("_middleware")._smoosh(`${e}_middleware/`)),null!==this.restSlugName&&n.push(...this.children.get("[...]")._smoosh(`${e}[...${this.restSlugName}]/`)),null!==this.optionalRestSlugName&&n.push(...this.children.get("[[...]]")._smoosh(`${e}[[...${this.optionalRestSlugName}]]/`)),n}_insert(e,t,r){if(0===e.length)return void(this.placeholder=!1);if(r)throw new Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let i=o.slice(1,-1),a=!1;if(i.startsWith("[")&&i.endsWith("]")&&(i=i.slice(1,-1),a=!0),i.startsWith("...")&&(i=i.substring(3),r=!0),i.startsWith("[")||i.endsWith("]"))throw new Error(`Segment names may not start or end with extra brackets ('${i}').`);if(i.startsWith("."))throw new Error(`Segment names may not start with erroneous periods ('${i}').`);function l(e,n){if(null!==e&&e!==n)throw new Error(`You cannot use different slug names for the same dynamic path ('${e}' !== '${n}').`);t.forEach((e=>{if(e===n)throw new Error(`You cannot have the same slug name "${n}" repeat within a single dynamic path`);if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw new Error(`You cannot have the slug names "${e}" and "${n}" differ only by non-word symbols within a single dynamic path`)})),t.push(n)}if(r)if(a){if(null!=this.restSlugName)throw new Error(`You cannot use both an required and optional catch-all route at the same level ("[...${this.restSlugName}]" and "${e[0]}" ).`);l(this.optionalRestSlugName,i),this.optionalRestSlugName=i,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw new Error(`You cannot use both an optional and required catch-all route at the same level ("[[...${this.optionalRestSlugName}]]" and "${e[0]}").`);l(this.restSlugName,i),this.restSlugName=i,o="[...]"}else{if(a)throw new Error(`Optional route parameters are not yet supported ("${e[0]}").`);l(this.slugName,i),this.slugName=i,o="[]"}}else"_middleware"===o&&1===e.length&&(this.isMiddleware=!0);this.children.has(o)||this.children.set(o,new n),this.children.get(o)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null,this.isMiddleware=!1}}},1889:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(2784));const o="undefined"==typeof window;class i extends r.Component{constructor(e){super(e),this.emitChange=()=>{this._hasHeadManager&&this.props.headManager.updateHead(this.props.reduceComponentsToState([...this.props.headManager.mountedInstances],this.props))},this._hasHeadManager=this.props.headManager&&this.props.headManager.mountedInstances,o&&this._hasHeadManager&&(this.props.headManager.mountedInstances.add(this),this.emitChange())}componentDidMount(){this._hasHeadManager&&this.props.headManager.mountedInstances.add(this),this.emitChange()}componentDidUpdate(){this.emitChange()}componentWillUnmount(){this._hasHeadManager&&this.props.headManager.mountedInstances.delete(this),this.emitChange()}render(){return null}}t.default=i},1624:(e,t)=>{"use strict";function n(){const{protocol:e,hostname:t,port:n}=window.location;return`${e}//${t}${n?":"+n:""}`}function r(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function o(e){return e.finished||e.headersSent}Object.defineProperty(t,"__esModule",{value:!0}),t.execOnce=function(e){let t,n=!1;return(...r)=>(n||(n=!0,t=e(...r)),t)},t.getLocationOrigin=n,t.getURL=function(){const{href:e}=window.location,t=n();return e.substring(t.length)},t.getDisplayName=r,t.isResSent=o,t.normalizeRepeatedSlashes=function(e){const t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")},t.loadGetInitialProps=async function e(t,n){const i=n.res||n.ctx&&n.ctx.res;if(!t.getInitialProps)return n.ctx&&n.Component?{pageProps:await e(n.Component,n.ctx)}:{};const a=await t.getInitialProps(n);if(i&&o(i))return a;if(!a){const e=`"${r(t)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`;throw new Error(e)}return a},t.ST=t.SP=t.warnOnce=void 0,t.warnOnce=e=>{};const i="undefined"!=typeof performance;t.SP=i;const a=i&&"function"==typeof performance.mark&&"function"==typeof performance.measure;t.ST=a;class l extends Error{}t.DecodeError=l},6577:(e,t,n)=>{n(104)},9097:(e,t,n)=>{n(4529)},5632:(e,t,n)=>{e.exports=n(9518)},7320:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,l,s=o(e),u=1;u{"use strict";var r=n(2784),o=n(7320),i=n(4616);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nt}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!h.call(g,e)||!h.call(p,e)&&(d.test(e)?g[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,b);v[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,b);v[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,b);v[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),v.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var x=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,k=60106,S=60107,_=60108,C=60114,O=60109,P=60110,T=60112,R=60113,L=60120,j=60115,A=60116,M=60121,I=60128,D=60129,N=60130,F=60131;if("function"==typeof Symbol&&Symbol.for){var z=Symbol.for;E=z("react.element"),k=z("react.portal"),S=z("react.fragment"),_=z("react.strict_mode"),C=z("react.profiler"),O=z("react.provider"),P=z("react.context"),T=z("react.forward_ref"),R=z("react.suspense"),L=z("react.suspense_list"),j=z("react.memo"),A=z("react.lazy"),M=z("react.block"),z("react.scope"),I=z("react.opaque.id"),D=z("react.debug_trace_mode"),N=z("react.offscreen"),F=z("react.legacy_hidden")}var $,B="function"==typeof Symbol&&Symbol.iterator;function U(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=B&&e[B]||e["@@iterator"])?e:null}function W(e){if(void 0===$)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);$=t&&t[1]||""}return"\n"+$+e}var H=!1;function V(e,t){if(!e||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var o=e.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,l=i.length-1;1<=a&&0<=l&&o[a]!==i[l];)l--;for(;1<=a&&0<=l;a--,l--)if(o[a]!==i[l]){if(1!==a||1!==l)do{if(a--,0>--l||o[a]!==i[l])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=l);break}}}finally{H=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?W(e):""}function q(e){switch(e.tag){case 5:return W(e.type);case 16:return W("Lazy");case 13:return W("Suspense");case 19:return W("SuspenseList");case 0:case 2:case 15:return V(e.type,!1);case 11:return V(e.type.render,!1);case 22:return V(e.type._render,!1);case 1:return V(e.type,!0);default:return""}}function X(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case S:return"Fragment";case k:return"Portal";case C:return"Profiler";case _:return"StrictMode";case R:return"Suspense";case L:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case P:return(e.displayName||"Context")+".Consumer";case O:return(e._context.displayName||"Context")+".Provider";case T:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case j:return X(e.type);case M:return X(e._render);case A:t=e._payload,e=e._init;try{return X(e(t))}catch(e){}}return null}function K(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Y(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function G(e){e._valueTracker||(e._valueTracker=function(e){var t=Y(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Y(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Z(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=K(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=K(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,K(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&Z(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ie(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:K(n)}}function ue(e,t){var n=K(t.value),r=K(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml";function de(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function he(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?de(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var pe,ge,me=(ge=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((pe=pe||document.createElement("div")).innerHTML="",t=pe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ge(e,t)}))}:ge);function ve(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ye={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},be=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ye.hasOwnProperty(e)&&ye[e]?(""+t).trim():t+"px"}function xe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(ye).forEach((function(e){be.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ye[t]=ye[e]}))}));var Ee=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ke(e,t){if(t){if(Ee[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function Se(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function _e(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,Oe=null,Pe=null;function Te(e){if(e=Jr(e)){if("function"!=typeof Ce)throw Error(a(280));var t=e.stateNode;t&&(t=to(t),Ce(e.stateNode,e.type,t))}}function Re(e){Oe?Pe?Pe.push(e):Pe=[e]:Oe=e}function Le(){if(Oe){var e=Oe,t=Pe;if(Pe=Oe=null,Te(e),t)for(e=0;e(r=31-Wt(r))?0:1<n;n++)t.push(e);return t}function Ut(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Wt(t)]=n}var Wt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Ht(e)/Vt|0)|0},Ht=Math.log,Vt=Math.LN2,qt=i.unstable_UserBlockingPriority,Xt=i.unstable_runWithPriority,Kt=!0;function Yt(e,t,n,r){De||Me();var o=Qt,i=De;De=!0;try{Ae(o,e,t,n,r)}finally{(De=i)||Fe()}}function Gt(e,t,n,r){Xt(qt,Qt.bind(null,e,t,n,r))}function Qt(e,t,n,r){var o;if(Kt)if((o=0==(4&t))&&0=Mn),Nn=String.fromCharCode(32),Fn=!1;function zn(e,t){switch(e){case"keyup":return-1!==jn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $n(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Bn=!1,Un={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Un[e.type]:"textarea"===t}function Hn(e,t,n,r){Re(r),0<(t=Ar(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Vn=null,qn=null;function Xn(e){_r(e,0)}function Kn(e){if(Q(eo(e)))return e}function Yn(e,t){if("change"===e)return t}var Gn=!1;if(f){var Qn;if(f){var Zn="oninput"in document;if(!Zn){var Jn=document.createElement("div");Jn.setAttribute("oninput","return;"),Zn="function"==typeof Jn.oninput}Qn=Zn}else Qn=!1;Gn=Qn&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function fr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?fr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dr(){for(var e=window,t=Z();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Z((e=t.contentWindow).document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var pr=f&&"documentMode"in document&&11>=document.documentMode,gr=null,mr=null,vr=null,yr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;yr||null==gr||gr!==Z(r)||(r="selectionStart"in(r=gr)&&hr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},vr&&sr(vr,r)||(vr=r,0<(r=Ar(mr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}Mt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Mt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Mt(At,2);for(var wr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),xr=0;xroo||(e.current=ro[oo],ro[oo]=null,oo--)}function lo(e,t){oo++,ro[oo]=e.current,e.current=t}var so={},uo=io(so),co=io(!1),fo=so;function ho(e,t){var n=e.type.contextTypes;if(!n)return so;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function po(e){return null!=e.childContextTypes}function go(){ao(co),ao(uo)}function mo(e,t,n){if(uo.current!==so)throw Error(a(168));lo(uo,t),lo(co,n)}function vo(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,X(t)||"Unknown",i));return o({},n,r)}function yo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||so,fo=uo.current,lo(uo,e),lo(co,co.current),!0}function bo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=vo(e,t,fo),r.__reactInternalMemoizedMergedChildContext=e,ao(co),ao(uo),lo(uo,e)):ao(co),lo(co,n)}var wo=null,xo=null,Eo=i.unstable_runWithPriority,ko=i.unstable_scheduleCallback,So=i.unstable_cancelCallback,_o=i.unstable_shouldYield,Co=i.unstable_requestPaint,Oo=i.unstable_now,Po=i.unstable_getCurrentPriorityLevel,To=i.unstable_ImmediatePriority,Ro=i.unstable_UserBlockingPriority,Lo=i.unstable_NormalPriority,jo=i.unstable_LowPriority,Ao=i.unstable_IdlePriority,Mo={},Io=void 0!==Co?Co:function(){},Do=null,No=null,Fo=!1,zo=Oo(),$o=1e4>zo?Oo:function(){return Oo()-zo};function Bo(){switch(Po()){case To:return 99;case Ro:return 98;case Lo:return 97;case jo:return 96;case Ao:return 95;default:throw Error(a(332))}}function Uo(e){switch(e){case 99:return To;case 98:return Ro;case 97:return Lo;case 96:return jo;case 95:return Ao;default:throw Error(a(332))}}function Wo(e,t){return e=Uo(e),Eo(e,t)}function Ho(e,t,n){return e=Uo(e),ko(e,t,n)}function Vo(){if(null!==No){var e=No;No=null,So(e)}qo()}function qo(){if(!Fo&&null!==Do){Fo=!0;var e=0;try{var t=Do;Wo(99,(function(){for(;eg?(m=f,f=null):m=f.sibling;var v=h(o,f,l[g],s);if(null===v){null===f&&(f=m);break}e&&f&&null===v.alternate&&t(o,f),a=i(v,a,g),null===c?u=v:c.sibling=v,c=v,f=m}if(g===l.length)return n(o,f),u;if(null===f){for(;gm?(v=g,g=null):v=g.sibling;var b=h(o,g,y.value,u);if(null===b){null===g&&(g=v);break}e&&g&&null===b.alternate&&t(o,g),l=i(b,l,m),null===f?c=b:f.sibling=b,f=b,g=v}if(y.done)return n(o,g),c;if(null===g){for(;!y.done;m++,y=s.next())null!==(y=d(o,y.value,u))&&(l=i(y,l,m),null===f?c=y:f.sibling=y,f=y);return c}for(g=r(o,g);!y.done;m++,y=s.next())null!==(y=p(g,o,m,y.value,u))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),l=i(y,l,m),null===f?c=y:f.sibling=y,f=y);return e&&g.forEach((function(e){return t(o,e)})),c}return function(e,r,i,s){var u="object"==typeof i&&null!==i&&i.type===S&&null===i.key;u&&(i=i.props.children);var c="object"==typeof i&&null!==i;if(c)switch(i.$$typeof){case E:e:{for(c=i.key,u=r;null!==u;){if(u.key===c){if(7===u.tag){if(i.type===S){n(e,u.sibling),(r=o(u,i.props.children)).return=e,e=r;break e}}else if(u.elementType===i.type){n(e,u.sibling),(r=o(u,i.props)).ref=wi(e,u,i),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}i.type===S?((r=Us(i.props.children,e.mode,s,i.key)).return=e,e=r):((s=Bs(i.type,i.key,i.props,null,e.mode,s)).ref=wi(e,r,i),s.return=e,e=s)}return l(e);case k:e:{for(u=i.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Vs(i,e.mode,s)).return=e,e=r}return l(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Hs(i,e.mode,s)).return=e,e=r),l(e);if(bi(i))return g(e,r,i,s);if(U(i))return m(e,r,i,s);if(c&&xi(e,i),void 0===i&&!u)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,X(e.type)||"Component"))}return n(e,r)}}var ki=Ei(!0),Si=Ei(!1),_i={},Ci=io(_i),Oi=io(_i),Pi=io(_i);function Ti(e){if(e===_i)throw Error(a(174));return e}function Ri(e,t){switch(lo(Pi,t),lo(Oi,e),lo(Ci,_i),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:he(null,"");break;default:t=he(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ao(Ci),lo(Ci,t)}function Li(){ao(Ci),ao(Oi),ao(Pi)}function ji(e){Ti(Pi.current);var t=Ti(Ci.current),n=he(t,e.type);t!==n&&(lo(Oi,e),lo(Ci,n))}function Ai(e){Oi.current===e&&(ao(Ci),ao(Oi))}var Mi=io(0);function Ii(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Di=null,Ni=null,Fi=!1;function zi(e,t){var n=Fs(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function $i(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Bi(e){if(Fi){var t=Ni;if(t){var n=t;if(!$i(e,t)){if(!(t=Hr(n.nextSibling))||!$i(e,t))return e.flags=-1025&e.flags|2,Fi=!1,void(Di=e);zi(Di,n)}Di=e,Ni=Hr(t.firstChild)}else e.flags=-1025&e.flags|2,Fi=!1,Di=e}}function Ui(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Di=e}function Wi(e){if(e!==Di)return!1;if(!Fi)return Ui(e),Fi=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!$r(t,e.memoizedProps))for(t=Ni;t;)zi(e,t),t=Hr(t.nextSibling);if(Ui(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ni=Hr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ni=null}}else Ni=Di?Hr(e.stateNode.nextSibling):null;return!0}function Hi(){Ni=Di=null,Fi=!1}var Vi=[];function qi(){for(var e=0;ei))throw Error(a(301));i+=1,Zi=Qi=null,t.updateQueue=null,Xi.current=La,e=n(r,o)}while(ea)}if(Xi.current=Pa,t=null!==Qi&&null!==Qi.next,Yi=0,Zi=Qi=Gi=null,Ji=!1,t)throw Error(a(300));return e}function oa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Zi?Gi.memoizedState=Zi=e:Zi=Zi.next=e,Zi}function ia(){if(null===Qi){var e=Gi.alternate;e=null!==e?e.memoizedState:null}else e=Qi.next;var t=null===Zi?Gi.memoizedState:Zi.next;if(null!==t)Zi=t,Qi=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Qi=e).memoizedState,baseState:Qi.baseState,baseQueue:Qi.baseQueue,queue:Qi.queue,next:null},null===Zi?Gi.memoizedState=Zi=e:Zi=Zi.next=e}return Zi}function aa(e,t){return"function"==typeof t?t(e):t}function la(e){var t=ia(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Qi,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var l=o.next;o.next=i.next,i.next=l}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var s=l=i=null,u=o;do{var c=u.lane;if((Yi&c)===c)null!==s&&(s=s.next={lane:0,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),r=u.eagerReducer===e?u.eagerState:e(r,u.action);else{var f={lane:c,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===s?(l=s=f,i=r):s=s.next=f,Gi.lanes|=c,Il|=c}u=u.next}while(null!==u&&u!==o);null===s?i=r:s.next=l,ar(r,t.memoizedState)||(Aa=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=s,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function sa(e){var t=ia(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var l=o=o.next;do{i=e(i,l.action),l=l.next}while(l!==o);ar(i,t.memoizedState)||(Aa=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ua(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(null!==o?e=o===r:(e=e.mutableReadLanes,(e=(Yi&e)===e)&&(t._workInProgressVersionPrimary=r,Vi.push(t))),e)return n(t._source);throw Vi.push(t),Error(a(350))}function ca(e,t,n,r){var o=Ol;if(null===o)throw Error(a(349));var i=t._getVersion,l=i(t._source),s=Xi.current,u=s.useState((function(){return ua(o,t,n)})),c=u[1],f=u[0];u=Zi;var d=e.memoizedState,h=d.refs,p=h.getSnapshot,g=d.source;d=d.subscribe;var m=Gi;return e.memoizedState={refs:h,source:t,subscribe:r},s.useEffect((function(){h.getSnapshot=n,h.setSnapshot=c;var e=i(t._source);if(!ar(l,e)){e=n(t._source),ar(f,e)||(c(e),e=ls(m),o.mutableReadLanes|=e&o.pendingLanes),e=o.mutableReadLanes,o.entangledLanes|=e;for(var r=o.entanglements,a=e;0n?98:n,(function(){e(!0)})),Wo(97<\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),"select"===n&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[Kr]=t,e[Yr]=r,Ha(e,t),t.stateNode=e,u=Se(n,r),n){case"dialog":Cr("cancel",e),Cr("close",e),i=r;break;case"iframe":case"object":case"embed":Cr("load",e),i=r;break;case"video":case"audio":for(i=0;i$l&&(t.flags|=64,l=!0,el(r,!1),t.lanes=33554432)}else{if(!l)if(null!==(e=Ii(u))){if(t.flags|=64,l=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),el(r,!0),null===r.tail&&"hidden"===r.tailMode&&!u.alternate&&!Fi)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*$o()-r.renderingStartTime>$l&&1073741824!==n&&(t.flags|=64,l=!0,el(r,!1),t.lanes=33554432);r.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=r.last)?n.sibling=u:t.child=u,r.last=u)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=$o(),n.sibling=null,t=Mi.current,lo(Mi,l?1&t|2:1&t),n):null;case 23:case 24:return vs(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function nl(e){switch(e.tag){case 1:po(e.type)&&go();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Li(),ao(co),ao(uo),qi(),0!=(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Ai(e),null;case 13:return ao(Mi),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ao(Mi),null;case 4:return Li(),null;case 10:return ei(e),null;case 23:case 24:return vs(),null;default:return null}}function rl(e,t){try{var n="",r=t;do{n+=q(r),r=r.return}while(r);var o=n}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:o}}function ol(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}Ha=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Va=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ti(Ci.current);var a,l=null;switch(n){case"input":i=J(e,i),r=J(e,r),l=[];break;case"option":i=ie(e,i),r=ie(e,r),l=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),l=[];break;case"textarea":i=le(e,i),r=le(e,r),l=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Dr)}for(f in ke(n,r),n=null,i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&null!=i[f])if("style"===f){var u=i[f];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(s.hasOwnProperty(f)?l||(l=[]):(l=l||[]).push(f,null));for(f in r){var c=r[f];if(u=null!=i?i[f]:void 0,r.hasOwnProperty(f)&&c!==u&&(null!=c||null!=u))if("style"===f)if(u){for(a in u)!u.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&u[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(l||(l=[]),l.push(f,n)),n=c;else"dangerouslySetInnerHTML"===f?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(l=l||[]).push(f,c)):"children"===f?"string"!=typeof c&&"number"!=typeof c||(l=l||[]).push(f,""+c):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(s.hasOwnProperty(f)?(null!=c&&"onScroll"===f&&Cr("scroll",e),l||u===c||(l=[])):"object"==typeof c&&null!==c&&c.$$typeof===I?c.toString():(l=l||[]).push(f,c))}n&&(l=l||[]).push("style",n);var f=l;(t.updateQueue=f)&&(t.flags|=4)}},qa=function(e,t,n,r){n!==r&&(t.flags|=4)};var il="function"==typeof WeakMap?WeakMap:Map;function al(e,t,n){(n=li(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Vl=r),ol(0,t)},n}function ll(e,t,n){(n=li(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return ol(0,t),r(o)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===ql?ql=new Set([this]):ql.add(this),ol(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var sl="function"==typeof WeakSet?WeakSet:Set;function ul(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Ms(e,t)}else t.current=null}function cl(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Ko(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Wr(t.stateNode.containerInfo))}throw Error(a(163))}function fl(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var o=e;r=o.next,0!=(4&(o=o.tag))&&0!=(1&o)&&(Ls(n,e),Rs(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Ko(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&fi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}fi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&zr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&xt(n)))))}throw Error(a(163))}function dl(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=null!=o&&o.hasOwnProperty("display")?o.display:null,r.style.display=we("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function hl(e,t){if(xo&&"function"==typeof xo.onCommitFiberUnmount)try{xo.onCommitFiberUnmount(wo,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,void 0!==o)if(0!=(4&r))Ls(t,n);else{r=t;try{o()}catch(e){Ms(r,e)}}n=n.next}while(n!==e)}break;case 1:if(ul(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Ms(t,e)}break;case 5:ul(t);break;case 4:bl(e,t)}}function pl(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function gl(e){return 5===e.tag||3===e.tag||4===e.tag}function ml(e){e:{for(var t=e.return;null!==t;){if(gl(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ve(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||gl(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?vl(e,n,t):yl(e,n,t)}function vl(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Dr));else if(4!==r&&null!==(e=e.child))for(vl(e,t,n),e=e.sibling;null!==e;)vl(e,t,n),e=e.sibling}function yl(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(yl(e,t,n),e=e.sibling;null!==e;)yl(e,t,n),e=e.sibling}function bl(e,t){for(var n,r,o=t,i=!1;;){if(!i){i=o.return;e:for(;;){if(null===i)throw Error(a(160));switch(n=i.stateNode,i.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}i=i.return}i=!0}if(5===o.tag||6===o.tag){e:for(var l=e,s=o,u=s;;)if(hl(l,u),null!==u.child&&4!==u.tag)u.child.return=u,u=u.child;else{if(u===s)break e;for(;null===u.sibling;){if(null===u.return||u.return===s)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}r?(l=n,s=o.stateNode,8===l.nodeType?l.parentNode.removeChild(s):l.removeChild(s)):n.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){n=o.stateNode.containerInfo,r=!0,o.child.return=o,o=o.child;continue}}else if(hl(e,o),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(i=!1)}o.sibling.return=o.return,o=o.sibling}}function wl(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3==(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Yr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Se(e,o),t=Se(e,r),o=0;oo&&(o=l),n&=~i}if(n=o,10<(n=(120>(n=$o()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*kl(n/1960))-n)){e.timeoutHandle=Br(Cs.bind(null,e),n);break}Cs(e);break;default:throw Error(a(329))}}return cs(e,$o()),e.callbackNode===t?fs.bind(null,e):null}function ds(e,t){for(t&=~Nl,t&=~Dl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0 component higher in the tree to provide a loading indicator or placeholder to display.")}5!==jl&&(jl=2),s=rl(s,l),d=a;do{switch(d.tag){case 3:i=s,d.flags|=4096,t&=-t,d.lanes|=t,ui(d,al(0,i,t));break e;case 1:i=s;var x=d.type,E=d.stateNode;if(0==(64&d.flags)&&("function"==typeof x.getDerivedStateFromError||null!==E&&"function"==typeof E.componentDidCatch&&(null===ql||!ql.has(E)))){d.flags|=4096,t&=-t,d.lanes|=t,ui(d,ll(d,i,t));break e}}d=d.return}while(null!==d)}_s(n)}catch(e){t=e,Pl===n&&null!==n&&(Pl=n=n.return);continue}break}}function ws(){var e=Sl.current;return Sl.current=Pa,null===e?Pa:e}function xs(e,t){var n=Cl;Cl|=16;var r=ws();for(Ol===e&&Tl===t||ys(e,t);;)try{Es();break}catch(t){bs(e,t)}if(Jo(),Cl=n,Sl.current=r,null!==Pl)throw Error(a(261));return Ol=null,Tl=0,jl}function Es(){for(;null!==Pl;)Ss(Pl)}function ks(){for(;null!==Pl&&!_o();)Ss(Pl)}function Ss(e){var t=Ul(e.alternate,e,Rl);e.memoizedProps=e.pendingProps,null===t?_s(e):Pl=t,_l.current=null}function _s(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=tl(n,t,Rl)))return void(Pl=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&Rl)||0==(4&n.mode)){for(var r=0,o=n.child;null!==o;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1l&&(s=l,l=E,E=s),s=cr(b,E),i=cr(b,l),s&&i&&(1!==x.rangeCount||x.anchorNode!==s.node||x.anchorOffset!==s.offset||x.focusNode!==i.node||x.focusOffset!==i.offset)&&((w=w.createRange()).setStart(s.node,s.offset),x.removeAllRanges(),E>l?(x.addRange(w),x.extend(i.node,i.offset)):(w.setEnd(i.node,i.offset),x.addRange(w))))),w=[];for(x=b;x=x.parentNode;)1===x.nodeType&&w.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"==typeof b.focus&&b.focus(),b=0;b$o()-zl?ys(e,0):Nl|=n),cs(e,t)}function Ds(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Bo()?1:2:(0===ns&&(ns=Ml),0===(t=$t(62914560&~ns))&&(t=4194304))),n=as(),null!==(e=us(e,t))&&(Ut(e,t,n),cs(e,n))}function Ns(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Fs(e,t,n,r){return new Ns(e,t,n,r)}function zs(e){return!(!(e=e.prototype)||!e.isReactComponent)}function $s(e,t){var n=e.alternate;return null===n?((n=Fs(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Bs(e,t,n,r,o,i){var l=2;if(r=e,"function"==typeof e)zs(e)&&(l=1);else if("string"==typeof e)l=5;else e:switch(e){case S:return Us(n.children,o,i,t);case D:l=8,o|=16;break;case _:l=8,o|=1;break;case C:return(e=Fs(12,n,t,8|o)).elementType=C,e.type=C,e.lanes=i,e;case R:return(e=Fs(13,n,t,o)).type=R,e.elementType=R,e.lanes=i,e;case L:return(e=Fs(19,n,t,o)).elementType=L,e.lanes=i,e;case N:return Ws(n,o,i,t);case F:return(e=Fs(24,n,t,o)).elementType=F,e.lanes=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case O:l=10;break e;case P:l=9;break e;case T:l=11;break e;case j:l=14;break e;case A:l=16,r=null;break e;case M:l=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Fs(l,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Us(e,t,n,r){return(e=Fs(7,e,r,t)).lanes=n,e}function Ws(e,t,n,r){return(e=Fs(23,e,r,t)).elementType=N,e.lanes=n,e}function Hs(e,t,n){return(e=Fs(6,e,null,t)).lanes=n,e}function Vs(e,t,n){return(t=Fs(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function qs(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Bt(0),this.expirationTimes=Bt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bt(0),this.mutableSourceEagerHydrationData=null}function Xs(e,t,n){var r=3{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(2967)},1837:(e,t,n)=>{"use strict";n(7320);var r=n(2784),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,i={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)l.call(t,r)&&!s.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:u,ref:c,props:i,_owner:a.current}}t.jsx=u,t.jsxs=u},3426:(e,t,n)=>{"use strict";var r=n(7320),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,l=60110,s=60112;t.Suspense=60113;var u=60115,c=60116;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;o=f("react.element"),i=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),l=f("react.context"),s=f("react.forward_ref"),t.Suspense=f("react.suspense"),u=f("react.memo"),c=f("react.lazy")}var d="function"==typeof Symbol&&Symbol.iterator;function h(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n{"use strict";e.exports=n(3426)},2322:(e,t,n)=>{"use strict";e.exports=n(1837)},5047:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),a=new P(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw i;return R()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=_(a,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var s=c(e,t,n);if("normal"===s.type){if(r=n.done?p:d,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=p,n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f="suspendedStart",d="suspendedYield",h="executing",p="completed",g={};function m(){}function v(){}function y(){}var b={};s(b,i,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(T([])));x&&x!==n&&r.call(x,i)&&(b=x);var E=y.prototype=m.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,i,a,l){var s=c(e[o],e,i);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(f).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,l)}))}l(s.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function _(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,_(e,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=c(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function T(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},6475:(e,t)=>{"use strict";var n,r,o,i;if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,c=null,f=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(f,0),e}};n=function(e){null!==u?setTimeout(n,0,e):(u=e,setTimeout(f,0))},r=function(e,t){c=setTimeout(e,t)},o=function(){clearTimeout(c)},t.unstable_shouldYield=function(){return!1},i=t.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var p=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,m=null,v=-1,y=5,b=0;t.unstable_shouldYield=function(){return t.unstable_now()>=b},i=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,o=e[r];if(!(void 0!==o&&0<_(o,t)))break e;e[r]=t,e[n]=o,n=r}}function k(e){return void 0===(e=e[0])?null:e}function S(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r_(a,n))void 0!==s&&0>_(s,a)?(e[r]=s,e[l]=n,r=l):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==s&&0>_(s,n)))break e;e[r]=s,e[l]=n,r=l}}}return t}return null}function _(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],O=[],P=1,T=null,R=3,L=!1,j=!1,A=!1;function M(e){for(var t=k(O);null!==t;){if(null===t.callback)S(O);else{if(!(t.startTime<=e))break;S(O),t.sortIndex=t.expirationTime,E(C,t)}t=k(O)}}function I(e){if(A=!1,M(e),!j)if(null!==k(C))j=!0,n(D);else{var t=k(O);null!==t&&r(I,t.startTime-e)}}function D(e,n){j=!1,A&&(A=!1,o()),L=!0;var i=R;try{for(M(n),T=k(C);null!==T&&(!(T.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=T.callback;if("function"==typeof a){T.callback=null,R=T.priorityLevel;var l=a(T.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?T.callback=l:T===k(C)&&S(C),M(n)}else S(C);T=k(C)}if(null!==T)var s=!0;else{var u=k(O);null!==u&&r(I,u.startTime-n),s=!1}return s}finally{T=null,R=i,L=!1}}var N=i;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){j||L||(j=!0,n(D))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return k(C)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=N,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,i,a){var l=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0l?(e.sortIndex=a,E(O,e),null===k(C)&&e===k(O)&&(A?o():A=!0,r(I,a-l))):(e.sortIndex=s,E(C,e),j||L||(j=!0,n(D))),e},t.unstable_wrapCallback=function(e){var t=R;return function(){var n=R;R=t;try{return e.apply(this,arguments)}finally{R=n}}}},4616:(e,t,n)=>{"use strict";e.exports=n(6475)},2778:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,".article-inner-css * {\n max-width: 100%;\n}\n\n:root {\n color-scheme: light dark;\n}\n\n.highlight {\n color: var(--colors-highlightText);\n background-color: var(--colors-highlightBackground);\n cursor: pointer;\n}\n\n.highlight_with_note {\n color: var(--colors-highlightText);\n border-bottom: 2px var(--colors-highlightBackground) solid;\n border-radius: 2px;\n cursor: pointer;\n}\n\n.article-inner-css .highlight_with_note .highlight_note_button {\n display: unset !important;\n margin: 0px !important;\n max-width: unset !important;\n height: unset !important;\n padding: 0px 8px;\n cursor: pointer;\n}\n/* \non smaller screens we display the note icon\n@media (max-width: 768px) {\n .highlight_with_note.last_element:after { \n content: url(/static/icons/highlight-note-icon.svg);\n padding: 0 3px;\n cursor: pointer;\n }\n} */\n\n.article-inner-css h1,\n.article-inner-css h2,\n.article-inner-css h3,\n.article-inner-css h4,\n.article-inner-css h5,\n.article-inner-css h6 {\n margin-block-start: 0.83em;\n margin-block-end: 0.83em;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n line-height: var(--line-height);\n font-size: var(--text-font-size);\n color: var(--headers-color);\n font-weight: bold;\n}\n.article-inner-css h1 {\n font-size: 1.5em !important;\n line-height: 1.4em !important;\n}\n.article-inner-css h2 {\n font-size: 1.43em !important;\n}\n.article-inner-css h3 {\n font-size: 1.25em !important;\n}\n.article-inner-css h4,\n.article-inner-css h5,\n.article-inner-css h6 {\n font-size: 1em !important;\n margin: 1em 0 !important;\n}\n\n.article-inner-css .scrollable {\n overflow: auto;\n}\n\n.article-inner-css div {\n line-height: var(--line-height);\n /* font-size: var(--text-font-size); */\n color: var(--font-color);\n}\n\n.article-inner-css p {\n font-family: var(--text-font-family);\n font-style: normal;\n font-weight: normal;\n\n color: var(--font-color);\n\n display: block;\n margin-block-start: 1em;\n margin-block-end: 1em;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n\n > img {\n display: block;\n margin: 0.5em auto !important;\n max-width: 100% !important;\n }\n\n > iframe {\n width: 100%;\n height: 350px;\n }\n}\n\n.article-inner-css section {\n line-height: 1.65em;\n font-size: var(--text-font-size);\n}\n\n.article-inner-css blockquote {\n display: block;\n border-left: 1px solid var(--font-color-transparent);\n padding-left: 16px;\n font-style: italic;\n margin-inline-start: 0px;\n > * {\n font-style: italic;\n }\n p:last-of-type {\n margin-bottom: 0;\n }\n}\n\n.article-inner-css a {\n color: var(--font-color-readerFont);\n}\n\n.article-inner-css .highlight a {\n color: var(--colors-highlightText);\n}\n\n.article-inner-css figure {\n * {\n color: var(--font-color-transparent);\n }\n\n margin: 30px 0;\n font-size: 0.75em;\n line-height: 1.5em;\n\n figcaption {\n color: var(--font-color);\n opacity: 0.7;\n margin: 10px 20px 10px 0;\n }\n\n figcaption * {\n color: var(--font-color);\n opacity: 0.7;\n }\n figcaption a {\n color: var(--font-color);\n /* margin: 10px 20px 10px 0; */\n opacity: 0.6;\n }\n\n > div {\n max-width: 100%;\n }\n}\n\n.article-inner-css figure[aria-label='media'] {\n margin: var(--figure-margin);\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.article-inner-css hr {\n margin-bottom: var(--hr-margin);\n border: none;\n}\n\n.article-inner-css table {\n display: block;\n word-break: normal;\n white-space: nowrap;\n border: 1px solid rgb(216, 216, 216);\n border-spacing: 0;\n border-collapse: collapse;\n font-size: 0.8rem;\n margin: auto;\n line-height: 1.5em;\n font-size: 0.9em;\n max-width: -moz-fit-content;\n max-width: fit-content;\n margin: 0 auto;\n overflow-x: auto;\n caption {\n margin: 0.5em 0;\n }\n th {\n border: 1px solid rgb(216, 216, 216);\n background-color: var(--table-header-color);\n padding: 5px;\n }\n td {\n border: 1px solid rgb(216, 216, 216);\n padding: 0.5em;\n padding: 5px;\n }\n\n p {\n margin: 0;\n padding: 0;\n }\n\n img {\n display: block;\n margin: 0.5em auto !important;\n max-width: 100% !important;\n }\n}\n\n.article-inner-css ul,\n.article-inner-css ol {\n margin-block-start: 1em;\n margin-block-end: 1em;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n padding-inline-start: 40px;\n margin-top: 18px;\n\n font-family: var(--text-font-family);\n font-style: normal;\n font-weight: normal;\n\n line-height: var(--line-height);\n font-size: var(--text-font-size);\n\n color: var(--font-color);\n}\n\n.article-inner-css li {\n word-break: break-word;\n ol,\n ul {\n margin: 0;\n }\n}\n\n.article-inner-css sup,\n.article-inner-css sub {\n position: relative;\n a {\n color: inherit;\n pointer-events: none;\n }\n}\n\n.article-inner-css sup {\n top: -0.3em;\n}\n\n.article-inner-css sub {\n bottom: 0.3em;\n}\n\n.article-inner-css cite {\n font-style: normal;\n}\n\n.article-inner-css .page {\n width: 100%;\n}\n\n/* Collapse excess whitespace. */\n.page p > p:empty,\n.page div > p:empty,\n.page p > div:empty,\n.page div > div:empty,\n.page p + br,\n.page p > br:only-child,\n.page div > br:only-child,\n.page img + br {\n display: none;\n}\n\n.article-inner-css video {\n max-width: 100%;\n}\n\n.article-inner-css dl {\n display: block;\n margin-block-start: 1em;\n margin-block-end: 1em;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n}\n\n.article-inner-css dd {\n display: block;\n margin-inline-start: 40px;\n}\n\n.article-inner-css pre,\n.article-inner-css code {\n vertical-align: bottom;\n word-wrap: initial;\n font-family: 'SF Mono', monospace !important;\n white-space: pre;\n direction: ltr;\n unicode-bidi: embed;\n color: var(--font-color);\n max-width: -moz-fit-content;\n margin: 0;\n overflow-x: auto;\n word-wrap: normal;\n border-radius: 4px;\n}\n\n.article-inner-css img {\n display: block;\n margin: 0.5em auto !important;\n max-width: 100% !important;\n height: auto;\n}\n\n.article-inner-css .page {\n text-align: start;\n word-wrap: break-word;\n\n font-size: var(--text-font-size);\n line-height: var(--line-height);\n}\n\n.article-inner-css .omnivore-instagram-embed {\n img {\n margin: 0 !important;\n }\n}\n\n\n",""]);const l=a},7420:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(8081),o=n.n(r),i=n(3645),a=n.n(i)()(o());a.push([e.id,"html,\nbody {\n padding: 0;\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,\n Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n line-height: 1.6;\n font-size: 18px;\n}\n\n.disable-webkit-callout {\n -webkit-touch-callout: none;\n}\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\ndiv#appleid-signin {\n min-width: 300px;\n min-height: 40px;\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 200;\n font-style: normal;\n src: url(Inter-ExtraLight-200.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 300;\n font-style: normal;\n src: url(Inter-Light-300.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 400;\n font-style: normal;\n src: url(Inter-Regular-400.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 500;\n font-style: normal;\n src: url(Inter-Medium-500.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 600;\n font-style: normal;\n src: url(Inter-SemiBold-600.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 700;\n font-style: normal;\n src: url(Inter-Bold-700.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 800;\n font-style: normal;\n src: url(Inter-ExtraBold-800.ttf);\n}\n\n@font-face {\n font-family: 'Inter';\n font-weight: 900;\n font-style: normal;\n src: url(Inter-Black-900.ttf);\n}\n\n@font-face {\n font-family: 'Lora';\n font-weight: 400;\n font-style: normal;\n src: url(Lora-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Lora';\n font-weight: 700;\n font-style: normal;\n src: url(Lora-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Lora';\n font-weight: 400;\n font-style: italic;\n src: url(Lora-Italic.ttf);\n}\n\n@font-face {\n font-family: 'Merriweather';\n font-weight: 400;\n font-style: normal;\n src: url(Merriweather-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Merriweather';\n font-weight: 700;\n font-style: normal;\n src: url(Merriweather-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Merriweather';\n font-weight: 400;\n font-style: italic;\n src: url(Merriweather-Italic.ttf);\n}\n\n@font-face {\n font-family: 'Open Sans';\n font-weight: 400;\n font-style: normal;\n src: url(OpenSans-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Open Sans';\n font-weight: 700;\n font-style: normal;\n src: url(OpenSans-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Open Sans';\n font-weight: 400;\n font-style: italic;\n src: url(OpenSans-Italic.ttf);\n}\n\n@font-face {\n font-family: 'Roboto';\n font-weight: 400;\n font-style: normal;\n src: url(Roboto-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Roboto';\n font-weight: 700;\n font-style: normal;\n src: url(Roboto-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Roboto';\n font-weight: 400;\n font-style: italic;\n src: url(Roboto-Italic.ttf);\n}\n\n@font-face {\n font-family: 'Crimson Text';\n font-weight: 400;\n font-style: normal;\n src: url(CrimsonText-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Crimson Text';\n font-weight: 700;\n font-style: normal;\n src: url(CrimsonText-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Crimson Text';\n font-weight: 400;\n font-style: italic;\n src: url(CrimsonText-Italic.ttf);\n}\n\n@font-face {\n font-family: 'OpenDyslexic';\n font-weight: 400;\n font-style: normal;\n src: url(OpenDyslexicAlta-Regular.otf);\n}\n\n@font-face {\n font-family: 'OpenDyslexic';\n font-weight: 700;\n font-style: normal;\n src: url(OpenDyslexicAlta-Bold.otf);\n}\n\n@font-face {\n font-family: 'OpenDyslexic';\n font-weight: 400;\n font-style: italic;\n src: url(OpenDyslexicAlta-Italic.otf);\n}\n\n@font-face {\n font-family: 'Source Serif Pro';\n font-weight: 400;\n font-style: normal;\n src: url(SourceSerifPro-Regular.ttf);\n}\n\n@font-face {\n font-family: 'Source Serif Pro';\n font-weight: 700;\n font-style: normal;\n src: url(SourceSerifPro-Bold.ttf);\n}\n\n@font-face {\n font-family: 'Source Serif Pro';\n font-weight: 400;\n font-style: italic;\n src: url(SourceSerifPro-Italic.ttf);\n}\n\n@font-face {\n font-family: 'SF Mono';\n font-weight: 400;\n font-style: normal;\n src: url(SFMonoRegular.otf);\n}\n\n.dropdown-arrow {\n display: inline-block;\n width: 0;\n height: 0;\n vertical-align: middle;\n border-style: solid;\n border-width: 4px 4px 0;\n border-right-color: transparent;\n border-bottom-color: transparent;\n border-left-color: transparent;\n}\n\n.slider {\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n height: 1px;\n background: var(--colors-grayBorderHover);\n}\n\n.slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 16px !important;\n height: 16px;\n border-radius: 50%;\n background: var(--colors-utilityTextContrast);\n cursor: pointer;\n}\n\n.slider::-moz-range-thumb {\n -webkit-appearance: none;\n width: 16px !important;\n height: 16px;\n border-radius: 50%;\n background: var(--colors-utilityTextContrast);\n cursor: pointer;\n}\n\ninput[type=range]::-webkit-slider-thumb {\n -webkit-appearance: none;\n border: none;\n height: 16px;\n width: 16px;\n border-radius: 50%;\n background: var(--colors-grayTextContrast);\n}\n\nbutton {\n padding: 0px;\n margin: 0px;\n}",""]);const l=a},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var l=0;l0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},3379:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={id:e,exports:{}};return n[e].call(i.exports,i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var l=2&r&&n;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,o.d(i,a),i},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}var n,r,i,a=o(7162),l=o.n(a),s=o(2784),u=o.t(s,2),c=o(8316),f="colors",d="sizes",h="space",p={gap:h,gridGap:h,columnGap:h,gridColumnGap:h,rowGap:h,gridRowGap:h,inset:h,insetBlock:h,insetBlockEnd:h,insetBlockStart:h,insetInline:h,insetInlineEnd:h,insetInlineStart:h,margin:h,marginTop:h,marginRight:h,marginBottom:h,marginLeft:h,marginBlock:h,marginBlockEnd:h,marginBlockStart:h,marginInline:h,marginInlineEnd:h,marginInlineStart:h,padding:h,paddingTop:h,paddingRight:h,paddingBottom:h,paddingLeft:h,paddingBlock:h,paddingBlockEnd:h,paddingBlockStart:h,paddingInline:h,paddingInlineEnd:h,paddingInlineStart:h,top:h,right:h,bottom:h,left:h,scrollMargin:h,scrollMarginTop:h,scrollMarginRight:h,scrollMarginBottom:h,scrollMarginLeft:h,scrollMarginX:h,scrollMarginY:h,scrollMarginBlock:h,scrollMarginBlockEnd:h,scrollMarginBlockStart:h,scrollMarginInline:h,scrollMarginInlineEnd:h,scrollMarginInlineStart:h,scrollPadding:h,scrollPaddingTop:h,scrollPaddingRight:h,scrollPaddingBottom:h,scrollPaddingLeft:h,scrollPaddingX:h,scrollPaddingY:h,scrollPaddingBlock:h,scrollPaddingBlockEnd:h,scrollPaddingBlockStart:h,scrollPaddingInline:h,scrollPaddingInlineEnd:h,scrollPaddingInlineStart:h,fontSize:"fontSizes",background:f,backgroundColor:f,backgroundImage:f,borderImage:f,border:f,borderBlock:f,borderBlockEnd:f,borderBlockStart:f,borderBottom:f,borderBottomColor:f,borderColor:f,borderInline:f,borderInlineEnd:f,borderInlineStart:f,borderLeft:f,borderLeftColor:f,borderRight:f,borderRightColor:f,borderTop:f,borderTopColor:f,caretColor:f,color:f,columnRuleColor:f,fill:f,outline:f,outlineColor:f,stroke:f,textDecorationColor:f,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:d,minBlockSize:d,maxBlockSize:d,inlineSize:d,minInlineSize:d,maxInlineSize:d,width:d,minWidth:d,maxWidth:d,height:d,minHeight:d,maxHeight:d,flexBasis:d,gridTemplateColumns:d,gridTemplateRows:d,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},g=(e,t)=>"function"==typeof t?{"()":Function.prototype.toString.call(t)}:t,m=()=>{const e=Object.create(null);return(t,n,...r)=>{const o=(e=>JSON.stringify(e,g))(t);return o in e?e[o]:e[o]=n(t,...r)}},v=Symbol.for("sxs.internal"),y=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),b=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:w}=Object.prototype,x=e=>e.includes("-")?e:e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),E=/\s+(?![^()]*\))/,k=e=>t=>e(..."string"==typeof t?String(t).split(E):[t]),S={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backdropFilter:e=>({WebkitBackdropFilter:e,backdropFilter:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),boxDecorationBreak:e=>({WebkitBoxDecorationBreak:e,boxDecorationBreak:e}),clipPath:e=>({WebkitClipPath:e,clipPath:e}),content:e=>({content:e.includes('"')||e.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e)?e:`"${e}"`}),hyphens:e=>({WebkitHyphens:e,hyphens:e}),maskImage:e=>({WebkitMaskImage:e,maskImage:e}),maskSize:e=>({WebkitMaskSize:e,maskSize:e}),tabSize:e=>({MozTabSize:e,tabSize:e}),textSizeAdjust:e=>({WebkitTextSizeAdjust:e,textSizeAdjust:e}),userSelect:e=>({WebkitUserSelect:e,userSelect:e}),marginBlock:k(((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e}))),marginInline:k(((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e}))),maxSize:k(((e,t)=>({maxBlockSize:e,maxInlineSize:t||e}))),minSize:k(((e,t)=>({minBlockSize:e,minInlineSize:t||e}))),paddingBlock:k(((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e}))),paddingInline:k(((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e})))},_=/([\d.]+)([^]*)/,C=(e,t)=>e.length?e.reduce(((e,n)=>(e.push(...t.map((e=>e.includes("&")?e.replace(/&/g,/[ +>|~]/.test(n)&&/&.*&/.test(e)?`:is(${n})`:n):n+" "+e))),e)),[]):t,O=(e,t)=>e in P&&"string"==typeof t?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,((t,n,r,o)=>n+("stretch"===r?`-moz-available${o};${x(e)}:${n}-webkit-fill-available`:`-moz-fit-content${o};${x(e)}:${n}fit-content`)+o)):String(t),P={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},T=e=>e?e+"-":"",R=(e,t,n)=>e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,((e,r,o,i,a)=>"$"==i==!!o?e:(r||"--"==i?"calc(":"")+"var(--"+("$"===i?T(t)+(a.includes("$")?"":T(n))+a.replace(/\$/g,"-"):a)+")"+(r||"--"==i?"*"+(r||"")+(o||"1")+")":""))),L=/\s*,\s*(?![^()]*\))/,j=Object.prototype.toString,A=(e,t,n,r,o)=>{let i,a,l;const s=(e,t,n)=>{let u,c;const f=e=>{for(u in e){const p=64===u.charCodeAt(0),g=p&&Array.isArray(e[u])?e[u]:[e[u]];for(c of g){const e=/[A-Z]/.test(h=u)?h:h.replace(/-[^]/g,(e=>e[1].toUpperCase())),g="object"==typeof c&&c&&c.toString===j&&(!r.utils[e]||!t.length);if(e in r.utils&&!g){const t=r.utils[e];if(t!==a){a=t,f(t(c)),a=null;continue}}else if(e in S){const t=S[e];if(t!==l){l=t,f(t(c)),l=null;continue}}if(p&&(d=u.slice(1)in r.media?"@media "+r.media[u.slice(1)]:u,u=d.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,((e,t,n,r,o,i)=>{const a=_.test(t),l=.0625*(a?-1:1),[s,u]=a?[r,t]:[t,r];return"("+("="===n[0]?"":">"===n[0]===a?"max-":"min-")+s+":"+("="!==n[0]&&1===n.length?u.replace(_,((e,t,r)=>Number(t)+l*(">"===n?1:-1)+r)):u)+(o?") and ("+(">"===o[0]?"min-":"max-")+s+":"+(1===o.length?i.replace(_,((e,t,n)=>Number(t)+l*(">"===o?-1:1)+n)):i):"")+")"}))),g){const e=p?n.concat(u):[...n],r=p?[...t]:C(t,u.split(L));void 0!==i&&o(M(...i)),i=void 0,s(c,r,e)}else void 0===i&&(i=[[],t,n]),u=p||36!==u.charCodeAt(0)?u:`--${T(r.prefix)}${u.slice(1).replace(/\$/g,"-")}`,c=g?c:"number"==typeof c?c&&e in I?String(c)+"px":String(c):R(O(e,null==c?"":c),r.prefix,r.themeMap[e]),i[0].push(`${p?`${u} `:`${x(u)}:`}${c}`)}}var d,h};f(e),void 0!==i&&o(M(...i)),i=void 0};s(e,t,n)},M=(e,t,n)=>`${n.map((e=>`${e}{`)).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(n.length?n.length+1:0).join("}")}`,I={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},D=e=>String.fromCharCode(e+(e>25?39:97)),N=e=>(e=>{let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=D(t%52)+n;return D(t%52)+n})(((e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e})(5381,JSON.stringify(e))>>>0),F=["themed","global","styled","onevar","resonevar","allvar","inline"],z=e=>{if(e.href&&!e.href.startsWith(location.origin))return!1;try{return!!e.cssRules}catch(e){return!1}},$=e=>{let t;const n=()=>{const{cssRules:e}=t.sheet;return[].map.call(e,((n,r)=>{const{cssText:o}=n;let i="";if(o.startsWith("--sxs"))return"";if(e[r-1]&&(i=e[r-1].cssText).startsWith("--sxs")){if(!n.cssRules.length)return"";for(const e in t.rules)if(t.rules[e].group===n)return`--sxs{--sxs:${[...t.rules[e].cache].join(" ")}}${o}`;return n.cssRules.length?`${i}${o}`:""}return o})).join("")},r=()=>{if(t){const{rules:e,sheet:n}=t;if(!n.deleteRule){for(;3===Object(Object(n.cssRules)[0]).type;)n.cssRules.splice(0,1);n.cssRules=[]}for(const t in e)delete e[t]}const o=Object(e).styleSheets||[];for(const e of o)if(z(e)){for(let o=0,i=e.cssRules;i[o];++o){const a=Object(i[o]);if(1!==a.type)continue;const l=Object(i[o+1]);if(4!==l.type)continue;++o;const{cssText:s}=a;if(!s.startsWith("--sxs"))continue;const u=s.slice(14,-3).trim().split(/\s+/),c=F[u[0]];c&&(t||(t={sheet:e,reset:r,rules:{},toString:n}),t.rules[c]={group:l,index:o,cache:new Set(u)})}if(t)break}if(!t){const o=(e,t)=>({type:t,cssRules:[],insertRule(e,t){this.cssRules.splice(t,0,o(e,{import:3,undefined:1}[(e.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return"@media{}"===e?`@media{${[].map.call(this.cssRules,(e=>e.cssText)).join("")}}`:e}});t={sheet:e?(e.head||e).appendChild(document.createElement("style")).sheet:o("","text/css"),rules:{},reset:r,toString:n}}const{sheet:i,rules:a}=t;for(let e=F.length-1;e>=0;--e){const t=F[e];if(!a[t]){const n=F[e+1],r=a[n]?a[n].index:i.cssRules.length;i.insertRule("@media{}",r),i.insertRule(`--sxs{--sxs:${e}}`,r),a[t]={group:i.cssRules[r+1],index:r,cache:new Set([e])}}B(a[t])}};return r(),t},B=e=>{const t=e.group;let n=t.cssRules.length;e.apply=e=>{try{t.insertRule(e,n),++n}catch(e){}}},U=Symbol(),W=m(),H=(e,t)=>W(e,(()=>(...n)=>{let r={type:null,composers:new Set};for(const t of n)if(null!=t)if(t[v]){null==r.type&&(r.type=t[v].type);for(const e of t[v].composers)r.composers.add(e)}else t.constructor!==Object||t.$$typeof?null==r.type&&(r.type=t):r.composers.add(V(t,e));return null==r.type&&(r.type="span"),r.composers.size||r.composers.add(["PJLV",{},[],[],{},[]]),q(e,r,t)})),V=({variants:e,compoundVariants:t,defaultVariants:n,...r},o)=>{const i=`${T(o.prefix)}c-${N(r)}`,a=[],l=[],s=Object.create(null),u=[];for(const e in n)s[e]=String(n[e]);if("object"==typeof e&&e)for(const t in e){c=s,f=t,w.call(c,f)||(s[t]="undefined");const n=e[t];for(const e in n){const r={[t]:String(e)};"undefined"===String(e)&&u.push(t);const o=n[e],i=[r,o,!b(o)];a.push(i)}}var c,f;if("object"==typeof t&&t)for(const e of t){let{css:t,...n}=e;t="object"==typeof t&&t||{};for(const e in n)n[e]=String(n[e]);const r=[n,t,!b(t)];l.push(r)}return[i,r,a,l,s,u]},q=(e,t,n)=>{const[r,o,i,a]=X(t.composers),l="function"==typeof t.type||t.type.$$typeof?(e=>{function t(){for(let n=0;nt.rules[e]={apply:n=>t[U].push([e,n])})),t})(n):null,s=(l||n).rules,u=`.${r}${o.length>1?`:where(.${o.slice(1).join(".")})`:""}`,c=c=>{c="object"==typeof c&&c||Y;const{css:f,...d}=c,h={};for(const e in i)if(delete d[e],e in c){let t=c[e];"object"==typeof t&&t?h[e]={"@initial":i[e],...t}:(t=String(t),h[e]="undefined"!==t||a.has(e)?t:i[e])}else h[e]=i[e];const p=new Set([...o]);for(const[r,o,i,a]of t.composers){n.rules.styled.cache.has(r)||(n.rules.styled.cache.add(r),A(o,[`.${r}`],[],e,(e=>{s.styled.apply(e)})));const t=K(i,h,e.media),l=K(a,h,e.media,!0);for(const o of t)if(void 0!==o)for(const[t,i,a]of o){const o=`${r}-${N(i)}-${t}`;p.add(o);const l=(a?n.rules.resonevar:n.rules.onevar).cache,u=a?s.resonevar:s.onevar;l.has(o)||(l.add(o),A(i,[`.${o}`],[],e,(e=>{u.apply(e)})))}for(const t of l)if(void 0!==t)for(const[o,i]of t){const t=`${r}-${N(i)}-${o}`;p.add(t),n.rules.allvar.cache.has(t)||(n.rules.allvar.cache.add(t),A(i,[`.${t}`],[],e,(e=>{s.allvar.apply(e)})))}}if("object"==typeof f&&f){const t=`${r}-i${N(f)}-css`;p.add(t),n.rules.inline.cache.has(t)||(n.rules.inline.cache.add(t),A(f,[`.${t}`],[],e,(e=>{s.inline.apply(e)})))}for(const e of String(c.className||"").trim().split(/\s+/))e&&p.add(e);const g=d.className=[...p].join(" ");return{type:t.type,className:g,selector:u,props:d,toString:()=>g,deferredInjector:l}};return y(c,{className:r,selector:u,[v]:t,toString:()=>(n.rules.styled.cache.has(r)||c(),r)})},X=e=>{let t="";const n=[],r={},o=[];for(const[i,,,,a,l]of e){""===t&&(t=i),n.push(i),o.push(...l);for(const e in a){const t=a[e];(void 0===r[e]||"undefined"!==t||l.includes(t))&&(r[e]=t)}}return[t,n,r,new Set(o)]},K=(e,t,n,r)=>{const o=[];e:for(let[i,a,l]of e){if(l)continue;let e,s=0,u=!1;for(e in i){const r=i[e];let o=t[e];if(o!==r){if("object"!=typeof o||!o)continue e;{let e,t,i=0;for(const a in o){if(r===String(o[a])){if("@initial"!==a){const e=a.slice(1);(t=t||[]).push(e in n?n[e]:a.replace(/^@media ?/,"")),u=!0}s+=i,e=!0}++i}if(t&&t.length&&(a={["@media "+t.join(", ")]:a}),!e)continue e}}}(o[s]=o[s]||[]).push([r?"cv":`${e}-${i[e]}`,a,u])}return o},Y={},G=m(),Q=(e,t)=>G(e,(()=>(...n)=>{const r=()=>{for(let r of n){r="object"==typeof r&&r||{};let n=N(r);if(!t.rules.global.cache.has(n)){if(t.rules.global.cache.add(n),"@import"in r){let e=[].indexOf.call(t.sheet.cssRules,t.rules.themed.group)-1;for(let n of[].concat(r["@import"]))n=n.includes('"')||n.includes("'")?n:`"${n}"`,t.sheet.insertRule(`@import ${n};`,e++);delete r["@import"]}A(r,[],[],e,(e=>{t.rules.global.apply(e)}))}}return""};return y(r,{toString:r})})),Z=m(),J=(e,t)=>Z(e,(()=>n=>{const r=`${T(e.prefix)}k-${N(n)}`,o=()=>{if(!t.rules.global.cache.has(r)){t.rules.global.cache.add(r);const o=[];A(n,[],[],e,(e=>o.push(e)));const i=`@keyframes ${r}{${o.join("")}}`;t.rules.global.apply(i)}return r};return y(o,{get name(){return o()},toString:o})})),ee=class{constructor(e,t,n,r){this.token=null==e?"":String(e),this.value=null==t?"":String(t),this.scale=null==n?"":String(n),this.prefix=null==r?"":String(r)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+T(this.prefix)+T(this.scale)+this.token}toString(){return this.computedValue}},te=m(),ne=(e,t)=>te(e,(()=>(n,r)=>{r="object"==typeof n&&n||Object(r);const o=`.${n=(n="string"==typeof n?n:"")||`${T(e.prefix)}t-${N(r)}`}`,i={},a=[];for(const t in r){i[t]={};for(const n in r[t]){const o=`--${T(e.prefix)}${t}-${n}`,l=R(String(r[t][n]),e.prefix,t);i[t][n]=new ee(n,l,t,e.prefix),a.push(`${o}:${l}`)}}const l=()=>{if(a.length&&!t.rules.themed.cache.has(n)){t.rules.themed.cache.add(n);const o=`${r===e.theme?":root,":""}.${n}{${a.join(";")}}`;t.rules.themed.apply(o)}return n};return{...i,get className(){return l()},selector:o,toString:l}})),re=m(),oe=m(),ie=e=>{const t=(e=>{let t=!1;const n=re(e,(e=>{t=!0;const n="prefix"in(e="object"==typeof e&&e||{})?String(e.prefix):"",r="object"==typeof e.media&&e.media||{},o="object"==typeof e.root?e.root||null:globalThis.document||null,i="object"==typeof e.theme&&e.theme||{},a={prefix:n,media:r,theme:i,themeMap:"object"==typeof e.themeMap&&e.themeMap||{...p},utils:"object"==typeof e.utils&&e.utils||{}},l=$(o),s={css:H(a,l),globalCss:Q(a,l),keyframes:J(a,l),createTheme:ne(a,l),reset(){l.reset(),s.theme.toString()},theme:{},sheet:l,config:a,prefix:n,getCssText:l.toString,toString:l.toString};return String(s.theme=s.createTheme(i)),s}));return t||n.reset(),n})(e);return t.styled=(({config:e,sheet:t})=>oe(e,(()=>{const n=H(e,t);return(...e)=>{const t=n(...e),r=t[v].type,o=s.forwardRef(((e,n)=>{const o=e&&e.as||r,{props:i,deferredInjector:a}=t(e);return delete i.as,i.ref=n,a?s.createElement(s.Fragment,null,s.createElement(o,i),s.createElement(a,null)):s.createElement(o,i)}));return o.className=t.className,o.displayName=`Styled.${r.displayName||r.name||r}`,o.selector=t.selector,o.toString=()=>t.selector,o[v]=t[v],o}})))(t),t},ae=()=>n||(n=ie()),le=(...e)=>ae().createTheme(...e),se=(...e)=>ae().keyframes(...e),ue=(...e)=>ae().styled(...e);(i=r||(r={})).Lighter="White",i.Light="LightGray",i.Dark="Gray",i.Darker="Dark";var ce=ie({utils:{bg:function(e){return{backgroundColor:e}},p:function(e){return{padding:e}},pt:function(e){return{paddingTop:e}},pb:function(e){return{paddingBottom:e}},pl:function(e){return{paddingLeft:e}},pr:function(e){return{paddingRight:e}},px:function(e){return{paddingLeft:e,paddingRight:e}},py:function(e){return{paddingTop:e,paddingBottom:e}},m:function(e){return{margin:e}},mt:function(e){return{marginTop:e}},mb:function(e){return{marginBottom:e}},ml:function(e){return{marginLeft:e}},mr:function(e){return{marginRight:e}},mx:function(e){return{marginLeft:e,marginRight:e}},my:function(e){return{marginTop:e,marginBottom:e}}},theme:{fonts:{inter:"Inter, sans-serif"},fontSizes:{1:"0.75em",2:"0.875em",3:"1em",4:"1.25em",5:"1.5em",6:"2em"},space:{1:"0.25em",2:"0.5em",3:"1em",4:"2em",5:"4em",6:"8em"},sizes:{1:"0.25em",2:"0.5em",3:"1em",4:"2em",5:"4em",6:"8em"},radii:{1:"0.125em",2:"0.25em",3:"0.5em",round:"9999px"},fontWeights:{},lineHeights:{},letterSpacings:{},borderWidths:{},borderStyles:{},shadows:{panelShadow:"0px 4px 18px rgba(120, 123, 134, 0.12)",cardBoxShadow:"0px 0px 4px 0px rgba(0, 0, 0, 0.1)"},zIndices:{},transitions:{},colors:{grayBase:"#F8F8F8",grayBg:"#FFFFFF",grayBgActive:"#e6e6e6",grayBorder:"rgba(0, 0, 0, 0.06)",grayTextContrast:"#3A3939",graySolid:"#9C9B9A",grayBgSubtle:"hsl(0 0% 97.3%)",grayBgHover:"hsl(0 0% 93.0%)",grayLine:"hsl(0 0% 88.7%)",grayBorderHover:"hsl(0 0% 78.0%)",grayText:"hsl(0 0% 43.5%)",highlightBackground:"rgba(255, 210, 52, 0.65)",highlight:"#FFD234",highlightText:"#3D3D3D",error:"#FA5E4A",omnivoreRed:"#FA5E4A;",omnivoreGray:"#3D3D3D",omnivoreOrange:"#FF9B3E",omnivorePeach:"rgb(255, 212, 146)",omnivoreYellow:"rgb(255, 234, 159)",omnivoreLightGray:"rgb(125, 125, 125)",omnivoreCtaYellow:"rgb(255, 210, 52)",readerBg:"#E5E5E5",readerFont:"#3D3D3D",readerFontHighContrast:"black",readerFontTransparent:"rgba(61,61,61,0.65)",readerHeader:"3D3D3D",readerTableHeader:"#FFFFFF",avatarBg:"#FFFFFF",avatarFont:"#0A0806",labelButtonsBg:"#F5F5F4",tooltipIcons:"#FDFAEC",textDefault:"rgba(10, 8, 6, 0.8)",textSubtle:"rgba(10, 8, 6, 0.65)",textNonEssential:"rgba(10, 8, 6, 0.4)",overlay:"rgba(63, 62, 60, 0.2)"}},media:{xsmDown:"(max-width: 375px)",smDown:"(max-width: 575px)",mdDown:"(max-width: 768px)",lgDown:"(max-width: 992px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)"}}),fe=ce.styled,de=(ce.css,ce.theme),he=(ce.getCssText,ce.globalCss),pe=ce.keyframes,ge=(ce.config,{colors:{grayBase:"#252525",grayBg:"#3B3938",grayBgActive:"#4f4d4c",grayTextContrast:"#D8D7D7",grayBorder:"rgba(255, 255, 255, 0.06)",graySolid:"#9C9B9A",grayBgSubtle:"hsl(0 0% 9.8%)",grayBgHover:"hsl(0 0% 13.8%)",grayLine:"hsl(0 0% 19.9%)",grayBorderHover:"hsl(0 0% 31.2%)",grayText:"hsl(0 0% 62.8%)",highlightBackground:"#867740",highlight:"#FFD234",highlightText:"white",error:"#FA5E4A",readerBg:"#303030",readerFont:"#b9b9b9",readerFontHighContrast:"white",readerFontTransparent:"rgba(185,185,185,0.65)",readerHeader:"#b9b9b9",readerTableHeader:"#FFFFFF",tooltipIcons:"#5F5E58",avatarBg:"#000000",avatarFont:"rgba(255, 255, 255, 0.8)",textDefault:"rgba(255, 255, 255, 0.8)",textSubtle:"rgba(255, 255, 255, 0.65)",textNonEssential:"rgba(10, 8, 6, 0.4)",overlay:"rgba(10, 8, 6, 0.65)",labelButtonsBg:"#5F5E58"},shadows:{cardBoxShadow:"0px 0px 9px -2px rgba(255, 255, 255, 0.09), 0px 7px 12px rgba(255, 255, 255, 0.07)"}}),me=le(r.Dark,ge),ve=le(r.Darker,ge),ye=le(r.Lighter,{});function be(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function we(...e){return s.useCallback(be(...e),e)}function xe(){return xe=Object.assign||function(e){for(var t=1;t{const{children:n,...r}=e;return s.Children.toArray(n).some(_e)?s.createElement(s.Fragment,null,s.Children.map(n,(e=>_e(e)?s.createElement(ke,xe({},r,{ref:t}),e.props.children):e))):s.createElement(ke,xe({},r,{ref:t}),n)}));Ee.displayName="Slot";const ke=s.forwardRef(((e,t)=>{const{children:n,...r}=e;return s.isValidElement(n)?s.cloneElement(n,{...Ce(r,n.props),ref:be(t,n.ref)}):s.Children.count(n)>1?s.Children.only(null):null}));ke.displayName="SlotClone";const Se=({children:e})=>s.createElement(s.Fragment,null,e);function _e(e){return s.isValidElement(e)&&e.type===Se}function Ce(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?n[r]=(...e)=>{null==i||i(...e),null==o||o(...e)}:"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const Oe=["a","button","div","h2","h3","img","li","nav","p","span","svg","ul"].reduce(((e,t)=>({...e,[t]:s.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?Ee:t;return s.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.as&&console.error(Pe),s.createElement(i,xe({},o,{ref:n}))}))})),{}),Pe="Warning: The `as` prop has been removed in favour of `asChild`. For details, see https://radix-ui.com/docs/primitives/overview/styling#changing-the-rendered-element",Te="horizontal",Re=["horizontal","vertical"],Le=s.forwardRef(((e,t)=>{const{decorative:n,orientation:r=Te,...o}=e,i=je(r)?r:Te,a=n?{role:"none"}:{"aria-orientation":"vertical"===i?i:void 0,role:"separator"};return s.createElement(Oe.div,xe({"data-orientation":i},a,o,{ref:t}))}));function je(e){return Re.includes(e)}Le.propTypes={orientation(e,t,n){const r=e[t],o=String(r);return r&&!je(r)?new Error(function(e,t){return`Invalid prop \`orientation\` of value \`${e}\` supplied to \`${t}\`, expected one of:\n - horizontal\n - vertical\n\nDefaulting to \`${Te}\`.`}(o,n)):null}};const Ae=Le;var Me=o(2322),Ie={alignment:{start:{alignItems:"flex-start"},center:{alignItems:"center"},end:{alignItems:"end"}},distribution:{around:{justifyContent:"space-around"},between:{justifyContent:"space-between"},evenly:{justifyContent:"space-evenly"},start:{justifyContent:"flex-start"},center:{justifyContent:"center"},end:{justifyContent:"flex-end"}}},De=fe("div",{}),Ne=fe("span",{}),Fe=fe("a",{}),ze=fe("blockquote",{}),$e=fe(De,{display:"flex",flexDirection:"row",variants:Ie,defaultVariants:{alignment:"start",distribution:"around"}}),Be=fe(De,{display:"flex",flexDirection:"column",variants:Ie,defaultVariants:{alignment:"start",distribution:"around"}}),Ue=fe(Ae,{backgroundColor:"$grayLine","&[data-orientation=horizontal]":{height:1,width:"100%"},"&[data-orientation=vertical]":{height:"100%",width:1}}),We=["omnivore-highlight-id","data-twitter-tweet-id","data-instagram-id"];function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]i||setTimeout(r,l,o)},onDiscarded:vt,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:$t?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:$t?5e3:3e3,compare:function(e,t){return Ot(e)==Ot(t)},isPaused:function(){return!1},cache:Gt,mutate:Qt,fallback:{}},It),Jt=(0,s.createContext)({}),en=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},tn={dedupe:!0},nn=(bt.defineProperty((function(e){var t=e.value,n=function(e,t){var n=Et(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=Et(o,a))}return n}((0,s.useContext)(Jt),t),r=t&&t.provider,o=(0,s.useState)((function(){return r?Kt(r(n.cache||Gt),t):yt}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),Ft((function(){return o?o[2]:yt}),[]),(0,s.createElement)(Jt.Provider,Et(e,{value:n}))}),"default",{value:Zt}),function(e,t,n){var r=n.cache,o=n.compare,i=n.fallbackData,a=n.suspense,l=n.revalidateOnMount,u=n.refreshInterval,c=n.refreshWhenHidden,f=n.refreshWhenOffline,d=Ut.get(r),h=d[0],p=d[1],g=d[2],m=d[3],v=Bt(e),y=v[0],b=v[1],w=v[2],x=(0,s.useRef)(!1),E=(0,s.useRef)(!1),k=(0,s.useRef)(y),S=(0,s.useRef)(t),_=(0,s.useRef)(n),C=function(){return _.current},O=function(){return C().isVisible()&&C().isOnline()},P=function(e){return r.set(w,Et(r.get(w),e))},T=r.get(y),R=wt(i)?n.fallback[y]:i,L=wt(T)?R:T,j=r.get(w)||{},A=j.error,M=!x.current,I=function(){return M&&!wt(l)?l:!C().isPaused()&&(a?!wt(L)&&n.revalidateIfStale:wt(L)||n.revalidateIfStale)},D=!(!y||!t)&&(!!j.isValidating||M&&I()),N=function(e,t){var n=(0,s.useState)({})[1],r=(0,s.useRef)(e),o=(0,s.useRef)({data:!1,error:!1,isValidating:!1}),i=(0,s.useCallback)((function(e){var i=!1,a=r.current;for(var l in e){var s=l;a[s]!==e[s]&&(a[s]=e[s],o.current[s]&&(i=!0))}i&&!t.current&&n({})}),[]);return Ft((function(){r.current=e})),[r,o.current,i]}({data:L,error:A,isValidating:D},E),F=N[0],z=N[1],$=N[2],B=(0,s.useCallback)((function(e){return rt(void 0,void 0,void 0,(function(){var t,i,a,l,s,u,c,f,d,h,p,v,w;return ot(this,(function(_){switch(_.label){case 0:if(t=S.current,!y||!t||E.current||C().isPaused())return[2,!1];l=!0,s=e||{},u=!m[y]||!s.dedupe,c=function(){return!E.current&&y===k.current&&x.current},f=function(){var e=m[y];e&&e[1]===a&&delete m[y]},d={isValidating:!1},h=function(){P({isValidating:!1}),c()&&$(d)},P({isValidating:!0}),$({isValidating:!0}),_.label=1;case 1:return _.trys.push([1,3,,4]),u&&(Wt(r,y,F.current.data,F.current.error,!0),n.loadingTimeout&&!r.get(y)&&setTimeout((function(){l&&c()&&C().onLoadingSlow(y,n)}),n.loadingTimeout),m[y]=[t.apply(void 0,b),Vt()]),w=m[y],i=w[0],a=w[1],[4,i];case 2:return i=_.sent(),u&&setTimeout(f,n.dedupingInterval),m[y]&&m[y][1]===a?(P({error:yt}),d.error=yt,p=g[y],!wt(p)&&(a<=p[0]||a<=p[1]||0===p[1])?(h(),u&&c()&&C().onDiscarded(y),[2,!1]):(o(F.current.data,i)?d.data=F.current.data:d.data=i,o(r.get(y),i)||r.set(y,i),u&&c()&&C().onSuccess(i,y,n),[3,4])):(u&&c()&&C().onDiscarded(y),[2,!1]);case 3:return v=_.sent(),f(),C().isPaused()||(P({error:v}),d.error=v,u&&c()&&(C().onError(v,y,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||xt(n.shouldRetryOnError)&&n.shouldRetryOnError(v))&&O()&&C().onErrorRetry(v,y,n,B,{retryCount:(s.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return l=!1,h(),c()&&u&&Wt(r,y,d.data,d.error,!1),[2,!0]}}))}))}),[y]),U=(0,s.useCallback)(qt.bind(yt,r,(function(){return k.current})),[]);if(Ft((function(){S.current=t,_.current=n})),Ft((function(){if(y){var e=y!==k.current,t=B.bind(yt,tn),n=0,r=en(y,p,(function(e,t,n){$(Et({error:t,isValidating:n},o(F.current.data,e)?yt:{data:e}))})),i=en(y,h,(function(e){if(0==e){var r=Date.now();C().revalidateOnFocus&&r>n&&O()&&(n=r+C().focusThrottleInterval,t())}else if(1==e)C().revalidateOnReconnect&&O()&&t();else if(2==e)return B()}));return E.current=!1,k.current=y,x.current=!0,e&&$({data:L,error:A,isValidating:D}),I()&&(wt(L)||Nt?t():(a=t,St()&&typeof window.requestAnimationFrame!=kt?window.requestAnimationFrame(a):setTimeout(a,1))),function(){E.current=!0,r(),i()}}var a}),[y,B]),Ft((function(){var e;function t(){var t=xt(u)?u(L):u;t&&-1!==e&&(e=setTimeout(n,t))}function n(){F.current.error||!c&&!C().isVisible()||!f&&!C().isOnline()?t():B(tn).then(t)}return t(),function(){e&&(clearTimeout(e),e=-1)}}),[u,c,f,B]),(0,s.useDebugValue)(L),a&&wt(L)&&y)throw S.current=t,_.current=n,E.current=!1,wt(A)?B(tn):A;return{mutate:U,get data(){return z.data=!0,L},get error(){return z.error=!0,A},get isValidating(){return z.isValidating=!0,D}}},{prod:{webBaseURL:null!==(it=window.omnivoreEnv.NEXT_PUBLIC_BASE_URL)&&void 0!==it?it:"",serverBaseURL:null!==(at=window.omnivoreEnv.NEXT_PUBLIC_SERVER_BASE_URL)&&void 0!==at?at:"",highlightsBaseURL:null!==(lt=window.omnivoreEnv.NEXT_PUBLIC_HIGHLIGHTS_BASE_URL)&&void 0!==lt?lt:""},dev:{webBaseURL:null!==(st=window.omnivoreEnv.NEXT_PUBLIC_DEV_BASE_URL)&&void 0!==st?st:"",serverBaseURL:null!==(ut=window.omnivoreEnv.NEXT_PUBLIC_DEV_SERVER_BASE_URL)&&void 0!==ut?ut:"",highlightsBaseURL:null!==(ct=window.omnivoreEnv.NEXT_PUBLIC_DEV_HIGHLIGHTS_BASE_URL)&&void 0!==ct?ct:""},demo:{webBaseURL:null!==(ft=window.omnivoreEnv.NEXT_PUBLIC_DEMO_BASE_URL)&&void 0!==ft?ft:"",serverBaseURL:null!==(dt=window.omnivoreEnv.NEXT_PUBLIC_DEMO_SERVER_BASE_URL)&&void 0!==dt?dt:"",highlightsBaseURL:null!==(ht=window.omnivoreEnv.NEXT_PUBLIC_DEMO_HIGHLIGHTS_BASE_URL)&&void 0!==ht?ht:""},local:{webBaseURL:null!==(pt=window.omnivoreEnv.NEXT_PUBLIC_LOCAL_BASE_URL)&&void 0!==pt?pt:"",serverBaseURL:null!==(gt=window.omnivoreEnv.NEXT_PUBLIC_LOCAL_SERVER_BASE_URL)&&void 0!==gt?gt:"",highlightsBaseURL:null!==(mt=window.omnivoreEnv.NEXT_PUBLIC_LOCAL_HIGHLIGHTS_BASE_URL)&&void 0!==mt?mt:""}});function rn(e){var t=nn[an].serverBaseURL;if(0==t.length)throw new Error("Couldn't find environment variable for server base url in ".concat(e," environment"));return t}var on,an=window.omnivoreEnv.NEXT_PUBLIC_APP_ENV||"prod",ln=(window.omnivoreEnv.SENTRY_DSN||window.omnivoreEnv.NEXT_PUBLIC_SENTRY_DSN,window.omnivoreEnv.NEXT_PUBLIC_PSPDFKIT_LICENSE_KEY,window.omnivoreEnv.SSO_JWT_SECRET,"".concat(nn[an].serverBaseURL,"local"==an?"/api/auth/gauth-redirect-localhost":"/api/auth/vercel/gauth-redirect"),"".concat(nn[an].serverBaseURL,"local"==an?"/api/auth/apple-redirect-localhost":"/api/auth/vercel/apple-redirect"),window.omnivoreEnv.NEXT_PUBLIC_INTERCOM_APP_ID,window.omnivoreEnv.NEXT_PUBLIC_SEGMENT_API_KEY,"prod"==an?window.omnivoreEnv.NEXT_PUBLIC_GOOGLE_ID:window.omnivoreEnv.NEXT_PUBLIC_DEV_GOOGLE_ID,"".concat(rn(an),"/api/graphql")),sn="".concat(rn(an),"/api");function un(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function cn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){un(i,r,o,a,l,"next",e)}function l(e){un(i,r,o,a,l,"throw",e)}a(void 0)}))}}function fn(){var e,t,n=(null===(e=window)||void 0===e?void 0:e.localStorage.getItem("authToken"))||void 0,r=(null===(t=window)||void 0===t?void 0:t.localStorage.getItem("pendingUserAuth"))||void 0;return n?{authorization:n}:r?{pendingUserAuth:r}:{}}function dn(e,t){return hn(e,t,!1)}function hn(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];n&&pn();var r=new nt.GraphQLClient(ln,{credentials:"include",mode:"cors"});return r.request(e,t,fn())}function pn(){return gn.apply(this,arguments)}function gn(){return(gn=cn(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"!=typeof window){e.next=2;break}return e.abrupt("return");case 2:if(!window.localStorage.getItem("authVerified")){e.next=4;break}return e.abrupt("return");case 4:return e.prev=4,e.next=7,fetch("".concat(sn,"/auth/verify"),{credentials:"include",mode:"cors",headers:fn()});case 7:if(200===(t=e.sent).status){e.next=10;break}return e.abrupt("return");case 10:return e.next=12,t.json();case 12:n=e.sent,r=n.authStatus,e.t0=r,e.next="AUTHENTICATED"===e.t0?17:"PENDING_USER"===e.t0?19:"NOT_AUTHENTICATED"===e.t0?21:22;break;case 17:return window.localStorage.setItem("authVerified","true"),e.abrupt("break",22);case 19:return"/confirm-profile"!==window.location.pathname&&(window.location.href="/confirm-profile"),e.abrupt("break",22);case 21:"/login"!==window.location.pathname&&(window.location.href="/login?errorCodes=AUTH_FAILED");case 22:e.next=27;break;case 24:return e.prev=24,e.t1=e.catch(4),e.abrupt("return");case 27:case"end":return e.stop()}}),e,null,[[4,24]])})))).apply(this,arguments)}(function(e){if(0==nn[an].highlightsBaseURL.length)throw new Error("Couldn't find environment variable for highlights base url in ".concat(e," environment"))})(an),function(e){if(0==nn[an].webBaseURL.length)throw new Error("Couldn't find environment variable for web base url in ".concat(e," environment"))}(an);var mn,vn,yn,bn=(0,nt.gql)(on||(mn=["\n query GetUserPersonalization {\n getUserPersonalization {\n ... on GetUserPersonalizationSuccess {\n userPersonalization {\n id\n theme\n margin\n fontSize\n fontFamily\n libraryLayoutType\n librarySortOrder\n }\n }\n ... on GetUserPersonalizationError {\n errorCodes\n }\n }\n }\n"],vn||(vn=mn.slice(0)),on=Object.freeze(Object.defineProperties(mn,{raw:{value:Object.freeze(vn)}}))));function wn(e){Qt(bn,{getUserPersonalization:{userPersonalization:e}},!1)}function xn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function En(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function kn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){En(i,r,o,a,l,"next",e)}function l(e){En(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Sn(e){return _n.apply(this,arguments)}function _n(){return _n=kn(regeneratorRuntime.mark((function e(t){var n,r,o,i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,nt.gql)(yn||(yn=xn(["\n mutation SetUserPersonalization($input: SetUserPersonalizationInput!) {\n setUserPersonalization(input: $input) {\n ... on SetUserPersonalizationSuccess {\n updatedUserPersonalization {\n id\n theme\n fontSize\n fontFamily\n margin\n libraryLayoutType\n librarySortOrder\n }\n }\n ... on SetUserPersonalizationError {\n errorCodes\n }\n }\n }\n "]))),e.prev=1,e.next=4,hn(n,{input:t});case 4:if(o=e.sent,null==(i=o)||null===(r=i.setUserPersonalization)||void 0===r||!r.updatedUserPersonalization){e.next=9;break}return wn(i.setUserPersonalization.updatedUserPersonalization),e.abrupt("return",null===(a=i.setUserPersonalization)||void 0===a?void 0:a.updatedUserPersonalization);case 9:return e.abrupt("return",void 0);case 12:return e.prev=12,e.t0=e.catch(1),e.abrupt("return",void 0);case 15:case"end":return e.stop()}}),e,null,[[1,12]])}))),_n.apply(this,arguments)}var Cn="theme";function On(e){"undefined"!=typeof window&&(Pn(e),Sn({theme:e}))}function Pn(e){"undefined"!=typeof window&&window.localStorage.setItem(Cn,e),document.body.classList.remove(ye,r.Light,me,ve),document.body.classList.add(e)}function Tn(){switch(function(){if("undefined"!=typeof window)return window.localStorage.getItem(Cn)}()){case r.Light:return"Light";case r.Dark:return"Dark";case r.Darker:return"Darker";case r.Lighter:return"Lighter";default:return""}}function Rn(){var e=Tn();return"Dark"===e||"Darker"===e}var Ln=o(4073),jn=o.n(Ln);function An(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function Mn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return In(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?In(e,t):void 0}}(e,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 In(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0;)r();return n.shift(),n.forEach((function(e,t){e.setAttribute("data-omnivore-anchor-idx",(t+1).toString())})),n}(e.current),r=new IntersectionObserver((function(e){var n=0,r=1e5;if(e.forEach((function(e){var t=e.target.getAttribute("data-omnivore-anchor-idx")||"0";e.isIntersecting&&1===e.intersectionRatio&&e.boundingClientRect.top0){for(var o=n;o-1>0;){var i=document.querySelector("[data-omnivore-anchor-idx='".concat((o-1).toString(),"']"));if(!i)throw new Error("Unable to find previous intersection element!");var a=i.getBoundingClientRect();if(!(a.top>=0&&a.left>=0&&a.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&a.right<=(window.innerWidth||document.documentElement.clientWidth)))break;o-=1}t(o)}}),{root:null,rootMargin:"0px",threshold:[1]});return null==n||n.forEach((function(e){r.observe(e)})),function(){r.disconnect()}}),[e,t])}(h,l);var p=(0,s.useMemo)((function(){return jn()((function(e){console.log("setReadingProgress",e),o(e)}),2e3)}),[]);(0,s.useEffect)((function(){return function(){p.cancel()}}),[]),(0,s.useEffect)((function(){var t;(t=regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,e.articleMutations.articleReadingProgressMutation({id:e.articleId,readingProgressPercent:r>100?100:r,readingProgressAnchorIndex:a});case 4:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(e){An(i,r,o,a,l,"next",e)}function l(e){An(i,r,o,a,l,"throw",e)}a(void 0)}))})()}),[e.articleId,r]),(0,s.useEffect)((function(){var e,t;void 0!==(null===(e=window)||void 0===e?void 0:e.webkit)&&(null===(t=window.webkit.messageHandlers.readingProgressUpdate)||void 0===t||t.postMessage({progress:r}))}),[r]),function(e,t){var n,r,o=(0,s.useRef)(void 0),i=(n=(0,s.useState)({x:0,y:0}),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(n,r)||function(e,t){if(e){if("string"==typeof e)return He(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?He(e,t):void 0}}(n,r)||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.")}()),a=i[0],l=i[1];(0,s.useEffect)((function(){var t=function(){var t,n,r,i,a,s,u={x:null!==(t=null!==(n=window.document.documentElement.scrollLeft)&&void 0!==n?n:null===(r=window)||void 0===r?void 0:r.scrollX)&&void 0!==t?t:0,y:null!==(i=null!==(a=window.document.documentElement.scrollTop)&&void 0!==a?a:null===(s=window)||void 0===s?void 0:s.scrollY)&&void 0!==i?i:0};e(),l(u),o.current=void 0},n=function(){void 0===o.current&&(o.current=setTimeout(t,1e3))};return window.addEventListener("scroll",n),function(){return window.removeEventListener("scroll",n)}}),[a,1e3,e])}((function(e){if(window&&window.document.scrollingElement){var t=window.scrollY/window.document.scrollingElement.scrollHeight;p(100*(t>.92?1:t))}}));var g=(0,s.useCallback)((function(e,t){if(t){var n=t.clientWidth+140;if(!e.closest("blockquote, table")){var r=parseFloat(e.getAttribute("width")||"");(r=isNaN(r)?e.naturalWidth:r)>n&&(e.style.setProperty("width","".concat(Math.min(r,n),"px")),e.style.setProperty("max-width","unset"),e.style.setProperty("margin-left","-".concat(Math.round(70),"px")))}}}),[]);(0,s.useEffect)((function(){if("undefined"!=typeof window&&e.highlightReady){if(!f)return;if(d(!1),e.initialReadingProgress&&e.initialReadingProgress>=98)return;var t=e.highlightHref.current?document.querySelector('[omnivore-highlight-id="'.concat(e.highlightHref.current,'"]')):document.querySelector("[data-omnivore-anchor-idx='".concat(e.initialAnchorIndex.toString(),"']"));if(t){var n=function(e){var t=0;if(e.offsetParent){do{t+=e.offsetTop}while(e=e.offsetParent);return t}return 0}(t);window.document.documentElement.scroll(0,n-100)}}}),[e.highlightReady,e.initialAnchorIndex,e.initialReadingProgress,f]),(0,s.useEffect)((function(){var e,t;"function"==typeof(null===(e=window)||void 0===e||null===(t=e.MathJax)||void 0===t?void 0:t.typeset)&&window.MathJax.typeset(),Array.from(document.getElementsByClassName("tweet-placeholder")).forEach((function(e){(0,c.render)((0,Me.jsx)(tt,{tweetId:e.getAttribute("data-tweet-id")||"",options:{theme:Rn()?"dark":"light",align:"center"}}),e)}))}),[]);var m=(0,s.useCallback)((function(){var e,t=null===(e=h.current)||void 0===e?void 0:e.querySelectorAll("img");null==t||t.forEach((function(e){g(e,h.current)}))}),[g]);return(0,s.useEffect)((function(){return window.addEventListener("load",m),function(){window.removeEventListener("load",m)}}),[m]),(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)("link",{rel:"stylesheet",href:"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.4.0/styles/".concat(t,".min.css")}),(0,Me.jsx)(De,{ref:h,css:{maxWidth:"100%"},className:"article-inner-css","data-testid":"article-inner",dangerouslySetInnerHTML:{__html:e.content}})]})}var Nn=fe("p",{fontFamily:"Inter",fontWeight:"normal",lineHeight:"120%",color:"$grayTextContrast",variants:{style:{body:{fontSize:"$2",lineHeight:"1.25"},logoTitle:{fontFamily:"Inter",fontWeight:700,fontSize:"18px",textTransform:"uppercase",letterSpacing:"0.15em"},bodyBold:{fontWeight:"bold",fontSize:"$2",lineHeight:"1.25"},headline:{fontSize:"$4","@md":{fontSize:"$6"}},fixedHeadline:{fontSize:"24px",fontWeight:"500"},subHeadline:{fontSize:"$5"},boldHeadline:{fontWeight:"bold",fontSize:"$4","@md":{fontSize:"$6"},margin:0},modalHeadline:{fontWeight:"500",fontSize:"16px",lineHeight:"1",color:"$grayText",margin:0},modalTitle:{fontSize:"29px",lineHeight:"37.7px",color:"$textDefault",margin:0},boldText:{fontWeight:"600",fontSize:"16px",lineHeight:"1",color:"$textDefault"},shareHighlightModalAnnotation:{fontSize:"18px",lineHeight:"23.4px",color:"$textSubtle",m:0},footnote:{fontSize:"$1"},shareTitle:{fontSize:"$1",fontWeight:"600",color:"$grayText"},shareSubtitle:{fontSize:"$1",color:"$grayText"},listTitle:{fontSize:"16px",fontWeight:"500",color:"$grayTextContrast",lineHeight:"1.5",wordBreak:"break-word"},caption:{color:"$grayText",fontSize:"12px",lineHeight:"1.5",wordBreak:"break-word"},captionLink:{fontSize:"$2",textDecoration:"underline",lineHeight:"1.5",cursor:"pointer"},highlightTitleAndAuthor:{fontSize:"18px",fontStyle:"italic",lineHeight:"22.5px",letterSpacing:"0.01em",margin:"0px",color:"$textSubtle"},highlightTitle:{fontSize:"14px",fontWeight:"400",lineHeight:"1.5",margin:"0px",color:"$omnivoreGray"},navLink:{m:0,fontSize:"$1",fontWeight:400,color:"$graySolid",cursor:"pointer","&:hover":{opacity:.7}},controlButton:{color:"$grayText",fontWeight:"500",fontFamily:"inter",fontSize:"14px"},menuTitle:{fontSize:13,pt:"0px",m:"0px",borderRadius:3,cursor:"default",color:"$grayText"},error:{color:"$error",fontSize:"$2",lineHeight:"1.25"}}},defaultVariants:{style:"footnote"}});function Fn(e){var t,n,r,o=e.style||"footnote";return(0,Me.jsx)(De,{children:(0,Me.jsxs)(Nn,{style:o,css:{wordBreak:"break-word"},children:[(n=e.href,r=e.author,r?"".concat(function(e){return"by ".concat("string"==typeof(t=e)?t.replace(/(<([^>]+)>)/gi,""):"");var t}(r),", ").concat(new URL(n).hostname):new URL(n).origin)," ",(0,Me.jsx)("span",{style:{position:"relative",bottom:1},children:"• "})," ",(t=e.rawDisplayDate,new Intl.DateTimeFormat("en-US",{dateStyle:"long"}).format(new Date(t)))," ",!e.hideButton&&(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)("span",{style:{position:"relative",bottom:1},children:"• "})," ",(0,Me.jsx)(Fe,{href:e.href,target:"_blank",rel:"noreferrer",css:{textDecoration:"underline",color:"$grayTextContrast"},children:"See original"})]})]})})}fe("li",{fontFamily:"Inter",fontWeight:"normal",lineHeight:"1.35",color:"$grayTextContrast"}),fe("ul",{fontFamily:"Inter",fontWeight:"normal",lineHeight:"1.35",color:"$grayTextContrast"}),fe("img",{}),fe("a",{textDecoration:"none"}),fe("mark",{});var zn=o(1427);function $n(e,t){for(var n=0,r=e.length-1;n=e[l+1]))return l;n=l+1}}throw new Error("Unable to find text node")}var Bn="omnivore-highlight-id",Un="omnivore-highlight-note-id",Wn="omnivore_highlight",Hn="article-container",Vn=/^(a|b|basefont|bdo|big|em|font|i|s|small|span|strike|strong|su[bp]|tt|u|code|mark)$/i,qn=new RegExp("<".concat(Wn,">([\\s\\S]*)<\\/").concat(Wn,">"),"i"),Xn=2e3;function Kn(e,t,n,r,o){var i,a=Jn({patch:e}),l=a.prefix,s=a.suffix,u=a.highlightTextStart,c=a.highlightTextEnd,f=a.textNodes,d=a.textNodeIndex,h="";if(tr(t).length)return{prefix:l,suffix:s,quote:h,startLocation:u,endLocation:c};for(var p=function(){var e=er({textNodes:f,startingTextNodeIndex:d,highlightTextStart:u,highlightTextEnd:c}),a=e.node,l=e.textPartsToHighlight,s=e.startsParagraph,p=a.parentNode,g=a.nextSibling;null==p||p.removeChild(a),l.forEach((function(e,a){var l=e.highlight,u=e.text.replace(/\n/g,""),c=document.createTextNode(u);if(l){u&&(s&&!a&&h&&(h+="\n"),h+=u);var f=document.createElement("span");return f.className=n?"highlight_with_note":"highlight",f.setAttribute(Bn,t),r&&f.setAttribute("style","background-color: ".concat(r," !important")),o&&f.setAttribute("title",o),f.appendChild(c),i=f,null==p?void 0:p.insertBefore(f,g)}return null==p?void 0:p.insertBefore(c,g)})),d++};c>f[d].startIndex;)p();if(n&&i){i.classList.add("last_element");var g=function(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.setAttribute("viewBox","0 0 14 14"),t.setAttribute("width","14"),t.setAttribute("height","14"),t.setAttribute("fill","none");var n=document.createElementNS(e,"path");return n.setAttribute("d","M1 5.66602C1 3.7804 1 2.83759 1.58579 2.2518C2.17157 1.66602 3.11438 1.66602 5 1.66602H9C10.8856 1.66602 11.8284 1.66602 12.4142 2.2518C13 2.83759 13 3.7804 13 5.66602V7.66601C13 9.55163 13 10.4944 12.4142 11.0802C11.8284 11.666 10.8856 11.666 9 11.666H4.63014C4.49742 11.666 4.43106 11.666 4.36715 11.6701C3.92582 11.6984 3.50632 11.8722 3.17425 12.1642C3.12616 12.2065 3.07924 12.2534 2.98539 12.3473V12.3473C2.75446 12.5782 2.639 12.6937 2.55914 12.7475C1.96522 13.1481 1.15512 12.8125 1.01838 12.1093C1 12.0148 1 11.8515 1 11.5249V5.66602Z"),n.setAttribute("stroke","rgba(255, 210, 52, 0.8)"),n.setAttribute("stroke-width","1.8"),n.setAttribute("stroke-linejoin","round"),t.appendChild(n),t}();g.setAttribute(Un,t);var m=document.createElement("div");m.className="highlight_note_button",m.appendChild(g),m.setAttribute(Un,t),m.setAttribute("width","14px"),m.setAttribute("height","14px"),i.appendChild(m)}return{prefix:l,suffix:s,quote:h,startLocation:u,endLocation:c}}function Yn(e){var t=document.getElementById(Hn);if(!t)throw new Error("Unable to find article content element");var n=new Range,r=new Range,o=new Range;o.selectNode(t),n.setStart(o.startContainer,o.startOffset),n.setEnd(e.startContainer,e.startOffset),r.setStart(e.endContainer,e.endOffset),r.setEnd(o.endContainer,o.endOffset);var i="".concat(n.toString(),"<").concat(Wn,">").concat(e.toString(),"").concat(Wn,">").concat(r.toString()),a=new zn.diff_match_patch,l=a.patch_toText(a.patch_make(o.toString(),i));if(!l)throw new Error("Invalid patch");return l}function Gn(e){var t=Yn(e),n=Zn(t);return[n.highlightTextStart,n.highlightTextEnd]}var Qn=function(e){var t=(null==e?void 0:e.current)||document.getElementById(Hn);if(!t)throw new Error("Unable to find article content element");var n=0,r="",o=!1,i=[];return t.childNodes.forEach((function e(t){var a;t.nodeType===Node.TEXT_NODE?(i.push({startIndex:n,node:t,startsParagraph:o}),n+=(null===(a=t.nodeValue)||void 0===a?void 0:a.length)||0,r+=t.nodeValue,o=!1):(Vn.test(t.tagName)||(o=!0),t.childNodes.forEach(e))})),i.push({startIndex:n,node:document.createTextNode("")}),{textNodes:i,articleText:r}},Zn=function(e){if(!e)throw new Error("Invalid patch");var t,n=Qn().articleText,r=new zn.diff_match_patch,o=r.patch_apply(r.patch_fromText(e),n);if(o[1][0])t=qn.exec(o[0]);else{r.Match_Threshold=.5,r.Match_Distance=4e3;var i=r.patch_apply(r.patch_fromText(e),n);if(!i[1][0])throw new Error("Unable to find the highlight");t=qn.exec(i[0])}if(!t)throw new Error("Unable to find the highlight from patch");var a=t.index;return{highlightTextStart:a,highlightTextEnd:a+t[1].length,matchingHighlightContent:t}};function Jn(e){var t=e.patch;if(!t)throw new Error("Invalid patch");var n=Qn().textNodes,r=Zn(t),o=r.highlightTextStart,i=r.highlightTextEnd,a=$n(n.map((function(e){return e.startIndex})),o),l=$n(n.map((function(e){return e.startIndex})),i);return{prefix:nr({textNodes:n,startingTextNodeIndex:a,startingOffset:o-n[a].startIndex,side:"prefix"}),suffix:nr({textNodes:n,startingTextNodeIndex:l,startingOffset:i-n[l].startIndex,side:"suffix"}),highlightTextStart:o,highlightTextEnd:i,textNodes:n,textNodeIndex:a}}var er=function(e){var t=e.textNodes,n=e.startingTextNodeIndex,r=e.highlightTextStart,o=e.highlightTextEnd,i=t[n],a=i.node,l=i.startIndex,s=i.startsParagraph,u=a.nodeValue||"",c=r-l,f=o-l,d=[];return c>0&&d.push({text:u.substring(0,c),highlight:!1}),d.push({text:u.substring(c,f),highlight:!0}),f<=u.length&&d.push({text:u.substring(f),highlight:!1}),{node:a,textPartsToHighlight:d,startsParagraph:s}},tr=function(e){return Array.from(document.querySelectorAll("[".concat(Bn,"='").concat(e,"']")))},nr=function(e){var t,n=e.textNodes,r=e.startingTextNodeIndex,o=e.startingOffset,i="prefix"===e.side,a=r,l=function e(){var t=n[a+=i?-1:1],r=t.node,o=t.startsParagraph,l=r.nodeValue||"";return i?o||l.length>Xn?l:e()+l:!n[a+1]||n[a+1].startsParagraph||l.length>Xn?l:l+e()},s=n[r],u=s.startsParagraph,c=s.node.nodeValue||"",f=i?c.substring(0,o):c.substring(o);return(t=i?u?f:l()+f:!n[a+1]||n[a+1].startsParagraph?f:f+l()).length<=Xn?t:i?t.slice(t.length-Xn):t.substring(0,Xn)},rr=function(e){var t=Jn({patch:e}),n=t.highlightTextStart;return t.highlightTextEnd-n<2e3};function or(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function ir(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){or(i,r,o,a,l,"next",e)}function l(e){or(i,r,o,a,l,"throw",e)}a(void 0)}))}}function ar(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return lr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lr(e,t):void 0}}(e,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 lr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&a<=0,s=o.startContainer===t.focusNode&&o.endOffset===t.anchorOffset,e.abrupt("return",l?{range:o,isReverseSelected:s,selection:t}:void 0);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var cr=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("undefined"==typeof window||!e)return{left:0,top:0,right:0,bottom:0,width:0,height:0};var n=e.getClientRects();if(!n||!n.length)return{left:0,top:0,right:0,bottom:0,width:0,height:0};var r=n[t?0:n.length-1];return{left:window.scrollX+r.left,top:window.scrollY+r.top,right:window.scrollX+r.right,bottom:window.scrollY+r.bottom,width:r.width,height:r.height}},fr=fe("button",{fontFamily:"inter",fontSize:"$2",lineHeight:"1.25",color:"$grayText",variants:{style:{ctaYellow:{borderRadius:"$3",px:"$3",py:"$2",border:"1px solid $yellow3",bg:"$yellow3","&:hover":{bg:"$yellow4",border:"1px solid $grayBorderHover"}},ctaDarkYellow:{border:0,fontSize:"14px",fontWeight:500,fontStyle:"normal",fontFamily:"Inter",borderRadius:"8px",cursor:"pointer",color:"$omnivoreGray",bg:"$omnivoreCtaYellow",p:"10px 12px"},ctaLightGray:{border:0,fontSize:"14px",fontWeight:500,fontStyle:"normal",fontFamily:"Inter",borderRadius:"8px",cursor:"pointer",color:"$grayTextContrast",p:"10px 12px",bg:"rgb(125, 125, 125, 0.1)","&:hover":{bg:"rgb(47, 47, 47, 0.1)",".ctaButtonIcon":{visibility:"visible"}},".ctaButtonIcon":{visibility:"hidden"}},ctaGray:{border:0,fontSize:"14px",fontWeight:500,fontStyle:"normal",fontFamily:"Inter",borderRadius:"8px",cursor:"pointer",color:"$omnivoreGray",bg:"$grayBgActive",p:"10px 12px"},ctaWhite:{borderRadius:"$3",px:"$3",py:"$2",cursor:"pointer",border:"1px solid $grayBgSubtle",bg:"$grayBgSubtle","&:hover":{border:"1px solid $grayBorderHover"}},modalOption:{style:"ghost",height:"52px",width:"100%",textAlign:"left",verticalAlign:"middle",color:"#0A0806",backgroundColor:"unset",outlineColor:"rgba(0, 0, 0, 0)",border:"1px solid rgba(0, 0, 0, 0.06)",cursor:"pointer","&:focus":{outline:"none"}},ctaModal:{height:"32px",verticalAlign:"middle",color:"$textDefault",backgroundColor:"$grayBase",fontWeight:"600",padding:"0px 12px",fontSize:"16px",border:"1px solid $grayBorder",cursor:"pointer",borderRadius:"8px","&:focus":{outline:"none"}},ctaSecondary:{color:"$grayText",border:"none",bg:"transparent","&:hover":{opacity:.8}},ctaPill:{borderRadius:"$3",px:"$3",py:"$2",border:"1px solid $grayBorder",bg:"$grayBgActive","&:hover":{bg:"$grayBgHover",border:"1px solid $grayBorderHover"}},circularIcon:{mx:"$1",display:"flex",alignItems:"center",fontWeight:500,height:44,width:44,borderRadius:"50%",justifyContent:"center",textAlign:"center",background:"$grayBase",cursor:"pointer",border:"none",opacity:.9,"&:hover":{opacity:1}},squareIcon:{mx:"$1",display:"flex",alignItems:"center",fontWeight:500,height:44,width:44,justifyContent:"center",textAlign:"center",background:"$grayBase",cursor:"pointer",border:"none",borderRight:"1px solid $grayText",opacity:.9,"&:hover":{opacity:1}},plainIcon:{bg:"transparent",border:"none",cursor:"pointer","&:hover":{opacity:.8}},articleActionIcon:{bg:"transparent",border:"none",cursor:"pointer","&:hover":{opacity:.8}},ghost:{color:"transparent",border:"none",bg:"transparent","&:hover":{opacity:.8}},themeSwitch:{p:"0px",m:"4px",ml:"0px",width:"24px",height:"24px",fontSize:"14px",borderRadius:"4px",border:"1px solid rgb(243, 243, 243)","&:hover":{transform:"scale(1.2)"}}}},defaultVariants:{style:"ctaWhite"}}),dr=new WeakMap,hr=new WeakMap,pr={},gr=0,mr=function(e,t,n){void 0===t&&(t=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e)),void 0===n&&(n="data-aria-hidden");var r=Array.isArray(e)?e:[e];pr[n]||(pr[n]=new WeakMap);var o=pr[n],i=[],a=new Set,l=function(e){e&&!a.has(e)&&(a.add(e),l(e.parentNode))};r.forEach(l);var s=function(e){!e||r.indexOf(e)>=0||Array.prototype.forEach.call(e.children,(function(e){if(a.has(e))s(e);else{var t=e.getAttribute("aria-hidden"),r=null!==t&&"false"!==t,l=(dr.get(e)||0)+1,u=(o.get(e)||0)+1;dr.set(e,l),o.set(e,u),i.push(e),1===l&&r&&hr.set(e,!0),1===u&&e.setAttribute(n,"true"),r||e.setAttribute("aria-hidden","true")}}))};return s(t),a.clear(),gr++,function(){i.forEach((function(e){var t=dr.get(e)-1,r=o.get(e)-1;dr.set(e,t),o.set(e,r),t||(hr.has(e)||e.removeAttribute("aria-hidden"),hr.delete(e)),r||e.removeAttribute(n)})),--gr||(dr=new WeakMap,dr=new WeakMap,hr=new WeakMap,pr={})}},vr=function(){return vr=Object.assign||function(e){for(var t,n=1,r=arguments.length;nr[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Ir=function(e,t){return"v"===e?function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowY&&!(t.overflowY===t.overflowX&&"visible"===t.overflowY)}(t):function(e){var t=window.getComputedStyle(e);return"range"===e.type||"hidden"!==t.overflowX&&!(t.overflowY===t.overflowX&&"visible"===t.overflowX)}(t)},Dr=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},Nr=!1;if("undefined"!=typeof window)try{var Fr=Object.defineProperty({},"passive",{get:function(){return Nr=!0,!0}});window.addEventListener("test",Fr,Fr),window.removeEventListener("test",Fr,Fr)}catch(e){Nr=!1}var zr=!!Nr&&{passive:!1},$r=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Br=function(e){return[e.deltaX,e.deltaY]},Ur=function(e){return e&&"current"in e?e.current:e},Wr=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},Hr=0,Vr=[];const qr=(Xr=function(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),o=s.useState(Hr++)[0],i=s.useState((function(){return Or()}))[0],a=s.useRef(e);s.useEffect((function(){a.current=e}),[e]),s.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-"+o);var t=[e.lockRef.current].concat((e.shards||[]).map(Ur)).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-"+o)})),function(){document.body.classList.remove("block-interactivity-"+o),t.forEach((function(e){return e.classList.remove("allow-interactivity-"+o)}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=s.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!a.current.allowPinchZoom;var o,i=$r(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-i[0],u="deltaY"in e?e.deltaY:l[1]-i[1],c=e.target,f=Math.abs(s)>Math.abs(u)?"h":"v",d=Mr(f,c);if(!d)return!0;if(d?o=f:(o="v"===f?"h":"v",d=Mr(f,c)),!d)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=o),!o)return!0;var h=r.current||o;return function(e,t,n,r,o){var i=r,a=n.target,l=t.contains(a),s=!1,u=i>0,c=0,f=0;do{var d=Dr(e,a),h=d[0],p=d[1]-d[2]-h;(h||p)&&Ir(e,a)&&(c+=p,f+=h),a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&(0===c||!1)||!u&&(0===f||!1))&&(s=!0),s}(h,t,e,"h"===h?s:u)}),[]),u=s.useCallback((function(e){var n=e;if(Vr.length&&Vr[Vr.length-1]===i){var r="deltaY"in n?Br(n):$r(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)n.preventDefault();else if(!o){var s=(a.current.shards||[]).map(Ur).filter(Boolean).filter((function(e){return e.contains(n.target)}));(s.length>0?l(n,s[0]):!a.current.noIsolation)&&n.preventDefault()}}}),[]),c=s.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),f=s.useCallback((function(e){n.current=$r(e),r.current=void 0}),[]),d=s.useCallback((function(t){c(t.type,Br(t),t.target,l(t,e.lockRef.current))}),[]),h=s.useCallback((function(t){c(t.type,$r(t),t.target,l(t,e.lockRef.current))}),[]);s.useEffect((function(){return Vr.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",u,zr),document.addEventListener("touchmove",u,zr),document.addEventListener("touchstart",f,zr),function(){Vr=Vr.filter((function(e){return e!==i})),document.removeEventListener("wheel",u,zr),document.removeEventListener("touchmove",u,zr),document.removeEventListener("touchstart",f,zr)}}),[]);var p=e.removeScrollBar,g=e.inert;return s.createElement(s.Fragment,null,g?s.createElement(i,{styles:Wr(o)}):null,p?s.createElement(Ar,{gapMode:"margin"}):null)},Er.useMedium(Xr),_r);var Xr,Kr=s.forwardRef((function(e,t){return s.createElement(Sr,vr({},e,{ref:t,sideCar:qr}))}));Kr.classNames=Sr.classNames;const Yr=Kr,Gr=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?s.useLayoutEffect:()=>{},Qr=u["useId".toString()]||(()=>{});let Zr=0;function Jr(e){const[t,n]=s.useState(Qr());return Gr((()=>{e||n((e=>null!=e?e:String(Zr++)))}),[e]),e||(t?`radix-${t}`:"")}const eo=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=s.useState(),r=s.useRef({}),o=s.useRef(e),i=s.useRef("none"),a=e?"mounted":"unmounted",[l,u]=function(e,t){return s.useReducer(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect((()=>{const e=to(r.current);i.current="mounted"===l?e:"none"}),[l]),Gr((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=to(t);if(e)u("MOUNT");else if("none"===a||"none"===(null==t?void 0:t.display))u("UNMOUNT");else{const e=r!==a;u(n&&e?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,u]),Gr((()=>{if(t){const e=e=>{const n=to(r.current).includes(e.animationName);e.target===t&&n&&u("ANIMATION_END")},n=e=>{e.target===t&&(i.current=to(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:s.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):s.Children.only(n),i=we(r.ref,o.ref);return"function"==typeof n||r.isPresent?s.cloneElement(o,{ref:i}):null};function to(e){return(null==e?void 0:e.animationName)||"none"}eo.displayName="Presence";let no=0;function ro(){s.useEffect((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:oo()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:oo()),no++,()=>{1===no&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),no--}}),[])}function oo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const io=["a","button","div","h2","h3","img","li","nav","p","span","svg","ul"].reduce(((e,t)=>({...e,[t]:s.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?Ee:t;return s.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.as&&console.error(ao),s.createElement(i,xe({},o,{ref:n}))}))})),{}),ao="Warning: The `as` prop has been removed in favour of `asChild`. For details, see https://radix-ui.com/docs/primitives/overview/styling#changing-the-rendered-element",lo=s.forwardRef(((e,t)=>{var n,r;const{containerRef:o,style:i,...a}=e,l=null!==(n=null==o?void 0:o.current)&&void 0!==n?n:null===globalThis||void 0===globalThis||null===(r=globalThis.document)||void 0===r?void 0:r.body,[,u]=s.useState({});return Gr((()=>{u({})}),[]),l?c.createPortal(s.createElement(io.div,xe({"data-radix-portal":""},a,{ref:t,style:l===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...i}:void 0})),l):null}));function so(e){const t=s.useRef(e);return s.useEffect((()=>{t.current=e})),s.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}const uo={bubbles:!1,cancelable:!0},co=s.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,u]=s.useState(null),c=so(o),f=so(i),d=s.useRef(null),h=we(t,(e=>u(e))),p=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect((()=>{if(r){function e(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:go(d.current,{select:!0})}function t(e){!p.paused&&l&&(l.contains(e.relatedTarget)||go(d.current,{select:!0}))}return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,l,p.paused]),s.useEffect((()=>{if(l){mo.add(p);const e=document.activeElement;if(!l.contains(e)){const t=new Event("focusScope.autoFocusOnMount",uo);l.addEventListener("focusScope.autoFocusOnMount",c),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(go(r,{select:t}),document.activeElement!==n)return}(fo(l).filter((e=>"A"!==e.tagName)),{select:!0}),document.activeElement===e&&go(l))}return()=>{l.removeEventListener("focusScope.autoFocusOnMount",c),setTimeout((()=>{const t=new Event("focusScope.autoFocusOnUnmount",uo);l.addEventListener("focusScope.autoFocusOnUnmount",f),l.dispatchEvent(t),t.defaultPrevented||go(null!=e?e:document.body,{select:!0}),l.removeEventListener("focusScope.autoFocusOnUnmount",f),mo.remove(p)}),0)}}}),[l,c,f,p]);const g=s.useCallback((e=>{if(!n&&!r)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=fo(e);return[ho(t,e),ho(t.reverse(),e)]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&go(i,{select:!0})):(e.preventDefault(),n&&go(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return s.createElement(io.div,xe({tabIndex:-1},a,{ref:h,onKeyDown:g}))}));function fo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ho(e,t){for(const n of e)if(!po(n,{upTo:t}))return n}function po(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function go(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const mo=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=vo(e,t),e.unshift(t)},remove(t){var n;e=vo(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function vo(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function yo(e){const t=so(e);s.useEffect((()=>{const e=e=>{"Escape"===e.key&&t(e)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[t])}let bo,wo=0;function xo(e,t){const n=s.createContext(t);function r(e){const{children:t,...r}=e,o=s.useMemo((()=>r),Object.values(r));return s.createElement(n.Provider,{value:o},t)}return r.displayName=e+"Provider",[r,function(r){const o=s.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}function Eo(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>s.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return s.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=s.createContext(r),i=n.length;function a(t){const{scope:n,children:r,...a}=t,l=(null==n?void 0:n[e][i])||o,u=s.useMemo((()=>a),Object.values(a));return s.createElement(l.Provider,{value:u},r)}return n=[...n,r],a.displayName=t+"Provider",[a,function(n,a){const l=(null==a?void 0:a[e][i])||o,u=s.useContext(l);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},ko(r,...t)]}function ko(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return s.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function So(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}const[_o,Co]=Io(),[Oo,Po]=Do(),[To,Ro]=Io(),[Lo,jo]=Do(),Ao=s.forwardRef(((e,t)=>{const n=0===Po(),r=s.createElement(Mo,xe({},e,{ref:t}));return n?s.createElement(_o,null,s.createElement(To,null,r)):r})),Mo=s.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...u}=e,c=Co(),f=Po()+1,d=f===c,h=Ro(n),p=jo()+(n?1:0),g=p{const e=e=>{const r="mouse"===e.pointerType;t.current=!r,n.current=r&&0===e.button},r=()=>{t.current=!1,n.current=!1};return document.addEventListener("pointerdown",e),document.addEventListener("pointerup",r),()=>{document.removeEventListener("pointerdown",e),document.removeEventListener("pointerup",r)}}),[]),Gr((()=>{if(e){function r(){wo--,0===wo&&(document.body.style.pointerEvents=bo)}return 0===wo&&(bo=document.body.style.pointerEvents),document.body.style.pointerEvents="none",wo++,()=>{t.current?document.addEventListener("click",r,{once:!0}):n.current?document.addEventListener("pointerup",r,{once:!0}):r()}}}),[e])})({disabled:n}),yo((e=>{d&&(null==r||r(e),e.defaultPrevented||null==l||l())}));const{onPointerDownCapture:m}=function(e){const t=so((e=>{g||(null==o||o(e),null==a||a(e),e.defaultPrevented||null==l||l())})),n=s.useRef(!1);return s.useEffect((()=>{const e=e=>{const r=e.target;if(r&&!n.current){const n=new CustomEvent("dismissableLayer.pointerDownOutside",{bubbles:!1,cancelable:!0,detail:{originalEvent:e}});r.addEventListener("dismissableLayer.pointerDownOutside",t,{once:!0}),r.dispatchEvent(n)}n.current=!1},r=window.setTimeout((()=>{document.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(r),document.removeEventListener("pointerdown",e)}}),[t]),{onPointerDownCapture:()=>n.current=!0}}(),{onBlurCapture:v,onFocusCapture:y}=function(e){const t=so((e=>{null==i||i(e),null==a||a(e),e.defaultPrevented||null==l||l()})),n=s.useRef(!1);return s.useEffect((()=>{const e=e=>{const r=e.target;if(r&&!n.current){const n=new CustomEvent("dismissableLayer.focusOutside",{bubbles:!1,cancelable:!0,detail:{originalEvent:e}});r.addEventListener("dismissableLayer.focusOutside",t,{once:!0}),r.dispatchEvent(n)}};return document.addEventListener("focusin",e),()=>document.removeEventListener("focusin",e)}),[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(),b=h>0&&!g;return s.createElement(Oo,{runningCount:f},s.createElement(Lo,{runningCount:p},s.createElement(io.div,xe({},u,{ref:t,style:{pointerEvents:b?"auto":void 0,...u.style},onPointerDownCapture:So(e.onPointerDownCapture,m),onBlurCapture:So(e.onBlurCapture,v),onFocusCapture:So(e.onFocusCapture,y)}))))}));function Io(e){const[t,n]=xo("TotalLayerCount",{total:0,onTotalIncrease:()=>{},onTotalDecrease:()=>{}});return[({children:e})=>{const[n,r]=s.useState(0);return s.createElement(t,{total:n,onTotalIncrease:s.useCallback((()=>r((e=>e+1))),[]),onTotalDecrease:s.useCallback((()=>r((e=>e-1))),[])},e)},function(e=!0){const{total:t,onTotalIncrease:r,onTotalDecrease:o}=n("TotalLayerCountConsumer");return s.useLayoutEffect((()=>{if(e)return r(),()=>o()}),[e,r,o]),t}]}function Do(e){const[t,n]=xo("RunningLayerCount",{count:0});return[e=>{const{children:n,runningCount:r}=e;return s.createElement(t,{count:r},n)},function(){return n("RunningLayerCountConsumer").count||0}]}const No=s.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return s.createElement(io.svg,xe({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:s.createElement("polygon",{points:"0,0 30,0 15,10"}))}));function Fo(e){const[t,n]=s.useState(void 0);return s.useEffect((()=>{if(e){const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else{const t=e.getBoundingClientRect();o=t.width,i=t.height}n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>{n(void 0),t.unobserve(e)}}}),[e]),t}let zo;const $o=new Map;function Bo(){const e=[];$o.forEach(((t,n)=>{const r=n.getBoundingClientRect();var o,i;i=r,((o=t.rect).width!==i.width||o.height!==i.height||o.top!==i.top||o.right!==i.right||o.bottom!==i.bottom||o.left!==i.left)&&(t.rect=r,e.push(t))})),e.forEach((e=>{e.callbacks.forEach((t=>t(e.rect)))})),zo=requestAnimationFrame(Bo)}function Uo(e){const[t,n]=s.useState();return s.useEffect((()=>{if(e){const t=function(e,t){const n=$o.get(e);return void 0===n?($o.set(e,{rect:{},callbacks:[t]}),1===$o.size&&(zo=requestAnimationFrame(Bo))):(n.callbacks.push(t),t(e.getBoundingClientRect())),()=>{const n=$o.get(e);if(void 0===n)return;const r=n.callbacks.indexOf(t);r>-1&&n.callbacks.splice(r,1),0===n.callbacks.length&&($o.delete(e),0===$o.size&&cancelAnimationFrame(zo))}}(e,n);return()=>{n(void 0),t()}}}),[e]),t}function Wo({anchorRect:e,popperSize:t,arrowSize:n,arrowOffset:r=0,side:o,sideOffset:i=0,align:a,alignOffset:l=0,shouldAvoidCollisions:s=!0,collisionBoundariesRect:u,collisionTolerance:c=0}){if(!e||!t||!u)return{popperStyles:Xo,arrowStyles:Ko};const f=function(e,t,n=0,r=0,o){const i=o?o.height:0,a=Ho(t,e,"x"),l=Ho(t,e,"y"),s=l.before-n-i,u=l.after+n+i,c=a.before-n-i,f=a.after+n+i;return{top:{start:{x:a.start+r,y:s},center:{x:a.center,y:s},end:{x:a.end-r,y:s}},right:{start:{x:f,y:l.start+r},center:{x:f,y:l.center},end:{x:f,y:l.end-r}},bottom:{start:{x:a.start+r,y:u},center:{x:a.center,y:u},end:{x:a.end-r,y:u}},left:{start:{x:c,y:l.start+r},center:{x:c,y:l.center},end:{x:c,y:l.end-r}}}}(t,e,i,l,n),d=f[o][a];if(!1===s){const e=Vo(d);let i=Ko;return n&&(i=Yo({popperSize:t,arrowSize:n,arrowOffset:r,side:o,align:a})),{popperStyles:{...e,"--radix-popper-transform-origin":qo(t,o,a,r,n)},arrowStyles:i,placedSide:o,placedAlign:a}}const h=DOMRect.fromRect({...t,...d}),p=(g=u,m=c,DOMRect.fromRect({width:g.width-2*m,height:g.height-2*m,x:g.left+m,y:g.top+m}));var g,m;const v=Zo(h,p),y=f[Qo(o)][a],b=function(e,t,n){const r=Qo(e);return t[e]&&!n[r]?r:e}(o,v,Zo(DOMRect.fromRect({...t,...y}),p)),w=function(e,t,n,r,o){const i="top"===n||"bottom"===n,a=i?"left":"top",l=i?"right":"bottom",s=i?"width":"height",u=t[s]>e[s];return"start"!==r&&"center"!==r||!(o[a]&&u||o[l]&&!u)?"end"!==r&&"center"!==r||!(o[l]&&u||o[a]&&!u)?r:"start":"end"}(t,e,o,a,v),x=Vo(f[b][w]);let E=Ko;return n&&(E=Yo({popperSize:t,arrowSize:n,arrowOffset:r,side:b,align:w})),{popperStyles:{...x,"--radix-popper-transform-origin":qo(t,b,w,r,n)},arrowStyles:E,placedSide:b,placedAlign:w}}function Ho(e,t,n){const r=e["x"===n?"left":"top"],o="x"===n?"width":"height",i=e[o],a=t[o];return{before:r-a,start:r,center:r+(i-a)/2,end:r+i-a,after:r+i}}function Vo(e){return{position:"absolute",top:0,left:0,minWidth:"max-content",willChange:"transform",transform:`translate3d(${Math.round(e.x+window.scrollX)}px, ${Math.round(e.y+window.scrollY)}px, 0)`}}function qo(e,t,n,r,o){const i="top"===t||"bottom"===t,a=o?o.width:0,l=o?o.height:0,s=a/2+r;let u="",c="";return i?(u={start:`${s}px`,center:"center",end:e.width-s+"px"}[n],c="top"===t?`${e.height+l}px`:-l+"px"):(u="left"===t?`${e.width+l}px`:-l+"px",c={start:`${s}px`,center:"center",end:e.height-s+"px"}[n]),`${u} ${c}`}const Xo={position:"fixed",top:0,left:0,opacity:0,transform:"translate3d(0, -200%, 0)"},Ko={position:"absolute",opacity:0};function Yo({popperSize:e,arrowSize:t,arrowOffset:n,side:r,align:o}){const i=(e.width-t.width)/2,a=(e.height-t.width)/2,l={top:0,right:90,bottom:180,left:-90}[r],s=Math.max(t.width,t.height),u={width:`${s}px`,height:`${s}px`,transform:`rotate(${l}deg)`,willChange:"transform",position:"absolute",[r]:"100%",direction:Go(r,o)};return"top"!==r&&"bottom"!==r||("start"===o&&(u.left=`${n}px`),"center"===o&&(u.left=`${i}px`),"end"===o&&(u.right=`${n}px`)),"left"!==r&&"right"!==r||("start"===o&&(u.top=`${n}px`),"center"===o&&(u.top=`${a}px`),"end"===o&&(u.bottom=`${n}px`)),u}function Go(e,t){return("top"!==e&&"right"!==e||"end"!==t)&&("bottom"!==e&&"left"!==e||"end"===t)?"ltr":"rtl"}function Qo(e){return{top:"bottom",right:"left",bottom:"top",left:"right"}[e]}function Zo(e,t){return{top:e.topt.right,bottom:e.bottom>t.bottom,left:e.left{const{__scopePopper:n,virtualRef:r,...o}=e,i=ni("PopperAnchor",n),a=s.useRef(null),l=we(t,a);return s.useEffect((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:s.createElement(io.div,xe({},o,{ref:l}))})),[oi,ii]=Jo("PopperContent"),ai=s.forwardRef(((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o,align:i="center",alignOffset:a,collisionTolerance:l,avoidCollisions:u=!0,...c}=e,f=ni("PopperContent",n),[d,h]=s.useState(),p=Uo(f.anchor),[g,m]=s.useState(null),v=Fo(g),[y,b]=s.useState(null),w=Fo(y),x=we(t,(e=>m(e))),E=function(){const[e,t]=s.useState(void 0);return s.useEffect((()=>{let e;function n(){t({width:window.innerWidth,height:window.innerHeight})}function r(){window.clearTimeout(e),e=window.setTimeout(n,100)}return n(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)}),[]),e}(),k=E?DOMRect.fromRect({...E,x:0,y:0}):void 0,{popperStyles:S,arrowStyles:_,placedSide:C,placedAlign:O}=Wo({anchorRect:p,popperSize:v,arrowSize:w,arrowOffset:d,side:r,sideOffset:o,align:i,alignOffset:a,shouldAvoidCollisions:u,collisionBoundariesRect:k,collisionTolerance:l}),P=void 0!==C;return s.createElement("div",{style:S,"data-radix-popper-content-wrapper":""},s.createElement(oi,{scope:n,arrowStyles:_,onArrowChange:b,onArrowOffsetChange:h},s.createElement(io.div,xe({"data-side":C,"data-align":O},c,{style:{...c.style,animation:P?void 0:"none"},ref:x}))))})),li=s.forwardRef((function(e,t){const{__scopePopper:n,offset:r,...o}=e,i=ii("PopperArrow",n),{onArrowOffsetChange:a}=i;return s.useEffect((()=>a(r)),[a,r]),s.createElement("span",{style:{...i.arrowStyles,pointerEvents:"none"}},s.createElement("span",{ref:i.onArrowChange,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},s.createElement(No,xe({},o,{ref:t,style:{...o.style,display:"block"}}))))})),si=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return s.createElement(ti,{scope:t,anchor:r,onAnchorChange:o},n)},ui=ri,ci=ai,fi=li;function di({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[r,o]=function({defaultProp:e,onChange:t}){const n=s.useState(e),[r]=n,o=s.useRef(r),i=so(t);return s.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,l=so(n);return[a,s.useCallback((t=>{if(i){const n=t,r="function"==typeof t?n(e):t;r!==e&&l(r)}else o(t)}),[i,e,o,l])]}const[hi,pi]=Eo("Popover",[ei]),gi=ei(),[mi,vi]=hi("Popover"),yi=s.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=vi("PopoverAnchor",n),i=gi(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=o;return s.useEffect((()=>(a(),()=>l())),[a,l]),s.createElement(ui,xe({},i,r,{ref:t}))})),bi=s.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=vi("PopoverContent",e.__scopePopover);return s.createElement(eo,{present:n||o.open},o.modal?s.createElement(wi,xe({},r,{ref:t})):s.createElement(xi,xe({},r,{ref:t})))})),wi=s.forwardRef(((e,t)=>{const{allowPinchZoom:n,portalled:r=!0,...o}=e,i=vi("PopoverContent",e.__scopePopover),a=s.useRef(null),l=we(t,a),u=s.useRef(!1);s.useEffect((()=>{const e=a.current;if(e)return mr(e)}),[]);const c=r?lo:s.Fragment;return s.createElement(c,null,s.createElement(Yr,{allowPinchZoom:n},s.createElement(Ei,xe({},o,{ref:l,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:So(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),u.current||null===(t=i.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:So(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;u.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:So(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})}))))})),xi=s.forwardRef(((e,t)=>{const{portalled:n=!0,...r}=e,o=vi("PopoverContent",e.__scopePopover),i=s.useRef(!1),a=n?lo:s.Fragment;return s.createElement(a,null,s.createElement(Ei,xe({},r,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n,r;null===(n=e.onCloseAutoFocus)||void 0===n||n.call(e,t),t.defaultPrevented||(i.current||null===(r=o.triggerRef.current)||void 0===r||r.focus(),t.preventDefault()),i.current=!1},onInteractOutside:t=>{var n,r;null===(n=e.onInteractOutside)||void 0===n||n.call(e,t),t.defaultPrevented||(i.current=!0);const a=t.target;(null===(r=o.triggerRef.current)||void 0===r?void 0:r.contains(a))&&t.preventDefault()}})))})),Ei=s.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:f,...d}=e,h=vi("PopoverContent",n),p=gi(n);return ro(),s.createElement(co,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},s.createElement(Ao,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1)},s.createElement(ci,xe({"data-state":ki(h.open),role:"dialog",id:h.contentId},p,d,{ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))}));function ki(e){return e?"open":"closed"}const Si=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,l=gi(t),u=s.useRef(null),[c,f]=s.useState(!1),[d=!1,h]=di({prop:r,defaultProp:o,onChange:i});return s.createElement(si,l,s.createElement(mi,{scope:t,contentId:Jr(),triggerRef:u,open:d,onOpenChange:h,onOpenToggle:s.useCallback((()=>h((e=>!e))),[h]),hasCustomAnchor:c,onCustomAnchorAdd:s.useCallback((()=>f(!0)),[]),onCustomAnchorRemove:s.useCallback((()=>f(!1)),[]),modal:a},n))},_i=yi,Ci=bi,Oi=s.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=gi(n);return s.createElement(fi,xe({},o,r,{ref:t}))}));function Pi(e){var t=fe(_i,{position:"absolute",left:e.xAnchorCoordinate,top:e.yAnchorCoordinate}),n=fe(Oi,{fill:"$grayBase"});return(0,Me.jsxs)(Si,{defaultOpen:!0,modal:!0,children:[(0,Me.jsx)(t,{}),(0,Me.jsxs)(Ci,{onOpenAutoFocus:function(t){e.preventAutoFocus&&t.preventDefault()},children:[e.children,(0,Me.jsx)(n,{})]})]})}function Ti(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ri(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Ri(e,t){if(e){if("string"==typeof e)return Li(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Li(e,t):void 0}}function Li(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1)){var r,o=Ti(e.split("|"));try{for(o.s();!(r=o.n()).done;){var a=r.value;i({type:Ii.SET_KEY_UP,key:a})}}catch(e){o.e(e)}finally{o.f()}}})))}})),r}),[t]),l=(0,s.useCallback)((function(e){var t=e.target;if(e.key){var n=e.key.toLowerCase();void 0!==o[n]&&(!1===o[n]&&i({type:Ii.SET_KEY_DOWN,key:n}),a(Ai(Ai({},o),{},Mi({},n,!0)),Di.includes(t.tagName))&&e.preventDefault())}}),[a,o]),u=(0,s.useCallback)((function(e){if(e.key){var t=e.key.toLowerCase();void 0!==o[t]&&!0===o[t]&&setTimeout((function(){return i({type:Ii.SET_KEY_UP,key:t})}),800)}}),[o]),(0,s.useEffect)((function(){if("undefined"!=typeof window)return window.addEventListener("keydown",l,!0),function(){return window.removeEventListener("keydown",l,!0)}}),[l]),(0,s.useEffect)((function(){if("undefined"!=typeof window)return window.addEventListener("keyup",u,!0),function(){return window.removeEventListener("keyup",u,!0)}}),[u]);var h=fe("div",{width:"1px",maxWidth:"1px",height:"100%",background:"$grayBorder"});return(0,Me.jsxs)($e,{distribution:"evenly",alignment:"center",css:{height:"100%",alignItems:"center",width:e.isTouchscreenDevice?"100%":"auto"},children:[e.isNewHighlight?(0,Me.jsx)(fr,{style:"plainIcon",title:"Create Highlight",onClick:function(){return e.handleButtonClick("create")},css:{flexDirection:"column",height:"100%",m:0,p:0,pt:"6px",alignItems:"baseline"},children:(0,Me.jsxs)($e,{css:{height:"100%",alignItems:"center"},children:[(0,Me.jsx)(zi,{size:28,strokeColor:de.colors.readerFont.toString()}),(0,Me.jsx)(Nn,{style:"body",css:{pb:"4px",pl:"12px",m:"0px",color:"$readerFont",fontWeight:"400",fontSize:"16px"},children:"Highlight"})]})}):(0,Me.jsx)(fr,{style:"plainIcon",title:"Remove Highlight",onClick:function(){return e.handleButtonClick("delete")},css:{color:"$readerFont",height:"100%",m:0,p:0,pt:"6px"},children:(0,Me.jsx)(Bi,{size:28,strokeColor:de.colors.readerFont.toString()})}),(0,Me.jsx)(h,{}),(0,Me.jsx)(fr,{style:"plainIcon",title:"Add Note to Highlight",onClick:function(){return e.handleButtonClick("comment")},css:{color:"$readerFont",height:"100%",m:0,p:0,pt:"6px"},children:(0,Me.jsx)($i,{size:28,strokeColor:de.colors.readerFont.toString()})})]})}function Ki(e,t){e.forEach((function(e){var t,n=(t=e,Array.from(document.querySelectorAll("[".concat(Bn,"='").concat(t,"']")))),r=function(e){return Array.from(document.querySelectorAll("[".concat(Un,"='").concat(e,"']")))}(e);r.forEach((function(e){e.remove()})),n.forEach((function(e){if("IMG"===e.nodeName)e.classList.remove("highlight-image");else if(e.childNodes){for(;e.hasChildNodes();){var t=e.firstChild;if(t){if(e.removeChild(t),!e.parentNode)throw new Error("highlight span has no parent node");e.parentNode.insertBefore(t,e.nextSibling)}}e.remove()}else{var n,r=document.createTextNode(e.textContent||"");null===(n=e.parentElement)||void 0===n||n.replaceChild(r,e)}}))}))}var Yi=new Uint8Array(16);function Gi(){if(!Ni&&!(Ni="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ni(Yi)}const Qi=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Zi=function(e){return"string"==typeof e&&Qi.test(e)};for(var Ji=[],ea=0;ea<256;++ea)Ji.push((ea+256).toString(16).substr(1));const ta=function(e,t,n){var r=(e=e||{}).random||(e.rng||Gi)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Ji[e[t+0]]+Ji[e[t+1]]+Ji[e[t+2]]+Ji[e[t+3]]+"-"+Ji[e[t+4]]+Ji[e[t+5]]+"-"+Ji[e[t+6]]+Ji[e[t+7]]+"-"+Ji[e[t+8]]+Ji[e[t+9]]+"-"+Ji[e[t+10]]+Ji[e[t+11]]+Ji[e[t+12]]+Ji[e[t+13]]+Ji[e[t+14]]+Ji[e[t+15]]).toLowerCase();if(!Zi(n))throw TypeError("Stringified UUID is invalid");return n}(r)};let na=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),"");function ra(e){var t=e.startContainer.nodeValue,n=e.endContainer.nodeValue,r=ia(e.startOffset,!1,t),o=ia(e.endOffset,!0,n);try{e.setStart(e.startContainer,r),e.setEnd(e.endContainer,o)}catch(e){console.warn("Unable to snap selection to the next word")}}var oa=function(e){return!!e&&/\s/.test(e)};function ia(e,t,n){if(!n)return e;var r=n.split(""),o=e;if(t){if(oa(r[o-1]))return o-1;for(;o0;){if(oa(r[o-1]))return o;o--}}return o}function aa(e){return function(e){if(Array.isArray(e))return la(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return la(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?la(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function la(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,o=t.selection,i=o.range,a=o.selection,ra(i),l=ta(),s=Yn(i),rr(s)){e.next=9;break}return e.abrupt("return",{errorMessage:"Highlight is too long"});case 9:if(a.isCollapsed||a.collapseToStart(),u=[],t.annotation&&u.push(t.annotation),r&&(t.selection.overlapHighlights.forEach((function(e){var n=t.existingHighlights.find((function(t){return t.id===e})),r=null==n?void 0:n.annotation;r&&u.push(r)})),Ki(t.selection.overlapHighlights,t.highlightStartEndOffsets)),c=Kn(s,l,u.length>0),f={prefix:c.prefix,suffix:c.suffix,quote:c.quote,id:l,shortId:na(8),patch:s,annotation:u.length>0?u.join("\n"):void 0,articleId:t.articleId},h=t.existingHighlights,!r){e.next=23;break}return e.next=19,n.mergeHighlightMutation(ua(ua({},f),{},{overlapHighlightIdList:t.selection.overlapHighlights}));case 19:d=e.sent,h=t.existingHighlights.filter((function(e){return!t.selection.overlapHighlights.includes(e.id)})),e.next=26;break;case 23:return e.next=25,n.createHighlightMutation(f);case 25:d=e.sent;case 26:if(!d){e.next=31;break}return p=[].concat(aa(h),[d]),e.abrupt("return",{highlights:p,newHighlightIndex:p.length>0?p.length-1:void 0});case 31:return e.abrupt("return",{highlights:t.existingHighlights,errorMessage:"Could not create highlight"});case 32:case"end":return e.stop()}}),e)})))).apply(this,arguments)}const ga=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>({...e,[t]:s.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?Ee:t;return s.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),s.createElement(i,xe({},o,{ref:n}))}))})),{}),ma=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=s.useState(),r=s.useRef({}),o=s.useRef(e),i=s.useRef("none"),a=e?"mounted":"unmounted",[l,u]=function(e,t){return s.useReducer(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect((()=>{const e=va(r.current);i.current="mounted"===l?e:"none"}),[l]),Gr((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=va(t);if(e)u("MOUNT");else if("none"===a||"none"===(null==t?void 0:t.display))u("UNMOUNT");else{const e=r!==a;u(n&&e?"ANIMATION_OUT":"UNMOUNT")}o.current=e}}),[e,u]),Gr((()=>{if(t){const e=e=>{const n=va(r.current).includes(e.animationName);e.target===t&&n&&u("ANIMATION_END")},n=e=>{e.target===t&&(i.current=va(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:s.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),o="function"==typeof n?n({present:r.isPresent}):s.Children.only(n),i=we(r.ref,o.ref);return"function"==typeof n||r.isPresent?s.cloneElement(o,{ref:i}):null};function va(e){return(null==e?void 0:e.animationName)||"none"}ma.displayName="Presence";const ya={bubbles:!1,cancelable:!0},ba=s.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,u]=s.useState(null),c=so(o),f=so(i),d=s.useRef(null),h=we(t,(e=>u(e))),p=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect((()=>{if(r){function e(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:ka(d.current,{select:!0})}function t(e){!p.paused&&l&&(l.contains(e.relatedTarget)||ka(d.current,{select:!0}))}return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,l,p.paused]),s.useEffect((()=>{if(l){Sa.add(p);const e=document.activeElement;if(!l.contains(e)){const t=new Event("focusScope.autoFocusOnMount",ya);l.addEventListener("focusScope.autoFocusOnMount",c),l.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ka(r,{select:t}),document.activeElement!==n)return}(wa(l).filter((e=>"A"!==e.tagName)),{select:!0}),document.activeElement===e&&ka(l))}return()=>{l.removeEventListener("focusScope.autoFocusOnMount",c),setTimeout((()=>{const t=new Event("focusScope.autoFocusOnUnmount",ya);l.addEventListener("focusScope.autoFocusOnUnmount",f),l.dispatchEvent(t),t.defaultPrevented||ka(null!=e?e:document.body,{select:!0}),l.removeEventListener("focusScope.autoFocusOnUnmount",f),Sa.remove(p)}),0)}}}),[l,c,f,p]);const g=s.useCallback((e=>{if(!n&&!r)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=wa(e);return[xa(t,e),xa(t.reverse(),e)]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&ka(i,{select:!0})):(e.preventDefault(),n&&ka(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return s.createElement(ga.div,xe({tabIndex:-1},a,{ref:h,onKeyDown:g}))}));function wa(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xa(e,t){for(const n of e)if(!Ea(n,{upTo:t}))return n}function Ea(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function ka(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const Sa=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=_a(e,t),e.unshift(t)},remove(t){var n;e=_a(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function _a(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}let Ca,Oa=0;const Pa=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ta=s.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...u}=e,c=s.useContext(Pa),[f,d]=s.useState(null),[,h]=s.useState({}),p=we(t,(e=>d(e))),g=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(m),y=f?g.indexOf(f):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,w=y>=v,x=function(e){const t=so((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));w&&!n&&(null==o||o(e),null==a||a(e),e.defaultPrevented||null==l||l())})),n=s.useRef(!1);return s.useEffect((()=>{const e=e=>{e.target&&!n.current&&La("dismissableLayer.pointerDownOutside",t,{originalEvent:e}),n.current=!1},r=window.setTimeout((()=>{document.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(r),document.removeEventListener("pointerdown",e)}}),[t]),{onPointerDownCapture:()=>n.current=!0}}(),E=function(e){const t=so((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==i||i(e),null==a||a(e),e.defaultPrevented||null==l||l())})),n=s.useRef(!1);return s.useEffect((()=>{const e=e=>{e.target&&!n.current&&La("dismissableLayer.focusOutside",t,{originalEvent:e})};return document.addEventListener("focusin",e),()=>document.removeEventListener("focusin",e)}),[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}();return yo((e=>{y===c.layers.size-1&&(null==r||r(e),e.defaultPrevented||null==l||l())})),function({disabled:e}){const t=s.useRef(!1);Gr((()=>{if(e){function n(){Oa--,0===Oa&&(document.body.style.pointerEvents=Ca)}function r(e){t.current="mouse"!==e.pointerType}return 0===Oa&&(Ca=document.body.style.pointerEvents),document.body.style.pointerEvents="none",Oa++,document.addEventListener("pointerup",r),()=>{t.current?document.addEventListener("click",n,{once:!0}):n(),document.removeEventListener("pointerup",r)}}}),[e])}({disabled:n}),s.useEffect((()=>{f&&(n&&c.layersWithOutsidePointerEventsDisabled.add(f),c.layers.add(f),Ra())}),[f,n,c]),s.useEffect((()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),Ra())}),[f,c]),s.useEffect((()=>{const e=()=>h({});return document.addEventListener("dismissableLayer.update",e),()=>document.removeEventListener("dismissableLayer.update",e)}),[]),s.createElement(ga.div,xe({},u,{ref:p,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:So(e.onFocusCapture,E.onFocusCapture),onBlurCapture:So(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:So(e.onPointerDownCapture,x.onPointerDownCapture)}))}));function Ra(){const e=new Event("dismissableLayer.update");document.dispatchEvent(e)}function La(e,t,n){const r=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});return t&&r.addEventListener(e,t,{once:!0}),!r.dispatchEvent(o)}const ja=u["useId".toString()]||(()=>{});let Aa=0;function Ma(e){const[t,n]=s.useState(ja());return Gr((()=>{e||n((e=>null!=e?e:String(Aa++)))}),[e]),e||(t?`radix-${t}`:"")}const[Ia,Da]=Eo("Dialog"),[Na,Fa]=Ia("Dialog"),za=s.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=Fa("DialogOverlay",e.__scopeDialog);return o.modal?s.createElement(ma,{present:n||o.open},s.createElement($a,xe({},r,{ref:t}))):null})),$a=s.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=Fa("DialogOverlay",n);return s.createElement(Yr,{as:Ee,allowPinchZoom:o.allowPinchZoom,shards:[o.contentRef]},s.createElement(ga.div,xe({"data-state":Va(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))})),Ba=s.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=Fa("DialogContent",e.__scopeDialog);return s.createElement(ma,{present:n||o.open},o.modal?s.createElement(Ua,xe({},r,{ref:t})):s.createElement(Wa,xe({},r,{ref:t})))})),Ua=s.forwardRef(((e,t)=>{const n=Fa("DialogContent",e.__scopeDialog),r=s.useRef(null),o=we(t,n.contentRef,r);return s.useEffect((()=>{const e=r.current;if(e)return mr(e)}),[]),s.createElement(Ha,xe({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:So(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:So(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:So(e.onFocusOutside,(e=>e.preventDefault()))}))})),Wa=s.forwardRef(((e,t)=>{const n=Fa("DialogContent",e.__scopeDialog),r=s.useRef(!1);return s.createElement(Ha,xe({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current||null===(i=n.triggerRef.current)||void 0===i||i.focus(),t.preventDefault()),r.current=!1},onInteractOutside:t=>{var o,i;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0);const a=t.target;(null===(i=n.triggerRef.current)||void 0===i?void 0:i.contains(a))&&t.preventDefault()}}))})),Ha=s.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,l=Fa("DialogContent",n),u=we(t,s.useRef(null));return ro(),s.createElement(s.Fragment,null,s.createElement(ba,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},s.createElement(Ta,xe({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Va(l.open)},a,{ref:u,onDismiss:()=>l.onOpenChange(!1)}))),!1)}));function Va(e){return e?"open":"closed"}const[qa,Xa]=xo("DialogTitleWarning",{contentName:"DialogContent",titleName:"DialogTitle",docsSlug:"dialog"}),Ka=za,Ya=Ba;var Ga,Qa=fe((e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0,allowPinchZoom:l}=e,u=s.useRef(null),c=s.useRef(null),[f=!1,d]=di({prop:r,defaultProp:o,onChange:i});return s.createElement(Na,{scope:t,triggerRef:u,contentRef:c,contentId:Ma(),titleId:Ma(),descriptionId:Ma(),open:f,onOpenChange:d,onOpenToggle:s.useCallback((()=>d((e=>!e))),[d]),modal:a,allowPinchZoom:l},n)}),{}),Za=pe({"0%":{opacity:0},"100%":{opacity:1}}),Ja=fe(Ka,{backgroundColor:"$overlay",width:"100vw",height:"100vh",position:"fixed",inset:0,"@media (prefers-reduced-motion: no-preference)":{animation:"".concat(Za," 150ms cubic-bezier(0.16, 1, 0.3, 1)")}}),el=(pe({"0%":{opacity:0,transform:"translate(-50%, -48%) scale(.96)"},"100%":{opacity:1,transform:"translate(-50%, -50%) scale(1)"}}),fe(Ya,{backgroundColor:"$grayBg",borderRadius:6,boxShadow:de.shadows.cardBoxShadow.toString(),position:"fixed","&:focus":{outline:"none"}})),tl=fe(el,{top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"90vw",maxWidth:"600px",maxHeight:"85vh","@smDown":{maxWidth:"95%",width:"95%"}}),nl=fe("textarea",{outline:"none",border:"none",overflow:"auto",resize:"none",background:"unset",color:"$grayText",fontSize:"$3",fontFamily:"inter",lineHeight:"1.35","&::placeholder":{opacity:.7}});function rl(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ol(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function il(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ol(i,r,o,a,l,"next",e)}function l(e){ol(i,r,o,a,l,"throw",e)}a(void 0)}))}}function al(e){return ll.apply(this,arguments)}function ll(){return ll=il(regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,nt.gql)(Ga||(Ga=rl(["\n mutation UpdateHighlight($input: UpdateHighlightInput!) {\n updateHighlight(input: $input) {\n ... on UpdateHighlightSuccess {\n highlight {\n id\n }\n }\n\n ... on UpdateHighlightError {\n errorCodes\n }\n }\n }\n "]))),e.prev=1,e.next=4,hn(n,{input:t});case 4:return r=e.sent,o=r,e.abrupt("return",null==o?void 0:o.updateHighlight.highlight.id);case 9:return e.prev=9,e.t0=e.catch(1),e.abrupt("return",void 0);case 12:case"end":return e.stop()}}),e,null,[[1,9]])}))),ll.apply(this,arguments)}fe(nl,{borderRadius:"6px",border:"1px solid $grayBorder",p:"$3",fontSize:"$1"});let sl,ul,cl,fl={data:""},dl=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||fl,hl=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,pl=/\/\*[^]*?\*\/|\s\s+|\n/g,gl=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?gl(a,i):i+"{"+gl(a,"k"==i[1]?"":t)+"}":"object"==typeof a?r+=gl(a,t?t.replace(/([^,])+/g,(e=>i.replace(/(^:.*)|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=gl.p?gl.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},ml={},vl=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+vl(e[n]);return t}return e},yl=(e,t,n,r,o)=>{let i=vl(e),a=ml[i]||(ml[i]=(e=>{let t=0,n=11;for(;t>>0;return"go"+n})(i));if(!ml[a]){let t=i!==e?e:(e=>{let t,n=[{}];for(;t=hl.exec(e.replace(pl,""));)t[4]?n.shift():t[3]?n.unshift(n[0][t[3]]=n[0][t[3]]||{}):n[0][t[1]]=t[2];return n[0]})(e);ml[a]=gl(o?{["@keyframes "+a]:t}:t,n?"":"."+a)}return((e,t,n)=>{-1==t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(ml[a],t,r),a},bl=(e,t,n)=>e.reduce(((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":gl(e,""):!1===e?"":e}return e+r+(null==i?"":i)}),"");function wl(e){let t=this||{},n=e.call?e(t.p):e;return yl(n.unshift?n.raw?bl(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,dl(t.target),t.g,t.o,t.k)}function xl(){return xl=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}var Nl=(0,s.forwardRef)((function(e,t){var n=e.alt,r=e.color,o=e.size,i=e.weight,a=e.mirrored,l=e.children,u=e.renderPath,c=Dl(e,["alt","color","size","weight","mirrored","children","renderPath"]),f=(0,s.useContext)(Ml),d=f.color,h=void 0===d?"currentColor":d,p=f.size,g=f.weight,m=void 0===g?"regular":g,v=f.mirrored,y=void 0!==v&&v,b=Dl(f,["color","size","weight","mirrored"]);return s.createElement("svg",Object.assign({ref:t,xmlns:"http://www.w3.org/2000/svg",width:null!=o?o:p,height:null!=o?o:p,fill:null!=r?r:h,viewBox:"0 0 256 256",transform:a||y?"scale(-1, 1)":void 0},b,c),!!n&&s.createElement("title",null,n),l,s.createElement("rect",{width:"256",height:"256",fill:"none"}),u(null!=i?i:m,null!=r?r:h))}));Nl.displayName="IconBase";const Fl=Nl;var zl=new Map;zl.set("bold",(function(e){return s.createElement(s.Fragment,null,s.createElement("polyline",{points:"172 104 113.3 160 84 132",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}))})),zl.set("duotone",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",opacity:"0.2"}),s.createElement("polyline",{points:"172 104 113.3 160 84 132",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))})),zl.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.2,104.2,0,0,0,128,24Zm49.5,85.8-58.6,56a8.1,8.1,0,0,1-5.6,2.2,7.7,7.7,0,0,1-5.5-2.2l-29.3-28a8,8,0,1,1,11-11.6l23.8,22.7,53.2-50.7a8,8,0,0,1,11,11.6Z"}))})),zl.set("light",(function(e){return s.createElement(s.Fragment,null,s.createElement("polyline",{points:"172 104 113.3 160 84 132",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}))})),zl.set("thin",(function(e){return s.createElement(s.Fragment,null,s.createElement("polyline",{points:"172 104 113.3 160 84 132",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}))})),zl.set("regular",(function(e){return s.createElement(s.Fragment,null,s.createElement("polyline",{points:"172 104 113.3 160 84 132",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))}));var $l=function(e,t){return Il(e,t,zl)},Bl=(0,s.forwardRef)((function(e,t){return s.createElement(Fl,Object.assign({ref:t},e,{renderPath:$l}))}));Bl.displayName="CheckCircle";const Ul=Bl;var Wl=new Map;Wl.set("bold",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("line",{x1:"128",y1:"80",x2:"128",y2:"132",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("circle",{cx:"128",cy:"172",r:"16"}))})),Wl.set("duotone",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",opacity:"0.2"}),s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeMiterlimit:"10",strokeWidth:"16"}),s.createElement("line",{x1:"128",y1:"80",x2:"128",y2:"136",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("circle",{cx:"128",cy:"172",r:"12"}))})),Wl.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.2,104.2,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"}))})),Wl.set("light",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("line",{x1:"128",y1:"80",x2:"128",y2:"136",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("circle",{cx:"128",cy:"172",r:"10"}))})),Wl.set("thin",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("line",{x1:"128",y1:"80",x2:"128",y2:"136",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("circle",{cx:"128",cy:"172",r:"8"}))})),Wl.set("regular",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeMiterlimit:"10",strokeWidth:"16"}),s.createElement("line",{x1:"128",y1:"80",x2:"128",y2:"136",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("circle",{cx:"128",cy:"172",r:"12"}))}));var Hl=function(e,t){return Il(e,t,Wl)},Vl=(0,s.forwardRef)((function(e,t){return s.createElement(Fl,Object.assign({ref:t},e,{renderPath:Hl}))}));Vl.displayName="WarningCircle";const ql=Vl;var Xl=new Map;Xl.set("bold",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"200",y1:"56",x2:"56",y2:"200",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("line",{x1:"200",y1:"200",x2:"56",y2:"56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}))})),Xl.set("duotone",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"200",y1:"56",x2:"56",y2:"200",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"200",y1:"200",x2:"56",y2:"56",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))})),Xl.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M139.3,128l66.4-66.3a8.1,8.1,0,0,0-11.4-11.4L128,116.7,61.7,50.3A8.1,8.1,0,0,0,50.3,61.7L116.7,128,50.3,194.3a8.1,8.1,0,0,0,0,11.4,8.2,8.2,0,0,0,11.4,0L128,139.3l66.3,66.4a8.2,8.2,0,0,0,11.4,0,8.1,8.1,0,0,0,0-11.4Z"}))})),Xl.set("light",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"200",y1:"56",x2:"56",y2:"200",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("line",{x1:"200",y1:"200",x2:"56",y2:"56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}))})),Xl.set("thin",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"200",y1:"56",x2:"56",y2:"200",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("line",{x1:"200",y1:"200",x2:"56",y2:"56",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}))})),Xl.set("regular",(function(e){return s.createElement(s.Fragment,null,s.createElement("line",{x1:"200",y1:"56",x2:"56",y2:"200",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"200",y1:"200",x2:"56",y2:"56",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))}));var Kl=function(e,t){return Il(e,t,Xl)},Yl=(0,s.forwardRef)((function(e,t){return s.createElement(Fl,Object.assign({ref:t},e,{renderPath:Kl}))}));Yl.displayName="X";const Gl=Yl;function Ql(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zl(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2])||arguments[2],r=(0,s.useCallback)((function(r){var o=r.key.toLowerCase();if(e&&"enter"===o){if(n&&!r.metaKey&&!r.ctrlKey)return;e()}else t&&"escape"===o&&t()}),[t,e]);(0,s.useEffect)((function(){if("undefined"!=typeof window)return window.addEventListener("keydown",r),function(){window.removeEventListener("keydown",r)}}),[r])}((function(){p()}),void 0,!0),e.highlight&&(c=null===(r=e.highlight)||void 0===r?void 0:r.updatedAt,f="Updated ",(d=Math.ceil((new Date).valueOf()-new Date(c).valueOf())/1e3)<60?"".concat(f," a few seconds ago"):d<3600?"".concat(f," ").concat(Math.floor(d/60)," minutes ago"):d<86400?"".concat(f," ").concat(Math.floor(d/3600)," hours ago"):d<604800?"".concat(f," ").concat(Math.floor(d/86400)," days ago"):d<2592e3?"".concat(f," ").concat(Math.floor(d/604800)," weeks ago"):d<31536e3?"".concat(f," ").concat(Math.floor(d/2592e3)," months ago"):d<31536e4?"".concat(f," ").concat(Math.floor(d/31536e3)," years ago"):d<31536e5&&"".concat(f," ").concat(Math.floor(d/31536e4)," decades ago"));var c,f,d,h=(0,s.useCallback)((function(e){u(e.target.value)}),[u]),p=(0,s.useCallback)(us(regeneratorRuntime.mark((function t(){var n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l==(null===(n=e.highlight)||void 0===n?void 0:n.annotation)||null===(r=e.highlight)||void 0===r||!r.id){t.next=5;break}return t.next=3,al({highlightId:null===(o=e.highlight)||void 0===o?void 0:o.id,annotation:l});case 3:t.sent?(e.onUpdate(as(as({},e.highlight),{},{annotation:l})),e.onOpenChange(!1)):rs("Error updating your note",{position:"bottom-right"});case 5:if(e.highlight||!e.createHighlightForNote){t.next=12;break}return t.next=8,e.createHighlightForNote(l);case 8:t.sent?e.onOpenChange(!0):rs("Error saving highlight",{position:"bottom-right"}),t.next=13;break;case 12:e.onOpenChange(!1);case 13:case"end":return t.stop()}}),t)}))),[l,e]);return(0,Me.jsxs)(Qa,{defaultOpen:!0,onOpenChange:e.onOpenChange,children:[(0,Me.jsx)(Ja,{}),(0,Me.jsx)(tl,{css:{overflow:"auto"},onPointerDownOutside:function(e){e.preventDefault()},children:(0,Me.jsxs)(Be,{children:[(0,Me.jsxs)($e,{distribution:"between",alignment:"center",css:{width:"100%"},children:[(0,Me.jsx)(Nn,{style:"modalHeadline",css:{p:"16px"},children:"Notes"}),(0,Me.jsx)(fr,{css:{pt:"16px",pr:"16px"},style:"ghost",onClick:function(){e.onOpenChange(!1)},children:(0,Me.jsx)(os,{size:20,strokeColor:de.colors.grayText.toString()})})]}),(0,Me.jsx)(Ne,{css:{width:"100%",height:"1px",opacity:"0.2",backgroundColor:de.colors.grayText.toString()}}),(0,Me.jsx)(nl,{css:{mt:"$2",width:"95%",p:"0px",height:"$6",marginLeft:"16px"},autoFocus:!0,placeholder:"Add your note here",value:l,onChange:h,maxLength:4e3}),(0,Me.jsx)(Ne,{css:{width:"100%",height:"1px",opacity:"0.2",backgroundColor:de.colors.grayText.toString()}}),(0,Me.jsx)($e,{alignment:"end",distribution:"end",css:{width:"100%",padding:"22px 22px 20px 0"},children:(0,Me.jsx)(fr,{style:"ctaDarkYellow",onClick:p,children:"Save"})})]})})]})}function ds(e){var t,n=(0,s.useMemo)((function(){return e.highlight.quote.split("\n")}),[e.highlight.quote]),r=null!==(t=e.highlight.annotation)&&void 0!==t?t:"",o=fe(ze,{margin:"0px 24px 16px 24px",fontSize:"18px",lineHeight:"27px",color:"$textDefault",cursor:"pointer"});return(0,Me.jsxs)(Be,{css:{width:"100%",boxSizing:"border-box"},children:[r&&(0,Me.jsx)(De,{css:{p:"16px",m:"16px",ml:"24px",mr:"24px",borderRadius:"6px",bg:"$grayBase"},children:(0,Me.jsx)(Nn,{style:"shareHighlightModalAnnotation",children:r})}),(0,Me.jsxs)(o,{onClick:function(){e.scrollToHighlight&&e.scrollToHighlight(e.highlight.id)},children:[e.highlight.prefix,(0,Me.jsx)(Ne,{css:{bg:"$highlightBackground",p:"1px",borderRadius:"2px"},children:n.map((function(e,t){return(0,Me.jsxs)(s.Fragment,{children:[e,t!==n.length-1&&(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)("br",{}),(0,Me.jsx)("br",{})]})]},t)}))}),e.highlight.suffix]}),(0,Me.jsx)(De,{css:{p:"24px",pt:"0",width:"100%",boxSizing:"border-box"},children:e.author&&e.title&&(0,Me.jsx)(Nn,{style:"highlightTitleAndAuthor",children:e.title+e.author})})]})}function hs(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function ps(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){hs(i,r,o,a,l,"next",e)}function l(e){hs(i,r,o,a,l,"throw",e)}a(void 0)}))}}function gs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ns.createElement(ga.span,xe({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),bs=s.forwardRef(((e,t)=>{var n,r;const{containerRef:o,style:i,...a}=e,l=null!==(n=null==o?void 0:o.current)&&void 0!==n?n:null===globalThis||void 0===globalThis||null===(r=globalThis.document)||void 0===r?void 0:r.body,[,u]=s.useState({});return Gr((()=>{u({})}),[]),l?c.createPortal(s.createElement(ga.div,xe({"data-radix-portal":""},a,{ref:t,style:l===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...i}:void 0})),l):null})),ws=s.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return s.createElement(ga.svg,xe({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:s.createElement("polygon",{points:"0,0 30,0 15,10"}))}));function xs(e){const[t,n]=s.useState(void 0);return s.useEffect((()=>{if(e){const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else{const t=e.getBoundingClientRect();o=t.width,i=t.height}n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const[Es,ks]=Eo("Popper"),[Ss,_s]=Es("Popper"),Cs=s.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=_s("PopperAnchor",n),a=s.useRef(null),l=we(t,a);return s.useEffect((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:s.createElement(ga.div,xe({},o,{ref:l}))})),[Os,Ps]=Es("PopperContent"),Ts=s.forwardRef(((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o,align:i="center",alignOffset:a,collisionTolerance:l,avoidCollisions:u=!0,...c}=e,f=_s("PopperContent",n),[d,h]=s.useState(),p=Uo(f.anchor),[g,m]=s.useState(null),v=xs(g),[y,b]=s.useState(null),w=xs(y),x=we(t,(e=>m(e))),E=function(){const[e,t]=s.useState(void 0);return s.useEffect((()=>{let e;function n(){t({width:window.innerWidth,height:window.innerHeight})}function r(){window.clearTimeout(e),e=window.setTimeout(n,100)}return n(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)}),[]),e}(),k=E?DOMRect.fromRect({...E,x:0,y:0}):void 0,{popperStyles:S,arrowStyles:_,placedSide:C,placedAlign:O}=Wo({anchorRect:p,popperSize:v,arrowSize:w,arrowOffset:d,side:r,sideOffset:o,align:i,alignOffset:a,shouldAvoidCollisions:u,collisionBoundariesRect:k,collisionTolerance:l}),P=void 0!==C;return s.createElement("div",{style:S,"data-radix-popper-content-wrapper":""},s.createElement(Os,{scope:n,arrowStyles:_,onArrowChange:b,onArrowOffsetChange:h},s.createElement(ga.div,xe({"data-side":C,"data-align":O},c,{style:{...c.style,animation:P?void 0:"none"},ref:x}))))})),Rs=s.forwardRef((function(e,t){const{__scopePopper:n,offset:r,...o}=e,i=Ps("PopperArrow",n),{onArrowOffsetChange:a}=i;return s.useEffect((()=>a(r)),[a,r]),s.createElement("span",{style:{...i.arrowStyles,pointerEvents:"none"}},s.createElement("span",{ref:i.onArrowChange,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},s.createElement(ws,xe({},o,{ref:t,style:{...o.style,display:"block"}}))))})),Ls=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return s.createElement(Ss,{scope:t,anchor:r,onAnchorChange:o},n)},js=Cs,As=Ts,Ms=Rs;function Is(e){const t=s.useRef({value:e,previous:e});return s.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}const[Ds,Ns]=Eo("Tooltip",[ks]),Fs=ks(),[zs,$s]=Ds("TooltipProvider",{isOpenDelayed:!0,delayDuration:700,onOpen:()=>{},onClose:()=>{}}),[Bs,Us]=Ds("Tooltip"),Ws=s.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Us("TooltipTrigger",n),i=Fs(n),a=we(t,o.onTriggerChange),l=s.useRef(!1),u=s.useCallback((()=>l.current=!1),[]);return s.useEffect((()=>()=>document.removeEventListener("mouseup",u)),[u]),s.createElement(js,xe({asChild:!0},i),s.createElement(ga.button,xe({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:a,onMouseEnter:So(e.onMouseEnter,o.onTriggerEnter),onMouseLeave:So(e.onMouseLeave,o.onClose),onMouseDown:So(e.onMouseDown,(()=>{o.onClose(),l.current=!0,document.addEventListener("mouseup",u,{once:!0})})),onFocus:So(e.onFocus,(()=>{l.current||o.onOpen()})),onBlur:So(e.onBlur,o.onClose),onClick:So(e.onClick,(e=>{0===e.detail&&o.onClose()}))})))})),Hs=s.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,o=Us("TooltipContent",e.__scopeTooltip);return s.createElement(ma,{present:n||o.open},s.createElement(Vs,xe({ref:t},r)))})),Vs=s.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,portalled:i=!0,...a}=e,l=Us("TooltipContent",n),u=Fs(n),c=i?bs:s.Fragment,{onClose:f}=l;return yo((()=>f())),s.useEffect((()=>(document.addEventListener("tooltip.open",f),()=>document.removeEventListener("tooltip.open",f))),[f]),s.createElement(c,null,s.createElement(qs,{__scopeTooltip:n}),s.createElement(As,xe({"data-state":l.stateAttribute},u,a,{ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),s.createElement(Se,null,r),s.createElement(ys,{id:l.contentId,role:"tooltip"},o||r)))}));function qs(e){const{__scopeTooltip:t}=e,n=Us("CheckTriggerMoved",t),r=Uo(n.trigger),o=null==r?void 0:r.left,i=Is(o),a=null==r?void 0:r.top,l=Is(a),u=n.onClose;return s.useEffect((()=>{(void 0!==i&&i!==o||void 0!==l&&l!==a)&&u()}),[u,i,l,o,a]),null}const Xs=Ws,Ks=Hs,Ys=s.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Fs(n);return s.createElement(Ms,xe({},o,r,{ref:t}))}));var Gs=["children","active","tooltipContent","tooltipSide","arrowStyles"];function Qs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zs(e){for(var t=1;t{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,delayDuration:a}=e,l=$s("Tooltip",t),u=Fs(t),[c,f]=s.useState(null),d=Ma(),h=s.useRef(0),p=null!=a?a:l.delayDuration,g=s.useRef(!1),{onOpen:m,onClose:v}=l,[y=!1,b]=di({prop:r,defaultProp:o,onChange:e=>{e&&(document.dispatchEvent(new CustomEvent("tooltip.open")),m()),null==i||i(e)}}),w=s.useMemo((()=>y?g.current?"delayed-open":"instant-open":"closed"),[y]),x=s.useCallback((()=>{window.clearTimeout(h.current),g.current=!1,b(!0)}),[b]),E=s.useCallback((()=>{window.clearTimeout(h.current),h.current=window.setTimeout((()=>{g.current=!0,b(!0)}),p)}),[p,b]);return s.useEffect((()=>()=>window.clearTimeout(h.current)),[]),s.createElement(Ls,u,s.createElement(Bs,{scope:t,contentId:d,open:y,stateAttribute:w,trigger:c,onTriggerChange:f,onTriggerEnter:s.useCallback((()=>{l.isOpenDelayed?E():x()}),[l.isOpenDelayed,E,x]),onOpen:s.useCallback(x,[x]),onClose:s.useCallback((()=>{window.clearTimeout(h.current),b(!1),v()}),[b,v])},n))},iu=Xs,au=nu,lu=ru,su={backgroundColor:"#F9D354",color:"#0A0806"},uu={fill:"#F9D354"},cu=function(e){var t=e.children,n=e.active,r=e.tooltipContent,o=e.tooltipSide,i=e.arrowStyles,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Gs);return(0,Me.jsxs)(ou,{open:n,children:[(0,Me.jsx)(iu,{asChild:!0,children:t}),(0,Me.jsxs)(au,Zs(Zs({sideOffset:5,side:o,style:su},a),{},{children:[r,(0,Me.jsx)(lu,{style:null!=i?i:uu})]}))]})},fu=new Map;fu.set("bold",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("path",{d:"M168,88H152a23.9,23.9,0,0,0-24,24V224",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}),s.createElement("line",{x1:"96",y1:"144",x2:"160",y2:"144",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}))})),fu.set("duotone",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",opacity:"0.2"}),s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("path",{d:"M168,88H152a23.9,23.9,0,0,0-24,24V224",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"96",y1:"144",x2:"160",y2:"144",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))})),fu.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M232,128a104.3,104.3,0,0,1-91.5,103.3,4.1,4.1,0,0,1-4.5-4V152h24a8,8,0,0,0,8-8.5,8.2,8.2,0,0,0-8.3-7.5H136V112a16,16,0,0,1,16-16h16a8,8,0,0,0,8-8.5,8.2,8.2,0,0,0-8.3-7.5H152a32,32,0,0,0-32,32v24H96a8,8,0,0,0-8,8.5,8.2,8.2,0,0,0,8.3,7.5H120v75.3a4,4,0,0,1-4.4,4C62.8,224.9,22,179,24.1,124.1A104,104,0,0,1,232,128Z"}))})),fu.set("light",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("path",{d:"M168,88H152a23.9,23.9,0,0,0-24,24V224",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}),s.createElement("line",{x1:"96",y1:"144",x2:"160",y2:"144",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}))})),fu.set("thin",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("path",{d:"M168,88H152a23.9,23.9,0,0,0-24,24V224",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}),s.createElement("line",{x1:"96",y1:"144",x2:"160",y2:"144",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}))})),fu.set("regular",(function(e){return s.createElement(s.Fragment,null,s.createElement("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("path",{d:"M168,88H152a23.9,23.9,0,0,0-24,24V224",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),s.createElement("line",{x1:"96",y1:"144",x2:"160",y2:"144",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))}));var du=function(e,t){return Il(e,t,fu)},hu=(0,s.forwardRef)((function(e,t){return s.createElement(Fl,Object.assign({ref:t},e,{renderPath:du}))}));hu.displayName="FacebookLogo";const pu=hu;var gu=new Map;gu.set("bold",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"24"}))})),gu.set("duotone",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",opacity:"0.2"}),s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))})),gu.set("fill",(function(){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M245.7,77.7l-30.2,30.1C209.5,177.7,150.5,232,80,232c-14.5,0-26.5-2.3-35.6-6.8-7.3-3.7-10.3-7.6-11.1-8.8a8,8,0,0,1,3.9-11.9c.2-.1,23.8-9.1,39.1-26.4a108.6,108.6,0,0,1-24.7-24.4c-13.7-18.6-28.2-50.9-19.5-99.1a8.1,8.1,0,0,1,5.5-6.2,8,8,0,0,1,8.1,1.9c.3.4,33.6,33.2,74.3,43.8V88a48.3,48.3,0,0,1,48.6-48,48.2,48.2,0,0,1,41,24H240a8,8,0,0,1,7.4,4.9A8.4,8.4,0,0,1,245.7,77.7Z"}))})),gu.set("light",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"12"}))})),gu.set("thin",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8"}))})),gu.set("regular",(function(e){return s.createElement(s.Fragment,null,s.createElement("path",{d:"M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z",fill:"none",stroke:e,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))}));var mu=function(e,t){return Il(e,t,gu)},vu=(0,s.forwardRef)((function(e,t){return s.createElement(Fl,Object.assign({ref:t},e,{renderPath:mu}))}));vu.displayName="TwitterLogo";const yu=vu;function bu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nt.start?1:0})).forEach((function(e){f>=e.start&&d<=e.end?p=!0:f<=e.end&&e.start<=d&&g.push(e)})),m=null,!g.length){t.next=21;break}if(x=!1,f<=g[0].start?(v=a.startContainer,y=a.startOffset):(E=tr(g[0].id),v=E.shift(),y=0),d>=g[g.length-1].end?(b=a.endContainer,w=a.endOffset):(k=tr(g[g.length-1].id),b=k.pop(),w=0,x=!0),v&&b){t.next=18;break}throw new Error("Failed to query node for computing new merged range");case 18:(m=new Range).setStart(v,y),x?m.setEndAfter(b):m.setEnd(b,w);case 21:if(!p){t.next=23;break}return t.abrupt("return",setTimeout((function(){o(null)}),100));case 23:return t.abrupt("return",o({selection:s,mouseEvent:n,range:null!==(r=m)&&void 0!==r?r:a,focusPosition:{x:h[l?"left":"right"],y:h[l?"top":"bottom"],isReverseSelected:l},overlapHighlights:g.map((function(e){return e.id}))}));case 24:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),[e]);return(0,s.useEffect)((function(){return document.addEventListener("mouseup",i),document.addEventListener("touchend",i),document.addEventListener("contextmenu",i),function(){document.removeEventListener("mouseup",i),document.removeEventListener("touchend",i),document.removeEventListener("contextmenu",i)}}),[e,i,false]),[r,o]}(e.highlightLocations),h=Nu(d,2),p=h[0],g=h[1],m=(0,s.useMemo)((function(){var e;return"undefined"!=typeof window&&!(!Ui()&&!(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document))&&"function"==typeof(null===(e=navigator)||void 0===e?void 0:e.share)}),[]),v=(0,s.useCallback)(function(){var t=Du(regeneratorRuntime.mark((function t(o){var i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=o||(null==c?void 0:c.id)){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,e.articleMutations.deleteHighlightMutation(i);case 5:t.sent?(Ki(n.map((function(e){return e.id})),e.highlightLocations),r(n.filter((function(e){return e.id!==i}))),f(void 0)):console.error("Failed to delete highlight");case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),[c,n,e.highlightLocations]),y=(0,s.useCallback)((function(t){Ki([t.id],e.highlightLocations);var o,i=n.filter((function(e){return e.id!==t.id}));r([].concat(function(e){if(Array.isArray(e))return zu(e)}(o=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||Fu(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[t]))}),[n,e.highlightLocations]),b=(0,s.useCallback)((function(t){var n;null===(n=navigator)||void 0===n||n.share({title:e.articleTitle,url:"".concat(e.highlightsBaseURL,"/").concat(t)}).then((function(){f(void 0)})).catch((function(e){console.log(e),f(void 0)}))}),[e.articleTitle,e.highlightsBaseURL]),w=(0,s.useCallback)((function(t){var n,r,o,i,l,s,u;void 0!==(null===(n=window)||void 0===n||null===(r=n.webkit)||void 0===r?void 0:r.messageHandlers.highlightAction)&&e.highlightBarDisabled?null===(o=window)||void 0===o||null===(i=o.webkit)||void 0===i||null===(l=i.messageHandlers.highlightAction)||void 0===l||l.postMessage({actionID:"annotate",annotation:null!==(s=null===(u=t.highlight)||void 0===u?void 0:u.annotation)&&void 0!==s?s:""}):(t.createHighlightForNote=function(){var e=Du(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.selectionData){e.next=2;break}return e.abrupt("return",void 0);case 2:return e.next=4,x(t.selectionData,n);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),a(t))}),[e.highlightBarDisabled]),x=function(){var t=Du(regeneratorRuntime.mark((function t(o,i){var l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ha({selection:o,articleId:e.articleId,existingHighlights:n,highlightStartEndOffsets:e.highlightLocations,annotation:i},e.articleMutations);case 2:if((l=t.sent).highlights&&0!=l.highlights.length){t.next=6;break}return console.error("Failed to create highlight"),t.abrupt("return",void 0);case 6:if(g(null),r(l.highlights),void 0!==l.newHighlightIndex){t.next=11;break}return a({highlightModalAction:"none"}),t.abrupt("return",void 0);case 11:return t.abrupt("return",l.highlights[l.newHighlightIndex]);case 12:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),E=(0,s.useCallback)(function(){var e=Du(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(p){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,x(p,n);case 4:e.sent||rs("Error saving highlight",{position:"bottom-right"});case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),[b,n,w,e.articleId,p,g,m,e.highlightLocations]),k=(0,s.useCallback)((function(e){var t=e.target,r=e.pageX,o=e.pageY;if(t&&(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE)if(l.current={pageX:r,pageY:o},t.hasAttribute(Bn)){var i=t.getAttribute(Bn),a=n.find((function(e){return e.id===i}));if(a){var s,u,c,d=t.getBoundingClientRect();null===(s=window)||void 0===s||null===(u=s.webkit)||void 0===u||null===(c=u.messageHandlers.viewerAction)||void 0===c||c.postMessage({actionID:"showMenu",rectX:d.x,rectY:d.y,rectWidth:d.width,rectHeight:d.height}),f(a)}}else if(t.hasAttribute(Un)){var h=t.getAttribute(Un),p=n.find((function(e){return e.id===h}));w({highlight:p,highlightModalAction:"addComment"})}else f(void 0)}),[n,e.highlightLocations]);(0,s.useEffect)((function(){if("undefined"!=typeof window)return document.addEventListener("click",k),function(){return document.removeEventListener("click",k)}}),[k]);var S,_,C,O,P,T,R=(0,s.useCallback)((function(t){switch(t){case"delete":v();break;case"create":E("none");break;case"comment":e.highlightBarDisabled||c?w({highlight:c,highlightModalAction:"addComment"}):w({highlight:void 0,selectionData:p||void 0,highlightModalAction:"addComment"});break;case"share":var n,r,o;e.isAppleAppEmbed&&(null===(n=window)||void 0===n||null===(r=n.webkit)||void 0===r||null===(o=r.messageHandlers.highlightAction)||void 0===o||o.postMessage({actionID:"share",highlightID:null==c?void 0:c.id})),c?m?b(c.shortId):a({highlight:c,highlightModalAction:"share"}):E("share");break;case"unshare":console.log("unshare")}}),[E,c,b,w,e.highlightBarDisabled,e.isAppleAppEmbed,v,m]);return(0,s.useEffect)((function(){var t=function(){R("comment")},n=function(){R("create")},r=function(){R("share")},o=function(){R("delete")},i=function(){f(void 0)},a=function(){var e=Du(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!c){e.next=4;break}return e.next=3,navigator.clipboard.writeText(c.quote);case 3:f(void 0);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),l=function(){var t=Du(regeneratorRuntime.mark((function t(n){var r,o,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!c){t.next=9;break}return i=null!==(r=n.annotation)&&void 0!==r?r:"",t.next=4,e.articleMutations.updateHighlightMutation({highlightId:c.id,annotation:null!==(o=n.annotation)&&void 0!==o?o:""});case 4:t.sent?y(Au(Au({},c),{},{annotation:i})):console.log("failed to change annotation for highlight with id",c.id),f(void 0),t.next=10;break;case 9:E("none",n.annotation);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return document.addEventListener("annotate",t),document.addEventListener("highlight",n),document.addEventListener("share",r),document.addEventListener("remove",o),document.addEventListener("copyHighlight",a),document.addEventListener("dismissHighlight",i),document.addEventListener("saveAnnotation",l),function(){document.removeEventListener("annotate",t),document.removeEventListener("highlight",n),document.removeEventListener("share",r),document.removeEventListener("remove",o),document.removeEventListener("copyHighlight",a),document.removeEventListener("dismissHighlight",i),document.removeEventListener("saveAnnotation",l)}})),"addComment"==(null==i?void 0:i.highlightModalAction)?(0,Me.jsx)(fs,{highlight:i.highlight,author:e.articleAuthor,title:e.articleTitle,onUpdate:y,onOpenChange:function(){return a({highlightModalAction:"none"})},createHighlightForNote:null==i?void 0:i.createHighlightForNote}):"share"==(null==i?void 0:i.highlightModalAction)&&i.highlight?(0,Me.jsx)(xu,{url:"".concat(e.highlightsBaseURL,"/").concat(i.highlight.shortId),title:e.articleTitle,author:e.articleAuthor,highlight:i.highlight,onOpenChange:function(){a({highlightModalAction:"none"})}}):e.highlightBarDisabled||!c&&!p?e.showHighlightsModal?(0,Me.jsx)(Tu,{highlights:n,onOpenChange:function(){return e.setShowHighlightsModal(!1)},scrollToHighlight:function(t){var n=document.querySelector('[omnivore-highlight-id="'.concat(t,'"]'));n&&(n.scrollIntoView({block:"center",behavior:"smooth"}),window.location.hash="#".concat(t),e.setShowHighlightsModal(!1))},deleteHighlightAction:function(e){v(e)}}):(0,Me.jsx)(Me.Fragment,{}):(0,Me.jsx)(Me.Fragment,{children:(0,Me.jsx)(qi,{anchorCoordinates:{pageX:null!==(S=null!==(_=null===(C=l.current)||void 0===C?void 0:C.pageX)&&void 0!==_?_:null==p?void 0:p.focusPosition.x)&&void 0!==S?S:0,pageY:null!==(O=null!==(P=null===(T=l.current)||void 0===T?void 0:T.pageY)&&void 0!==P?P:null==p?void 0:p.focusPosition.y)&&void 0!==O?O:0},isNewHighlight:!!p,handleButtonClick:R,isSharedToFeed:null!=(null==c?void 0:c.sharedAt),isTouchscreenDevice:!0})})}function Bu(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function Uu(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Bu(i,r,o,a,l,"next",e)}function l(e){Bu(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Wu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n>16&255,n>>8&255,255&n]);return(0,Me.jsx)(fr,{style:"plainIcon",onClick:function(t){r.push('/home?q=label:"'.concat(e.text,'"')),t.stopPropagation()},children:(0,Me.jsx)(Ne,{css:{display:"inline-table",margin:"4px",borderRadius:"32px",color:e.color,fontSize:"12px",fontWeight:"bold",padding:"2px 5px 2px 5px",whiteSpace:"nowrap",cursor:"pointer",backgroundClip:"padding-box",border:"1px solid rgba(".concat(o[0],", ").concat(o[1],", ").concat(o[2],", 0.7)"),backgroundColor:"rgba(".concat(o[0],", ").concat(o[1],", ").concat(o[2],", 0.08)")},children:e.text})})}function Qu(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function Zu(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Qu(i,r,o,a,l,"next",e)}function l(e){Qu(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Ju(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ec(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ec(e,t):void 0}}(e,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 ec(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=100&&r<=300&&k(r)},n=function(e){var t,n,r=null!==(t=null!==(n=e.maxWidthPercentage)&&void 0!==n?n:b)&&void 0!==t?t:100;r>=40&&r<=100&&w(r)},o=function(t){var n,r,o,i=null!==(n=null!==(r=null!==(o=t.fontFamily)&&void 0!==o?o:_)&&void 0!==r?r:e.fontFamily)&&void 0!==n?n:"inter";console.log("setting font fam to",t.fontFamily),C(i)},i=function(){var e=Zu(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n="high"==t.fontContrast,T(n);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),a=function(){var e=Zu(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(r=null!==(n=t.fontSize)&&void 0!==n?n:18)>=10&&r<=28&&N(r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),l=function(e){var t;Pn(null!==(t=e.isDark)&&void 0!==t&&t?r.Dark:r.Light)},s=function(){navigator.share&&navigator.share({title:e.article.title,url:e.article.originalArticleUrl})};return document.addEventListener("updateFontFamily",o),document.addEventListener("updateLineHeight",t),document.addEventListener("updateMaxWidthPercentage",n),document.addEventListener("updateFontSize",a),document.addEventListener("updateColorMode",l),document.addEventListener("handleFontContrastChange",i),document.addEventListener("share",s),function(){document.removeEventListener("updateFontFamily",o),document.removeEventListener("updateLineHeight",t),document.removeEventListener("updateMaxWidthPercentage",n),document.removeEventListener("updateFontSize",a),document.removeEventListener("updateColorMode",l),document.removeEventListener("handleFontContrastChange",i),document.removeEventListener("share",s)}}));var F={fontSize:m,margin:null!==(o=e.margin)&&void 0!==o?o:360,maxWidthPercentage:null!=b?b:e.maxWidthPercentage,lineHeight:null!==(i=null!=E?E:e.lineHeight)&&void 0!==i?i:150,fontFamily:null!==(a=null!=_?_:e.fontFamily)&&void 0!==a?a:"inter",readerFontColor:P?de.colors.readerFontHighContrast.toString():de.colors.readerFont.toString(),readerFontColorTransparent:de.colors.readerFontTransparent.toString(),readerTableHeaderColor:de.colors.readerTableHeader.toString(),readerHeadersColor:de.colors.readerHeader.toString()};return(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsxs)(De,{id:"article-container",css:{padding:"16px",maxWidth:"".concat(null!==(l=F.maxWidthPercentage)&&void 0!==l?l:100,"%"),background:e.isAppleAppEmbed?"unset":de.colors.grayBg.toString(),"--text-font-family":F.fontFamily,"--text-font-size":"".concat(F.fontSize,"px"),"--line-height":"".concat(F.lineHeight,"%"),"--blockquote-padding":"0.5em 1em","--blockquote-icon-font-size":"1.3rem","--figure-margin":"1.6rem auto","--hr-margin":"1em","--font-color":F.readerFontColor,"--font-color-transparent":F.readerFontColorTransparent,"--table-header-color":F.readerTableHeaderColor,"--headers-color":F.readerHeadersColor,"@sm":{"--blockquote-padding":"1em 2em","--blockquote-icon-font-size":"1.7rem","--figure-margin":"2.6875rem auto","--hr-margin":"2em",margin:"30px 0px"},"@md":{maxWidth:F.maxWidthPercentage?"".concat(F.maxWidthPercentage,"%"):1024-F.margin}},children:[(0,Me.jsxs)(Be,{alignment:"start",distribution:"start",children:[(0,Me.jsx)(Nn,{style:"boldHeadline","data-testid":"article-headline",css:{fontFamily:F.fontFamily},children:e.article.title}),(0,Me.jsx)(Fn,{rawDisplayDate:null!==(u=e.article.publishedAt)&&void 0!==u?u:e.article.createdAt,author:e.article.author,href:e.article.url}),e.labels?(0,Me.jsx)(Ne,{css:{pb:"16px",width:"100%","&:empty":{display:"none"}},children:null===(c=e.labels)||void 0===c?void 0:c.map((function(e){return(0,Me.jsx)(Gu,{text:e.name,color:e.color},e.id)}))}):null]}),(0,Me.jsx)(Dn,{highlightReady:j,highlightHref:R,articleId:e.article.id,content:e.article.content,initialAnchorIndex:e.article.readingProgressAnchorIndex,articleMutations:e.articleMutations}),(0,Me.jsxs)(fr,{style:"ghost",css:{p:0,my:"$4",color:"$error",fontSize:"$1","&:hover":{opacity:.8}},onClick:function(){return p(!0)},children:["Report issues with this page -",">"]}),(0,Me.jsx)(De,{css:{height:"100px"}})]}),(0,Me.jsx)($u,{highlightLocations:I,highlights:e.article.highlights,articleTitle:e.article.title,articleAuthor:null!==(f=e.article.author)&&void 0!==f?f:"",articleId:e.article.id,isAppleAppEmbed:e.isAppleAppEmbed,highlightsBaseURL:e.highlightsBaseURL,highlightBarDisabled:e.highlightBarDisabled,showHighlightsModal:e.showHighlightsModal,setShowHighlightsModal:e.setShowHighlightsModal,articleMutations:e.articleMutations}),h?(0,Me.jsx)(Hu,{onCommit:function(t){!function(e){Ku.apply(this,arguments)}({pageId:e.article.id,itemUrl:e.article.url,reportTypes:["CONTENT_DISPLAY"],reportComment:t})},onOpenChange:function(e){return p(e)}}):null]})}var nc=o(3379),rc=o.n(nc),oc=o(7795),ic=o.n(oc),ac=o(569),lc=o.n(ac),sc=o(3565),uc=o.n(sc),cc=o(9216),fc=o.n(cc),dc=o(4589),hc=o.n(dc),pc=o(7420),gc={};gc.styleTagTransform=hc(),gc.setAttributes=uc(),gc.insert=lc().bind(null,"head"),gc.domAPI=ic(),gc.insertStyleElement=fc(),rc()(pc.Z,gc),pc.Z&&pc.Z.locals&&pc.Z.locals;var mc=o(2778),vc={};function yc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bc(t){for(var n=1;n0&&void 0!==arguments[0])||arguments[0];if("undefined"!=typeof window){var t=window.localStorage.getItem(Cn);t&&Object.values(r).includes(t)&&(e?On(t):Pn(t))}}(!1),(0,Me.jsx)(Me.Fragment,{children:(0,Me.jsx)(De,{css:{overflowY:"auto",height:"100%",width:"100vw"},children:(0,Me.jsx)(Be,{alignment:"center",distribution:"center",className:"disable-webkit-callout",children:(0,Me.jsx)(tc,{article:window.omnivoreArticle,labels:window.omnivoreArticle.labels,isAppleAppEmbed:!0,highlightBarDisabled:!0,highlightsBaseURL:"https://example.com",fontSize:null!==(e=window.fontSize)&&void 0!==e?e:18,fontFamily:null!==(t=window.fontFamily)&&void 0!==t?t:"inter",margin:window.margin,maxWidthPercentage:window.maxWidthPercentage,lineHeight:window.lineHeight,highContrastFont:null===(n=window.prefersHighContrastFont)||void 0===n||n,articleMutations:{createHighlightMutation:function(e){return wc("createHighlight",e)},deleteHighlightMutation:function(e){return wc("deleteHighlight",{highlightId:e})},mergeHighlightMutation:function(e){return wc("mergeHighlight",e)},updateHighlightMutation:function(e){return wc("updateHighlight",e)},articleReadingProgressMutation:function(e){return wc("articleReadingProgress",e)}}})})})})};c.render((0,Me.jsx)(xc,{}),document.getElementById("root"))})()})();
\ No newline at end of file
diff --git a/apple/OmnivoreKit/Sources/Views/ShareExtensionView.swift b/apple/OmnivoreKit/Sources/Views/ShareExtensionView.swift
index bf5186771..fb8d32fb7 100644
--- a/apple/OmnivoreKit/Sources/Views/ShareExtensionView.swift
+++ b/apple/OmnivoreKit/Sources/Views/ShareExtensionView.swift
@@ -37,36 +37,6 @@ public enum ShareExtensionStatus {
}
}
-struct CornerRadiusStyle: ViewModifier {
- var radius: CGFloat
- var corners: UIRectCorner
-
- struct CornerRadiusShape: Shape {
- var radius = CGFloat.infinity
- var corners = UIRectCorner.allCorners
-
- func path(in rect: CGRect) -> Path {
- let path = UIBezierPath(
- roundedRect: rect,
- byRoundingCorners: corners,
- cornerRadii: CGSize(width: radius, height: radius)
- )
- return Path(path.cgPath)
- }
- }
-
- func body(content: Content) -> some View {
- content
- .clipShape(CornerRadiusShape(radius: radius, corners: corners))
- }
-}
-
-extension View {
- func cornerRadius(_ radius: CGFloat, corners: UIRectCorner) -> some View {
- ModifiedContent(content: self, modifier: CornerRadiusStyle(radius: radius, corners: corners))
- }
-}
-
private extension SaveArticleError {
var displayMessage: String {
switch self {
@@ -197,9 +167,15 @@ public struct ShareExtensionChildView: View {
}
private func localImage(from url: URL) -> Image? {
- if let data = try? Data(contentsOf: url), let img = UIImage(data: data) {
- return Image(uiImage: img)
- }
+ #if os(iOS)
+ if let data = try? Data(contentsOf: url), let img = UIImage(data: data) {
+ return Image(uiImage: img)
+ }
+ #else
+ if let data = try? Data(contentsOf: url), let img = NSImage(data: data) {
+ return Image(nsImage: img)
+ }
+ #endif
return nil
}
diff --git a/packages/api/src/elastic/pages.ts b/packages/api/src/elastic/pages.ts
index 12318ef54..c83b92e74 100644
--- a/packages/api/src/elastic/pages.ts
+++ b/packages/api/src/elastic/pages.ts
@@ -48,8 +48,8 @@ const appendReadFilter = (body: SearchBody, filter: ReadFilter): void => {
case ReadFilter.UNREAD:
body.query.bool.filter.push({
range: {
- readingProgress: {
- gte: 98,
+ readingProgressPercent: {
+ lt: 98,
},
},
})
@@ -57,8 +57,8 @@ const appendReadFilter = (body: SearchBody, filter: ReadFilter): void => {
case ReadFilter.READ:
body.query.bool.filter.push({
range: {
- readingProgress: {
- lt: 98,
+ readingProgressPercent: {
+ gte: 98,
},
},
})
diff --git a/packages/api/src/elastic/types.ts b/packages/api/src/elastic/types.ts
index c05bde556..3a89c8da5 100644
--- a/packages/api/src/elastic/types.ts
+++ b/packages/api/src/elastic/types.ts
@@ -14,7 +14,7 @@ export interface SearchBody {
| { exists: { field: string } }
| {
range: {
- readingProgress: { gte: number } | { lt: number }
+ readingProgressPercent: { gte: number } | { lt: number }
}
}
| {
diff --git a/packages/api/test/resolvers/article.test.ts b/packages/api/test/resolvers/article.test.ts
index b4a8dc650..fe08eea37 100644
--- a/packages/api/test/resolvers/article.test.ts
+++ b/packages/api/test/resolvers/article.test.ts
@@ -1003,5 +1003,22 @@ describe('Article API', () => {
expect(res.body.data.search.edges[4].node.id).to.eq(highlights[0].id)
})
})
+
+ context('when is:unread is in the query', () => {
+ before(() => {
+ keyword = 'search is:unread'
+ })
+
+ it('should return unread articles in descending order', async () => {
+ const res = await graphqlRequest(query, authToken).expect(200)
+
+ expect(res.body.data.search.edges.length).to.eq(5)
+ expect(res.body.data.search.edges[0].node.id).to.eq(pages[4].id)
+ expect(res.body.data.search.edges[1].node.id).to.eq(pages[3].id)
+ expect(res.body.data.search.edges[2].node.id).to.eq(pages[2].id)
+ expect(res.body.data.search.edges[3].node.id).to.eq(pages[1].id)
+ expect(res.body.data.search.edges[4].node.id).to.eq(pages[0].id)
+ })
+ })
})
})
diff --git a/packages/appreader/src/index.jsx b/packages/appreader/src/index.jsx
index 424bb517e..b820478b8 100644
--- a/packages/appreader/src/index.jsx
+++ b/packages/appreader/src/index.jsx
@@ -44,6 +44,7 @@ const App = () => {
margin={window.margin}
maxWidthPercentage={window.maxWidthPercentage}
lineHeight={window.lineHeight}
+ highContrastFont={window.prefersHighContrastFont ?? true}
articleMutations={{
createHighlightMutation: (input) =>
mutation('createHighlight', input),
diff --git a/packages/web/components/templates/PrimaryLayout.tsx b/packages/web/components/templates/PrimaryLayout.tsx
index 88fc900e8..30b652ea3 100644
--- a/packages/web/components/templates/PrimaryLayout.tsx
+++ b/packages/web/components/templates/PrimaryLayout.tsx
@@ -82,8 +82,8 @@ export function PrimaryLayout(props: PrimaryLayoutProps): JSX.Element {
/>
diff --git a/packages/web/components/tokens/stitches.config.ts b/packages/web/components/tokens/stitches.config.ts
index a812ea226..a435ab952 100644
--- a/packages/web/components/tokens/stitches.config.ts
+++ b/packages/web/components/tokens/stitches.config.ts
@@ -230,6 +230,9 @@ export const lighterTheme = createTheme(ThemeId.Lighter, {})
// Apply global styles in here
export const globalStyles = globalCss({
+ 'body': {
+ backgroundColor: '$grayBase'
+ },
'*': {
'&:focus': {
outline: 'none',