diff --git a/CHANGE_LOG.md b/CHANGE_LOG.md index 080765a..d8eac19 100644 --- a/CHANGE_LOG.md +++ b/CHANGE_LOG.md @@ -4,15 +4,20 @@ +### 4.20.2 + +- add: `x-ul-package-version` header to report mobile SDK plugin versions +- fix: set default `cssString` in getBackgroundColor to prevent regex match failing + ### 4.20.1 fix: Added missing JS files ### 4.20.0 -add: Added the method dismissActiveSurvey to enable dismissing of an active survey -add: Added async methods for sending visitor attributes -chore: Update LICENSE +- add: Added the method dismissActiveSurvey to enable dismissing of an active survey +- add: Added async methods for sending visitor attributes +- chore: Update LICENSE ### 4.19.3 diff --git a/UserLeapKit.json b/UserLeapKit.json index 28d6c8b..20085e0 100644 --- a/UserLeapKit.json +++ b/UserLeapKit.json @@ -52,5 +52,6 @@ "4.19.1": "https://github.com/UserLeap/userleap-ios-sdk-releases/archive/4.19.1.zip", "4.19.2": "https://github.com/UserLeap/userleap-ios-sdk-releases/archive/4.19.2.zip", "4.20.0": "https://github.com/UserLeap/userleap-ios-sdk-releases/archive/4.20.0.zip", - "4.20.1": "https://github.com/UserLeap/userleap-ios-sdk-releases/archive/4.20.1.zip" + "4.20.1": "https://github.com/UserLeap/userleap-ios-sdk-releases/archive/4.20.1.zip", + "4.20.2": "https://github.com/UserLeap/userleap-ios-sdk-releases/archive/4.20.2.zip" } \ No newline at end of file diff --git a/UserLeapKit.podspec b/UserLeapKit.podspec index baa4f5e..768f999 100644 --- a/UserLeapKit.podspec +++ b/UserLeapKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "UserLeapKit" - s.version = "4.20.1" + s.version = "4.20.2" s.summary = "UserLeap surveys in iOS" s.description = <<-DESC Access the power of Sprig inside of your iOS applications. Track visitor progress and deliver surveys natively across diff --git a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Headers/UserLeapKit-Swift.h b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Headers/UserLeapKit-Swift.h index 938c79a..99b230d 100644 --- a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Headers/UserLeapKit-Swift.h +++ b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Headers/UserLeapKit-Swift.h @@ -1,6 +1,6 @@ #if 0 #elif defined(__arm64__) && __arm64__ -// Generated by Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) +// Generated by Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) #ifndef USERLEAPKIT_SWIFT_H #define USERLEAPKIT_SWIFT_H #pragma clang diagnostic push @@ -23,7 +23,6 @@ # include #endif -#pragma clang diagnostic ignored "-Wduplicate-method-match" #pragma clang diagnostic ignored "-Wauto-import" #if defined(__OBJC__) #include @@ -32,10 +31,24 @@ #include #include #include +#include +#include +#include +#include #else #include #include #include +#include +#endif +#if defined(__cplusplus) +#if __has_include() +# include +#else +# ifndef __ptrauth_swift_value_witness_function_pointer +# define __ptrauth_swift_value_witness_function_pointer(x) +# endif +#endif #endif #if !defined(SWIFT_TYPEDEFS) @@ -71,53 +84,66 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); # if __has_feature(objc_class_property) # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ # else -# define SWIFT_CLASS_PROPERTY(...) +# define SWIFT_CLASS_PROPERTY(...) # endif #endif - -#if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) -#else -# define SWIFT_RUNTIME_NAME(X) +#if !defined(SWIFT_RUNTIME_NAME) +# if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +# else +# define SWIFT_RUNTIME_NAME(X) +# endif #endif -#if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) -#else -# define SWIFT_COMPILE_NAME(X) +#if !defined(SWIFT_COMPILE_NAME) +# if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +# else +# define SWIFT_COMPILE_NAME(X) +# endif #endif -#if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) -#else -# define SWIFT_METHOD_FAMILY(X) +#if !defined(SWIFT_METHOD_FAMILY) +# if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +# else +# define SWIFT_METHOD_FAMILY(X) +# endif #endif -#if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) -#else -# define SWIFT_NOESCAPE +#if !defined(SWIFT_NOESCAPE) +# if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +# else +# define SWIFT_NOESCAPE +# endif #endif -#if __has_attribute(ns_consumed) -# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) -#else -# define SWIFT_RELEASES_ARGUMENT +#if !defined(SWIFT_RELEASES_ARGUMENT) +# if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +# else +# define SWIFT_RELEASES_ARGUMENT +# endif #endif -#if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) -#else -# define SWIFT_WARN_UNUSED_RESULT +#if !defined(SWIFT_WARN_UNUSED_RESULT) +# if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +# else +# define SWIFT_WARN_UNUSED_RESULT +# endif #endif -#if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) -#else -# define SWIFT_NORETURN +#if !defined(SWIFT_NORETURN) +# if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +# else +# define SWIFT_NORETURN +# endif #endif #if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA +# define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) # if __has_attribute(objc_subclassing_restricted) @@ -137,28 +163,25 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) # endif #endif - #if !defined(SWIFT_PROTOCOL) # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif - #if !defined(SWIFT_EXTENSION) # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif - #if !defined(OBJC_DESIGNATED_INITIALIZER) # if __has_attribute(objc_designated_initializer) # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) # else -# define OBJC_DESIGNATED_INITIALIZER +# define OBJC_DESIGNATED_INITIALIZER # endif #endif #if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# if __has_attribute(enum_extensibility) # define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) # else -# define SWIFT_ENUM_ATTR(_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) # endif #endif #if !defined(SWIFT_ENUM) @@ -187,14 +210,16 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #if !defined(SWIFT_DEPRECATED_MSG) # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif -#if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) -#else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#if !defined(SWIFT_DEPRECATED_OBJC) +# if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +# else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +# endif #endif #if defined(__OBJC__) #if !defined(IBSegueAction) -# define IBSegueAction +# define IBSegueAction #endif #endif #if !defined(SWIFT_EXTERN) @@ -207,26 +232,31 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #if !defined(SWIFT_CALL) # define SWIFT_CALL __attribute__((swiftcall)) #endif +#if !defined(SWIFT_INDIRECT_RESULT) +# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result)) +#endif +#if !defined(SWIFT_CONTEXT) +# define SWIFT_CONTEXT __attribute__((swift_context)) +#endif +#if !defined(SWIFT_ERROR_RESULT) +# define SWIFT_ERROR_RESULT __attribute__((swift_error_result)) +#endif #if defined(__cplusplus) -#if !defined(SWIFT_NOEXCEPT) # define SWIFT_NOEXCEPT noexcept -#endif #else -#if !defined(SWIFT_NOEXCEPT) # define SWIFT_NOEXCEPT #endif +#if defined(_WIN32) +#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) +# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport) #endif -#if defined(__cplusplus) -#if !defined(SWIFT_CXX_INT_DEFINED) -#define SWIFT_CXX_INT_DEFINED -namespace swift { -using Int = ptrdiff_t; -using UInt = size_t; -} +#else +#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) +# define SWIFT_IMPORT_STDLIB_SYMBOL #endif #endif #if defined(__OBJC__) -#if __has_feature(modules) +#if __has_feature(objc_modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" #endif @@ -455,7 +485,6 @@ SWIFT_PROTOCOL("_TtP11UserLeapKit20SprigPresentationAPI_") /// \param completion Invoked when survey questions have been fetched and it is about to present it /// - (void)presentSurveyWithId:(NSInteger)surveyId from:(UIViewController * _Nonnull)viewController fetchCompletion:(void (^ _Nullable)(void))fetchCompletion; -/// Dismisses the active survey. - (void)dismissActiveSurvey; @end @@ -475,18 +504,14 @@ typedef SWIFT_ENUM(NSInteger, SurveyState, open) { + + @interface UserLeap (SWIFT_EXTENSION(UserLeapKit)) - (NSArray * _Nonnull)integrateOptimizely:(NSObject * _Nonnull)optimizely userId:(NSString * _Nonnull)userId attributes:(NSDictionary * _Nonnull)attributes isOverride:(BOOL)isOverride; - (void)integrateOptimizelyExperiments:(NSArray * _Nonnull)experiments :(BOOL)isOverride; @end -@interface UserLeap (SWIFT_EXTENSION(UserLeapKit)) -- (void)registerEventListenerFor:(enum LifecycleEvent)eventType listener:(void (^ _Nonnull)(NSDictionary * _Nonnull))listener; -- (void)unregisterAllEventListenersFor:(enum LifecycleEvent)eventType; -@end - - @interface UserLeap (SWIFT_EXTENSION(UserLeapKit)) - (void)trackAndPresentWithEventName:(NSString * _Nonnull)eventName from:(UIViewController * _Nonnull)viewController SWIFT_DEPRECATED_MSG("Use trackAndPresent with EventPayload instead"); - (void)trackAndPresentWithEventName:(NSString * _Nonnull)eventName userId:(NSString * _Nullable)userId partnerAnonymousId:(NSString * _Nullable)partnerAnonymousId from:(UIViewController * _Nonnull)viewController SWIFT_DEPRECATED_MSG("Use trackAndPresent with EventPayload instead"); @@ -507,11 +532,16 @@ typedef SWIFT_ENUM(NSInteger, SurveyState, open) { /// \param viewController The view controller from which to present the survey. /// - (void)presentDebugSurveyFrom:(UIViewController * _Nonnull)viewController; -/// Dismisses the active survey. - (void)dismissActiveSurvey; @end +@interface UserLeap (SWIFT_EXTENSION(UserLeapKit)) +- (void)registerEventListenerFor:(enum LifecycleEvent)eventType listener:(void (^ _Nonnull)(NSDictionary * _Nonnull))listener; +- (void)unregisterAllEventListenersFor:(enum LifecycleEvent)eventType; +@end + + @interface UserLeap (SWIFT_EXTENSION(UserLeapKit)) /// The UserLeap singleton must be configured before use. Call this during app initialization. /// \param withEnvironment The environment ID for your application. You can find this in your UserLeap account. diff --git a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Info.plist b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Info.plist index a00fa20..a53d6d6 100644 Binary files a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Info.plist and b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Info.plist differ diff --git a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo index 06514a2..84cb77d 100644 Binary files a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo and b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo differ diff --git a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios.abi.json b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios.abi.json index 4010095..192db3c 100644 --- a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios.abi.json +++ b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios.abi.json @@ -14,6 +14,13 @@ "RawDocComment" ] }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "Foundation", @@ -45,6 +52,13 @@ "declKind": "Import", "moduleName": "UserLeapKit" }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "TypeDecl", "name": "SprigAPIResult", @@ -2537,6 +2551,20 @@ "declKind": "Import", "moduleName": "UserLeapKit" }, + { + "kind": "Import", + "name": "UIKit", + "printedName": "UIKit", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "Foundation", @@ -2554,6 +2582,20 @@ "RawDocComment" ] }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "Foundation", @@ -4148,10 +4190,7 @@ "name": "Foundation", "printedName": "Foundation", "declKind": "Import", - "moduleName": "UserLeapKit", - "declAttributes": [ - "RawDocComment" - ] + "moduleName": "UserLeapKit" }, { "kind": "Import", @@ -4160,6 +4199,41 @@ "declKind": "Import", "moduleName": "UserLeapKit" }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "AVKit", + "printedName": "AVKit", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "AVKit", + "printedName": "AVKit", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "UIKit", @@ -6066,7 +6140,7 @@ { "kind": "TypeFunc", "name": "Function", - "printedName": "([Swift.String : Swift.String]) -> ()", + "printedName": "([Swift.String : Any]) -> ()", "children": [ { "kind": "TypeNominal", @@ -6076,7 +6150,7 @@ { "kind": "TypeNominal", "name": "Dictionary", - "printedName": "[Swift.String : Swift.String]", + "printedName": "[Swift.String : Any]", "children": [ { "kind": "TypeNominal", @@ -6086,9 +6160,8 @@ }, { "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" + "name": "ProtocolComposition", + "printedName": "Any" } ], "usr": "s:SD" @@ -6098,7 +6171,7 @@ ], "declKind": "Func", "usr": "c:@CM@UserLeapKit@objc(cs)UserLeap(im)registerEventListenerFor:listener:", - "mangledName": "$s11UserLeapKit0aB0C21registerEventListener3for8listeneryAA09LifecycleE0O_ySDyS2SGctF", + "mangledName": "$s11UserLeapKit0aB0C21registerEventListener3for8listeneryAA09LifecycleE0O_ySDySSypGctF", "moduleName": "UserLeapKit", "objc_name": "registerEventListenerFor:listener:", "declAttributes": [ @@ -6244,6 +6317,27 @@ "declKind": "Import", "moduleName": "UserLeapKit" }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "AVKit", + "printedName": "AVKit", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "Foundation", @@ -6254,6 +6348,27 @@ "RawDocComment" ] }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "AVKit", + "printedName": "AVKit", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "Foundation", @@ -6280,6 +6395,20 @@ "declAttributes": [ "RawDocComment" ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "AVKit", + "printedName": "AVKit", + "declKind": "Import", + "moduleName": "UserLeapKit" } ], "json_format_version": 8 @@ -6313,6 +6442,153 @@ "length": 33, "value": "\"com.userleap.sdk.threadSafeBool\"" }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/ThreadSafeCollections.swift", + "kind": "BooleanLiteral", + "offset": 1358, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "BooleanLiteral", + "offset": 753, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "IntegerLiteral", + "offset": 826, + "length": 3, + "value": "100" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "IntegerLiteral", + "offset": 832, + "length": 4, + "value": "1024" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "IntegerLiteral", + "offset": 839, + "length": 4, + "value": "1024" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "FloatLiteral", + "offset": 1526, + "length": 4, + "value": "30.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "IntegerLiteral", + "offset": 1658, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "IntegerLiteral", + "offset": 1681, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "FloatLiteral", + "offset": 1994, + "length": 3, + "value": "5.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 3472, + "length": 53, + "value": "\"[Session Replay] Failure fetching available storage\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 4047, + "length": 47, + "value": "\"Could not convert systemFreeSize to NSNumber.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 4285, + "length": 54, + "value": "\"Could not retrieve the documentDirectory attributes.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 4518, + "length": 47, + "value": "\"Could not retrieve the documentDirectory URL.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "BooleanLiteral", + "offset": 4791, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "BooleanLiteral", + "offset": 5446, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "FloatLiteral", + "offset": 5896, + "length": 3, + "value": "1.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "BooleanLiteral", + "offset": 5947, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 6838, + "length": 45, + "value": "\"[Session Replay] Touch phase was not caught\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 6917, + "length": 38, + "value": "\"Touch phase \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 6938, + "length": 3, + "value": "\" was not caught.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "BooleanLiteral", + "offset": 8063, + "length": 5, + "value": "false" + }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", "kind": "IntegerLiteral", @@ -6364,521 +6640,4119 @@ }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", - "kind": "StringLiteral", - "offset": 345, - "length": 25, - "value": "\"UserLeapKit.SprigSurveyViewController\"" + "kind": "BooleanLiteral", + "offset": 2036, + "length": 5, + "value": "false" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", "kind": "IntegerLiteral", - "offset": 396, - "length": 7, - "value": "1" + "offset": 2609, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", "kind": "IntegerLiteral", - "offset": 396, - "length": 7, - "value": "1" + "offset": 3088, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", - "kind": "StringLiteral", - "offset": 285, - "length": 14, - "value": "\"UserLeapKit.SprigAPIResult\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 3374, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Constant.swift", - "kind": "IntegerLiteral", - "offset": 186, - "length": 3, - "value": "150" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 3488, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "FloatLiteral", + "offset": 3564, + "length": 3, + "value": "0.2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 3744, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "FloatLiteral", + "offset": 3819, + "length": 3, + "value": "0.4" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 3854, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "FloatLiteral", + "offset": 3904, + "length": 3, + "value": "0.7" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "FloatLiteral", + "offset": 3955, + "length": 3, + "value": "0.4" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 4441, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 4478, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 4716, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 4883, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 4977, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 5326, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 5372, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 6011, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "StringLiteral", + "offset": 345, + "length": 25, + "value": "\"UserLeapKit.SprigSurveyViewController\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 7682, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 7761, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 7806, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 7845, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 8084, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 8774, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 8783, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 8818, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 9111, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Retryable.swift", + "kind": "BooleanLiteral", + "offset": 593, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Retryable.swift", + "kind": "IntegerLiteral", + "offset": 732, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Retryable.swift", + "kind": "BooleanLiteral", + "offset": 828, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Retryable.swift", + "kind": "BooleanLiteral", + "offset": 895, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", + "kind": "IntegerLiteral", + "offset": 396, + "length": 7, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", + "kind": "IntegerLiteral", + "offset": 396, + "length": 7, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", + "kind": "StringLiteral", + "offset": 285, + "length": 14, + "value": "\"UserLeapKit.SprigAPIResult\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "IntegerLiteral", + "offset": 186, + "length": 3, + "value": "150" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "IntegerLiteral", + "offset": 304, + "length": 3, + "value": "100" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 371, + "length": 11, + "value": "\"SGReplays\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 413, + "length": 16, + "value": "\"SGUploadStates\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 454, + "length": 10, + "value": "\"SGEvents\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 514, + "length": 8, + "value": "\"before\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 540, + "length": 7, + "value": "\"after\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 574, + "length": 16, + "value": "\"beforeAndAfter\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 514, + "length": 8, + "value": "\"before\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 540, + "length": 7, + "value": "\"after\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 574, + "length": 16, + "value": "\"beforeAndAfter\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "kind": "StringLiteral", + "offset": 7544, + "length": 22, + "value": "\"UserLeapKit.SGOptimizelyExperiment\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "kind": "IntegerLiteral", + "offset": 9155, + "length": 5, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "kind": "IntegerLiteral", + "offset": 9216, + "length": 8, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "kind": "IntegerLiteral", + "offset": 9155, + "length": 5, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "kind": "IntegerLiteral", + "offset": 9216, + "length": 8, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SPTouchWindow.swift", + "kind": "FloatLiteral", + "offset": 218, + "length": 3, + "value": "0.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SPTouchWindow.swift", + "kind": "Array", + "offset": 672, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SPTouchWindow.swift", + "kind": "BooleanLiteral", + "offset": 818, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SPTouchWindow.swift", + "kind": "BooleanLiteral", + "offset": 1313, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1047, + "length": 19, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1058, + "length": 1, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1065, + "length": 1, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1296, + "length": 6, + "value": "\"POST\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1901, + "length": 36, + "value": "\"Error making postData network call\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1971, + "length": 91, + "value": "\"Error received making network call. Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2052, + "length": 8, + "value": "\"(none)\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2061, + "length": 51, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 2732, + "length": 3, + "value": "200" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 2746, + "length": 3, + "value": "300" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2781, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 2798, + "length": 3, + "value": "401" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 2803, + "length": 3, + "value": "403" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2840, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 2857, + "length": 3, + "value": "404" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2892, + "length": 14, + "value": "\"Received 404\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2955, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3232, + "length": 24, + "value": "\"x-ul-mobile-user-agent\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3295, + "length": 25, + "value": "\"x-ul-mobile-sdk-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3356, + "length": 18, + "value": "\"x-ul-app-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3410, + "length": 17, + "value": "\"x-ul-os-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3462, + "length": 18, + "value": "\"x-ul-environment\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3513, + "length": 9, + "value": "\"unknown\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3536, + "length": 17, + "value": "\"accept-language\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3728, + "length": 26, + "value": "\"x-ul-installation-method\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "FloatLiteral", + "offset": 4511, + "length": 3, + "value": "1.1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 4763, + "length": 1, + "value": "5" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "FloatLiteral", + "offset": 4793, + "length": 3, + "value": "0.1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 4826, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 4830, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 4835, + "length": 9, + "value": "\";q=\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 4843, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 4874, + "length": 4, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 429, + "length": 8, + "value": "\"action\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 463, + "length": 9, + "value": "\"message\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 496, + "length": 5, + "value": "\"err\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 524, + "length": 6, + "value": "\"meta\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 557, + "length": 5, + "value": "\"vid\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 594, + "length": 7, + "value": "\"envId\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 626, + "length": 8, + "value": "\"method\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 670, + "length": 20, + "value": "\"additional.details\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 713, + "length": 6, + "value": "\"file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 743, + "length": 7, + "value": "\"stack\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 773, + "length": 6, + "value": "\"tags\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 808, + "length": 13, + "value": "\"device.name\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 855, + "length": 18, + "value": "\"device.OSVersion\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 1280, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 1487, + "length": 10, + "value": "\"(no vid)\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 1548, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2319, + "length": 12, + "value": "\"x-ul-error\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2332, + "length": 28, + "value": "\"userleap-\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2353, + "length": 1, + "value": "\"-error\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2735, + "length": 20, + "value": "\"An error occurred:\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2794, + "length": 33, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2809, + "length": 1, + "value": "\".\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2826, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2853, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2892, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2924, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 276, + "length": 31, + "value": "\"getOptimizelyConfigWithError:\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 362, + "length": 16, + "value": "\"experimentsMap\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 421, + "length": 4, + "value": "\"id\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 498, + "length": 59, + "value": "\"getVariationKeyWithExperimentKey:userId:attributes:error:\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 626, + "length": 10, + "value": "\"allFlags\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 702, + "length": 41, + "value": "\"jsonVariationDetailForKey:defaultValue:\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 798, + "length": 16, + "value": "\"variationIndex\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "Array", + "offset": 2197, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 3389, + "length": 37, + "value": "\"Error caught in integrateOptimizely\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "Array", + "offset": 3556, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 3746, + "length": 13, + "value": "\"experiments\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "Dictionary", + "offset": 4120, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 4749, + "length": 74, + "value": "\"[Warning] Sprig: LaunchDarkly integration failed to get variation detail\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 4900, + "length": 67, + "value": "\"[Warning] Sprig: LaunchDarkly integration failed to get all flags\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 5016, + "length": 78, + "value": "\"[Warning] Sprig: LaunchDarkly integration failed to respond to allFlags call\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 693, + "length": 19, + "value": "\"UploadStates.json\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 745, + "length": 1, + "value": "3" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 1839, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 2067, + "length": 57, + "value": "\"Error adding new SGReplayUploadState model to data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 2324, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 3508, + "length": 69, + "value": "\"Could not increment retry for SGReplayUploadState item in data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 3804, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 4063, + "length": 1, + "value": "3" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 4101, + "length": 1, + "value": "5" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 5241, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 5726, + "length": 58, + "value": "\"Could not remove SGReplayUploadState item from data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 6075, + "length": 58, + "value": "\"Failed to remove finished video file: file did not exist\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 6400, + "length": 38, + "value": "\"Failed to remove finished video file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 6472, + "length": 70, + "value": "\"Failed to remove video \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 6511, + "length": 4, + "value": "\" from file system. Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 1428, + "length": 32, + "value": "\"com.sprig.DataFileServiceQueue\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "Array", + "offset": 2250, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 2957, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 4413, + "length": 40, + "value": "\"Error fetching and decoding file data.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 4487, + "length": 62, + "value": "\"Failed to fetch and decode for file \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 4535, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 5048, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 5165, + "length": 38, + "value": "\"Error encoding and saving file data.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 5237, + "length": 61, + "value": "\"Failed to encode and save for file \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 5284, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 5397, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "IntegerLiteral", + "offset": 5598, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 5626, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 5786, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 6291, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "Array", + "offset": 6485, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 6672, + "length": 40, + "value": "\"Error saving empty array for data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 6746, + "length": 63, + "value": "\"Error saving empty array for data file for the URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 6807, + "length": 1, + "value": "\".\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 7058, + "length": 40, + "value": "\"Error creating directory for data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 7132, + "length": 65, + "value": "\"Error creating the directory for the URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 7183, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/EventPayload.swift", + "kind": "StringLiteral", + "offset": 173, + "length": 12, + "value": "\"UserLeapKit.EventPayload\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 216, + "length": 16, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 242, + "length": 12, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 264, + "length": 16, + "value": "3" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 290, + "length": 17, + "value": "4" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 317, + "length": 15, + "value": "5" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 342, + "length": 14, + "value": "6" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 366, + "length": 15, + "value": "7" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 391, + "length": 12, + "value": "8" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 413, + "length": 13, + "value": "9" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 526, + "length": 10, + "value": "\"sdkReady\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 580, + "length": 18, + "value": "\"visitorIdUpdated\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 638, + "length": 11, + "value": "\"setHeight\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 693, + "length": 18, + "value": "\"surveyDimensions\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 756, + "length": 19, + "value": "\"surveyWillPresent\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 818, + "length": 17, + "value": "\"surveyPresented\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 877, + "length": 16, + "value": "\"surveyAppeared\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 936, + "length": 19, + "value": "\"surveyWillDismiss\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 995, + "length": 14, + "value": "\"surveyClosed\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1050, + "length": 15, + "value": "\"replayCapture\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1193, + "length": 10, + "value": "\"sdkReady\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1247, + "length": 18, + "value": "\"visitorIdUpdated\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1317, + "length": 11, + "value": "\"setHeight\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1376, + "length": 18, + "value": "\"surveyDimensions\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1446, + "length": 19, + "value": "\"surveyWillPresent\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1518, + "length": 17, + "value": "\"surveyPresented\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1586, + "length": 16, + "value": "\"surveyAppeared\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1652, + "length": 19, + "value": "\"surveyWillDismiss\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1722, + "length": 14, + "value": "\"surveyClosed\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1784, + "length": 15, + "value": "\"replayCapture\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 216, + "length": 16, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 242, + "length": 12, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 264, + "length": 16, + "value": "3" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 290, + "length": 17, + "value": "4" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 317, + "length": 15, + "value": "5" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 342, + "length": 14, + "value": "6" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 366, + "length": 15, + "value": "7" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 391, + "length": 12, + "value": "8" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 413, + "length": 13, + "value": "9" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Extensions\/Date+SG.swift", + "kind": "IntegerLiteral", + "offset": 283, + "length": 5, + "value": "1000" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Extensions\/Date+SG.swift", + "kind": "StringLiteral", + "offset": 424, + "length": 13, + "value": "\"en_US_POSIX\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Extensions\/Date+SG.swift", + "kind": "StringLiteral", + "offset": 468, + "length": 29, + "value": "\"yyyy-MM-dd HH:mm:ss '+'SSSS\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Extensions\/Date+SG.swift", + "kind": "StringLiteral", + "offset": 529, + "length": 4, + "value": "\"%@\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIView+AutoLayout.swift", + "kind": "BooleanLiteral", + "offset": 318, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIView+AutoLayout.swift", + "kind": "BooleanLiteral", + "offset": 423, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIView+AutoLayout.swift", + "kind": "BooleanLiteral", + "offset": 515, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIView+AutoLayout.swift", + "kind": "BooleanLiteral", + "offset": 617, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIView+AutoLayout.swift", + "kind": "BooleanLiteral", + "offset": 858, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 2664, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 2682, + "length": 23, + "value": "\"(no URL on navAction)\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 2917, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 2990, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "Dictionary", + "offset": 3119, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 3380, + "length": 72, + "value": "\"Sprig.mobileHeaderJSON = '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 3449, + "length": 4, + "value": "\"';\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 3612, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "Array", + "offset": 3696, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 3740, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4132, + "length": 24, + "value": "\"x-ul-mobile-user-agent\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4195, + "length": 25, + "value": "\"x-ul-mobile-sdk-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4256, + "length": 18, + "value": "\"x-ul-app-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4310, + "length": 17, + "value": "\"x-ul-os-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4362, + "length": 18, + "value": "\"x-ul-environment\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4397, + "length": 9, + "value": "\"unknown\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4420, + "length": 17, + "value": "\"accept-language\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "FloatLiteral", + "offset": 4995, + "length": 3, + "value": "1.1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 5247, + "length": 1, + "value": "5" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "FloatLiteral", + "offset": 5277, + "length": 3, + "value": "0.1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 5310, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 5314, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 5319, + "length": 9, + "value": "\";q=\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 5327, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 5358, + "length": 4, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8102, + "length": 26, + "value": "\"x-ul-installation-method\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8152, + "length": 26, + "value": "\"x-ul-installation-method\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8274, + "length": 22, + "value": "\"x-ul-package-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8320, + "length": 22, + "value": "\"x-ul-package-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 8568, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 8816, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8877, + "length": 20, + "value": "\"sprigWebController\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8988, + "length": 74, + "value": "\"configure('\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9014, + "length": 4, + "value": "\"', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9058, + "length": 60, + "value": "\"');\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 9113, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9430, + "length": 28, + "value": "\"Sprig.locale = '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9456, + "length": 3, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9547, + "length": 39, + "value": "\"Sprig('setEmail', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9583, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10143, + "length": 69, + "value": "\"Sprig('setAttributes', \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10210, + "length": 1, + "value": "\")\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10464, + "length": 122, + "value": "\"Sprig.mobileIdentifyAndSetAttributes(\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10518, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10539, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10584, + "length": 1, + "value": "\")\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10940, + "length": 122, + "value": "\"Sprig.mobileIdentifyAndSetAttributes(\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10994, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11015, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11060, + "length": 1, + "value": "\")\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11349, + "length": 72, + "value": "\"Sprig('removeAttributes', \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11419, + "length": 1, + "value": "\")\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11510, + "length": 37, + "value": "\"Sprig('setUserId', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11544, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11640, + "length": 49, + "value": "\"Sprig('setPartnerAnonymousId', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11686, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11774, + "length": 41, + "value": "\"Sprig('setPreviewKey', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11812, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11873, + "length": 21, + "value": "\"Sprig('logoutUser')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12087, + "length": 11, + "value": "\"undefined\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12163, + "length": 13, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12174, + "length": 2, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12228, + "length": 11, + "value": "\"undefined\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12338, + "length": 25, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12361, + "length": 2, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12407, + "length": 11, + "value": "\"undefined\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12924, + "length": 131, + "value": "\"Sprig.mobileTrackEvent('\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12961, + "length": 78, + "value": "\"', \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12982, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13013, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13036, + "length": 1, + "value": "\", '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13052, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13159, + "length": 57, + "value": "\"Sprig.mobileDisplaySurvey(\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13197, + "length": 1, + "value": "\", '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13213, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13287, + "length": 42, + "value": "\"Sprig.dismissActiveSurvey('close.click')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13432, + "length": 56, + "value": "\"Sprig('integrateOptimizely', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13470, + "length": 19, + "value": "\"', \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13486, + "length": 1, + "value": "\")\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13614, + "length": 98, + "value": "\"Sprig('importLaunchDarklyJSONMapping', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13709, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14586, + "length": 11, + "value": "\"undefined\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14661, + "length": 13, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14672, + "length": 2, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14726, + "length": 11, + "value": "\"undefined\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14836, + "length": 25, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14859, + "length": 2, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 16645, + "length": 7, + "value": "\"ready\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 16843, + "length": 166, + "value": "\"window.webkit.messageHandlers.sprigWebController.postMessage({ type: 'loadShouldDismissOnPageChange', dismissOnPageChange:`${Sprig._config.dismissOnPageChange}` });\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 17255, + "length": 244, + "value": "\" Sprig._completeSessionReplay({\n surveyId: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 17347, + "length": 1, + "value": "\",\n responseGroupUuid: \"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 17410, + "length": 1, + "value": "\"\",\n eventDigest: [\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 17463, + "length": 1, + "value": "\"]\n })\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 17831, + "length": 6, + "value": "\"type\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18013, + "length": 6, + "value": "\"type\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18047, + "length": 31, + "value": "\"loadShouldDismissOnPageChange\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18126, + "length": 21, + "value": "\"dismissOnPageChange\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18184, + "length": 6, + "value": "\"true\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 18243, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 18319, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18406, + "length": 16, + "value": "\"surveyCallback\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18464, + "length": 12, + "value": "\"callbackId\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18507, + "length": 13, + "value": "\"surveyState\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 18739, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19180, + "length": 19, + "value": "\"surveyWillDismiss\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19256, + "length": 18, + "value": "\"visitorIdUpdated\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19309, + "length": 11, + "value": "\"visitorId\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19336, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19413, + "length": 15, + "value": "\"replayCapture\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19533, + "length": 31, + "value": "\"generateVideoUploadUrlPayload\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19632, + "length": 10, + "value": "\"surveyId\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19765, + "length": 18, + "value": "\"responseGroupUid\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19845, + "length": 9, + "value": "\"seconds\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 19959, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 20012, + "length": 12, + "value": "\"replayType\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 20277, + "length": 40, + "value": "\"Problem parsing replayCapture response\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 20351, + "length": 15, + "value": "\"Body: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 20365, + "length": 51, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 21263, + "length": 10, + "value": "\"sdkReady\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 21408, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 21692, + "length": 21, + "value": "\"dismissOnPageChange\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 21924, + "length": 51, + "value": "\"Failed to fire dismissOnPageChange event \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 21974, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 22056, + "length": 24, + "value": "\"dismiss.on.page.change\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 22478, + "length": 32, + "value": "\"maxMobileReplayDurationSeconds\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 22647, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 23310, + "length": 13, + "value": "\"cardBgColor\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 23339, + "length": 9, + "value": "\"#ffffff\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 23634, + "length": 11, + "value": "\"setHeight\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 23717, + "length": 8, + "value": "\"height\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 23741, + "length": 5, + "value": "\"400\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 23964, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 24324, + "length": 6, + "value": "\"type\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 609, + "length": 19, + "value": "\"UIBackgroundModes\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 680, + "length": 7, + "value": "\"fetch\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 767, + "length": 26, + "value": "\"com.userleap.UserLeapKit\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "BooleanLiteral", + "offset": 852, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "BooleanLiteral", + "offset": 904, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 1949, + "length": 5, + "value": "\"PUT\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 2081, + "length": 61, + "value": "\"Error: queueUploadTask was passed a URL that does not exist\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 2176, + "length": 74, + "value": "\"queueUploadTask was passed the URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 2227, + "length": 5, + "value": "\" which does not exist.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 3118, + "length": 61, + "value": "\"Error: urlSession for replay upload completed with an error\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 3213, + "length": 67, + "value": "\"urlSession for replay upload completed with an error. Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadProcessManager.swift", + "kind": "Array", + "offset": 2104, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadProcessManager.swift", + "kind": "StringLiteral", + "offset": 3056, + "length": 27, + "value": "\"Error saving touch event.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "BooleanLiteral", + "offset": 400, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 735, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 886, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "BooleanLiteral", + "offset": 1106, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 1327, + "length": 13, + "value": "\"sprig_touch\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 1401, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 1476, + "length": 66, + "value": "\"{ type: \"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 1500, + "length": 1, + "value": "\"\", timestamp: \"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 1535, + "length": 1, + "value": "\"\" }, \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "IntegerLiteral", + "offset": 1889, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "IntegerLiteral", + "offset": 1938, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "IntegerLiteral", + "offset": 1987, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 317, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "Dictionary", + "offset": 713, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 763, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "Dictionary", + "offset": 857, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 1386, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "StringLiteral", + "offset": 1442, + "length": 17, + "value": "\"sprigPreviewKey\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "Dictionary", + "offset": 2086, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "StringLiteral", + "offset": 2397, + "length": 26, + "value": "\"x-ul-installation-method\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 2901, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "StringLiteral", + "offset": 3574, + "length": 29, + "value": "\"Received low memory warning\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 11366, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 11411, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 11459, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 11507, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 11548, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 12729, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 13841, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 16524, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 16590, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 16649, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "Array", + "offset": 17152, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "StringLiteral", + "offset": 338, + "length": 3, + "value": "\"#\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "StringLiteral", + "offset": 349, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 380, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 623, + "length": 1, + "value": "3" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 731, + "length": 5, + "value": "0xF00" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 741, + "length": 1, + "value": "8" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 746, + "length": 4, + "value": "15.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 790, + "length": 5, + "value": "0x0F0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 800, + "length": 1, + "value": "4" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 805, + "length": 4, + "value": "15.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 847, + "length": 5, + "value": "0x00F" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 856, + "length": 4, + "value": "15.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 905, + "length": 1, + "value": "6" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 1014, + "length": 8, + "value": "0xFF0000" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 1027, + "length": 2, + "value": "16" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 1033, + "length": 5, + "value": "255.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 1078, + "length": 8, + "value": "0x00FF00" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 1091, + "length": 1, + "value": "8" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 1096, + "length": 5, + "value": "255.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 1139, + "length": 8, + "value": "0x0000FF" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 1151, + "length": 5, + "value": "255.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 1319, + "length": 3, + "value": "1.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Timestamp.swift", + "kind": "BooleanLiteral", + "offset": 489, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Timestamp.swift", + "kind": "StringLiteral", + "offset": 781, + "length": 34, + "value": "\"Error removing items before time\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "kind": "StringLiteral", + "offset": 114, + "length": 44, + "value": "\"result.message.error.networkAccessDisabled\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "kind": "StringLiteral", + "offset": 221, + "length": 52, + "value": "\"result.message.error.vistorAttributeTypeNotAllowed\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "kind": "StringLiteral", + "offset": 405, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "kind": "StringLiteral", + "offset": 114, + "length": 44, + "value": "\"result.message.error.networkAccessDisabled\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "kind": "StringLiteral", + "offset": 221, + "length": 52, + "value": "\"result.message.error.vistorAttributeTypeNotAllowed\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGEventManager.swift", + "kind": "StringLiteral", + "offset": 570, + "length": 13, + "value": "\"Events.json\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGEventManager.swift", + "kind": "StringLiteral", + "offset": 1026, + "length": 48, + "value": "\"Error adding new SGTouchEventInfo to data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGEventManager.swift", + "kind": "StringLiteral", + "offset": 1856, + "length": 48, + "value": "\"Error adding new SGTouchEventInfo to data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 82, + "length": 10, + "value": "\"api_root\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 122, + "length": 21, + "value": "\"endpoint_post_error\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 174, + "length": 22, + "value": "\"endpoint_post_upload\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 82, + "length": 10, + "value": "\"api_root\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 122, + "length": 21, + "value": "\"endpoint_post_error\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 174, + "length": 22, + "value": "\"endpoint_post_upload\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "Dictionary", + "offset": 309, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 405, + "length": 14, + "value": "\"SGProperties\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 436, + "length": 7, + "value": "\"plist\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 832, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 483, + "length": 6, + "value": "\"FINE\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 506, + "length": 6, + "value": "\"INFO\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 530, + "length": 7, + "value": "\"DEBUG\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 555, + "length": 7, + "value": "\"ERROR\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 579, + "length": 6, + "value": "\"NONE\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 712, + "length": 20, + "value": "\"USERLEAP_LOG_LEVEL\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "IntegerLiteral", + "offset": 925, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "BooleanLiteral", + "offset": 1003, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 483, + "length": 6, + "value": "\"FINE\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 506, + "length": 6, + "value": "\"INFO\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 530, + "length": 7, + "value": "\"DEBUG\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 555, + "length": 7, + "value": "\"ERROR\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 579, + "length": 6, + "value": "\"NONE\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "BooleanLiteral", + "offset": 1295, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 1574, + "length": 4, + "value": "\"\t\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 1630, + "length": 3, + "value": "\" \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 1647, + "length": 4, + "value": "\"\n\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "Array", + "offset": 1801, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "IntegerLiteral", + "offset": 1832, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "BooleanLiteral", + "offset": 2661, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 2957, + "length": 25, + "value": "\"TRACE \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 2981, + "length": 4, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 2984, + "length": 45, + "value": "\"elapsed: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 3028, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 3217, + "length": 19, + "value": "\"Unfinished Trace:\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "FloatLiteral", + "offset": 78, + "length": 5, + "value": "120.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 131, + "length": 2, + "value": "10" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 168, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "FloatLiteral", + "offset": 206, + "length": 3, + "value": "2.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 259, + "length": 3, + "value": "600" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 1272, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 1345, + "length": 17, + "value": "\"session-replay-\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 1388, + "length": 6, + "value": "\".mp4\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 1457, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "Array", + "offset": 1729, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 1758, + "length": 1, + "value": "6" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "Array", + "offset": 1826, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 1983, + "length": 35, + "value": "\"com.userleap.frameProcessingQueue\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 2304, + "length": 45, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 2322, + "length": 1, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 2344, + "length": 1, + "value": "\".mp4\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 3996, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 4087, + "length": 45, + "value": "\"[Session Replay] Could not create directory\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 4166, + "length": 69, + "value": "\"Could not create directory for the URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 4221, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 5311, + "length": 65, + "value": "\"[Session Replay] There was a problem cleaning partial MP4 files\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 5409, + "length": 42, + "value": "\"Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 5450, + "length": 51, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 6415, + "length": 40, + "value": "\"[Session Replay] Could not remove file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 6489, + "length": 51, + "value": "\"Could not remove file URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 6526, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 7144, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 7202, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 7693, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 7735, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 8145, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 8166, + "length": 2, + "value": "60" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 8292, + "length": 2, + "value": "60" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 8773, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 9038, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 9278, + "length": 45, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 9296, + "length": 1, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 9318, + "length": 1, + "value": "\".mp4\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 10201, + "length": 46, + "value": "\"[Session Replay] Could not initialize writer\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 10281, + "length": 68, + "value": "\"Could not initialize writer for URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 10335, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 10930, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Constant.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 304, - "length": 3, - "value": "100" + "offset": 11350, + "length": 1, + "value": "8" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 11490, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 11496, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 11639, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 7643, - "length": 22, - "value": "\"UserLeapKit.SGOptimizelyExperiment\"" + "offset": 11731, + "length": 48, + "value": "\"[Session Replay] Could not create pixel buffer\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 9254, - "length": 5, + "offset": 12110, + "length": 1, "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 9315, - "length": 8, - "value": "2" + "offset": 12254, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 9254, - "length": 5, + "offset": 12353, + "length": 1, "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 9315, - "length": 8, - "value": "2" + "offset": 12666, + "length": 1, + "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 13669, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 276, - "length": 31, - "value": "\"getOptimizelyConfigWithError:\"" + "offset": 15652, + "length": 47, + "value": "\"[Session Replay] Could not create video track\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 362, - "length": 16, - "value": "\"experimentsMap\"" + "offset": 15733, + "length": 100, + "value": "\"Could not create video track with \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 421, - "length": 4, - "value": "\"id\"" + "offset": 15786, + "length": 5, + "value": "\" input URLs and an output URL of \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 498, - "length": 59, - "value": "\"getVariationKeyWithExperimentKey:userId:attributes:error:\"" + "offset": 15831, + "length": 1, + "value": "\".\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 15907, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 626, - "length": 10, - "value": "\"allFlags\"" + "offset": 17313, + "length": 65, + "value": "\"[Session Replay] Could not insertTimeRange while joining videos\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 702, - "length": 41, - "value": "\"jsonVariationDetailForKey:defaultValue:\"" + "offset": 17412, + "length": 105, + "value": "\"Could not join videos with \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 798, - "length": 16, - "value": "\"variationIndex\"" + "offset": 17458, + "length": 5, + "value": "\" input URLs and an output URL of \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/EventPayload.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 173, - "length": 12, - "value": "\"UserLeapKit.EventPayload\"" + "offset": 17503, + "length": 1, + "value": "\". Error was: \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 17624, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 216, - "length": 16, + "offset": 17901, + "length": 1, "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 242, - "length": 12, - "value": "2" + "offset": 17915, + "length": 2, + "value": "30" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 264, - "length": 16, - "value": "3" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 18123, + "length": 76, + "value": "\"[Session Replay] VideoComposition renderSize was zero while joining videos\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 290, - "length": 17, - "value": "4" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 18209, + "length": 60, + "value": "\"VideoComposition renderSize was zero while joining videos.\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 317, - "length": 15, - "value": "5" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 18367, + "length": 5, + "value": "false" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 342, - "length": 14, - "value": "6" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 18626, + "length": 77, + "value": "\"[Session Replay] Could not create AVAssetExportSession while joining videos\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 366, - "length": 15, - "value": "7" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 18713, + "length": 61, + "value": "\"Could not create AVAssetExportSession while joining videos.\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 391, - "length": 12, - "value": "8" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 18872, + "length": 5, + "value": "false" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 413, - "length": 13, - "value": "9" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 20331, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 216, - "length": 16, - "value": "1" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 21179, + "length": 25, + "value": "\"FINISHED-\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 242, - "length": 12, - "value": "2" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 21199, + "length": 1, + "value": "\".mp4\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 264, - "length": 16, - "value": "3" + "offset": 22485, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 290, - "length": 17, - "value": "4" + "offset": 22568, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 317, - "length": 15, - "value": "5" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "Array", + "offset": 22753, + "length": 2, + "value": "[]" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 342, - "length": 14, - "value": "6" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "Array", + "offset": 22790, + "length": 2, + "value": "[]" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 366, - "length": 15, - "value": "7" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 656, + "length": 59, + "value": "\"Problem converting payload to data in fetchMediaUploadUrl\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 749, + "length": 25, + "value": "\"Payload: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 773, + "length": 51, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", "kind": "IntegerLiteral", - "offset": 391, - "length": 12, - "value": "8" + "offset": 1142, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", "kind": "IntegerLiteral", - "offset": 413, - "length": 13, - "value": "9" + "offset": 1361, + "length": 1, + "value": "3" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", - "kind": "BooleanLiteral", - "offset": 2765, - "length": 5, - "value": "false" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "IntegerLiteral", + "offset": 1399, + "length": 1, + "value": "5" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", - "kind": "BooleanLiteral", - "offset": 2838, - "length": 4, - "value": "true" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "IntegerLiteral", + "offset": 1798, + "length": 1, + "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", "kind": "Dictionary", - "offset": 2967, + "offset": 2303, "length": 3, "value": "[]" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", "kind": "StringLiteral", - "offset": 3228, - "length": 63, - "value": "\"Sprig.mobileHeaderJSON = '\"" + "offset": 2702, + "length": 8, + "value": "\"upload\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 2713, + "length": 5, + "value": "\"url\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 2861, + "length": 101, + "value": "\"Error converting JSON response to dictionary while fetching media upload URL in fetchMediaUploadURL\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 2996, + "length": 121, + "value": "\"Payload: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 3047, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 3050, + "length": 4, + "value": "\" JSON Response: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 3113, + "length": 2, + "value": "\"\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", "kind": "StringLiteral", - "offset": 3288, - "length": 4, - "value": "\"';\"" + "offset": 3116, + "length": 51, + "value": "\"\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "BooleanLiteral", - "offset": 3519, + "offset": 1096, "length": 5, "value": "false" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", - "kind": "Array", - "offset": 3603, - "length": 2, - "value": "[]" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 1154, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 1190, + "length": 3, + "value": "100" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "BooleanLiteral", - "offset": 3647, + "offset": 1358, "length": 4, "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", - "kind": "Dictionary", - "offset": 666, - "length": 3, - "value": "[]" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "StringLiteral", + "offset": 1539, + "length": 15, + "value": "\"surveyWebView\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "BooleanLiteral", - "offset": 716, - "length": 5, - "value": "false" + "offset": 1785, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", - "kind": "Dictionary", - "offset": 813, - "length": 3, - "value": "[]" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 1824, + "length": 2, + "value": "14" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "BooleanLiteral", - "offset": 1172, + "offset": 1965, "length": 5, "value": "false" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 2031, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 1228, - "length": 17, - "value": "\"sprigPreviewKey\"" + "offset": 2103, + "length": 9, + "value": "\"snippet\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 114, - "length": 44, - "value": "\"result.message.error.networkAccessDisabled\"" + "offset": 2122, + "length": 6, + "value": "\"html\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 221, - "length": 52, - "value": "\"result.message.error.vistorAttributeTypeNotAllowed\"" + "offset": 2143, + "length": 25, + "value": "\"sprig_web_assets.bundle\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 114, - "length": 44, - "value": "\"result.message.error.networkAccessDisabled\"" + "offset": 2240, + "length": 32, + "value": "\"Unable to find resource bundle\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 221, - "length": 52, - "value": "\"result.message.error.vistorAttributeTypeNotAllowed\"" + "offset": 2306, + "length": 143, + "value": "\"Bundle resource path: \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 82, - "length": 10, - "value": "\"api_root\"" + "offset": 2370, + "length": 9, + "value": "\"unknown\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 122, - "length": 21, - "value": "\"endpoint_post_error\"" + "offset": 2380, + "length": 1, + "value": "\", bundle id: \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 82, - "length": 10, - "value": "\"api_root\"" + "offset": 2438, + "length": 9, + "value": "\"unknown\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 122, - "length": 21, - "value": "\"endpoint_post_error\"" + "offset": 2448, + "length": 51, + "value": "\"\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", - "kind": "Dictionary", - "offset": 256, - "length": 3, - "value": "[]" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 2959, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 483, - "length": 6, - "value": "\"FINE\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 3045, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 506, - "length": 6, - "value": "\"INFO\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 3183, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 530, - "length": 7, - "value": "\"DEBUG\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 3353, + "length": 1, + "value": "2" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 555, - "length": 7, - "value": "\"ERROR\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 3391, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 579, - "length": 6, - "value": "\"NONE\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 3550, + "length": 1, + "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 712, - "length": 20, - "value": "\"USERLEAP_LOG_LEVEL\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 3595, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 483, - "length": 6, - "value": "\"FINE\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 4696, + "length": 1, + "value": "5" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 506, - "length": 6, - "value": "\"INFO\"" + "offset": 4754, + "length": 29, + "value": "\"Error evaluating javascript\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 530, - "length": 7, - "value": "\"DEBUG\"" + "offset": 4817, + "length": 73, + "value": "\"Javascript was: \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 555, - "length": 7, - "value": "\"ERROR\"" + "offset": 4847, + "length": 1, + "value": "\". Error was: \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 579, - "length": 6, - "value": "\"NONE\"" + "offset": 4889, + "length": 51, + "value": "\"\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "BooleanLiteral", - "offset": 1295, - "length": 5, - "value": "false" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 5807, + "length": 1, + "value": "0" }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "BooleanLiteral", - "offset": 1096, - "length": 5, - "value": "false" + "offset": 5840, + "length": 4, + "value": "true" }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "IntegerLiteral", - "offset": 1154, + "offset": 6341, "length": 1, "value": "0" }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "IntegerLiteral", - "offset": 1190, - "length": 3, - "value": "100" + "offset": 6420, + "length": 1, + "value": "0" }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", @@ -6886,6 +10760,83 @@ "offset": 564, "length": 15, "value": "\"UserLeapKit.SprigSurveyView\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 392, + "length": 84, + "value": "\"UserLeap\/iOS;Version=\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 427, + "length": 1, + "value": "\";OSVersion=\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 450, + "length": 1, + "value": "\";AppVersion=\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 475, + "length": 1, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 697, + "length": 21, + "value": "\"USERLEAP_KILLSWITCH\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 747, + "length": 7, + "value": "\"0.0.1\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 797, + "length": 8, + "value": "\"4.20.2\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 1370, + "length": 28, + "value": "\"CFBundleShortVersionString\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 1488, + "length": 9, + "value": "\"Unknown\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 1711, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "IntegerLiteral", + "offset": 1803, + "length": 1, + "value": "0" } ] } \ No newline at end of file diff --git a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios.private.swiftinterface b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios.private.swiftinterface index 6b14093..88b1598 100644 --- a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios.private.swiftinterface +++ b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios.private.swiftinterface @@ -1,7 +1,8 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) +// swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) // swift-module-flags: -target arm64-apple-ios11.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -Osize -module-name UserLeapKit // swift-module-flags-ignorable: -enable-bare-slash-regex +import AVKit import CoreGraphics import Foundation import Swift @@ -65,8 +66,8 @@ import _StringProcessing @objc public class SGOptimizelyExperiment : ObjectiveC.NSObject, Swift.Codable { @objc public init(id: Swift.String, variation: Swift.String) @objc deinit - public func encode(to encoder: Swift.Encoder) throws - required public init(from decoder: Swift.Decoder) throws + public func encode(to encoder: any Swift.Encoder) throws + required public init(from decoder: any Swift.Decoder) throws } @objc public protocol SprigOptimizelyIntegrationAPI { @objc func integrateOptimizely(_ optimizely: ObjectiveC.NSObject, userId: Swift.String, attributes: Swift.Dictionary, isOverride: Swift.Bool) -> [UserLeapKit.SGOptimizelyExperiment] @@ -179,7 +180,7 @@ extension UserLeapKit.UserLeap : UserLeapKit.SprigPresentationAPI { @objc dynamic public func dismissActiveSurvey() } extension UserLeapKit.UserLeap { - @objc dynamic public func registerEventListener(for eventType: UserLeapKit.LifecycleEvent, listener: @escaping (Swift.Dictionary) -> Swift.Void) + @objc dynamic public func registerEventListener(for eventType: UserLeapKit.LifecycleEvent, listener: @escaping (Swift.Dictionary) -> Swift.Void) @objc dynamic public func unregisterAllEventListeners(for eventType: UserLeapKit.LifecycleEvent) } extension UserLeapKit.SprigAPIResult.SprigAPIResultStatus : Swift.Equatable {} diff --git a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios.swiftdoc b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios.swiftdoc index 7713d13..3eafb34 100644 Binary files a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios.swiftdoc and b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios.swiftdoc differ diff --git a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios.swiftinterface b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios.swiftinterface index 6b14093..88b1598 100644 --- a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios.swiftinterface +++ b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios.swiftinterface @@ -1,7 +1,8 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) +// swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) // swift-module-flags: -target arm64-apple-ios11.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -Osize -module-name UserLeapKit // swift-module-flags-ignorable: -enable-bare-slash-regex +import AVKit import CoreGraphics import Foundation import Swift @@ -65,8 +66,8 @@ import _StringProcessing @objc public class SGOptimizelyExperiment : ObjectiveC.NSObject, Swift.Codable { @objc public init(id: Swift.String, variation: Swift.String) @objc deinit - public func encode(to encoder: Swift.Encoder) throws - required public init(from decoder: Swift.Decoder) throws + public func encode(to encoder: any Swift.Encoder) throws + required public init(from decoder: any Swift.Decoder) throws } @objc public protocol SprigOptimizelyIntegrationAPI { @objc func integrateOptimizely(_ optimizely: ObjectiveC.NSObject, userId: Swift.String, attributes: Swift.Dictionary, isOverride: Swift.Bool) -> [UserLeapKit.SGOptimizelyExperiment] @@ -179,7 +180,7 @@ extension UserLeapKit.UserLeap : UserLeapKit.SprigPresentationAPI { @objc dynamic public func dismissActiveSurvey() } extension UserLeapKit.UserLeap { - @objc dynamic public func registerEventListener(for eventType: UserLeapKit.LifecycleEvent, listener: @escaping (Swift.Dictionary) -> Swift.Void) + @objc dynamic public func registerEventListener(for eventType: UserLeapKit.LifecycleEvent, listener: @escaping (Swift.Dictionary) -> Swift.Void) @objc dynamic public func unregisterAllEventListeners(for eventType: UserLeapKit.LifecycleEvent) } extension UserLeapKit.SprigAPIResult.SprigAPIResultStatus : Swift.Equatable {} diff --git a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/UserLeapKit b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/UserLeapKit index 8788e5b..f8fe2e2 100755 Binary files a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/UserLeapKit and b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/UserLeapKit differ diff --git a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/sprig_web_assets.bundle/shim.js b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/sprig_web_assets.bundle/shim.js index 2c9bac4..213d13a 100644 --- a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/sprig_web_assets.bundle/shim.js +++ b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/sprig_web_assets.bundle/shim.js @@ -1,705 +1,9 @@ -(function(q){typeof define=="function"&&define.amd?define(q):q()})(function(){"use strict";var Ug=Object.defineProperty;var Og=(q,We,kt)=>We in q?Ug(q,We,{enumerable:!0,configurable:!0,writable:!0,value:kt}):q[We]=kt;var se=(q,We,kt)=>(Og(q,typeof We!="symbol"?We+"":We,kt),kt);var q=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function We(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function kt(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var oe={},Tt={};Object.defineProperty(Tt,"__esModule",{value:!0});var Jr=function(){function e(){}return e.prototype.handleError=function(t){},e}();Tt.NoopErrorHandler=Jr;var ei=new Jr;function Ic(e){ei=e}Tt.setErrorHandler=Ic;function kc(){return ei}Tt.getErrorHandler=kc;function Tc(){ei=new Jr}Tt.resetErrorHandler=Tc;var ti={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.NOTSET=0]="NOTSET",t[t.DEBUG=1]="DEBUG",t[t.INFO=2]="INFO",t[t.WARNING=3]="WARNING",t[t.ERROR=4]="ERROR"}(e.LogLevel||(e.LogLevel={}))})(ti);var dt={},zt={},Zn={exports:{}},sa=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(sa){var la=new Uint8Array(16);Zn.exports=function(){return sa(la),la}}else{var ua=new Array(16);Zn.exports=function(){for(var t=0,n;t<16;t++)(t&3)===0&&(n=Math.random()*4294967296),ua[t]=n>>>((t&3)<<3)&255;return ua}}for(var ca=[],Xn=0;Xn<256;++Xn)ca[Xn]=(Xn+256).toString(16).substr(1);function Lc(e,t){var n=t||0,r=ca;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")}var da=Lc,Rc=Zn.exports,Ac=da,fa,ni,ri=0,ii=0;function Uc(e,t,n){var r=t&&n||0,i=t||[];e=e||{};var o=e.node||fa,a=e.clockseq!==void 0?e.clockseq:ni;if(o==null||a==null){var s=Rc();o==null&&(o=fa=[s[0]|1,s[1],s[2],s[3],s[4],s[5]]),a==null&&(a=ni=(s[6]<<8|s[7])&16383)}var l=e.msecs!==void 0?e.msecs:new Date().getTime(),u=e.nsecs!==void 0?e.nsecs:ii+1,c=l-ri+(u-ii)/1e4;if(c<0&&e.clockseq===void 0&&(a=a+1&16383),(c<0||l>ri)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");ri=l,ii=u,ni=a,l+=122192928e5;var d=((l&268435455)*1e4+u)%4294967296;i[r++]=d>>>24&255,i[r++]=d>>>16&255,i[r++]=d>>>8&255,i[r++]=d&255;var f=l/4294967296*1e4&268435455;i[r++]=f>>>8&255,i[r++]=f&255,i[r++]=f>>>24&15|16,i[r++]=f>>>16&255,i[r++]=a>>>8|128,i[r++]=a&255;for(var p=0;p<6;++p)i[r+p]=o[p];return t||Ac(i)}var Oc=Uc,Dc=Zn.exports,Pc=da;function Nc(e,t,n){var r=t&&n||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var i=e.random||(e.rng||Dc)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t)for(var o=0;o<16;++o)t[r+o]=i[o];return t||Pc(i)}var Mc=Nc,Vc=Oc,pa=Mc,oi=pa;oi.v1=Vc,oi.v4=pa;var jc=oi;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=jc;function n(){return t.v4()}e.generateUUID=n;function r(){return new Date().getTime()}e.getTimestamp=r;function i(d,f){for(var p=!1,h=Object.keys(d),v=0;v=this.logLevel},e.prototype.getLogLevelName=function(t){switch(t){case te.LogLevel.DEBUG:return"DEBUG";case te.LogLevel.INFO:return"INFO ";case te.LogLevel.WARNING:return"WARN ";case te.LogLevel.ERROR:return"ERROR";default:return"NOTSET"}},e.prototype.consoleLog=function(t,n){switch(t){case te.LogLevel.DEBUG:console.log.apply(console,n);break;case te.LogLevel.INFO:console.info.apply(console,n);break;case te.LogLevel.WARNING:console.warn.apply(console,n);break;case te.LogLevel.ERROR:console.error.apply(console,n);break;default:console.log.apply(console,n)}},e}();dt.ConsoleLogHandler=Hc;var yn=te.LogLevel.NOTSET,si=null,ma=function(){function e(t){t===void 0&&(t={}),this.messagePrefix="",t.messagePrefix&&(this.messagePrefix=t.messagePrefix)}return e.prototype.log=function(t,n){for(var r=[],i=2;i=this.maxQueueSize&&this.flush()},e.prototype.flush=function(){this.sink(this.buffer),this.buffer=[],this.timer.stop()},e}();Wt.DefaultEventQueue=ed,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendEventNotification=e.getQueue=e.validateAndGetBatchSize=e.validateAndGetFlushInterval=e.DEFAULT_BATCH_SIZE=e.DEFAULT_FLUSH_INTERVAL=void 0;var t=Wt,n=oe,r=zt;e.DEFAULT_FLUSH_INTERVAL=3e4,e.DEFAULT_BATCH_SIZE=10;var i=n.getLogger("EventProcessor");function o(u){return u<=0&&(i.warn("Invalid flushInterval "+u+", defaulting to "+e.DEFAULT_FLUSH_INTERVAL),u=e.DEFAULT_FLUSH_INTERVAL),u}e.validateAndGetFlushInterval=o;function a(u){return u=Math.floor(u),u<1&&(i.warn("Invalid batchSize "+u+", defaulting to "+e.DEFAULT_BATCH_SIZE),u=e.DEFAULT_BATCH_SIZE),u=Math.max(1,u),u}e.validateAndGetBatchSize=a;function s(u,c,d,f){var p;return u>1?p=new t.DefaultEventQueue({flushInterval:c,maxQueueSize:u,sink:d,batchComparator:f}):p=new t.SingleEventQueue({sink:d}),p}e.getQueue=s;function l(u,c){u&&u.sendNotifications(r.NOTIFICATION_TYPES.LOG_EVENT,c)}e.sendEventNotification=l}(li);var ya={};Object.defineProperty(ya,"__esModule",{value:!0});var _a={};Object.defineProperty(_a,"__esModule",{value:!0});var Yt={},er={};Object.defineProperty(er,"__esModule",{value:!0}),er.LocalStorageStore=void 0;var td=zt,nd=oe,wa=nd.getLogger("EventProcessor"),rd=function(){function e(t){var n=t.key,r=t.maxValues,i=r===void 0?1e3:r;this.LS_KEY=n,this.maxValues=i}return e.prototype.get=function(t){return this.getMap()[t]||null},e.prototype.set=function(t,n){var r=this.getMap();r[t]=n,this.replace(r)},e.prototype.remove=function(t){var n=this.getMap();delete n[t],this.replace(n)},e.prototype.values=function(){return td.objectValues(this.getMap())},e.prototype.clear=function(){this.replace({})},e.prototype.replace=function(t){try{window.localStorage&&localStorage.setItem(this.LS_KEY,JSON.stringify(t)),this.clean()}catch(n){wa.error(n)}},e.prototype.clean=function(){var t=this.getMap(),n=Object.keys(t),r=n.length-this.maxValues;if(!(r<1)){var i=n.map(function(a){return{key:a,value:t[a]}});i.sort(function(a,s){return a.value.timestamp-s.value.timestamp});for(var o=0;o0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]>>((t&3)<<3)&255;return Ra}}for(var Aa=[],rr=0;rr<256;++rr)Aa[rr]=(rr+256).toString(16).substr(1);function xd(e,t){var n=t||0,r=Aa;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")}var Ua=xd,Cd=nr.exports,Sd=Ua,Oa,fi,pi=0,hi=0;function Id(e,t,n){var r=t&&n||0,i=t||[];e=e||{};var o=e.node||Oa,a=e.clockseq!==void 0?e.clockseq:fi;if(o==null||a==null){var s=Cd();o==null&&(o=Oa=[s[0]|1,s[1],s[2],s[3],s[4],s[5]]),a==null&&(a=fi=(s[6]<<8|s[7])&16383)}var l=e.msecs!==void 0?e.msecs:new Date().getTime(),u=e.nsecs!==void 0?e.nsecs:hi+1,c=l-pi+(u-hi)/1e4;if(c<0&&e.clockseq===void 0&&(a=a+1&16383),(c<0||l>pi)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");pi=l,hi=u,fi=a,l+=122192928e5;var d=((l&268435455)*1e4+u)%4294967296;i[r++]=d>>>24&255,i[r++]=d>>>16&255,i[r++]=d>>>8&255,i[r++]=d&255;var f=l/4294967296*1e4&268435455;i[r++]=f>>>8&255,i[r++]=f&255,i[r++]=f>>>24&15|16,i[r++]=f>>>16&255,i[r++]=a>>>8|128,i[r++]=a&255;for(var p=0;p<6;++p)i[r+p]=o[p];return t||Sd(i)}var kd=Id,Td=nr.exports,Ld=Ua;function Rd(e,t,n){var r=t&&n||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var i=e.random||(e.rng||Td)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t)for(var o=0;o<16;++o)t[r+o]=i[o];return t||Ld(i)}var Ad=Rd,Ud=kd,Da=Ad,Pa=Da;Pa.v1=Ud,Pa.v4=Da;var Od={exports:{}};(function(e){(function(){function t(i,o){for(var a=i.length,s=o^a,l=0,u;a>=4;)u=i.charCodeAt(l)&255|(i.charCodeAt(++l)&255)<<8|(i.charCodeAt(++l)&255)<<16|(i.charCodeAt(++l)&255)<<24,u=(u&65535)*1540483477+(((u>>>16)*1540483477&65535)<<16),u^=u>>>24,u=(u&65535)*1540483477+(((u>>>16)*1540483477&65535)<<16),s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)^u,a-=4,++l;switch(a){case 3:s^=(i.charCodeAt(l+2)&255)<<16;case 2:s^=(i.charCodeAt(l+1)&255)<<8;case 1:s^=i.charCodeAt(l)&255,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)}return s^=s>>>13,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16),s^=s>>>15,s>>>0}function n(i,o){var a,s,l,u,c,d,f,p;for(a=i.length&3,s=i.length-a,l=o,c=3432918353,d=461845907,p=0;p>>16)*c&65535)<<16)&4294967295,f=f<<15|f>>>17,f=(f&65535)*d+(((f>>>16)*d&65535)<<16)&4294967295,l^=f,l=l<<13|l>>>19,u=(l&65535)*5+(((l>>>16)*5&65535)<<16)&4294967295,l=(u&65535)+27492+(((u>>>16)+58964&65535)<<16);switch(f=0,a){case 3:f^=(i.charCodeAt(p+2)&255)<<16;case 2:f^=(i.charCodeAt(p+1)&255)<<8;case 1:f^=i.charCodeAt(p)&255,f=(f&65535)*c+(((f>>>16)*c&65535)<<16)&4294967295,f=f<<15|f>>>17,f=(f&65535)*d+(((f>>>16)*d&65535)<<16)&4294967295,l^=f}return l^=i.length,l^=l>>>16,l=(l&65535)*2246822507+(((l>>>16)*2246822507&65535)<<16)&4294967295,l^=l>>>13,l=(l&65535)*3266489909+(((l>>>16)*3266489909&65535)<<16)&4294967295,l^=l>>>16,l>>>0}var r=n;r.v2=t,r.v3=n,e.exports=r})()})(Od);var Na={},vi={},mi={},Be={};Object.defineProperty(Be,"__esModule",{value:!0}),Be.DEFAULT_UPDATE_INTERVAL=5*60*1e3,Be.MIN_UPDATE_INTERVAL=1e3,Be.DEFAULT_URL_TEMPLATE="https://cdn.optimizely.com/datafiles/%s.json",Be.DEFAULT_AUTHENTICATED_URL_TEMPLATE="https://config.optimizely.com/datafiles/auth/%s.json",Be.BACKOFF_BASE_WAIT_SECONDS_BY_ERROR_COUNT=[0,8,16,32,64,128,256,512],Be.REQUEST_TIMEOUT_MS=60*1e3,Object.defineProperty(mi,"__esModule",{value:!0});var Dd=Be,Pd=oe,Nd=Pd.getLogger("DatafileManager"),Md="GET",Vd=4;function jd(e){var t=e.getAllResponseHeaders();if(t===null)return{};var n=t.split(`\r -`),r={};return n.forEach(function(i){var o=i.indexOf(": ");if(o>-1){var a=i.slice(0,o),s=i.slice(o+2);s.length>0&&(r[a]=s)}}),r}function Bd(e,t){Object.keys(e).forEach(function(n){var r=e[n];t.setRequestHeader(n,r)})}function Fd(e,t){var n=new XMLHttpRequest,r=new Promise(function(i,o){n.open(Md,e,!0),Bd(t,n),n.onreadystatechange=function(){if(n.readyState===Vd){var a=n.status;if(a===0){o(new Error("Request error"));return}var s=jd(n),l={statusCode:n.status,body:n.responseText,headers:s};i(l)}},n.timeout=Dd.REQUEST_TIMEOUT_MS,n.ontimeout=function(){Nd.error("Request timed out")},n.send()});return{responsePromise:r,abort:function(){n.abort()}}}mi.makeGetRequest=Fd;var gi={},yi={};Object.defineProperty(yi,"__esModule",{value:!0});var Hd=function(){function e(){this.listeners={},this.listenerId=1}return e.prototype.on=function(t,n){var r=this;this.listeners[t]||(this.listeners[t]={});var i=String(this.listenerId);return this.listenerId++,this.listeners[t][i]=n,function(){r.listeners[t]&&delete r.listeners[t][i]}},e.prototype.emit=function(t,n){var r=this.listeners[t];r&&Object.keys(r).forEach(function(i){var o=r[i];o(n)})},e.prototype.removeAllListeners=function(){this.listeners={}},e}();yi.default=Hd;var _i={};Object.defineProperty(_i,"__esModule",{value:!0});var wi=Be;function Kd(){return Math.round(Math.random()*1e3)}var $d=function(){function e(){this.errorCount=0}return e.prototype.getDelay=function(){if(this.errorCount===0)return 0;var t=wi.BACKOFF_BASE_WAIT_SECONDS_BY_ERROR_COUNT[Math.min(wi.BACKOFF_BASE_WAIT_SECONDS_BY_ERROR_COUNT.length-1,this.errorCount)];return t*1e3+Kd()},e.prototype.countError=function(){this.errorCount=wn.MIN_UPDATE_INTERVAL}function Va(e){return e>=200&&e<400}var Zd={get:function(){return Promise.resolve("")},set:function(){return Promise.resolve()},contains:function(){return Promise.resolve(!1)},remove:function(){return Promise.resolve()}},Xd=function(){function e(t){var n=this,r=ir(ir({},this.getConfigDefaults()),t),i=r.datafile,o=r.autoUpdate,a=o===void 0?!1:o,s=r.sdkKey,l=r.updateInterval,u=l===void 0?wn.DEFAULT_UPDATE_INTERVAL:l,c=r.urlTemplate,d=c===void 0?wn.DEFAULT_URL_TEMPLATE:c,f=r.cache,p=f===void 0?Zd:f;this.cache=p,this.cacheKey="opt-datafile-"+s,this.isReadyPromiseSettled=!1,this.readyPromiseResolver=function(){},this.readyPromiseRejecter=function(){},this.readyPromise=new Promise(function(h,v){n.readyPromiseResolver=h,n.readyPromiseRejecter=v}),i?(this.currentDatafile=i,s||this.resolveReadyPromise()):this.currentDatafile="",this.isStarted=!1,this.datafileUrl=qd.sprintf(d,s),this.emitter=new zd.default,this.autoUpdate=a,Qd(u)?this.updateInterval=u:(Ce.warn("Invalid updateInterval %s, defaulting to %s",u,wn.DEFAULT_UPDATE_INTERVAL),this.updateInterval=wn.DEFAULT_UPDATE_INTERVAL),this.currentTimeout=null,this.currentRequest=null,this.backoffController=new Wd.default,this.syncOnCurrentRequestComplete=!1}return e.prototype.get=function(){return this.currentDatafile},e.prototype.start=function(){this.isStarted||(Ce.debug("Datafile manager started"),this.isStarted=!0,this.backoffController.reset(),this.setDatafileFromCacheIfAvailable(),this.syncDatafile())},e.prototype.stop=function(){return Ce.debug("Datafile manager stopped"),this.isStarted=!1,this.currentTimeout&&(clearTimeout(this.currentTimeout),this.currentTimeout=null),this.emitter.removeAllListeners(),this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=null),Promise.resolve()},e.prototype.onReady=function(){return this.readyPromise},e.prototype.on=function(t,n){return this.emitter.on(t,n)},e.prototype.onRequestRejected=function(t){!this.isStarted||(this.backoffController.countError(),t instanceof Error?Ce.error("Error fetching datafile: %s",t.message,t):typeof t=="string"?Ce.error("Error fetching datafile: %s",t):Ce.error("Error fetching datafile"))},e.prototype.onRequestResolved=function(t){if(!!this.isStarted){typeof t.statusCode<"u"&&Va(t.statusCode)?this.backoffController.reset():this.backoffController.countError(),this.trySavingLastModified(t.headers);var n=this.getNextDatafileFromResponse(t);if(n!=="")if(Ce.info("Updating datafile from response"),this.currentDatafile=n,this.cache.set(this.cacheKey,n),!this.isReadyPromiseSettled)this.resolveReadyPromise();else{var r={datafile:n};this.emitter.emit(Yd,r)}}},e.prototype.onRequestComplete=function(){!this.isStarted||(this.currentRequest=null,!this.isReadyPromiseSettled&&!this.autoUpdate&&this.rejectReadyPromise(new Error("Failed to become ready")),this.autoUpdate&&this.syncOnCurrentRequestComplete&&this.syncDatafile(),this.syncOnCurrentRequestComplete=!1)},e.prototype.syncDatafile=function(){var t=this,n={};this.lastResponseLastModified&&(n["if-modified-since"]=this.lastResponseLastModified),Ce.debug("Making datafile request to url %s with headers: %s",this.datafileUrl,function(){return JSON.stringify(n)}),this.currentRequest=this.makeGetRequest(this.datafileUrl,n);var r=function(){t.onRequestComplete()},i=function(a){t.onRequestResolved(a)},o=function(a){t.onRequestRejected(a)};this.currentRequest.responsePromise.then(i,o).then(r,r),this.autoUpdate&&this.scheduleNextUpdate()},e.prototype.resolveReadyPromise=function(){this.readyPromiseResolver(),this.isReadyPromiseSettled=!0},e.prototype.rejectReadyPromise=function(t){this.readyPromiseRejecter(t),this.isReadyPromiseSettled=!0},e.prototype.scheduleNextUpdate=function(){var t=this,n=this.backoffController.getDelay(),r=Math.max(n,this.updateInterval);Ce.debug("Scheduling sync in %s ms",r),this.currentTimeout=setTimeout(function(){t.currentRequest?t.syncOnCurrentRequestComplete=!0:t.syncDatafile()},r)},e.prototype.getNextDatafileFromResponse=function(t){return Ce.debug("Response status code: %s",t.statusCode),typeof t.statusCode>"u"||t.statusCode===304?"":Va(t.statusCode)?t.body:""},e.prototype.trySavingLastModified=function(t){var n=t["last-modified"]||t["Last-Modified"];typeof n<"u"&&(this.lastResponseLastModified=n,Ce.debug("Saved last modified header value from response: %s",this.lastResponseLastModified))},e.prototype.setDatafileFromCacheIfAvailable=function(){var t=this;this.cache.get(this.cacheKey).then(function(n){t.isStarted&&!t.isReadyPromiseSettled&&n!==""&&(Ce.debug("Using datafile from cache"),t.currentDatafile=n,t.resolveReadyPromise())})},e}();gi.default=Xd;var Jd=q&&q.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ef=q&&q.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vi,"__esModule",{value:!0});var tf=mi,nf=ef(gi),rf=function(e){Jd(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeGetRequest=function(n,r){return tf.makeGetRequest(n,r)},t.prototype.getConfigDefaults=function(){return{autoUpdate:!1}},t}(nf.default);vi.default=rf,Object.defineProperty(Na,"__esModule",{value:!0});var of=vi;Na.HttpPollingDatafileManager=of.default;var af={NOTSET:0,DEBUG:1,INFO:2,WARNING:3,ERROR:4},sf={CONDITION_EVALUATOR_ERROR:"%s: Error evaluating audience condition of type %s: %s",DATAFILE_AND_SDK_KEY_MISSING:"%s: You must provide at least one of sdkKey or datafile. Cannot start Optimizely",EXPERIMENT_KEY_NOT_IN_DATAFILE:"%s: Experiment key %s is not in datafile.",FEATURE_NOT_IN_DATAFILE:"%s: Feature key %s is not in datafile.",IMPROPERLY_FORMATTED_EXPERIMENT:"%s: Experiment key %s is improperly formatted.",INVALID_ATTRIBUTES:"%s: Provided attributes are in an invalid format.",INVALID_BUCKETING_ID:"%s: Unable to generate hash for bucketing ID %s: %s",INVALID_DATAFILE:"%s: Datafile is invalid - property %s: %s",INVALID_DATAFILE_MALFORMED:"%s: Datafile is invalid because it is malformed.",INVALID_CONFIG:"%s: Provided Optimizely config is in an invalid format.",INVALID_JSON:"%s: JSON object is not valid.",INVALID_ERROR_HANDLER:'%s: Provided "errorHandler" is in an invalid format.',INVALID_EVENT_DISPATCHER:'%s: Provided "eventDispatcher" is in an invalid format.',INVALID_EVENT_TAGS:"%s: Provided event tags are in an invalid format.",INVALID_EXPERIMENT_KEY:"%s: Experiment key %s is not in datafile. It is either invalid, paused, or archived.",INVALID_EXPERIMENT_ID:"%s: Experiment ID %s is not in datafile.",INVALID_GROUP_ID:"%s: Group ID %s is not in datafile.",INVALID_LOGGER:'%s: Provided "logger" is in an invalid format.',INVALID_ROLLOUT_ID:"%s: Invalid rollout ID %s attached to feature %s",INVALID_USER_ID:"%s: Provided user ID is in an invalid format.",INVALID_USER_PROFILE_SERVICE:"%s: Provided user profile service instance is in an invalid format: %s.",NO_DATAFILE_SPECIFIED:"%s: No datafile specified. Cannot start optimizely.",NO_JSON_PROVIDED:"%s: No JSON object to validate against schema.",NO_VARIATION_FOR_EXPERIMENT_KEY:"%s: No variation key %s defined in datafile for experiment %s.",UNDEFINED_ATTRIBUTE:"%s: Provided attribute: %s has an undefined value.",UNRECOGNIZED_ATTRIBUTE:"%s: Unrecognized attribute %s provided. Pruning before sending event to Optimizely.",UNABLE_TO_CAST_VALUE:"%s: Unable to cast value %s to type %s, returning null.",USER_NOT_IN_FORCED_VARIATION:"%s: User %s is not in the forced variation map. Cannot remove their forced variation.",USER_PROFILE_LOOKUP_ERROR:'%s: Error while looking up user profile for user ID "%s": %s.',USER_PROFILE_SAVE_ERROR:'%s: Error while saving user profile for user ID "%s": %s.',VARIABLE_KEY_NOT_IN_DATAFILE:'%s: Variable with key "%s" associated with feature with key "%s" is not in datafile.',VARIATION_ID_NOT_IN_DATAFILE:"%s: No variation ID %s defined in datafile for experiment %s.",VARIATION_ID_NOT_IN_DATAFILE_NO_EXPERIMENT:"%s: Variation ID %s is not in the datafile.",INVALID_INPUT_FORMAT:"%s: Provided %s is in an invalid format.",INVALID_DATAFILE_VERSION:"%s: This version of the JavaScript SDK does not support the given datafile version: %s",INVALID_VARIATION_KEY:"%s: Provided variation key is in an invalid format."},lf={ACTIVATE_USER:"%s: Activating user %s in experiment %s.",DISPATCH_CONVERSION_EVENT:"%s: Dispatching conversion event to URL %s with params %s.",DISPATCH_IMPRESSION_EVENT:"%s: Dispatching impression event to URL %s with params %s.",DEPRECATED_EVENT_VALUE:"%s: Event value is deprecated in %s call.",EVENT_KEY_NOT_FOUND:"%s: Event key %s is not in datafile.",EXPERIMENT_NOT_RUNNING:"%s: Experiment %s is not running.",FEATURE_ENABLED_FOR_USER:"%s: Feature %s is enabled for user %s.",FEATURE_NOT_ENABLED_FOR_USER:"%s: Feature %s is not enabled for user %s.",FEATURE_HAS_NO_EXPERIMENTS:"%s: Feature %s is not attached to any experiments.",FAILED_TO_PARSE_VALUE:'%s: Failed to parse event value "%s" from event tags.',FAILED_TO_PARSE_REVENUE:'%s: Failed to parse revenue value "%s" from event tags.',FORCED_BUCKETING_FAILED:"%s: Variation key %s is not in datafile. Not activating user %s.",INVALID_OBJECT:"%s: Optimizely object is not valid. Failing %s.",INVALID_CLIENT_ENGINE:"%s: Invalid client engine passed: %s. Defaulting to node-sdk.",INVALID_DEFAULT_DECIDE_OPTIONS:"%s: Provided default decide options is not an array.",INVALID_DECIDE_OPTIONS:"%s: Provided decide options is not an array. Using default decide options.",INVALID_VARIATION_ID:"%s: Bucketed into an invalid variation ID. Returning null.",NOTIFICATION_LISTENER_EXCEPTION:"%s: Notification listener for (%s) threw exception: %s",NO_ROLLOUT_EXISTS:"%s: There is no rollout of feature %s.",NOT_ACTIVATING_USER:"%s: Not activating user %s for experiment %s.",NOT_TRACKING_USER:"%s: Not tracking user %s.",PARSED_REVENUE_VALUE:'%s: Parsed revenue value "%s" from event tags.',PARSED_NUMERIC_VALUE:'%s: Parsed event value "%s" from event tags.',RETURNING_STORED_VARIATION:'%s: Returning previously activated variation "%s" of experiment "%s" for user "%s" from user profile.',ROLLOUT_HAS_NO_EXPERIMENTS:"%s: Rollout of feature %s has no experiments",SAVED_VARIATION:'%s: Saved variation "%s" of experiment "%s" for user "%s".',SAVED_VARIATION_NOT_FOUND:"%s: User %s was previously bucketed into variation with ID %s for experiment %s, but no matching variation was found.",SHOULD_NOT_DISPATCH_ACTIVATE:'%s: Experiment %s is not in "Running" state. Not activating user.',SKIPPING_JSON_VALIDATION:"%s: Skipping JSON schema validation.",TRACK_EVENT:"%s: Tracking event %s for user %s.",UNRECOGNIZED_DECIDE_OPTION:"%s: Unrecognized decide option %s provided.",USER_ASSIGNED_TO_EXPERIMENT_BUCKET:"%s: Assigned bucket %s to user with bucketing ID %s.",USER_BUCKETED_INTO_EXPERIMENT_IN_GROUP:"%s: User %s is in experiment %s of group %s.",USER_BUCKETED_INTO_TARGETING_RULE:"%s: User %s bucketed into targeting rule %s.",USER_IN_FEATURE_EXPERIMENT:"%s: User %s is in variation %s of experiment %s on the feature %s.",USER_IN_ROLLOUT:"%s: User %s is in rollout of feature %s.",USER_NOT_BUCKETED_INTO_EVERYONE_TARGETING_RULE:"%s: User %s not bucketed into everyone targeting rule due to traffic allocation.",USER_NOT_BUCKETED_INTO_EXPERIMENT_IN_GROUP:"%s: User %s is not in experiment %s of group %s.",USER_NOT_BUCKETED_INTO_ANY_EXPERIMENT_IN_GROUP:"%s: User %s is not in any experiment of group %s.",USER_NOT_BUCKETED_INTO_TARGETING_RULE:"%s User %s not bucketed into targeting rule %s due to traffic allocation. Trying everyone rule.",USER_NOT_IN_FEATURE_EXPERIMENT:"%s: User %s is not in any experiment on the feature %s.",USER_NOT_IN_ROLLOUT:"%s: User %s is not in rollout of feature %s.",USER_FORCED_IN_VARIATION:"%s: User %s is forced in variation %s.",USER_MAPPED_TO_FORCED_VARIATION:"%s: Set variation %s for experiment %s and user %s in the forced variation map.",USER_DOESNT_MEET_CONDITIONS_FOR_TARGETING_RULE:"%s: User %s does not meet conditions for targeting rule %s.",USER_MEETS_CONDITIONS_FOR_TARGETING_RULE:"%s: User %s meets conditions for targeting rule %s.",USER_HAS_VARIATION:"%s: User %s is in variation %s of experiment %s.",USER_HAS_FORCED_DECISION_WITH_RULE_SPECIFIED:"Variation (%s) is mapped to flag (%s), rule (%s) and user (%s) in the forced decision map.",USER_HAS_FORCED_DECISION_WITH_NO_RULE_SPECIFIED:"Variation (%s) is mapped to flag (%s) and user (%s) in the forced decision map.",USER_HAS_FORCED_DECISION_WITH_RULE_SPECIFIED_BUT_INVALID:"Invalid variation is mapped to flag (%s), rule (%s) and user (%s) in the forced decision map.",USER_HAS_FORCED_DECISION_WITH_NO_RULE_SPECIFIED_BUT_INVALID:"Invalid variation is mapped to flag (%s) and user (%s) in the forced decision map.",USER_HAS_FORCED_VARIATION:"%s: Variation %s is mapped to experiment %s and user %s in the forced variation map.",USER_HAS_NO_VARIATION:"%s: User %s is in no variation of experiment %s.",USER_HAS_NO_FORCED_VARIATION:"%s: User %s is not in the forced variation map.",USER_HAS_NO_FORCED_VARIATION_FOR_EXPERIMENT:"%s: No experiment %s mapped to user %s in the forced variation map.",USER_NOT_IN_ANY_EXPERIMENT:"%s: User %s is not in any experiment of group %s.",USER_NOT_IN_EXPERIMENT:"%s: User %s does not meet conditions to be in experiment %s.",USER_RECEIVED_DEFAULT_VARIABLE_VALUE:'%s: User "%s" is not in any variation or rollout rule. Returning default value for variable "%s" of feature flag "%s".',FEATURE_NOT_ENABLED_RETURN_DEFAULT_VARIABLE_VALUE:'%s: Feature "%s" is not enabled for user %s. Returning the default variable value "%s".',VARIABLE_NOT_USED_RETURN_DEFAULT_VARIABLE_VALUE:'%s: Variable "%s" is not used in variation "%s". Returning default value.',USER_RECEIVED_VARIABLE_VALUE:'%s: Got variable value "%s" for variable "%s" of feature flag "%s"',VALID_DATAFILE:"%s: Datafile is valid.",VALID_USER_PROFILE_SERVICE:"%s: Valid user profile service provided.",VARIATION_REMOVED_FOR_USER:"%s: Variation mapped to experiment %s has been removed for user %s.",VARIABLE_REQUESTED_WITH_WRONG_TYPE:'%s: Requested variable type "%s", but variable is of type "%s". Use correct API to retrieve value. Returning None.',VALID_BUCKETING_ID:'%s: BucketingId is valid: "%s"',BUCKETING_ID_NOT_STRING:"%s: BucketingID attribute is not a string. Defaulted to userId",EVALUATING_AUDIENCE:'%s: Starting to evaluate audience "%s" with conditions: %s.',EVALUATING_AUDIENCES_COMBINED:'%s: Evaluating audiences for %s "%s": %s.',AUDIENCE_EVALUATION_RESULT:'%s: Audience "%s" evaluated to %s.',AUDIENCE_EVALUATION_RESULT_COMBINED:"%s: Audiences for %s %s collectively evaluated to %s.",MISSING_ATTRIBUTE_VALUE:'%s: Audience condition %s evaluated to UNKNOWN because no value was passed for user attribute "%s".',UNEXPECTED_CONDITION_VALUE:"%s: Audience condition %s evaluated to UNKNOWN because the condition value is not supported.",UNEXPECTED_TYPE:'%s: Audience condition %s evaluated to UNKNOWN because a value of type "%s" was passed for user attribute "%s".',UNEXPECTED_TYPE_NULL:'%s: Audience condition %s evaluated to UNKNOWN because a null value was passed for user attribute "%s".',UNKNOWN_CONDITION_TYPE:"%s: Audience condition %s has an unknown condition type. You may need to upgrade to a newer release of the Optimizely SDK.",UNKNOWN_MATCH_TYPE:"%s: Audience condition %s uses an unknown match type. You may need to upgrade to a newer release of the Optimizely SDK.",UPDATED_OPTIMIZELY_CONFIG:"%s: Updated Optimizely config to revision %s (project id %s)",OUT_OF_BOUNDS:'%s: Audience condition %s evaluated to UNKNOWN because the number value for user attribute "%s" is not in the range [-2^53, +2^53].',UNABLE_TO_ATTACH_UNLOAD:'%s: unable to bind optimizely.close() to page unload event: "%s"'},uf={BOT_FILTERING:"$opt_bot_filtering",BUCKETING_ID:"$opt_bucketing_id",STICKY_BUCKETING_KEY:"$opt_experiment_bucket_map",USER_AGENT:"$opt_user_agent",FORCED_DECISION_NULL_RULE_KEY:"$opt_null_rule_key"},cf="javascript-sdk",df="node-sdk",ff="react-sdk",pf="react-native-sdk",hf="react-native-js-sdk",vf="4.9.4",mf="4.9.4",gf={AB_TEST:"ab-test",FEATURE:"feature",FEATURE_TEST:"feature-test",FEATURE_VARIABLE:"feature-variable",ALL_FEATURE_VARIABLES:"all-feature-variables",FLAG:"flag"},yf={FEATURE_TEST:"feature-test",ROLLOUT:"rollout",EXPERIMENT:"experiment"},_f={RULE:"rule",EXPERIMENT:"experiment"},wf={BOOLEAN:"boolean",DOUBLE:"double",INTEGER:"integer",STRING:"string",JSON:"json"},or={V2:"2",V3:"3",V4:"4"},bf={SDK_NOT_READY:"Optimizely SDK not configured properly yet.",FLAG_KEY_INVALID:'No flag was found for key "%s".',VARIABLE_VALUE_INVALID:'Variable value for key "%s" is invalid or wrong type.'},bi;(function(e){e.ACTIVATE="ACTIVATE:experiment, user_id,attributes, variation, event",e.DECISION="DECISION:type, userId, attributes, decisionInfo",e.LOG_EVENT="LOG_EVENT:logEvent",e.OPTIMIZELY_CONFIG_UPDATE="OPTIMIZELY_CONFIG_UPDATE",e.TRACK="TRACK:event_key, user_id, attributes, event_tags, event"})(bi||(bi={}));var Ef=Object.freeze({__proto__:null,LOG_LEVEL:af,ERROR_MESSAGES:sf,LOG_MESSAGES:lf,CONTROL_ATTRIBUTES:uf,JAVASCRIPT_CLIENT_ENGINE:cf,NODE_CLIENT_ENGINE:df,REACT_CLIENT_ENGINE:ff,REACT_NATIVE_CLIENT_ENGINE:pf,REACT_NATIVE_JS_CLIENT_ENGINE:hf,BROWSER_CLIENT_VERSION:vf,NODE_CLIENT_VERSION:mf,DECISION_NOTIFICATION_TYPES:gf,DECISION_SOURCES:yf,AUDIENCE_EVALUATION_TYPES:_f,FEATURE_VARIABLE_TYPES:wf,DATAFILE_VERSIONS:or,DECISION_MESSAGES:bf,get NOTIFICATION_TYPES(){return bi}});or.V2,or.V3,or.V4,function(){function e(){}return e.prototype.log=function(){},e}();function xf(e){return new oe.ConsoleLogHandler(e)}var ja;(function(e){e.BOOLEAN="boolean",e.DOUBLE="double",e.INTEGER="integer",e.STRING="string",e.JSON="json"})(ja||(ja={}));var Ba;(function(e){e.DISABLE_DECISION_EVENT="DISABLE_DECISION_EVENT",e.ENABLED_FLAGS_ONLY="ENABLED_FLAGS_ONLY",e.IGNORE_USER_PROFILE_SERVICE="IGNORE_USER_PROFILE_SERVICE",e.INCLUDE_REASONS="INCLUDE_REASONS",e.EXCLUDE_VARIABLES="EXCLUDE_VARIABLES"})(Ba||(Ba={})),oe.getLogger(),oe.getLogger(),oe.getLogger(),oe.getLogger(),oe.getLogger("EVENT_BUILDER"),oe.getLogger(),oe.setLogHandler(xf()),oe.setLogLevel(oe.LogLevel.INFO);let ar;const Cf=new Uint8Array(16);function Sf(){if(!ar&&(ar=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ar))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ar(Cf)}const le=[];for(let e=0;e<256;++e)le.push((e+256).toString(16).slice(1));function If(e,t=0){return(le[e[t+0]]+le[e[t+1]]+le[e[t+2]]+le[e[t+3]]+"-"+le[e[t+4]]+le[e[t+5]]+"-"+le[e[t+6]]+le[e[t+7]]+"-"+le[e[t+8]]+le[e[t+9]]+"-"+le[e[t+10]]+le[e[t+11]]+le[e[t+12]]+le[e[t+13]]+le[e[t+14]]+le[e[t+15]]).toLowerCase()}const Fa={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ye(e,t,n){if(Fa.randomUUID&&!t&&!e)return Fa.randomUUID();e=e||{};const r=e.random||(e.rng||Sf)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return If(r)}const Zt="ul-app";var O=(e=>(e.Caption="ul-caption",e.CardContainer="ul-card__container",e.CardMainContent="ul-card-main-content",e.Choice="choice",e.ChoiceCheckbox="select-checkbox",e.ChoiceGroup="ul-card__choices",e.ChoiceLabel="select-label",e.ChoiceLabelContainer="choice-label-container",e.ChoiceRadio="select-radio",e.ChoiceTextEntryContainer="choice-text-entry-container",e.ChoiceTextInput="choice-text-input",e.CloseButton="close-btn",e.CloseContainer="close-container",e.ConsentLegalNameInput="ul-consent-legal__name-input",e.CustomStyle="ul-custom-style",e.DesktopSuffix="--desktop",e.FadeInTransition="fade-in-transition",e.LikertNumber="likert-number",e.LikertSmiley="likert-smiley",e.LikertStar="likert-star",e.LoadingSpinner="ul-loading-spinner",e.LoadingSpinnerContainer="ul-loading-spinner-container",e.LoadingSpinnerFirst="first",e.LoadingSpinnerFourth="fourth",e.LoadingSpinnerSecond="second",e.LoadingSpinnerThird="third",e.MobileSuffix="--mobile",e.NPSNumber="nps-number",e.OpenTextInput="ul-card-text__input",e.QuestionHeader="ul-question",e.VideoCard="ul-card--video",e.CheckmarkButton="ul-button-checkmark",e.InactiveButton="ul-button-inactive",e.LeftAlignButton="ul-button-left-align",e.ButtonDisabled="sprig-button-disabled",e.SkipButton="ul-card-skip__button",e))(O||{});const Ei="#e6e6e6",bn="#bd282a",kf=500,Tf=1030;var Qe=(e=>(e.Closed="close.click",e.Complete="survey.completed",e.PageChange="page.change",e.API="api",e.Override="override",e))(Qe||{}),B=(e=>(e.ReplayCapture="replay.capture",e.SDKReady="sdk.ready",e.SurveyAppeared="survey.appeared",e.SurveyClosed="survey.closed",e.SurveyDimensions="survey.dimensions",e.SurveyFadingOut="survey.fadingOut",e.SurveyHeight="survey.height",e.SurveyPresented="survey.presented",e.SurveyLifeCycle="survey.lifeCycle",e.SurveyWillClose="survey.willClose",e.SurveyWillPresent="survey.will.present",e.CloseSurveyOnOverlayClick="close.survey.overlayClick",e.VisitorIDUpdated="visitor.id.updated",e.QuestionAnswered="question.answered",e))(B||{}),Ha=(e=>(e.SurveyId="survey.id",e))(Ha||{});const Ka={SDK_READY:"sdk.ready",SURVEY_APPEARED:"survey.appeared",SURVEY_CLOSED:"survey.closed",SURVEY_DIMENSIONS:"survey.dimensions",SURVEY_FADING_OUT:"survey.fadingOut",SURVEY_HEIGHT:"survey.height",SURVEY_PRESENTED:"survey.presented",SURVEY_LIFE_CYCLE:"survey.lifeCycle",SURVEY_WILL_CLOSE:"survey.willClose",SURVEY_WILL_PRESENT:"survey.will.present",QUESTION_ANSWERED:"question.answered",REPLAY_CAPTURE:"replay.capture",CLOSE_SURVEY_ON_OVERLAY_CLICK:"close.survey.overlayClick",VISITOR_ID_UPDATED:"visitor.id.updated",DATA:{DISMISS_REASONS:{API:"api",CLOSED:"close.click",COMPLETE:"survey.completed",PAGE_CHANGE:"page.change",OVERRIDE:"override"},SURVEY_ID:"survey.id"}};var Se=(e=>(e.VerifyViewVersion="verify.view.version",e.CurrentQuestion="survey.question",e.ViewPrototypeClick="question.prototype.click",e.ViewAgreementClick="question.agreement.click",e.RecordedTaskStart="recorded.task.start",e.RecordedTaskPermissionScreen="recorded.task.permission.screen",e.SurveyComplete="survey.complete",e))(Se||{}),Lt=(e=>(e.ViewVersion="view.version",e.QuestionId="qid",e.Props="props",e))(Lt||{}),Ie=(e=>(e.Video="video",e.Audio="audio",e.Screen="screen",e))(Ie||{}),ce=(e=>(e.PermissionStatus="permission.status",e.AvPermission="av.permission",e.ScreenPermission="screen.permission",e.BeginRecording="begin.recording",e.StartTask="start.task",e.FinishTask="finish.task",e))(ce||{}),ke=(e=>(e.Abandoned="abandoned",e.GivenUp="given.up",e.Completed="completed",e))(ke||{}),K=(e=>(e.ScreenPermissionRequested="screen.permission.requested",e.PermissionDescriptors="permission.descriptors",e.PermissionStatusCallback="permission.status.callback",e.StreamReadyCallback="stream.ready.callback",e.StreamCanceledCallback="stream.canceled.callback",e.TaskCompleteCallback="task.complete.callback",e.TaskResponse="task.response",e.TaskStatus="task.status",e.RecordingMediaTypes="recording.media.types",e.StartRecordingCallback="start.recording.callback",e.PassthroughData="passthrough.data",e.CurrentIndex="current.index",e.UploadCallback="upload.callback",e.ProgressCallback="progress.callback",e.BeginCallback="begin.callback",e))(K||{}),ye=(e=>(e.Preview="sprig.previewKey",e.Credentials="userleap.ids",e.PageViews="userleap.pageviews",e))(ye||{});const $a=()=>{try{return window.parent.Intercom}catch(e){return console.error(e),null}},Ga=[Object.freeze(Object.defineProperty({__proto__:null,enable:()=>{const e=$a();!e||(e.ul_wasVisible&&e("update",{hide_default_launcher:!1}),delete e.ul_wasVisible)},disable:()=>{const e=$a();!e||(e.ul_wasVisible=!!document.querySelector("iframe.intercom-launcher-frame"),e.ul_wasVisible&&e("update",{hide_default_launcher:!0}))}},Symbol.toStringTag,{value:"Module"}))];class xi{static disable(){Ga.forEach(t=>t.disable())}static enable(){Ga.forEach(t=>t.enable())}}const Lf=1,qa=e=>e instanceof HTMLElement,za=(e,t,n)=>{const r=e.createElement("style");n&&(r.nonce=n),r.textContent=t,r.id=O.CustomStyle,e.head.appendChild(r)},Wa=e=>{const t=e.querySelector(`.${O.CardContainer}`);let n=600,r=0;if(t){n=t.scrollHeight;const i=getComputedStyle(t),o=parseFloat(i.marginTop)+parseFloat(i.marginBottom),a=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth);r=o+a}return n+r+Lf},Rf=e=>{const t=e.querySelector(`.${O.CardContainer}`);t&&(t.scrollTop=0)};var Af=class extends Error{constructor(e,t,n){super(`Possible EventEmitter memory leak detected. ${n} ${t.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`),this.emitter=e,this.type=t,this.count=n,this.name="MaxListenersExceededWarning"}},Ya=class{static listenerCount(e,t){return e.listenerCount(t)}constructor(){this.events=new Map,this.maxListeners=Ya.defaultMaxListeners,this.hasWarnedAboutPotentialMemoryLeak=!1}_emitInternalEvent(e,t,n){this.emit(e,t,n)}_getListeners(e){return Array.prototype.concat.apply([],this.events.get(e))||[]}_removeListener(e,t){const n=e.indexOf(t);return n>-1&&e.splice(n,1),[]}_wrapOnceListener(e,t){const n=(...r)=>(this.removeListener(e,n),t.apply(this,r));return Object.defineProperty(n,"name",{value:t.name}),n}setMaxListeners(e){return this.maxListeners=e,this}getMaxListeners(){return this.maxListeners}eventNames(){return Array.from(this.events.keys())}emit(e,...t){const n=this._getListeners(e);return n.forEach(r=>{r.apply(this,t)}),n.length>0}addListener(e,t){this._emitInternalEvent("newListener",e,t);const n=this._getListeners(e).concat(t);if(this.events.set(e,n),this.maxListeners>0&&this.listenerCount(e)>this.maxListeners&&!this.hasWarnedAboutPotentialMemoryLeak){this.hasWarnedAboutPotentialMemoryLeak=!0;const r=new Af(this,e,this.listenerCount(e));console.warn(r)}return this}on(e,t){return this.addListener(e,t)}once(e,t){return this.addListener(e,this._wrapOnceListener(e,t))}prependListener(e,t){const n=this._getListeners(e);if(n.length>0){const r=[t].concat(n);this.events.set(e,r)}else this.events.set(e,n.concat(t));return this}prependOnceListener(e,t){return this.prependListener(e,this._wrapOnceListener(e,t))}removeListener(e,t){const n=this._getListeners(e);return n.length>0&&(this._removeListener(n,t),this.events.set(e,n),this._emitInternalEvent("removeListener",e,t)),this}off(e,t){return this.removeListener(e,t)}removeAllListeners(e){return e?this.events.delete(e):this.events.clear(),this}listeners(e){return Array.from(this._getListeners(e))}listenerCount(e){return this._getListeners(e).length}rawListeners(e){return this.listeners(e)}},Qa=Ya;Qa.defaultMaxListeners=10;const H=new Qa;var En=(e=>(e.BottomLeft="bottomLeft",e.BottomRight="bottomRight",e.Center="center",e.TopLeft="topLeft",e.TopRight="topRight",e))(En||{}),Fe=(e=>(e.Error="x-ul-error",e.EnvironmentID="x-ul-environment-id",e.InstallationMethod="x-ul-installation-method",e.PartnerAnonymousId="x-ul-anonymous-id",e.Platform="userleap-platform",e.PreviewMode="x-ul-preview-mode",e.UserID="x-ul-user-id",e.VisitorID="x-ul-visitor-id",e))(Fe||{}),Rt=(e=>(e.Email="email",e.Link="link",e.Web="web",e))(Rt||{}),ft=(e=>(e.Npm="web-npm",e.NpmBundled="web-npm-bundled",e.Gtm="web-gtm",e.Segment="web-segment",e.SegmentAndroid="android-segment",e.SegmentReactNative="react-native-segment",e.SegmentIOS="ios-segment",e.Snippet="web-snippet",e))(ft||{});const sr=e=>new Promise(t=>{setTimeout(()=>{t()},e)}),Xt=({"userleap-platform":e})=>e!==Rt.Web,re=(e,t)=>{const n=t?O.MobileSuffix:O.DesktopSuffix;return[e+n,e]},Uf=(e,t)=>[e,`${e}__${t}`];class Za{constructor(t){se(this,"storage");se(this,"tempStorage",{});se(this,"isStorageAvailable");this.storage=window[t],this.isStorageAvailable=this.checkIfStorageAvailable()}checkIfStorageAvailable(){try{const t="__storage_test__";return this.storage.setItem(t,t),this.storage.removeItem(t),!0}catch{return!1}}setItem(t,n){this.isStorageAvailable?this.storage.setItem(t,n):this.tempStorage[t]=n}getItem(t){return this.isStorageAvailable?this.storage.getItem(t):this.tempStorage[t]}removeItem(t){this.isStorageAvailable?this.storage.removeItem(t):delete this.tempStorage[t]}clear(){this.isStorageAvailable?this.storage.clear():this.tempStorage={}}}const pt=new Za("sessionStorage"),_e=new Za("localStorage");class Of{constructor(t){se(this,"payload");se(this,"promise");se(this,"reject",()=>{});se(this,"resolve",()=>{});this.payload=t,this.promise=new Promise((n,r)=>{this.reject=r,this.resolve=n})}resolveRequest(t){this.resolve(t)}}const Df={RATELIMIT_RESET_DEFAULT:10};let Xa=!1,Ja="",lr=!1,es=!1,ur=[];const Pf=e=>e._config&&e._config.installationMethod?e._config.installationMethod:e._gtm?ft.Gtm:e._segment?ft.Segment:ft.Snippet,Ci=e=>{var t;(t=e==null?void 0:e.blockedURI)!=null&&t.includes(window.UserLeap._API_URL)&&(es=!0,console.warn(`[Sprig] ${e.blockedURI} is blocked by Content-Security-Policy`),document.removeEventListener("securitypolicyviolation",Ci))},Si=(e="")=>{Xa=!0,Ja=e};function Jt(e={}){const t={"Content-Type":"application/json","userleap-platform":Rt.Web,"x-ul-sdk-version":"2.24.12-beta.0",[Fe.InstallationMethod]:Pf(e)};if(e.envId&&(t[Fe.EnvironmentID]=e.envId),e.token&&(t.Authorization="Bearer "+e.token),e.userId&&(t[Fe.UserID]=e.userId),e.visitorId&&(t[Fe.VisitorID]=e.visitorId),e.partnerAnonymousId&&(t[Fe.PartnerAnonymousId]=e.partnerAnonymousId),e.mobileHeadersJSON){const n=JSON.parse(e.mobileHeadersJSON);Object.assign(t,n)}return e.locale&&(t["accept-language"]=e.locale),window.previewMode&&(t[Fe.PreviewMode]="1"),t}const ts=async(e,t,n)=>{if(e)return{status:429};{const r=new Of(n);return ur.push(r),r.promise}},Ze=async(e,t,n=0,r=!1,i=!1)=>{const o={url:e,options:t,attempt:n,shouldDropOnRateLimit:r};if(lr&&!i)return ts(r,i,o);const a={ok:!1,reportError:!1};if(Xa)return console.info(`UserLeap - ${Ja}`),a;try{t.headers=Object.assign(Jt(),t.headers);const s=await fetch(e,t);if(s.status===429)if(!lr&&!r||i){lr=!0;const u=s.headers.has("ratelimit-reset")?Number(s.headers.get("ratelimit-reset")):Df.RATELIMIT_RESET_DEFAULT;return await sr(u*1e3),Ze(e,t,0,r,!0)}else return ts(r,!1,o);if(lr=!1,ur.length&&(ur.map(l=>{const{url:u,options:c,attempt:d,shouldDropOnRateLimit:f}=l.payload;Ze(u,c,d,f).then(p=>{l.resolveRequest(p)})}),ur=[]),s.ok){if(s.status===249)return Si(),a;const l=await s.text();try{return l&&l!=="OK"&&(s.json=JSON.parse(l)),s}catch{return{ok:!1,reportError:!1,error:new Error(`failed parsing response json for ${e} - ${l}`)}}}return s}catch(s){const l=n+1;return l>5||es?{ok:!1,reportError:!1,error:s}:(await sr(Math.pow(2,n)*1e3),Ze(e,t,l))}};var ns={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(q,function(){var n=function(o,a){if(a=a||{},typeof o!="function")throw new i("fetch must be a function");if(typeof a!="object")throw new i("defaults must be an object");if(a.retries!==void 0&&!r(a.retries))throw new i("retries must be a positive integer");if(a.retryDelay!==void 0&&!r(a.retryDelay)&&typeof a.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(a.retryOn!==void 0&&!Array.isArray(a.retryOn)&&typeof a.retryOn!="function")throw new i("retryOn property expects an array or function");var s={retries:3,retryDelay:1e3,retryOn:[]};return a=Object.assign(s,a),function(u,c){var d=a.retries,f=a.retryDelay,p=a.retryOn;if(c&&c.retries!==void 0)if(r(c.retries))d=c.retries;else throw new i("retries must be a positive integer");if(c&&c.retryDelay!==void 0)if(r(c.retryDelay)||typeof c.retryDelay=="function")f=c.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(c&&c.retryOn)if(Array.isArray(c.retryOn)||typeof c.retryOn=="function")p=c.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(h,v){var m=function(_){var b=typeof Request<"u"&&u instanceof Request?u.clone():u;o(b,c).then(function(E){if(Array.isArray(p)&&p.indexOf(E.status)===-1)h(E);else if(typeof p=="function")try{return Promise.resolve(p(_,null,E)).then(function(g){g?w(_,null,E):h(E)}).catch(v)}catch(g){v(g)}else _=0}function i(o){this.name="ArgumentError",this.message=o}return n})})(ns);const Nf=ns.exports;class Mf{constructor(t){se(this,"awaitingResolvers",[]);se(this,"activeCount",0);this.capacity=t}async acquire(){if(this.activeCount{this.awaitingResolvers.push(t)})}release(){const t=this.awaitingResolvers.shift();t&&this.activeCount<=this.capacity?t():this.activeCount--}async execute(t){try{return await this.acquire(),await t()}finally{this.release()}}setLimit(t){this.capacity=t}}const rs=new Mf(2),Vf=e=>rs.setLimit(e),jf=Nf(fetch),Bf=async(e,t=3)=>rs.execute(async()=>{const r=(await jf(e.uploadUrl,{body:e.data,method:"PUT",retries:t,retryDelay:i=>Math.pow(2,i)*1e3})).headers.get("ETag");if(!r)throw new Error(`Upload response did not include etag for upload ${e.uploadId}, part ${e.chunkIndex}`);return r}),is=async({apiUrl:e,surveyId:t,uploadId:n,etags:r,headers:i,responseGroupUuid:o,replayDuration:a,eventDigest:s},l=!1)=>{var u;if(!(!l&&!n&&!r))return Ze(`${e}/sdk/1/completeSessionReplay`,{method:"POST",body:JSON.stringify({etags:r,uploadId:n,responseGroupUuid:o,surveyId:t,replayDuration:a,eventDigest:s,userAgent:(u=window==null?void 0:window.navigator)==null?void 0:u.userAgent}),headers:i})};/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var $=function(){return $=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u"?ne:Reflect.ownKeys)(t).forEach(function(n){Xe(e,n,t[n])})}var os=Object.defineProperty;function Xe(e,t,n,r){os(e,t,pe(n&&we(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function tn(e){return{from:function(t){return e.prototype=Object.create(t.prototype),Xe(e.prototype,"constructor",e),{extend:en.bind(null,e.prototype)}}}}var Hf=Object.getOwnPropertyDescriptor;function ki(e,t){var n=Hf(e,t),r;return n||(r=xn(e))&&ki(r,t)}var Kf=[].slice;function cr(e,t,n){return Kf.call(e,t,n)}function as(e,t){return t(e)}function Cn(e){if(!e)throw new Error("Assertion Failed")}function ss(e){Y.setImmediate?setImmediate(e):setTimeout(e,0)}function ls(e,t){return e.reduce(function(n,r,i){var o=t(r,i);return o&&(n[o[0]]=o[1]),n},{})}function $f(e,t,n){try{e.apply(null,n)}catch(r){t&&t(r)}}function Je(e,t){if(we(e,t))return e[t];if(!t)return e;if(typeof t!="string"){for(var n=[],r=0,i=t.length;r=0)t=e;else{var i=xn(e);t=i===Object.prototype?{}:Object.create(i),ht&&ht.set(e,t);for(var o in e)we(e,o)&&(t[o]=Ti(e[o]))}return t}var Wf={}.toString;function Li(e){return Wf.call(e).slice(8,-1)}var Ri=typeof Symbol<"u"?Symbol.iterator:"@@iterator",Yf=typeof Ri=="symbol"?function(e){var t;return e!=null&&(t=e[Ri])&&t.apply(e)}:function(){return null},nn={};function et(e){var t,n,r,i;if(arguments.length===1){if(de(e))return e.slice();if(this===nn&&typeof e=="string")return[e];if(i=Yf(e)){for(n=[];r=i.next(),!r.done;)n.push(r.value);return n}if(e==null)return[e];if(t=e.length,typeof t=="number"){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}var Ai=typeof Symbol<"u"?function(e){return e[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},He=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function fs(e,t){He=e,ps=t}var ps=function(){return!0},Qf=!new Error("").stack;function At(){if(Qf)try{throw At.arguments,new Error}catch(e){return e}return new Error}function Ui(e,t){var n=e.stack;return n?(t=t||0,n.indexOf(e.name)===0&&(t+=(e.name+e.message).split(` +var al=Object.defineProperty;var ll=(se,ce,Ae)=>ce in se?al(se,ce,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):se[ce]=Ae;var V=(se,ce,Ae)=>(ll(se,typeof ce!="symbol"?ce+"":ce,Ae),Ae);(function(){"use strict";let se;const ce=new Uint8Array(16);function Ae(){if(!se&&(se=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!se))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return se(ce)}const q=[];for(let e=0;e<256;++e)q.push((e+256).toString(16).slice(1));function cs(e,t=0){return q[e[t+0]]+q[e[t+1]]+q[e[t+2]]+q[e[t+3]]+"-"+q[e[t+4]]+q[e[t+5]]+"-"+q[e[t+6]]+q[e[t+7]]+"-"+q[e[t+8]]+q[e[t+9]]+"-"+q[e[t+10]]+q[e[t+11]]+q[e[t+12]]+q[e[t+13]]+q[e[t+14]]+q[e[t+15]]}const Lr={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function We(e,t,n){if(Lr.randomUUID&&!t&&!e)return Lr.randomUUID();e=e||{};const r=e.random||(e.rng||Ae)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return cs(r)}var Dt=(e=>(e.Caption="ul-caption",e.CardContainer="ul-card__container",e.CardMainContent="ul-card-main-content",e.Choice="choice",e.ChoiceCheckbox="select-checkbox",e.ChoiceGroup="ul-card__choices",e.ChoiceLabel="select-label",e.ChoiceLabelContainer="choice-label-container",e.ChoiceRadio="select-radio",e.ChoiceTextEntryContainer="choice-text-entry-container",e.ChoiceTextInput="choice-text-input",e.CloseButton="close-btn",e.CloseContainer="close-container",e.ConsentLegalNameInput="ul-consent-legal__name-input",e.CustomStyle="ul-custom-style",e.DesktopSuffix="--desktop",e.FadeInTransition="fade-in-transition",e.LikertNumber="likert-number",e.LikertSmiley="likert-smiley",e.LikertStar="likert-star",e.LoadingSpinner="ul-loading-spinner",e.LoadingSpinnerContainer="ul-loading-spinner-container",e.LoadingSpinnerFirst="first",e.LoadingSpinnerFourth="fourth",e.LoadingSpinnerSecond="second",e.LoadingSpinnerThird="third",e.MobileSuffix="--mobile",e.NPSNumber="nps-number",e.OpenTextInput="ul-card-text__input",e.QuestionHeader="ul-question",e.VideoCard="ul-card--video",e.CheckmarkButton="ul-button-checkmark",e.InactiveButton="ul-button-inactive",e.LeftAlignButton="ul-button-left-align",e.ButtonDisabled="sprig-button-disabled",e.SkipButton="ul-card-skip__button",e))(Dt||{});const us=500;var Oe=(e=>(e.Closed="close.click",e.Complete="survey.completed",e.PageChange="page.change",e.API="api",e.Override="override",e))(Oe||{}),D=(e=>(e.ReplayCapture="replay.capture",e.SDKReady="sdk.ready",e.SurveyAppeared="survey.appeared",e.SurveyClosed="survey.closed",e.SurveyDimensions="survey.dimensions",e.SurveyFadingOut="survey.fadingOut",e.SurveyHeight="survey.height",e.SurveyPresented="survey.presented",e.SurveyLifeCycle="survey.lifeCycle",e.SurveyWidth="survey.width",e.SurveyWillClose="survey.willClose",e.SurveyWillPresent="survey.will.present",e.CloseSurveyOnOverlayClick="close.survey.overlayClick",e.VisitorIDUpdated="visitor.id.updated",e.QuestionAnswered="question.answered",e))(D||{}),Pt=(e=>(e.SurveyId="survey.id",e))(Pt||{});const kr={SDK_READY:"sdk.ready",SURVEY_APPEARED:"survey.appeared",SURVEY_CLOSED:"survey.closed",SURVEY_DIMENSIONS:"survey.dimensions",SURVEY_FADING_OUT:"survey.fadingOut",SURVEY_HEIGHT:"survey.height",SURVEY_PRESENTED:"survey.presented",SURVEY_LIFE_CYCLE:"survey.lifeCycle",SURVEY_WILL_CLOSE:"survey.willClose",SURVEY_WILL_PRESENT:"survey.will.present",QUESTION_ANSWERED:"question.answered",REPLAY_CAPTURE:"replay.capture",CLOSE_SURVEY_ON_OVERLAY_CLICK:"close.survey.overlayClick",VISITOR_ID_UPDATED:"visitor.id.updated",DATA:{DISMISS_REASONS:{API:"api",CLOSED:"close.click",COMPLETE:"survey.completed",PAGE_CHANGE:"page.change",OVERRIDE:"override"},SURVEY_ID:"survey.id"}};var pn=(e=>(e.VerifyViewVersion="verify.view.version",e.CurrentQuestion="survey.question",e.ViewPrototypeClick="question.prototype.click",e.ViewAgreementClick="question.agreement.click",e.RecordedTaskStart="recorded.task.start",e.RecordedTaskPermissionScreen="recorded.task.permission.screen",e.SurveyComplete="survey.complete",e))(pn||{}),Ir=(e=>(e.ViewVersion="view.version",e.QuestionId="qid",e.Props="props",e))(Ir||{}),Ur=(e=>(e.Video="video",e.Audio="audio",e.Screen="screen",e))(Ur||{}),Q=(e=>(e.Preview="sprig.previewKey",e.Credentials="userleap.ids",e.PageViews="userleap.pageviews",e))(Q||{});const xr=()=>{try{return window.parent.Intercom}catch(e){return console.error(e),null}},Ar=[Object.freeze(Object.defineProperty({__proto__:null,disable:()=>{const e=xr();e&&(e.ul_wasVisible=!!document.querySelector("iframe.intercom-launcher-frame"),e.ul_wasVisible&&e("update",{hide_default_launcher:!0}))},enable:()=>{const e=xr();e&&(e.ul_wasVisible&&e("update",{hide_default_launcher:!1}),delete e.ul_wasVisible)}},Symbol.toStringTag,{value:"Module"}))];class ds{static disable(){Ar.forEach(t=>t.disable())}static enable(){Ar.forEach(t=>t.enable())}}const hs=1,Or=e=>e instanceof HTMLElement||e instanceof SVGElement,ps=(e,t,n)=>{const r=e.createElement("style");n&&(r.nonce=n),r.textContent=t,r.id=Dt.CustomStyle,e.head.appendChild(r)},fs=()=>{try{return window.parent.innerWidth}catch{return window.innerWidth}},ys=e=>{const t=e.querySelector(`.${Dt.CardContainer}`);let n=600,r=360;if(t){n=t.scrollHeight;const i=getComputedStyle(t),s=parseFloat(i.marginTop)+parseFloat(i.marginBottom),o=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth);n+=s+o,r=t.scrollWidth;const a=parseFloat(i.marginLeft)+parseFloat(i.marginRight),l=parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth);r+=a+l}return[n+hs,Math.min(r,fs())]};var ms=class extends Error{constructor(e,t,n){super(`Possible EventEmitter memory leak detected. ${n} ${t.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`),this.emitter=e,this.type=t,this.count=n,this.name="MaxListenersExceededWarning"}},Dr=class{static listenerCount(e,t){return e.listenerCount(t)}constructor(){this.events=new Map,this.maxListeners=Dr.defaultMaxListeners,this.hasWarnedAboutPotentialMemoryLeak=!1}_emitInternalEvent(e,t,n){this.emit(e,t,n)}_getListeners(e){return Array.prototype.concat.apply([],this.events.get(e))||[]}_removeListener(e,t){const n=e.indexOf(t);return n>-1&&e.splice(n,1),[]}_wrapOnceListener(e,t){const n=(...r)=>(this.removeListener(e,n),t.apply(this,r));return Object.defineProperty(n,"name",{value:t.name}),n}setMaxListeners(e){return this.maxListeners=e,this}getMaxListeners(){return this.maxListeners}eventNames(){return Array.from(this.events.keys())}emit(e,...t){const n=this._getListeners(e);return n.forEach(r=>{r.apply(this,t)}),n.length>0}addListener(e,t){this._emitInternalEvent("newListener",e,t);const n=this._getListeners(e).concat(t);if(this.events.set(e,n),this.maxListeners>0&&this.listenerCount(e)>this.maxListeners&&!this.hasWarnedAboutPotentialMemoryLeak){this.hasWarnedAboutPotentialMemoryLeak=!0;const r=new ms(this,e,this.listenerCount(e));console.warn(r)}return this}on(e,t){return this.addListener(e,t)}once(e,t){return this.addListener(e,this._wrapOnceListener(e,t))}prependListener(e,t){const n=this._getListeners(e);if(n.length>0){const r=[t].concat(n);this.events.set(e,r)}else this.events.set(e,n.concat(t));return this}prependOnceListener(e,t){return this.prependListener(e,this._wrapOnceListener(e,t))}removeListener(e,t){const n=this._getListeners(e);return n.length>0&&(this._removeListener(n,t),this.events.set(e,n),this._emitInternalEvent("removeListener",e,t)),this}off(e,t){return this.removeListener(e,t)}removeAllListeners(e){return e?this.events.delete(e):this.events.clear(),this}listeners(e){return Array.from(this._getListeners(e))}listenerCount(e){return this._getListeners(e).length}rawListeners(e){return this.listeners(e)}},Pr=Dr;Pr.defaultMaxListeners=10;const P=new Pr;var lt=(e=>(e.BottomLeft="bottomLeft",e.BottomRight="bottomRight",e.Center="center",e.TopLeft="topLeft",e.TopRight="topRight",e))(lt||{}),oe=(e=>(e.Error="x-ul-error",e.EnvironmentID="x-ul-environment-id",e.InstallationMethod="x-ul-installation-method",e.PartnerAnonymousId="x-ul-anonymous-id",e.Platform="userleap-platform",e.PreviewMode="x-ul-preview-mode",e.UserID="x-ul-user-id",e.VisitorID="x-ul-visitor-id",e))(oe||{}),Rt=(e=>(e.Email="email",e.Link="link",e.Web="web",e))(Rt||{}),ze=(e=>(e.Npm="web-npm",e.NpmBundled="web-npm-bundled",e.Gtm="web-gtm",e.Segment="web-segment",e.SegmentAndroid="android-segment",e.SegmentReactNative="react-native-segment",e.SegmentIOS="ios-segment",e.Snippet="web-snippet",e))(ze||{});const Ct=e=>new Promise(t=>{setTimeout(()=>{t()},e)}),gs=({"userleap-platform":e})=>e!==Rt.Web;class Rr{constructor(t){V(this,"storage");V(this,"tempStorage",{});V(this,"isStorageAvailable");this.storage=window[t],this.isStorageAvailable=this.checkIfStorageAvailable()}checkIfStorageAvailable(){try{const t="__storage_test__";return this.storage.setItem(t,t),this.storage.removeItem(t),!0}catch{return!1}}setItem(t,n){this.isStorageAvailable?this.storage.setItem(t,n):this.tempStorage[t]=n}getItem(t){return this.isStorageAvailable?this.storage.getItem(t):this.tempStorage[t]}removeItem(t){this.isStorageAvailable?this.storage.removeItem(t):delete this.tempStorage[t]}clear(){this.isStorageAvailable?this.storage.clear():this.tempStorage={}}}const ve=new Rr("sessionStorage"),X=new Rr("localStorage");var ws=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cr={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ws,function(){var n=function(s,o){if(o=o||{},typeof s!="function")throw new i("fetch must be a function");if(typeof o!="object")throw new i("defaults must be an object");if(o.retries!==void 0&&!r(o.retries))throw new i("retries must be a positive integer");if(o.retryDelay!==void 0&&!r(o.retryDelay)&&typeof o.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(o.retryOn!==void 0&&!Array.isArray(o.retryOn)&&typeof o.retryOn!="function")throw new i("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return o=Object.assign(a,o),function(u,c){var h=o.retries,d=o.retryDelay,p=o.retryOn;if(c&&c.retries!==void 0)if(r(c.retries))h=c.retries;else throw new i("retries must be a positive integer");if(c&&c.retryDelay!==void 0)if(r(c.retryDelay)||typeof c.retryDelay=="function")d=c.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(c&&c.retryOn)if(Array.isArray(c.retryOn)||typeof c.retryOn=="function")p=c.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(g,y){var w=function(f){var v=typeof Request<"u"&&u instanceof Request?u.clone():u;s(v,c).then(function(b){if(Array.isArray(p)&&p.indexOf(b.status)===-1)g(b);else if(typeof p=="function")try{return Promise.resolve(p(f,null,b)).then(function(_){_?m(f,null,b):g(b)}).catch(y)}catch(_){y(_)}else f=0}function i(s){this.name="ArgumentError",this.message=s}return n})})(Cr);var bs=Cr.exports;const Tr=vs(bs),_s=Tr(fetch),Ge={Error:1,Warn:2,Info:3,Debug:4};let fn=1e3,Tt=Ge.Debug,He=[];const Ss=e=>{const t=Object.entries(Ge).find(n=>n[1]===e);return(t==null?void 0:t[0])??""},Es=e=>e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3}),Ls=(e,t)=>`${Es(t)}:${e}`,ks=()=>{He=He.filter(e=>e.level<=Tt)},Is=()=>{He.length>fn&&He.shift()},Bt=(e,t)=>{e>Tt||(He.push({level:e,line:Ls(t,new Date)}),Is())},ct=e=>{Bt(Ge.Debug,e)},I=e=>{Bt(Ge.Info,e)},Br=e=>{Bt(Ge.Warn,e)},jr=e=>{Bt(Ge.Error,e)},Us=()=>He.map(e=>e.line),xs=()=>new TextEncoder().encode(Us().join(` +`)),As=async e=>{if(!e)return;const t=xs();return _s(e,{body:t,method:"PUT",retries:3,retryDelay:n=>Math.pow(2,n)*1e3})},Os=(e,t)=>{e!==void 0&&(fn=e),t!==void 0&&(Tt=t),ct(`Initializing logger with limit of ${fn} lines and ${Ss(Tt)} level`),ks()};class Ds{constructor(t){V(this,"payload");V(this,"promise");V(this,"reject",()=>{});V(this,"resolve",()=>{});this.payload=t,this.promise=new Promise((n,r)=>{this.reject=r,this.resolve=n})}resolveRequest(t){this.resolve(t)}}const Ps={RATELIMIT_RESET_DEFAULT:10};let Kr=!1,Nr="",jt=!1,Fr=!1,Kt=[];const Rs=e=>e._config&&e._config.installationMethod?e._config.installationMethod:e._gtm?ze.Gtm:e._segment?ze.Segment:ze.Snippet,yn=e=>{var t;(t=e==null?void 0:e.blockedURI)!=null&&t.includes(window.UserLeap._API_URL)&&(Fr=!0,console.warn(`[Sprig] ${e.blockedURI} is blocked by Content-Security-Policy`),document.removeEventListener("securitypolicyviolation",yn))},mn=(e="")=>{Kr=!0,Nr=e};function Ye(e={}){const t={"Content-Type":"application/json","userleap-platform":Rt.Web,"x-ul-sdk-version":"2.26.2",[oe.InstallationMethod]:Rs(e)};if(e.envId&&(t[oe.EnvironmentID]=e.envId),e.token&&(t.Authorization="Bearer "+e.token),e.userId&&(t[oe.UserID]=e.userId),e.visitorId&&(t[oe.VisitorID]=e.visitorId),e.partnerAnonymousId&&(t[oe.PartnerAnonymousId]=e.partnerAnonymousId),e.mobileHeadersJSON){const n=JSON.parse(e.mobileHeadersJSON);Object.assign(t,n)}return e.locale&&(t["accept-language"]=e.locale),window.previewMode&&(t[oe.PreviewMode]="1"),t}const Mr=async(e,t,n)=>{if(e)return{status:429};{const r=new Ds(n);return Kt.push(r),r.promise}},Je=async(e,t,n=0,r=!1,i=!1)=>{const s={url:e,options:t,attempt:n,shouldDropOnRateLimit:r};if(jt&&!i)return Mr(r,i,s);const o={ok:!1,reportError:!1};if(Kr)return console.info(`UserLeap - ${Nr}`),o;try{t.headers=Object.assign(Ye(),t.headers);const a=await fetch(e,t);if(a.status===429)if(!jt&&!r||i){jt=!0;const u=a.headers.has("ratelimit-reset")?Number(a.headers.get("ratelimit-reset")):Ps.RATELIMIT_RESET_DEFAULT;return await Ct(u*1e3),Je(e,t,0,r,!0)}else return Mr(r,!1,s);if(jt=!1,Kt.length&&(Kt.map(l=>{const{url:u,options:c,attempt:h,shouldDropOnRateLimit:d}=l.payload;Je(u,c,h,d).then(p=>{l.resolveRequest(p)})}),Kt=[]),a.ok){if(a.status===249)return mn(),o;const l=await a.text();try{return l&&l!=="OK"&&(a.json=JSON.parse(l)),a}catch{return{ok:!1,reportError:!1,error:new Error(`failed parsing response json for ${e} - ${l}`)}}}return a}catch(a){const l=n+1;return l>5||Fr?{ok:!1,reportError:!1,error:a}:(await Ct(Math.pow(2,n)*1e3),Je(e,t,l))}};class Cs{constructor(t){V(this,"awaitingResolvers",[]);V(this,"activeCount",0);this.capacity=t}async acquire(){if(this.activeCount{this.awaitingResolvers.push(t)})}release(){const t=this.awaitingResolvers.shift();t&&this.activeCount<=this.capacity?t():this.activeCount--}async execute(t){try{return await this.acquire(),await t()}finally{this.release()}}setLimit(t){this.capacity=t}}const $r=new Cs(2),Ts=e=>$r.setLimit(e),Bs=Tr(fetch),js=async(e,t=3)=>$r.execute(async()=>{I(`Beginning upload of chunk ${e.chunkIndex} for survey: ${e.surveyId}`);const n=await Bs(e.uploadUrl,{body:e.data,method:"PUT",retries:t,retryDelay:i=>Math.pow(2,i)*1e3});I(`Completed upload of chunk ${e.chunkIndex} for survey: ${e.surveyId}`);const r=n.headers.get("ETag");if(!r)throw new Error(`Upload response did not include etag for upload ${e.uploadId}, part ${e.chunkIndex}`);return r}),Vr=async({apiUrl:e,surveyId:t,uploadId:n,etags:r,headers:i,responseGroupUuid:s,replayDuration:o,eventDigest:a},l=!1)=>{var u;if(!l&&!n&&!r){I(`Cannot mark upload complete: isMobile: ${l} / uploadId: ${n} / etags: ${r}`);return}I(`Marking upload complete for survey: ${t}`),await Je(`${e}/sdk/1/completeSessionReplay`,{method:"POST",body:JSON.stringify({etags:r,uploadId:n,responseGroupUuid:s,surveyId:t,replayDuration:o,eventDigest:a,userAgent:(u=window==null?void 0:window.navigator)==null?void 0:u.userAgent}),headers:i}),I(`Done marking upload complete for survey: ${t}`)},j=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,N=Object.keys,W=Array.isArray;function G(e,t){return typeof t!="object"||N(t).forEach(function(n){e[n]=t[n]}),e}typeof Promise>"u"||j.Promise||(j.Promise=Promise);const ut=Object.getPrototypeOf,Ks={}.hasOwnProperty;function Z(e,t){return Ks.call(e,t)}function Qe(e,t){typeof t=="function"&&(t=t(ut(e))),(typeof Reflect>"u"?N:Reflect.ownKeys)(t).forEach(n=>{ue(e,n,t[n])})}const qr=Object.defineProperty;function ue(e,t,n,r){qr(e,t,G(n&&Z(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function Xe(e){return{from:function(t){return e.prototype=Object.create(t.prototype),ue(e.prototype,"constructor",e),{extend:Qe.bind(null,e.prototype)}}}}const Ns=Object.getOwnPropertyDescriptor;function gn(e,t){let n;return Ns(e,t)||(n=ut(e))&&gn(n,t)}const Fs=[].slice;function Nt(e,t,n){return Fs.call(e,t,n)}function Wr(e,t){return t(e)}function dt(e){if(!e)throw new Error("Assertion Failed")}function zr(e){j.setImmediate?setImmediate(e):setTimeout(e,0)}function Gr(e,t){return e.reduce((n,r,i)=>{var s=t(r,i);return s&&(n[s[0]]=s[1]),n},{})}function de(e,t){if(Z(e,t))return e[t];if(!t)return e;if(typeof t!="string"){for(var n=[],r=0,i=t.length;r["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>j[e]),$s=Jr.map(e=>j[e]);Gr(Jr,e=>[e,!0]);let be=null;function ht(e){be=typeof WeakMap<"u"&&new WeakMap;const t=wn(e);return be=null,t}function wn(e){if(!e||typeof e!="object")return e;let t=be&&be.get(e);if(t)return t;if(W(e)){t=[],be&&be.set(e,t);for(var n=0,r=e.length;n=0)t=e;else{const s=ut(e);for(var i in t=s===Object.prototype?{}:Object.create(s),be&&be.set(e,t),e)Z(e,i)&&(t[i]=wn(e[i]))}return t}const{toString:Vs}={};function vn(e){return Vs.call(e).slice(8,-1)}const bn=typeof Symbol<"u"?Symbol.iterator:"@@iterator",qs=typeof bn=="symbol"?function(e){var t;return e!=null&&(t=e[bn])&&t.apply(e)}:function(){return null},Ze={};function he(e){var t,n,r,i;if(arguments.length===1){if(W(e))return e.slice();if(this===Ze&&typeof e=="string")return[e];if(i=qs(e)){for(n=[];!(r=i.next()).done;)n.push(r.value);return n}if(e==null)return[e];if(typeof(t=e.length)=="number"){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const _n=typeof Symbol<"u"?e=>e[Symbol.toStringTag]==="AsyncFunction":()=>!1;var ae=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Qr(e,t){ae=e,Xr=t}var Xr=()=>!0;const Ws=!new Error("").stack;function De(){if(Ws)try{throw De.arguments,new Error}catch(e){return e}return new Error}function Sn(e,t){var n=e.stack;return n?(t=t||0,n.indexOf(e.name)===0&&(t+=(e.name+e.message).split(` `).length),n.split(` -`).slice(t).filter(ps).map(function(r){return` -`+r}).join("")):""}var Zf=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"],hs=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Oi=Zf.concat(hs),Xf={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function rn(e,t){this._e=At(),this.name=e,this.message=t}tn(rn).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Ui(this._e,2))}},toString:function(){return this.name+": "+this.message}});function vs(e,t){return e+". Errors: "+Object.keys(t).map(function(n){return t[n].toString()}).filter(function(n,r,i){return i.indexOf(n)===r}).join(` -`)}function dr(e,t,n,r){this._e=At(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=vs(e,t)}tn(dr).from(rn);function In(e,t){this._e=At(),this.name="BulkError",this.failures=Object.keys(t).map(function(n){return t[n]}),this.failuresByPos=t,this.message=vs(e,t)}tn(In).from(rn);var Di=Oi.reduce(function(e,t){return e[t]=t+"Error",e},{}),Jf=rn,j=Oi.reduce(function(e,t){var n=t+"Error";function r(i,o){this._e=At(),this.name=n,i?typeof i=="string"?(this.message=""+i+(o?` - `+o:""),this.inner=o||null):typeof i=="object"&&(this.message=i.name+" "+i.message,this.inner=i):(this.message=Xf[t]||n,this.inner=null)}return tn(r).from(Jf),e[t]=r,e},{});j.Syntax=SyntaxError,j.Type=TypeError,j.Range=RangeError;var ms=hs.reduce(function(e,t){return e[t+"Error"]=j[t],e},{});function ep(e,t){if(!e||e instanceof rn||e instanceof TypeError||e instanceof SyntaxError||!e.name||!ms[e.name])return e;var n=new ms[e.name](t||e.message,e);return"stack"in e&&Xe(n,"stack",{get:function(){return this.inner.stack}}),n}var fr=Oi.reduce(function(e,t){return["Syntax","Type","Range"].indexOf(t)===-1&&(e[t+"Error"]=j[t]),e},{});fr.ModifyError=dr,fr.DexieError=rn,fr.BulkError=In;function W(){}function kn(e){return e}function tp(e,t){return e==null||e===kn?t:function(n){return t(e(n))}}function Ut(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function np(e,t){return e===W?t:function(){var n=e.apply(this,arguments);n!==void 0&&(arguments[0]=n);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?Ut(r,this.onsuccess):r),i&&(this.onerror=this.onerror?Ut(i,this.onerror):i),o!==void 0?o:n}}function rp(e,t){return e===W?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Ut(n,this.onsuccess):n),r&&(this.onerror=this.onerror?Ut(r,this.onerror):r)}}function ip(e,t){return e===W?t:function(n){var r=e.apply(this,arguments);pe(n,r);var i=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?Ut(i,this.onsuccess):i),o&&(this.onerror=this.onerror?Ut(o,this.onerror):o),r===void 0?a===void 0?void 0:a:pe(r,a)}}function op(e,t){return e===W?t:function(){return t.apply(this,arguments)===!1?!1:e.apply(this,arguments)}}function Pi(e,t){return e===W?t:function(){var n=e.apply(this,arguments);if(n&&typeof n.then=="function"){for(var r=this,i=arguments.length,o=new Array(i);i--;)o[i]=arguments[i];return n.then(function(){return t.apply(r,o)})}return t.apply(this,arguments)}}var Tn={},ap=100,sp=20,gs=100,Ni=typeof Promise>"u"?[]:function(){var e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,xn(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,xn(t),e]}(),Mi=Ni[0],pr=Ni[1],Vi=Ni[2],ys=pr&&pr.then,hr=Mi&&Mi.constructor,ji=!!Vi,Bi=!1,lp=Vi?function(){Vi.then(yr)}:Y.setImmediate?setImmediate.bind(null,yr):Y.MutationObserver?function(){var e=document.createElement("div");new MutationObserver(function(){yr(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(yr,0)},Ln=function(e,t){Rn.push([e,t]),vr&&(lp(),vr=!1)},Fi=!0,vr=!0,Ot=[],mr=[],Hi=null,Ki=kn,on={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ts,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(function(e){try{Ts(e[0],e[1])}catch{}})}},M=on,Rn=[],Dt=0,gr=[];function U(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=W,this._lib=!1;var t=this._PSD=M;if(He&&(this._stackHolder=At(),this._prev=null,this._numPrev=0),typeof e!="function"){if(e!==Tn)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Gi(this,this._value);return}this._state=null,this._value=null,++t.ref,ws(this,e)}var $i={get:function(){var e=M,t=br;function n(r,i){var o=this,a=!e.global&&(e!==M||t!==br),s=a&&!tt(),l=new U(function(u,c){qi(o,new _s(xr(r,e,a,s),xr(i,e,a,s),u,c,e))});return He&&xs(l,this),l}return n.prototype=Tn,n},set:function(e){Xe(this,"then",e&&e.prototype===Tn?$i:{get:function(){return e},set:$i.set})}};en(U.prototype,{then:$i,_then:function(e,t){qi(this,new _s(null,null,e,t,M))},catch:function(e){if(arguments.length===1)return this.then(null,e);var t=arguments[0],n=arguments[1];return typeof t=="function"?this.then(null,function(r){return r instanceof t?n(r):_r(r)}):this.then(null,function(r){return r&&r.name===t?n(r):_r(r)})},finally:function(e){return this.then(function(t){return e(),t},function(t){return e(),_r(t)})},stack:{get:function(){if(this._stack)return this._stack;try{Bi=!0;var e=Es(this,[],sp),t=e.join(` -From previous: `);return this._state!==null&&(this._stack=t),t}finally{Bi=!1}}},timeout:function(e,t){var n=this;return e<1/0?new U(function(r,i){var o=setTimeout(function(){return i(new j.Timeout(t))},e);n.then(r,i).finally(clearTimeout.bind(null,o))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&Xe(U.prototype,Symbol.toStringTag,"Dexie.Promise"),on.env=Cs();function _s(e,t,n,r,i){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=n,this.reject=r,this.psd=i}en(U,{all:function(){var e=et.apply(null,arguments).map(Er);return new U(function(t,n){e.length===0&&t([]);var r=e.length;e.forEach(function(i,o){return U.resolve(i).then(function(a){e[o]=a,--r||t(e)},n)})})},resolve:function(e){if(e instanceof U)return e;if(e&&typeof e.then=="function")return new U(function(n,r){e.then(n,r)});var t=new U(Tn,!0,e);return xs(t,Hi),t},reject:_r,race:function(){var e=et.apply(null,arguments).map(Er);return new U(function(t,n){e.map(function(r){return U.resolve(r).then(t,n)})})},PSD:{get:function(){return M},set:function(e){return M=e}},totalEchoes:{get:function(){return br}},newPSD:vt,usePSD:sn,scheduler:{get:function(){return Ln},set:function(e){Ln=e}},rejectionMapper:{get:function(){return Ki},set:function(e){Ki=e}},follow:function(e,t){return new U(function(n,r){return vt(function(i,o){var a=M;a.unhandleds=[],a.onunhandled=o,a.finalize=Ut(function(){var s=this;cp(function(){s.unhandleds.length===0?i():o(s.unhandleds[0])})},a.finalize),e()},t,n,r)})}}),hr&&(hr.allSettled&&Xe(U,"allSettled",function(){var e=et.apply(null,arguments).map(Er);return new U(function(t){e.length===0&&t([]);var n=e.length,r=new Array(n);e.forEach(function(i,o){return U.resolve(i).then(function(a){return r[o]={status:"fulfilled",value:a}},function(a){return r[o]={status:"rejected",reason:a}}).then(function(){return--n||t(r)})})})}),hr.any&&typeof AggregateError<"u"&&Xe(U,"any",function(){var e=et.apply(null,arguments).map(Er);return new U(function(t,n){e.length===0&&n(new AggregateError([]));var r=e.length,i=new Array(r);e.forEach(function(o,a){return U.resolve(o).then(function(s){return t(s)},function(s){i[a]=s,--r||n(new AggregateError(i))})})})}));function ws(e,t){try{t(function(n){if(e._state===null){if(n===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&An();n&&typeof n.then=="function"?ws(e,function(i,o){n instanceof U?n._then(i,o):n.then(i,o)}):(e._state=!0,e._value=n,bs(e)),r&&Un()}},Gi.bind(null,e))}catch(n){Gi(e,n)}}function Gi(e,t){if(mr.push(t),e._state===null){var n=e._lib&&An();t=Ki(t),e._state=!1,e._value=t,He&&t!==null&&typeof t=="object"&&!t._promise&&$f(function(){var r=ki(t,"stack");t._promise=e,Xe(t,"stack",{get:function(){return Bi?r&&(r.get?r.get.apply(t):r.value):e.stack}})}),dp(e),bs(e),n&&Un()}}function bs(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n0;)for(e=Rn,Rn=[],n=e.length,t=0;t0);Fi=!0,vr=!0}function zi(){var e=Ot;Ot=[],e.forEach(function(r){r._PSD.onunhandled.call(null,r._value,r)});for(var t=gr.slice(0),n=t.length;n;)t[--n]()}function cp(e){function t(){e(),gr.splice(gr.indexOf(t),1)}gr.push(t),++Dt,Ln(function(){--Dt===0&&zi()},[])}function dp(e){Ot.some(function(t){return t._value===e._value})||Ot.push(e)}function fp(e){for(var t=Ot.length;t;)if(Ot[--t]._value===e._value){Ot.splice(t,1);return}}function _r(e){return new U(Tn,!1,e)}function Z(e,t){var n=M;return function(){var r=An(),i=M;try{return mt(n,!0),e.apply(this,arguments)}catch(o){t&&t(o)}finally{mt(i,!1),r&&Un()}}}var fe={awaits:0,echoes:0,id:0},pp=0,wr=[],Wi=0,br=0,hp=0;function vt(e,t,n,r){var i=M,o=Object.create(i);o.parent=i,o.ref=0,o.global=!1,o.id=++hp;var a=on.env;o.env=ji?{Promise:U,PromiseProp:{value:U,configurable:!0,writable:!0},all:U.all,race:U.race,allSettled:U.allSettled,any:U.any,resolve:U.resolve,reject:U.reject,nthen:Is(a.nthen,o),gthen:Is(a.gthen,o)}:{},t&&pe(o,t),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=sn(o,e,n,r);return o.ref===0&&o.finalize(),s}function an(){return fe.id||(fe.id=++pp),++fe.awaits,fe.echoes+=gs,fe.id}function tt(){return fe.awaits?(--fe.awaits===0&&(fe.id=0),fe.echoes=fe.awaits*gs,!0):!1}(""+ys).indexOf("[native code]")===-1&&(an=tt=W);function Er(e){return fe.echoes&&e&&e.constructor===hr?(an(),e.then(function(t){return tt(),t},function(t){return tt(),ie(t)})):e}function vp(e){++br,(!fe.echoes||--fe.echoes===0)&&(fe.echoes=fe.id=0),wr.push(M),mt(e,!0)}function mp(){var e=wr[wr.length-1];wr.pop(),mt(e,!1)}function mt(e,t){var n=M;if((t?fe.echoes&&(!Wi++||e!==M):Wi&&(!--Wi||e!==M))&&Ss(t?vp.bind(null,e):mp),e!==M&&(M=e,n===on&&(on.env=Cs()),ji)){var r=on.env.Promise,i=e.env;pr.then=i.nthen,r.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(Y,"Promise",i.PromiseProp),r.all=i.all,r.race=i.race,r.resolve=i.resolve,r.reject=i.reject,i.allSettled&&(r.allSettled=i.allSettled),i.any&&(r.any=i.any))}}function Cs(){var e=Y.Promise;return ji?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(Y,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:pr.then,gthen:e.prototype.then}:{}}function sn(e,t,n,r,i){var o=M;try{return mt(e,!0),t(n,r,i)}finally{mt(o,!1)}}function Ss(e){ys.call(Mi,e)}function xr(e,t,n,r){return typeof e!="function"?e:function(){var i=M;n&&an(),mt(t,!0);try{return e.apply(this,arguments)}finally{mt(i,!1),r&&Ss(tt)}}}function Is(e,t){return function(n,r){return e.call(this,xr(n,t),xr(r,t))}}var ks="unhandledrejection";function Ts(e,t){var n;try{n=t.onuncatched(e)}catch{}if(n!==!1)try{var r,i={promise:t,reason:e};if(Y.document&&document.createEvent?(r=document.createEvent("Event"),r.initEvent(ks,!0,!0),pe(r,i)):Y.CustomEvent&&(r=new CustomEvent(ks,{detail:i}),pe(r,i)),r&&Y.dispatchEvent&&(dispatchEvent(r),!Y.PromiseRejectionEvent&&Y.onunhandledrejection))try{Y.onunhandledrejection(r)}catch{}He&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: "+(e.stack||e))}catch{}}var ie=U.reject;function Yi(e,t,n,r){if(!e.idbdb||!e._state.openComplete&&!M.letThrough&&!e._vip){if(e._state.openComplete)return ie(new j.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return ie(new j.DatabaseClosed);e.open().catch(W)}return e._state.dbReadyPromise.then(function(){return Yi(e,t,n,r)})}else{var i=e._createTransaction(t,n,e._dbSchema);try{i.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===Di.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(function(){return Yi(e,t,n,r)})):ie(o)}return i._promise(t,function(o,a){return vt(function(){return M.trans=i,r(o,a,i)})}).then(function(o){return i._completion.then(function(){return o})})}}var Ls="3.2.4",Pt=String.fromCharCode(65535),Qi=-1/0,nt="Invalid key provided. Keys must be of type string, number, Date or Array.",Rs="String expected.",On=[],Cr=typeof navigator<"u"&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),gp=Cr,yp=Cr,As=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)},Sr="__dbnames",Zi="readonly",Xi="readwrite";function Nt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var Us={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Ir(e){return typeof e=="string"&&!/\./.test(e)?function(t){return t[e]===void 0&&e in t&&(t=Sn(t),delete t[e]),t}:function(t){return t}}var _p=function(){function e(){}return e.prototype._trans=function(t,n,r){var i=this._tx||M.trans,o=this.name;function a(l,u,c){if(!c.schema[o])throw new j.NotFound("Table "+o+" not part of transaction");return n(c.idbtrans,c)}var s=An();try{return i&&i.db===this.db?i===M.trans?i._promise(t,a,r):vt(function(){return i._promise(t,a,r)},{trans:i,transless:M.transless||M}):Yi(this.db,t,[this.name],a)}finally{s&&Un()}},e.prototype.get=function(t,n){var r=this;return t&&t.constructor===Object?this.where(t).first(n):this._trans("readonly",function(i){return r.core.get({trans:i,key:t}).then(function(o){return r.hook.reading.fire(o)})}).then(n)},e.prototype.where=function(t){if(typeof t=="string")return new this.db.WhereClause(this,t);if(de(t))return new this.db.WhereClause(this,"["+t.join("+")+"]");var n=ne(t);if(n.length===1)return this.where(n[0]).equals(t[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter(function(c){return c.compound&&n.every(function(d){return c.keyPath.indexOf(d)>=0})&&c.keyPath.every(function(d){return n.indexOf(d)>=0})})[0];if(r&&this.db._maxKey!==Pt)return this.where(r.name).equals(r.keyPath.map(function(c){return t[c]}));!r&&He&&console.warn("The query "+JSON.stringify(t)+" on "+this.name+" would benefit of a "+("compound index ["+n.join("+")+"]"));var i=this.schema.idxByName,o=this.db._deps.indexedDB;function a(c,d){try{return o.cmp(c,d)===0}catch{return!1}}var s=n.reduce(function(c,d){var f=c[0],p=c[1],h=i[d],v=t[d];return[f||h,f||!h?Nt(p,h&&h.multi?function(m){var w=Je(m,d);return de(w)&&w.some(function(_){return a(v,_)})}:function(m){return a(v,Je(m,d))}):p]},[null,null]),l=s[0],u=s[1];return l?this.where(l.name).equals(t[l.keyPath]).filter(u):r?this.filter(u):this.where(n).equals("")},e.prototype.filter=function(t){return this.toCollection().and(t)},e.prototype.count=function(t){return this.toCollection().count(t)},e.prototype.offset=function(t){return this.toCollection().offset(t)},e.prototype.limit=function(t){return this.toCollection().limit(t)},e.prototype.each=function(t){return this.toCollection().each(t)},e.prototype.toArray=function(t){return this.toCollection().toArray(t)},e.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},e.prototype.orderBy=function(t){return new this.db.Collection(new this.db.WhereClause(this,de(t)?"["+t.join("+")+"]":t))},e.prototype.reverse=function(){return this.toCollection().reverse()},e.prototype.mapToClass=function(t){this.schema.mappedClass=t;var n=function(r){if(!r)return r;var i=Object.create(t.prototype);for(var o in r)if(we(r,o))try{i[o]=r[o]}catch{}return i};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=n,this.hook("reading",n),t},e.prototype.defineClass=function(){function t(n){pe(this,n)}return this.mapToClass(t)},e.prototype.add=function(t,n){var r=this,i=this.schema.primKey,o=i.auto,a=i.keyPath,s=t;return a&&o&&(s=Ir(a)(t)),this._trans("readwrite",function(l){return r.core.mutate({trans:l,type:"add",keys:n!=null?[n]:null,values:[s]})}).then(function(l){return l.numFailures?U.reject(l.failures[0]):l.lastResult}).then(function(l){if(a)try{Oe(t,a,l)}catch{}return l})},e.prototype.update=function(t,n){if(typeof t=="object"&&!de(t)){var r=Je(t,this.schema.primKey.keyPath);if(r===void 0)return ie(new j.InvalidArgument("Given object does not contain its primary key"));try{typeof n!="function"?ne(n).forEach(function(i){Oe(t,i,n[i])}):n(t,{value:t,primKey:r})}catch{}return this.where(":id").equals(r).modify(n)}else return this.where(":id").equals(t).modify(n)},e.prototype.put=function(t,n){var r=this,i=this.schema.primKey,o=i.auto,a=i.keyPath,s=t;return a&&o&&(s=Ir(a)(t)),this._trans("readwrite",function(l){return r.core.mutate({trans:l,type:"put",values:[s],keys:n!=null?[n]:null})}).then(function(l){return l.numFailures?U.reject(l.failures[0]):l.lastResult}).then(function(l){if(a)try{Oe(t,a,l)}catch{}return l})},e.prototype.delete=function(t){var n=this;return this._trans("readwrite",function(r){return n.core.mutate({trans:r,type:"delete",keys:[t]})}).then(function(r){return r.numFailures?U.reject(r.failures[0]):void 0})},e.prototype.clear=function(){var t=this;return this._trans("readwrite",function(n){return t.core.mutate({trans:n,type:"deleteRange",range:Us})}).then(function(n){return n.numFailures?U.reject(n.failures[0]):void 0})},e.prototype.bulkGet=function(t){var n=this;return this._trans("readonly",function(r){return n.core.getMany({keys:t,trans:r}).then(function(i){return i.map(function(o){return n.hook.reading.fire(o)})})})},e.prototype.bulkAdd=function(t,n,r){var i=this,o=Array.isArray(n)?n:void 0;r=r||(o?void 0:n);var a=r?r.allKeys:void 0;return this._trans("readwrite",function(s){var l=i.schema.primKey,u=l.auto,c=l.keyPath;if(c&&o)throw new j.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new j.InvalidArgument("Arguments objects and keys must have the same length");var d=t.length,f=c&&u?t.map(Ir(c)):t;return i.core.mutate({trans:s,type:"add",keys:o,values:f,wantResults:a}).then(function(p){var h=p.numFailures,v=p.results,m=p.lastResult,w=p.failures,_=a?v:m;if(h===0)return _;throw new In(i.name+".bulkAdd(): "+h+" of "+d+" operations failed",w)})})},e.prototype.bulkPut=function(t,n,r){var i=this,o=Array.isArray(n)?n:void 0;r=r||(o?void 0:n);var a=r?r.allKeys:void 0;return this._trans("readwrite",function(s){var l=i.schema.primKey,u=l.auto,c=l.keyPath;if(c&&o)throw new j.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new j.InvalidArgument("Arguments objects and keys must have the same length");var d=t.length,f=c&&u?t.map(Ir(c)):t;return i.core.mutate({trans:s,type:"put",keys:o,values:f,wantResults:a}).then(function(p){var h=p.numFailures,v=p.results,m=p.lastResult,w=p.failures,_=a?v:m;if(h===0)return _;throw new In(i.name+".bulkPut(): "+h+" of "+d+" operations failed",w)})})},e.prototype.bulkDelete=function(t){var n=this,r=t.length;return this._trans("readwrite",function(i){return n.core.mutate({trans:i,type:"delete",keys:t})}).then(function(i){var o=i.numFailures,a=i.lastResult,s=i.failures;if(o===0)return a;throw new In(n.name+".bulkDelete(): "+o+" of "+r+" operations failed",s)})},e}();function Dn(e){var t={},n=function(s,l){if(l){for(var u=arguments.length,c=new Array(u-1);--u;)c[u-1]=arguments[u];return t[s].subscribe.apply(null,c),e}else if(typeof s=="string")return t[s]};n.addEventType=o;for(var r=1,i=arguments.length;rt?1:ef?s:0}return this.toArray(function(u){return u.sort(l)}).then(n)},e.prototype.toArray=function(t){var n=this;return this._read(function(r){var i=n._ctx;if(i.dir==="next"&&ln(i,!0)&&i.limit>0){var o=i.valueMapper,a=kr(i,i.table.core.schema);return i.table.core.query({trans:r,limit:i.limit,values:!0,query:{index:a,range:i.range}}).then(function(l){var u=l.result;return o?u.map(o):u})}else{var s=[];return Tr(i,function(l){return s.push(l)},r,i.table.core).then(function(){return s})}},t)},e.prototype.offset=function(t){var n=this._ctx;return t<=0?this:(n.offset+=t,ln(n)?eo(n,function(){var r=t;return function(i,o){return r===0?!0:r===1?(--r,!1):(o(function(){i.advance(r),r=0}),!1)}}):eo(n,function(){var r=t;return function(){return--r<0}}),this)},e.prototype.limit=function(t){return this._ctx.limit=Math.min(this._ctx.limit,t),eo(this._ctx,function(){var n=t;return function(r,i,o){return--n<=0&&i(o),n>=0}},!0),this},e.prototype.until=function(t,n){return Ji(this._ctx,function(r,i,o){return t(r.value)?(i(o),n):!0}),this},e.prototype.first=function(t){return this.limit(1).toArray(function(n){return n[0]}).then(t)},e.prototype.last=function(t){return this.reverse().first(t)},e.prototype.filter=function(t){return Ji(this._ctx,function(n){return t(n.value)}),bp(this._ctx,t),this},e.prototype.and=function(t){return this.filter(t)},e.prototype.or=function(t){return new this.db.WhereClause(this._ctx.table,t,this)},e.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},e.prototype.desc=function(){return this.reverse()},e.prototype.eachKey=function(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,i){t(i.key,i)})},e.prototype.eachUniqueKey=function(t){return this._ctx.unique="unique",this.eachKey(t)},e.prototype.eachPrimaryKey=function(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,i){t(i.primaryKey,i)})},e.prototype.keys=function(t){var n=this._ctx;n.keysOnly=!n.isMatch;var r=[];return this.each(function(i,o){r.push(o.key)}).then(function(){return r}).then(t)},e.prototype.primaryKeys=function(t){var n=this._ctx;if(n.dir==="next"&&ln(n,!0)&&n.limit>0)return this._read(function(i){var o=kr(n,n.table.core.schema);return n.table.core.query({trans:i,values:!1,limit:n.limit,query:{index:o,range:n.range}})}).then(function(i){var o=i.result;return o}).then(t);n.keysOnly=!n.isMatch;var r=[];return this.each(function(i,o){r.push(o.primaryKey)}).then(function(){return r}).then(t)},e.prototype.uniqueKeys=function(t){return this._ctx.unique="unique",this.keys(t)},e.prototype.firstKey=function(t){return this.limit(1).keys(function(n){return n[0]}).then(t)},e.prototype.lastKey=function(t){return this.reverse().firstKey(t)},e.prototype.distinct=function(){var t=this._ctx,n=t.index&&t.table.schema.idxByName[t.index];if(!n||!n.multi)return this;var r={};return Ji(this._ctx,function(i){var o=i.primaryKey.toString(),a=we(r,o);return r[o]=!0,!a}),this},e.prototype.modify=function(t){var n=this,r=this._ctx;return this._write(function(i){var o;if(typeof t=="function")o=t;else{var a=ne(t),s=a.length;o=function(w){for(var _=!1,b=0;b0&&l.mutate({trans:i,type:"add",values:x}).then(function(A){for(var k in A.failures)S.splice(parseInt(k),1);m(x.length,A)})).then(function(){return(I.length>0||P&&typeof t=="object")&&l.mutate({trans:i,type:"put",keys:C,values:I,criteria:P,changeSpec:typeof t!="function"&&t}).then(function(A){return m(I.length,A)})}).then(function(){return(S.length>0||P&&t===to)&&l.mutate({trans:i,type:"delete",keys:S,criteria:P}).then(function(A){return m(S.length,A)})}).then(function(){return w.length>b+E&&_(b+f)})})};return _(0).then(function(){if(p.length>0)throw new dr("Error modifying one or more objects",p,h,v);return w.length})})})},e.prototype.delete=function(){var t=this._ctx,n=t.range;return ln(t)&&(t.isPrimKey&&!yp||n.type===3)?this._write(function(r){var i=t.table.core.schema.primaryKey,o=n;return t.table.core.count({trans:r,query:{index:i,range:o}}).then(function(a){return t.table.core.mutate({trans:r,type:"deleteRange",range:o}).then(function(s){var l=s.failures;s.lastResult,s.results;var u=s.numFailures;if(u)throw new dr("Could not delete some values",Object.keys(l).map(function(c){return l[c]}),a-u);return a-u})})}):this.modify(to)},e}(),to=function(e,t){return t.value=null};function Sp(e){return Pn(Cp.prototype,function(n,r){this.db=e;var i=Us,o=null;if(r)try{i=r()}catch(u){o=u}var a=n._ctx,s=a.table,l=s.hook.reading.fire;this._ctx={table:s,index:a.index,isPrimKey:!a.index||s.schema.primKey.keyPath&&a.index===s.schema.primKey.name,range:i,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:a.or,valueMapper:l!==kn?l:null}})}function Ip(e,t){return et?-1:e===t?0:1}function be(e,t,n){var r=e instanceof Vs?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function un(e){return new e.Collection(e,function(){return Ms("")}).limit(0)}function Tp(e){return e==="next"?function(t){return t.toUpperCase()}:function(t){return t.toLowerCase()}}function Lp(e){return e==="next"?function(t){return t.toLowerCase()}:function(t){return t.toUpperCase()}}function Rp(e,t,n,r,i,o){for(var a=Math.min(e.length,r.length),s=-1,l=0;l=0?e.substr(0,s)+t[s]+n.substr(s+1):null;i(e[l],u)<0&&(s=l)}return a0)&&(E=x)}return m(E!==null?function(){v.continue(E+c)}:w),!1}),p}function gt(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Ms(e){return{type:1,lower:e,upper:e}}var Vs=function(){function e(){}return Object.defineProperty(e.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),e.prototype.between=function(t,n,r,i){r=r!==!1,i=i===!0;try{return this._cmp(t,n)>0||this._cmp(t,n)===0&&(r||i)&&!(r&&i)?un(this):new this.Collection(this,function(){return gt(t,n,!r,!i)})}catch{return be(this,nt)}},e.prototype.equals=function(t){return t==null?be(this,nt):new this.Collection(this,function(){return Ms(t)})},e.prototype.above=function(t){return t==null?be(this,nt):new this.Collection(this,function(){return gt(t,void 0,!0)})},e.prototype.aboveOrEqual=function(t){return t==null?be(this,nt):new this.Collection(this,function(){return gt(t,void 0,!1)})},e.prototype.below=function(t){return t==null?be(this,nt):new this.Collection(this,function(){return gt(void 0,t,!1,!0)})},e.prototype.belowOrEqual=function(t){return t==null?be(this,nt):new this.Collection(this,function(){return gt(void 0,t)})},e.prototype.startsWith=function(t){return typeof t!="string"?be(this,Rs):this.between(t,t+Pt,!0,!0)},e.prototype.startsWithIgnoreCase=function(t){return t===""?this.startsWith(t):Lr(this,function(n,r){return n.indexOf(r[0])===0},[t],Pt)},e.prototype.equalsIgnoreCase=function(t){return Lr(this,function(n,r){return n===r[0]},[t],"")},e.prototype.anyOfIgnoreCase=function(){var t=et.apply(nn,arguments);return t.length===0?un(this):Lr(this,function(n,r){return r.indexOf(n)!==-1},t,"")},e.prototype.startsWithAnyOfIgnoreCase=function(){var t=et.apply(nn,arguments);return t.length===0?un(this):Lr(this,function(n,r){return r.some(function(i){return n.indexOf(i)===0})},t,Pt)},e.prototype.anyOf=function(){var t=this,n=et.apply(nn,arguments),r=this._cmp;try{n.sort(r)}catch{return be(this,nt)}if(n.length===0)return un(this);var i=new this.Collection(this,function(){return gt(n[0],n[n.length-1])});i._ondirectionchange=function(a){r=a==="next"?t._ascending:t._descending,n.sort(r)};var o=0;return i._addAlgorithm(function(a,s,l){for(var u=a.key;r(u,n[o])>0;)if(++o,o===n.length)return s(l),!1;return r(u,n[o])===0?!0:(s(function(){a.continue(n[o])}),!1)}),i},e.prototype.notEqual=function(t){return this.inAnyRange([[Qi,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},e.prototype.noneOf=function(){var t=et.apply(nn,arguments);if(t.length===0)return new this.Collection(this);try{t.sort(this._ascending)}catch{return be(this,nt)}var n=t.reduce(function(r,i){return r?r.concat([[r[r.length-1][1],i]]):[[Qi,i]]},null);return n.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(n,{includeLowers:!1,includeUppers:!1})},e.prototype.inAnyRange=function(t,n){var r=this,i=this._cmp,o=this._ascending,a=this._descending,s=this._min,l=this._max;if(t.length===0)return un(this);if(!t.every(function(g){return g[0]!==void 0&&g[1]!==void 0&&o(g[0],g[1])<=0}))return be(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",j.InvalidArgument);var u=!n||n.includeLowers!==!1,c=n&&n.includeUppers===!0;function d(g,x){for(var I=0,C=g.length;I0){S[0]=s(S[0],x[0]),S[1]=l(S[1],x[1]);break}}return I===C&&g.push(x),g}var f=o;function p(g,x){return f(g[0],x[0])}var h;try{h=t.reduce(d,[]),h.sort(p)}catch{return be(this,nt)}var v=0,m=c?function(g){return o(g,h[v][1])>0}:function(g){return o(g,h[v][1])>=0},w=u?function(g){return a(g,h[v][0])>0}:function(g){return a(g,h[v][0])>=0};function _(g){return!m(g)&&!w(g)}var b=m,E=new this.Collection(this,function(){return gt(h[0][0],h[h.length-1][1],!u,!c)});return E._ondirectionchange=function(g){g==="next"?(b=m,f=o):(b=w,f=a),h.sort(p)},E._addAlgorithm(function(g,x,I){for(var C=g.key;b(C);)if(++v,v===h.length)return x(I),!1;return _(C)?!0:(r._cmp(C,h[v][1])===0||r._cmp(C,h[v][0])===0||x(function(){f===o?g.continue(h[v][0]):g.continue(h[v][1])}),!1)}),E},e.prototype.startsWithAnyOf=function(){var t=et.apply(nn,arguments);return t.every(function(n){return typeof n=="string"})?t.length===0?un(this):this.inAnyRange(t.map(function(n){return[n,n+Pt]})):be(this,"startsWithAnyOf() only works with strings")},e}();function Ap(e){return Pn(Vs.prototype,function(n,r,i){this.db=e,this._ctx={table:n,index:r===":id"?null:r,or:i};var o=e._deps.indexedDB;if(!o)throw new j.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=function(a,s){return o.cmp(s,a)},this._max=function(a,s){return o.cmp(a,s)>0?a:s},this._min=function(a,s){return o.cmp(a,s)<0?a:s},this._IDBKeyRange=e._deps.IDBKeyRange})}function Ke(e){return Z(function(t){return Nn(t),e(t.target.error),!1})}function Nn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var Mn="storagemutated",yt="x-storagemutated-1",_t=Dn(null,Mn),Up=function(){function e(){}return e.prototype._lock=function(){return Cn(!M.global),++this._reculock,this._reculock===1&&!M.global&&(M.lockOwnerFor=this),this},e.prototype._unlock=function(){if(Cn(!M.global),--this._reculock===0)for(M.global||(M.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{sn(t[1],t[0])}catch{}}return this},e.prototype._locked=function(){return this._reculock&&M.lockOwnerFor!==this},e.prototype.create=function(t){var n=this;if(!this.mode)return this;var r=this.db.idbdb,i=this.db._state.dbOpenError;if(Cn(!this.idbtrans),!t&&!r)switch(i&&i.name){case"DatabaseClosedError":throw new j.DatabaseClosed(i);case"MissingAPIError":throw new j.MissingAPI(i.message,i);default:throw new j.OpenFailed(i)}if(!this.active)throw new j.TransactionInactive;return Cn(this._completion._state===null),t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):r.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})),t.onerror=Z(function(o){Nn(o),n._reject(t.error)}),t.onabort=Z(function(o){Nn(o),n.active&&n._reject(new j.Abort(t.error)),n.active=!1,n.on("abort").fire(o)}),t.oncomplete=Z(function(){n.active=!1,n._resolve(),"mutatedParts"in t&&_t.storagemutated.fire(t.mutatedParts)}),this},e.prototype._promise=function(t,n,r){var i=this;if(t==="readwrite"&&this.mode!=="readwrite")return ie(new j.ReadOnly("Transaction is readonly"));if(!this.active)return ie(new j.TransactionInactive);if(this._locked())return new U(function(a,s){i._blockedFuncs.push([function(){i._promise(t,n,r).then(a,s)},M])});if(r)return vt(function(){var a=new U(function(s,l){i._lock();var u=n(s,l,i);u&&u.then&&u.then(s,l)});return a.finally(function(){return i._unlock()}),a._lib=!0,a});var o=new U(function(a,s){var l=n(a,s,i);l&&l.then&&l.then(a,s)});return o._lib=!0,o},e.prototype._root=function(){return this.parent?this.parent._root():this},e.prototype.waitFor=function(t){var n=this._root(),r=U.resolve(t);if(n._waitingFor)n._waitingFor=n._waitingFor.then(function(){return r});else{n._waitingFor=r,n._waitingQueue=[];var i=n.idbtrans.objectStore(n.storeNames[0]);(function a(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(i.get(-1/0).onsuccess=a)})()}var o=n._waitingFor;return new U(function(a,s){r.then(function(l){return n._waitingQueue.push(Z(a.bind(null,l)))},function(l){return n._waitingQueue.push(Z(s.bind(null,l)))}).finally(function(){n._waitingFor===o&&(n._waitingFor=null)})})},e.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new j.Abort))},e.prototype.table=function(t){var n=this._memoizedTables||(this._memoizedTables={});if(we(n,t))return n[t];var r=this.schema[t];if(!r)throw new j.NotFound("Table "+t+" not part of transaction");var i=new this.db.Table(t,r,this);return i.core=this.db.core.table(t),n[t]=i,i},e}();function Op(e){return Pn(Up.prototype,function(n,r,i,o,a){var s=this;this.db=e,this.mode=n,this.storeNames=r,this.schema=i,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=Dn(this,"complete","error","abort"),this.parent=a||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new U(function(l,u){s._resolve=l,s._reject=u}),this._completion.then(function(){s.active=!1,s.on.complete.fire()},function(l){var u=s.active;return s.active=!1,s.on.error.fire(l),s.parent?s.parent._reject(l):u&&s.idbtrans&&s.idbtrans.abort(),ie(l)})})}function no(e,t,n,r,i,o,a){return{name:e,keyPath:t,unique:n,multi:r,auto:i,compound:o,src:(n&&!a?"&":"")+(r?"*":"")+(i?"++":"")+js(t)}}function js(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function Bs(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:ls(n,function(r){return[r.name,r]})}}function Dp(e){return e.length===1?e[0]:e}var Vn=function(e){try{return e.only([[]]),Vn=function(){return[[]]},[[]]}catch{return Vn=function(){return Pt},Pt}};function ro(e){return e==null?function(){}:typeof e=="string"?Pp(e):function(t){return Je(t,e)}}function Pp(e){var t=e.split(".");return t.length===1?function(n){return n[e]}:function(n){return Je(n,e)}}function Fs(e){return[].slice.call(e)}var Np=0;function jn(e){return e==null?":id":typeof e=="string"?e:"["+e.join("+")+"]"}function Mp(e,t,n){function r(d,f){var p=Fs(d.objectStoreNames);return{schema:{name:d.name,tables:p.map(function(h){return f.objectStore(h)}).map(function(h){var v=h.keyPath,m=h.autoIncrement,w=de(v),_=v==null,b={},E={name:h.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:_,compound:w,keyPath:v,autoIncrement:m,unique:!0,extractKey:ro(v)},indexes:Fs(h.indexNames).map(function(g){return h.index(g)}).map(function(g){var x=g.name,I=g.unique,C=g.multiEntry,S=g.keyPath,R=de(S),D={name:x,compound:R,keyPath:S,unique:I,multiEntry:C,extractKey:ro(S)};return b[jn(S)]=D,D}),getIndexByKeyPath:function(g){return b[jn(g)]}};return b[":id"]=E.primaryKey,v!=null&&(b[jn(v)]=E.primaryKey),E})},hasGetAll:p.length>0&&"getAll"in f.objectStore(p[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}function i(d){if(d.type===3)return null;if(d.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var f=d.lower,p=d.upper,h=d.lowerOpen,v=d.upperOpen,m=f===void 0?p===void 0?null:t.upperBound(p,!!v):p===void 0?t.lowerBound(f,!!h):t.bound(f,p,!!h,!!v);return m}function o(d){var f=d.name;function p(m){var w=m.trans,_=m.type,b=m.keys,E=m.values,g=m.range;return new Promise(function(x,I){x=Z(x);var C=w.objectStore(f),S=C.keyPath==null,R=_==="put"||_==="add";if(!R&&_!=="delete"&&_!=="deleteRange")throw new Error("Invalid operation type: "+_);var D=(b||E||{length:1}).length;if(b&&E&&b.length!==E.length)throw new Error("Given keys array must have same length as given values array.");if(D===0)return x({numFailures:0,failures:{},results:[],lastResult:void 0});var T,P=[],A=[],k=0,J=function(ze){++k,Nn(ze)};if(_==="deleteRange"){if(g.type===4)return x({numFailures:k,failures:A,results:[],lastResult:void 0});g.type===3?P.push(T=C.clear()):P.push(T=C.delete(i(g)))}else{var ve=R?S?[E,b]:[E,null]:[b,null],Ve=ve[0],me=ve[1];if(R)for(var Ae=0;Ae=t});u.forEach(function(d){o.push(function(){var f=s,p=d._cfg.dbschema;uo(i,f,r),uo(i,p,r),s=i._dbSchema=p;var h=Hs(f,p);h.add.forEach(function(E){ao(r,E[0],E[1].primKey,E[1].indexes)}),h.change.forEach(function(E){if(E.recreate)throw new j.Upgrade("Not yet support for changing primary key");var g=r.objectStore(E.name);E.add.forEach(function(x){return so(g,x)}),E.change.forEach(function(x){g.deleteIndex(x.name),so(g,x)}),E.del.forEach(function(x){return g.deleteIndex(x)})});var v=d._cfg.contentUpgrade;if(v&&d._cfg.version>t){io(i,r),n._memoizedTables={},l=!0;var m=us(p);h.del.forEach(function(E){m[E]=f[E]}),oo(i,[i.Transaction.prototype]),Rr(i,[i.Transaction.prototype],ne(m),m),n.schema=m;var w=Ai(v);w&&an();var _,b=U.follow(function(){if(_=v(n),_&&w){var E=tt.bind(null,null);_.then(E,E)}});return _&&typeof _.then=="function"?U.resolve(_):b.then(function(){return _})}}),o.push(function(f){if(!l||!gp){var p=d._cfg.dbschema;$p(p,f)}oo(i,[i.Transaction.prototype]),Rr(i,[i.Transaction.prototype],i._storeNames,i._dbSchema),n.schema=i._dbSchema})});function c(){return o.length?U.resolve(o.shift()(n.idbtrans)).then(c):U.resolve()}return c().then(function(){Kp(s,r)})}function Hs(e,t){var n={del:[],add:[],change:[]},r;for(r in e)t[r]||n.del.push(r);for(r in t){var i=e[r],o=t[r];if(!i)n.add.push([r,o]);else{var a={name:r,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||i.primKey.auto!==o.primKey.auto&&!Cr)a.recreate=!0,n.change.push(a);else{var s=i.idxByName,l=o.idxByName,u=void 0;for(u in s)l[u]||a.del.push(u);for(u in l){var c=s[u],d=l[u];c?c.src!==d.src&&a.change.push(d):a.add.push(d)}(a.del.length>0||a.add.length>0||a.change.length>0)&&n.change.push(a)}}}return n}function ao(e,t,n,r){var i=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach(function(o){return so(i,o)}),i}function Kp(e,t){ne(e).forEach(function(n){t.db.objectStoreNames.contains(n)||ao(t,n,e[n].primKey,e[n].indexes)})}function $p(e,t){[].slice.call(t.db.objectStoreNames).forEach(function(n){return e[n]==null&&t.db.deleteObjectStore(n)})}function so(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function lo(e,t,n){var r={},i=cr(t.objectStoreNames,0);return i.forEach(function(o){for(var a=n.objectStore(o),s=a.keyPath,l=no(js(s),s||"",!1,!1,!!a.autoIncrement,s&&typeof s!="string",!0),u=[],c=0;c"u"?U.resolve():Jp()).then(function(){return new U(function(l,u){if(i(),!n)throw new j.MissingAPI;var c=e.name,d=t.autoSchema?n.open(c):n.open(c,Math.round(e.verno*10));if(!d)throw new j.MissingAPI;d.onerror=Ke(u),d.onblocked=Z(e._fireOnBlocked),d.onupgradeneeded=Z(function(f){if(a=d.transaction,t.autoSchema&&!e._options.allowEmptyDB){d.onerror=Nn,a.abort(),d.result.close();var p=n.deleteDatabase(c);p.onsuccess=p.onerror=Z(function(){u(new j.NoSuchDatabase("Database "+c+" doesnt exist"))})}else{a.onerror=Ke(u);var h=f.oldVersion>Math.pow(2,62)?0:f.oldVersion;s=h<1,e._novip.idbdb=d.result,Fp(e,h/10,a,u)}},u),d.onsuccess=Z(function(){a=null;var f=e._novip.idbdb=d.result,p=cr(f.objectStoreNames);if(p.length>0)try{var h=f.transaction(Dp(p),"readonly");t.autoSchema?Gp(e,f,h):(uo(e,e._dbSchema,h),qp(e,h)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),io(e,h)}catch{}On.push(e),f.onversionchange=Z(function(v){t.vcFired=!0,e.on("versionchange").fire(v)}),f.onclose=Z(function(v){e.on("close").fire(v)}),s&&Zp(e._deps,c),l()},u)})})]).then(function(){return i(),t.onReadyBeingFired=[],U.resolve(po(function(){return e.on.ready.fire(e.vip)})).then(function l(){if(t.onReadyBeingFired.length>0){var u=t.onReadyBeingFired.reduce(Pi,W);return t.onReadyBeingFired=[],U.resolve(po(function(){return u(e.vip)})).then(l)}})}).finally(function(){t.onReadyBeingFired=null,t.isBeingOpened=!1}).then(function(){return e}).catch(function(l){t.dbOpenError=l;try{a&&a.abort()}catch{}return r===t.openCanceller&&e._close(),ie(l)}).finally(function(){t.openComplete=!0,o()})}function ho(e){var t=function(a){return e.next(a)},n=function(a){return e.throw(a)},r=o(t),i=o(n);function o(a){return function(s){var l=a(s),u=l.value;return l.done?u:!u||typeof u.then!="function"?de(u)?Promise.all(u).then(r,i):r(u):u.then(r,i)}}return o(t)()}function th(e,t,n){var r=arguments.length;if(r<2)throw new j.InvalidArgument("Too few arguments");for(var i=new Array(r-1);--r;)i[r-1]=arguments[r];n=i.pop();var o=cs(i);return[e,o,n]}function Ks(e,t,n,r,i){return U.resolve().then(function(){var o=M.transless||M,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:o};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(d){return d.name===Di.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(function(){return Ks(e,t,n,null,i)})):ie(d)}var l=Ai(i);l&&an();var u,c=U.follow(function(){if(u=i.call(a,a),u)if(l){var d=tt.bind(null,null);u.then(d,d)}else typeof u.next=="function"&&typeof u.throw=="function"&&(u=ho(u))},s);return(u&&typeof u.then=="function"?U.resolve(u).then(function(d){return a.active?d:ie(new j.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):c.then(function(){return u})).then(function(d){return r&&a._resolve(),a._completion.then(function(){return d})}).catch(function(d){return a._reject(d),ie(d)})})}function Ar(e,t,n){for(var r=de(e)?e.slice():[e],i=0;i0,x=$($({},w),{isVirtual:g,keyTail:m,keyLength:E,extractKey:ro(v),unique:!g&&w.unique});if(b.push(x),x.isPrimaryKey||o.push(x),E>1){var I=E===2?v[0]:v.slice(0,E-1);a(I,m+1,w)}return b.sort(function(C,S){return C.keyTail-S.keyTail}),x}var s=a(r.primaryKey.keyPath,0,r.primaryKey);i[":id"]=[s];for(var l=0,u=r.indexes;l0?Promise.reject(b.failures[0]):_.length1?t:e}:{d:0});else{var n=new rt;return e&&"d"in e&&pe(n,e),n}};en(rt.prototype,(mo={add:function(e){return Ur(this,e),this},addKey:function(e){return Bn(this,e,e),this},addKeys:function(e){var t=this;return e.forEach(function(n){return Bn(t,n,n)}),this}},mo[Ri]=function(){return yo(this)},mo));function Bn(e,t,n){var r=he(t,n);if(!isNaN(r)){if(r>0)throw RangeError();if(go(e))return pe(e,{from:t,to:n,d:1});var i=e.l,o=e.r;if(he(n,e.from)<0)return i?Bn(i,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Gs(e);if(he(t,e.to)>0)return o?Bn(o,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Gs(e);he(t,e.from)<0&&(e.from=t,e.l=null,e.d=o?o.d+1:1),he(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;i&&!e.l&&Ur(e,i),o&&a&&Ur(e,o)}}function Ur(e,t){function n(r,i){var o=i.from,a=i.to,s=i.l,l=i.r;Bn(r,o,a),s&&n(r,s),l&&n(r,l)}go(t)||n(e,t)}function lh(e,t){var n=yo(t),r=n.next();if(r.done)return!1;for(var i=r.value,o=yo(e),a=o.next(i.from),s=a.value;!r.done&&!a.done;){if(he(s.from,i.to)<=0&&he(s.to,i.from)>=0)return!0;he(i.from,s.from)<0?i=(r=n.next(s.from)).value:s=(a=o.next(i.from)).value}return!1}function yo(e){var t=go(e)?null:{s:0,n:e};return{next:function(n){for(var r=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&he(n,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||he(n,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Gs(e){var t,n,r=(((t=e.r)===null||t===void 0?void 0:t.d)||0)-(((n=e.l)===null||n===void 0?void 0:n.d)||0),i=r>1?"r":r<-1?"l":"";if(i){var o=i==="r"?"l":"r",a=$({},e),s=e[i];e.from=s.from,e.to=s.to,e[i]=s[i],a[i]=s[o],e[o]=a,a.d=qs(a)}e.d=qs(e)}function qs(e){var t=e.r,n=e.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1}var uh={stack:"dbcore",level:0,create:function(e){var t=e.schema.name,n=new rt(e.MIN_KEY,e.MAX_KEY);return $($({},e),{table:function(r){var i=e.table(r),o=i.schema,a=o.primaryKey,s=a.extractKey,l=a.outbound,u=$($({},i),{mutate:function(f){var p=f.trans,h=p.mutatedParts||(p.mutatedParts={}),v=function(I){var C="idb://"+t+"/"+r+"/"+I;return h[C]||(h[C]=new rt)},m=v(""),w=v(":dels"),_=f.type,b=f.type==="deleteRange"?[f.range]:f.type==="delete"?[f.keys]:f.values.length<50?[[],f.values]:[],E=b[0],g=b[1],x=f.trans._cache;return i.mutate(f).then(function(I){if(de(E)){_!=="delete"&&(E=I.results),m.addKeys(E);var C=$s(E,x);!C&&_!=="add"&&w.addKeys(E),(C||g)&&ch(v,o,C,g)}else if(E){var S={from:E.lower,to:E.upper};w.add(S),m.add(S)}else m.add(n),w.add(n),o.indexes.forEach(function(R){return v(R.name).add(n)});return I})}}),c=function(f){var p,h,v=f.query,m=v.index,w=v.range;return[m,new rt((p=w.lower)!==null&&p!==void 0?p:e.MIN_KEY,(h=w.upper)!==null&&h!==void 0?h:e.MAX_KEY)]},d={get:function(f){return[a,new rt(f.key)]},getMany:function(f){return[a,new rt().addKeys(f.keys)]},count:c,query:c,openCursor:c};return ne(d).forEach(function(f){u[f]=function(p){var h=M.subscr;if(h){var v=function(x){var I="idb://"+t+"/"+r+"/"+x;return h[I]||(h[I]=new rt)},m=v(""),w=v(":dels"),_=d[f](p),b=_[0],E=_[1];if(v(b.name||"").add(E),!b.isPrimaryKey)if(f==="count")w.add(n);else{var g=f==="query"&&l&&p.values&&i.query($($({},p),{values:!1}));return i[f].apply(this,arguments).then(function(x){if(f==="query"){if(l&&p.values)return g.then(function(R){var D=R.result;return m.addKeys(D),x});var I=p.values?x.result.map(s):x.result;p.values?m.addKeys(I):w.addKeys(I)}else if(f==="openCursor"){var C=x,S=p.values;return C&&Object.create(C,{key:{get:function(){return w.addKey(C.primaryKey),C.key}},primaryKey:{get:function(){var R=C.primaryKey;return w.addKey(R),R}},value:{get:function(){return S&&m.addKey(C.primaryKey),C.value}}})}return x})}}return i[f].apply(this,arguments)}}),u}})}};function ch(e,t,n,r){function i(o){var a=e(o.name||"");function s(u){return u!=null?o.extractKey(u):null}var l=function(u){return o.multiEntry&&de(u)?u.forEach(function(c){return a.addKey(c)}):a.addKey(u)};(n||r).forEach(function(u,c){var d=n&&s(n[c]),f=r&&s(r[c]);he(d,f)!==0&&(d!=null&&l(d),f!=null&&l(f))})}t.indexes.forEach(i)}var _o=function(){function e(t,n){var r=this;this._middlewares={},this.verno=0;var i=e.dependencies;this._options=n=$({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var o=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:W,dbReadyPromise:null,cancelOpen:W,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};a.dbReadyPromise=new U(function(s){a.dbReadyResolve=s}),a.openCanceller=new U(function(s,l){a.cancelOpen=l}),this._state=a,this.name=t,this.on=Dn(this,"populate","blocked","versionchange","close",{ready:[Pi,W]}),this.on.ready.subscribe=as(this.on.ready.subscribe,function(s){return function(l,u){e.vip(function(){var c=r._state;if(c.openComplete)c.dbOpenError||U.resolve().then(l),u&&s(l);else if(c.onReadyBeingFired)c.onReadyBeingFired.push(l),u&&s(l);else{s(l);var d=r;u||s(function f(){d.on.ready.unsubscribe(l),d.on.ready.unsubscribe(f)})}})}}),this.Collection=Sp(this),this.Table=wp(this),this.Transaction=Op(this),this.Version=Yp(this),this.WhereClause=Ap(this),this.on("versionchange",function(s){s.newVersion>0?console.warn("Another connection wants to upgrade database '"+r.name+"'. Closing db now to resume the upgrade."):console.warn("Another connection wants to delete database '"+r.name+"'. Closing db now to resume the delete request."),r.close()}),this.on("blocked",function(s){!s.newVersion||s.newVersion=0&&On.splice(n,1),this.idbdb){try{this.idbdb.close()}catch{}this._novip.idbdb=null}t.dbReadyPromise=new U(function(r){t.dbReadyResolve=r}),t.openCanceller=new U(function(r,i){t.cancelOpen=i})},e.prototype.close=function(){this._close();var t=this._state;this._options.autoOpen=!1,t.dbOpenError=new j.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)},e.prototype.delete=function(){var t=this,n=arguments.length>0,r=this._state;return new U(function(i,o){var a=function(){t.close();var s=t._deps.indexedDB.deleteDatabase(t.name);s.onsuccess=Z(function(){Xp(t._deps,t.name),i()}),s.onerror=Ke(o),s.onblocked=t._fireOnBlocked};if(n)throw new j.InvalidArgument("Arguments not allowed in db.delete()");r.isBeingOpened?r.dbReadyPromise.then(a):a()})},e.prototype.backendDB=function(){return this.idbdb},e.prototype.isOpen=function(){return this.idbdb!==null},e.prototype.hasBeenClosed=function(){var t=this._state.dbOpenError;return t&&t.name==="DatabaseClosed"},e.prototype.hasFailed=function(){return this._state.dbOpenError!==null},e.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(e.prototype,"tables",{get:function(){var t=this;return ne(this._allTables).map(function(n){return t._allTables[n]})},enumerable:!1,configurable:!0}),e.prototype.transaction=function(){var t=th.apply(this,arguments);return this._transaction.apply(this,t)},e.prototype._transaction=function(t,n,r){var i=this,o=M.trans;(!o||o.db!==this||t.indexOf("!")!==-1)&&(o=null);var a=t.indexOf("?")!==-1;t=t.replace("!","").replace("?","");var s,l;try{if(l=n.map(function(c){var d=c instanceof i.Table?c.name:c;if(typeof d!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return d}),t=="r"||t===Zi)s=Zi;else if(t=="rw"||t==Xi)s=Xi;else throw new j.InvalidArgument("Invalid transaction mode: "+t);if(o){if(o.mode===Zi&&s===Xi)if(a)o=null;else throw new j.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o&&l.forEach(function(c){if(o&&o.storeNames.indexOf(c)===-1)if(a)o=null;else throw new j.SubTransaction("Table "+c+" not included in parent transaction.")}),a&&o&&!o.active&&(o=null)}}catch(c){return o?o._promise(null,function(d,f){f(c)}):ie(c)}var u=Ks.bind(null,this,s,l,o,r);return o?o._promise(s,u,"lock"):M.trans?sn(M.transless,function(){return i._whenReady(u)}):this._whenReady(u)},e.prototype.table=function(t){if(!we(this._allTables,t))throw new j.InvalidTable("Table "+t+" does not exist");return this._allTables[t]},e}(),dh=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",fh=function(){function e(t){this._subscribe=t}return e.prototype.subscribe=function(t,n,r){return this._subscribe(!t||typeof t=="function"?{next:t,error:n,complete:r}:t)},e.prototype[dh]=function(){return this},e}();function zs(e,t){return ne(t).forEach(function(n){var r=e[n]||(e[n]=new rt);Ur(r,t[n])}),e}function ph(e){var t=!1,n=void 0,r=new fh(function(i){var o=Ai(e);function a(m){o&&an();var w=function(){return vt(e,{subscr:m,trans:null})},_=M.trans?sn(M.transless,w):w();return o&&_.then(tt,tt),_}var s=!1,l={},u={},c={get closed(){return s},unsubscribe:function(){s=!0,_t.storagemutated.unsubscribe(h)}};i.start&&i.start(c);var d=!1,f=!1;function p(){return ne(u).some(function(m){return l[m]&&lh(l[m],u[m])})}var h=function(m){zs(l,m),p()&&v()},v=function(){if(!(d||s)){l={};var m={},w=a(m);f||(_t(Mn,h),f=!0),d=!0,Promise.resolve(w).then(function(_){t=!0,n=_,d=!1,!s&&(p()?v():(l={},u=m,i.next&&i.next(_)))},function(_){d=!1,t=!1,i.error&&i.error(_),c.unsubscribe()})}};return v(),c});return r.hasValue=function(){return t},r.getValue=function(){return n},r}var wo;try{wo={indexedDB:Y.indexedDB||Y.mozIndexedDB||Y.webkitIndexedDB||Y.msIndexedDB,IDBKeyRange:Y.IDBKeyRange||Y.webkitIDBKeyRange}}catch{wo={indexedDB:null,IDBKeyRange:null}}var Mt=_o;en(Mt,$($({},fr),{delete:function(e){var t=new Mt(e,{addons:[]});return t.delete()},exists:function(e){return new Mt(e,{addons:[]}).open().then(function(t){return t.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(e){try{return Qp(Mt.dependencies).then(e)}catch{return ie(new j.MissingAPI)}},defineClass:function(){function e(t){pe(this,t)}return e},ignoreTransaction:function(e){return M.trans?sn(M.transless,e):e()},vip:po,async:function(e){return function(){try{var t=ho(e.apply(this,arguments));return!t||typeof t.then!="function"?U.resolve(t):t}catch(n){return ie(n)}}},spawn:function(e,t,n){try{var r=ho(e.apply(n,t||[]));return!r||typeof r.then!="function"?U.resolve(r):r}catch(i){return ie(i)}},currentTransaction:{get:function(){return M.trans||null}},waitFor:function(e,t){var n=U.resolve(typeof e=="function"?Mt.ignoreTransaction(e):e).timeout(t||6e4);return M.trans?M.trans.waitFor(n):n},Promise:U,debug:{get:function(){return He},set:function(e){fs(e,e==="dexie"?function(){return!0}:As)}},derive:tn,extend:pe,props:en,override:as,Events:Dn,on:_t,liveQuery:ph,extendObservabilitySet:zs,getByKeyPath:Je,setByKeyPath:Oe,delByKeyPath:Gf,shallowClone:us,deepClone:Sn,getObjectDiff:vo,cmp:he,asap:ss,minKey:Qi,addons:[],connections:On,errnames:Di,dependencies:wo,semVer:Ls,version:Ls.split(".").map(function(e){return parseInt(e)}).reduce(function(e,t,n){return e+t/Math.pow(10,n*2)})})),Mt.maxKey=Vn(Mt.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(_t(Mn,function(e){if(!it){var t;Cr?(t=document.createEvent("CustomEvent"),t.initCustomEvent(yt,!0,!0,e)):t=new CustomEvent(yt,{detail:e}),it=!0,dispatchEvent(t),it=!1}}),addEventListener(yt,function(e){var t=e.detail;it||Or(t)}));function Or(e){var t=it;try{it=!0,_t.storagemutated.fire(e)}finally{it=t}}var it=!1;if(typeof BroadcastChannel<"u"){var Dr=new BroadcastChannel(yt);typeof Dr.unref=="function"&&Dr.unref(),_t(Mn,function(e){it||Dr.postMessage(e)}),Dr.onmessage=function(e){e.data&&Or(e.data)}}else if(typeof self<"u"&&typeof navigator<"u"){_t(Mn,function(e){try{it||(typeof localStorage<"u"&&localStorage.setItem(yt,JSON.stringify({trig:Math.random(),changedParts:e})),typeof self.clients=="object"&&Ii([],self.clients.matchAll({includeUncontrolled:!0}),!0).forEach(function(t){return t.postMessage({type:yt,changedParts:e})}))}catch{}}),typeof addEventListener<"u"&&addEventListener("storage",function(e){if(e.key===yt){var t=JSON.parse(e.newValue);t&&Or(t.changedParts)}});var Ws=self.document&&navigator.serviceWorker;Ws&&Ws.addEventListener("message",hh)}function hh(e){var t=e.data;t&&t.type===yt&&Or(t.changedParts)}U.rejectionMapper=ep,fs(He,As);var cn=(e=>(e.ReadyForUpload="ReadyForUpload",e.UploadComplete="UploadComplete",e))(cn||{}),Vt=(e=>(e.After="after",e.Before="before",e.BeforeAndAfter="beforeAndAfter",e))(Vt||{});const bo="sprig.sessionId",Ys="sprig.disableReplayRecording",vh=30,Qs=()=>{pt.setItem(Ys,"disabled")},jt=()=>!!pt.getItem(Ys),mh=["did not allow mutations","called in an invalid security context"],gh=e=>{if(!e)return!0;for(const t of mh)if(e.toLowerCase().includes(t))return!1;return!0},yh=(e,t,n)=>{jt()||t instanceof Error&&(Qs(),gh(t==null?void 0:t.message)&&(window.UserLeap.reportError(e,t,n),wh()))},_h=async(e,t)=>{var r;let n;try{if((r=window.navigator.storage)!=null&&r.estimate){const{quota:i,usage:o}=await window.navigator.storage.estimate();n={availableSpaceInMB:i&&o?(i-o)/(1024*1024):void 0,quota:i,usage:o}}}catch(i){window.UserLeap.reportError("Error getting storage estimate",i)}yh(e,t,n)},ge=(()=>{const e=pt.getItem(bo);return e?(pt.removeItem(bo),e):Ye()})();window.addEventListener("beforeunload",()=>{pt.setItem(bo,ge)});const wh=async()=>{try{await Promise.allSettled([z.events.clear(),z.chunkUploads.clear(),z.pendingCaptures.clear()])}catch(e){window.UserLeap.reportError("Error wiping database",e)}},Eo=(e,t,n=()=>!0)=>z.table(t).where("timestamp").below(e).and(n).delete(),bh=()=>{z.events.where("sessionId").equals(ge).delete(),z.pendingCaptures.where("sessionId").equals(ge).delete()},Eh=e=>{const t=e.map(n=>{var r;return{...n,sessionId:(r=n.sessionId)!=null?r:ge}});return z.events.bulkAdd(t)},xh=(e,t)=>z.events.where("[sessionId+timestamp]").between([ge,e],[ge,t]).toArray(),Ch=(e,t,n)=>{const r=new Date,i=r.setMinutes(r.getMinutes()+(n!=null?n:vh));return z.events.where("[sessionId+timestamp]").between([ge,e],[ge,t]).modify({expiredAt:i})},Sh=e=>{var t;return z.chunkUploads.add({...e,sessionId:(t=e.sessionId)!=null?t:ge})},Ih=(e,t)=>z.chunkUploads.update(e,{data:null,etag:t,status:cn.UploadComplete}),kh=({status:e,uploadId:t})=>t?z.chunkUploads.where({uploadId:t,status:e}).toArray():z.chunkUploads.where({sessionId:ge,status:e}).toArray(),Th=e=>z.chunkUploads.where({uploadId:e,status:cn.UploadComplete}).toArray(),Lh=e=>z.chunkUploads.where({uploadId:e,status:cn.UploadComplete}).delete(),Rh=e=>{var t;return z.pendingCaptures.add({...e,sessionId:(t=e.sessionId)!=null?t:ge,canUpload:!1})},Ah=()=>z.pendingCaptures.where("sessionId").equals(ge).and(e=>e.targetTimestampz.pendingCaptures.where("sessionId").equals(ge).toArray(),Oh=e=>z.pendingCaptures.where("sessionId").equals(ge).and(t=>t.captureParams.responseGroupId===e).modify({canUpload:!0}),Dh=async e=>{var t;if((t=window.navigator.storage)!=null&&t.estimate){const{quota:n,usage:r}=await window.navigator.storage.estimate();if(n&&r&&(n-r)/1073741824{Qs()});const Nh=async(e,t,n)=>new Promise((r,i)=>{const o=e.createElement("script");o.src=t,o.onload=r,o.onerror=i,n&&(o.nonce=n),e.head.appendChild(o)});let Zs=1,Xs=5e3,xo=6e4;const Mh=5,Js=1e3,el=30,Pr=el+Mh,Co="sprig.pendingCount";let tl=0,nl=Date.now(),So=!1;const Vh=async(e,t,n,r=2,i)=>{try{if(jt()||!t||(i!=null&&i.minAvailableGb&&(Zs=i.minAvailableGb),!await Dh(Zs)))return;i!=null&&i.minDuration&&(Xs=i.minDuration),i!=null&&i.batchDuration&&(xo=i.batchDuration),Vf(r),Gh(),Fh(t+Pr,30*60,t+Pr),Hh(),window.rrwebRecord||await Nh(e,"https://cdn.sprig.com/dependencies/record-2.0.0-alpha.6.min.js",n);const o=window.rrwebRecord;if(!o)return;let a=!0;o({checkoutEveryNms:el*1e3,sampling:{input:"last",scroll:250,media:800},emit:(s,l)=>{if(jt())return;nl=Date.now();const u=a||!!l;a=!1,jh({uuid:Ye(),event:JSON.stringify(s),isValidStart:u,timestamp:Date.now()})},...i}),So=!0,tl||(tl=window.setInterval(()=>{Date.now()-nl>Js&&Fn("Sprig_Noop",{})},Js))}catch(o){return De("Error initializing replay",o)}};let Io=!1,ko=[];const jh=e=>{ko.push(e),Io||Bh()},Bh=()=>{Io=!0,setTimeout(async()=>{if(jt())return;const e=ko;ko=[],Io=!1;try{await Eh(e)}catch(t){De("Error storing replay events",t)}},500)},Fh=(e=6*60,t=30*60,n=4*60)=>{const r=setInterval(()=>{const i=Date.now();jt()||z.transaction("rw!",z.events,z.chunkUploads,z.pendingCaptures,()=>{Eo(i-e*1e3,"events",o=>o.expiredAt===void 0||o.expiredAto.canUpload===void 0||o.canUpload===!1)}).catch(o=>{clearInterval(r),De("Error deleting table rows",o)})},3e4)},Hh=(e=5)=>{setInterval(Qh,e*1e3)},Kh=async(e,t,n,r,i)=>{try{const o=Math.min(e+i,n),a=await xh(e,o);if(!(a!=null&&a.length))return[r,[]];if(!r){let s=-1;return a==null||a.forEach((l,u)=>{if(!l.isValidStart)return;const c=l.timestamp<=t;(s<0||c)&&(s=u)}),s<0?[]:[!0,a==null?void 0:a.slice(s)]}return[r,a]}catch(o){De("Error getting events batch",o)}},$h=(e,t,n)=>{const r=e.length,i=t*1024*1024,o=Math.ceil(r/n),a=Math.max(i,o),s=[];let l=0;for(;lPromise.all(e.map(async t=>{const n=await Bf(t);return await Ih(t.uuid,n),t.uploadId})),il=async e=>{const t=await Th(e);if(!(t!=null&&t.length))return;t.sort((i,o)=>i.chunkIndex-o.chunkIndex);const n=t.map(i=>({ETag:i.etag,PartNumber:i.chunkIndex})).filter(i=>i.ETag!==null),r=t[0];await is({apiUrl:r.apiUrl,surveyId:r.surveyId,uploadId:e,responseGroupUuid:r.responseGroupId,etags:n,headers:r.completeUploadHeaders,replayDuration:r.replayDuration}),await Lh(e)},Gh=async()=>{try{let e=[];if(await z.transaction("rw",z.chunkUploads,async()=>{e=await kh({status:cn.ReadyForUpload}).catch(n=>{De("chunkUploads transaction error",n)})}),!(e!=null&&e.length))return;const t=await rl(e);t!=null&&t.length&&await Promise.all(t.map(async n=>{n&&await il(n)}))}catch(e){De("Error getting chunk upload uuids",e)}},qh=async(e,t)=>{await rl(t),await Promise.all(e.map(n=>il(n)))},zh=e=>{let t=0;e.forEach(i=>{t+=i.length});const n=new Uint8Array(t);let r=0;return e.forEach(i=>{n.set(i,r),r+=i.length}),n},ol=async(e,t,n)=>{const r=new TextEncoder;let i=null,o=null,a=null,s=!1,l=!1,[u,c]=[0,0];const d=e-Pr*1e3,f=[];let p=[];for(let v=d;v_.event).join(",")}`,w=r.encode(m);n?(o===null&&(a=new window.CompressionStream("gzip"),o=a.writable.getWriter()),o.write(w)):f.push(w),s=!0}if(c-u{const n=window.CompressionStream!==void 0;let r=null;const i=t!=null?t:Date.now(),o=i-e;try{r=await ol(o,i,n)}catch(a){if(a instanceof Error&&window.UserLeap.reportError("Error compressing replay",a),n)try{r=await ol(o,i,!1)}catch(s){De("fileData fallback failed",s)}}return r},al=async e=>{const{surveyId:t,responseGroupId:n,visitorId:r,apiUrl:i,completeUploadHeaders:o,replayParams:a,triggerTimestamp:s}=e,l=await Wh(a.replayDurationSeconds*1e3,s);if(!(l!=null&&l.length))return;const u=$h(l,a.minimumChunkSizeMb,a.signedUrls.length),c=await Promise.all(u.map(async(d,f)=>{const p=Ye(),h={apiUrl:i,chunkIndex:f+1,completeUploadHeaders:o,etag:null,responseGroupId:n,status:cn.ReadyForUpload,surveyId:t,timestamp:s,totalChunks:u.length,data:d,uploadId:a.uploadId,uploadUrl:a.signedUrls[f].url,uuid:p,visitorId:r};return await Sh(h),h}));await qh([a.uploadId],c)},sl=async(e,t)=>{if(!jt())try{const{isStandalone:n,replayParams:r,triggerTimestamp:i,responseGroupId:o}=e,a=async()=>{setTimeout(()=>H.removeListener(B.QuestionAnswered,a),0),r.replayDurationType===Vt.Before?await al(e):await Oh(o)};if(r.replayDurationType===Vt.After||r.replayDurationType===Vt.BeforeAndAfter){n||H.on(B.QuestionAnswered,a),await Yh(e);return}if(n||t)await al(e);else{const s=Pr+r.replayDurationSeconds;await Ch(i-s*1e3,i,r.expirationTimeLimitMinutes),H.on(B.QuestionAnswered,a)}}catch(n){De("Error scheduling or capturing replay",n)}},ll=()=>{if(!jt())try{bh()}catch(e){De("Error clearing session event data",e)}};let ot=pt.getItem(Co);const Yh=async e=>{const{surveyId:t}=e,n=await Uh(),r=n==null?void 0:n.filter(a=>a.captureParams.surveyId===t);if(r!=null&&r.length)return;const i={...e,replayParams:{...e.replayParams}};e.replayParams.replayDurationType===Vt.BeforeAndAfter&&(i.replayParams.replayDurationSeconds*=2),i.replayParams.replayDurationType=Vt.Before;const o=e.triggerTimestamp+e.replayParams.replayDurationSeconds*1e3;return i.triggerTimestamp=o,ot=ot?(parseInt(ot)+1).toString():"1",pt.setItem(Co,ot),Rh({uuid:Ye(),targetTimestamp:o,timestamp:Date.now(),captureParams:i})},Qh=async()=>{try{if(ot&&parseInt(ot)>0){const e=await Ah();e.length&&await Promise.all(e.map(async t=>{await z.pendingCaptures.delete(t.uuid),await sl(t.captureParams,t.canUpload)})),ot=(parseInt(ot)-e.length).toString(),pt.setItem(Co,ot)}}catch(e){De("Error initiating pending captures",e)}},Fn=(e,t)=>{var n,r;if(!!So)try{(r=(n=window.rrwebRecord)==null?void 0:n.addCustomEvent)==null||r.call(n,e,t)}catch(i){De("Error recording custom event",i)}},ul=e=>{Fn("Sprig_PageView",e)},Zh=e=>{Fn("Sprig_TrackEvent",e)},Xh=e=>{Fn("Sprig_ShowSurvey",e)},Jh=e=>{Fn("Sprig_SubmitSurvey",e)},De=(e,t)=>(So=!1,_h(e,t));var L=(e=>(e.ConsentLegal="consentlegal",e.Likert="likert",e.MultipleChoice="multiplechoice",e.MultipleSelect="multipleselect",e.NPS="nps",e.Open="open",e.RecordedTask="recordedtask",e.TextUrlPrompt="texturlprompt",e.Thanks="thanks",e.Uploading="uploading",e.VideoVoice="videovoice",e))(L||{}),at=(e=>(e.Answered="answered",e.Equal="eq",e.NotEqual="neq",e.Skipped="skipped",e.LessThan="lt",e.LessThanOrEqual="lte",e.GivenUp="given_up",e.GreaterThan="gt",e.GreaterThanOrEqual="gte",e.ListAll="list_all",e.ListAtLeastOne="list_alo",e.ListExact="list_exact",e.DoesNotInclude="list_dni",e.Contains="contains",e.DoesNotContain="notcontains",e))(at||{}),dn=(e=>(e.Camera="camera",e.Microphone="microphone",e.Screen="screen",e))(dn||{}),Te=(e=>(e.AvPermission="av_permission",e.ScreenPermission="screen_permission",e.StartTask="start_task",e.CompleteTask="complete_task",e))(Te||{}),Bt=(e=>(e.Number="number",e.Smiley="smiley",e.Star="star",e))(Bt||{}),Hn,N,cl,fn,Ft,dl,fl,pl,Nr={},hl=[],ev=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function st(e,t){for(var n in t)e[n]=t[n];return e}function vl(e){var t=e.parentNode;t&&t.removeChild(e)}function ee(e,t,n){var r,i,o,a={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Hn.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return Kn(e,a,r,i,null)}function Kn(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++cl:i};return i==null&&N.vnode!=null&&N.vnode(o),o}function ml(){return{current:null}}function Le(e){return e.children}function tv(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||Mr(e,o,null,n[o],r);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||Mr(e,o,t[o],n[o],r)}function gl(e,t,n){t[0]==="-"?e.setProperty(t,n==null?"":n):e[t]=n==null?"":typeof n!="number"||ev.test(t)?n:n+"px"}function Mr(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||gl(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||gl(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?_l:yl,o):e.removeEventListener(t,o?_l:yl,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n==null?"":n;break e}catch{}typeof n=="function"||(n==null||n===!1&&t.indexOf("-")==-1?e.removeAttribute(t):e.setAttribute(t,n))}}function yl(e){fn=!0;try{return this.l[e.type+!1](N.event?N.event(e):e)}finally{fn=!1}}function _l(e){fn=!0;try{return this.l[e.type+!0](N.event?N.event(e):e)}finally{fn=!1}}function Pe(e,t){this.props=e,this.context=t}function $n(e,t){if(t==null)return e.__?$n(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&Ft.sort(function(l,u){return l.__v.__b-u.__v.__b}));Vr.__r=0}function bl(e,t,n,r,i,o,a,s,l,u){var c,d,f,p,h,v,m,w=r&&r.__k||hl,_=w.length;for(n.__k=[],c=0;c0?Kn(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(f=w[c])===null||f&&p.key==f.key&&p.type===f.type)w[c]=void 0;else for(d=0;d<_;d++){if((f=w[d])&&p.key==f.key&&p.type===f.type){w[d]=void 0;break}f=null}Lo(e,p,f=f||Nr,i,o,a,s,l,u),h=p.__e,(d=p.ref)&&f.ref!=d&&(m||(m=[]),f.ref&&m.push(f.ref,null,p),m.push(d,p.__c||h,p)),h!=null?(v==null&&(v=h),typeof p.type=="function"&&p.__k===f.__k?p.__d=l=El(p,l,e):l=xl(e,p,f,w,h,l),typeof n.type=="function"&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=$n(f))}for(n.__e=v,c=_;c--;)w[c]!=null&&(typeof n.type=="function"&&w[c].__e!=null&&w[c].__e==n.__d&&(n.__d=Cl(r).nextSibling),kl(w[c],w[c]));if(m)for(c=0;c=0;t--)if((n=e.__k[t])&&(r=Cl(n)))return r}return null}function Lo(e,t,n,r,i,o,a,s,l){var u,c,d,f,p,h,v,m,w,_,b,E,g,x,I,C=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(l=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(u=N.__b)&&u(t);try{e:if(typeof C=="function"){if(m=t.props,w=(u=C.contextType)&&r[u.__c],_=u?w?w.props.value:u.__:r,n.__c?v=(c=t.__c=n.__c).__=c.__E:("prototype"in C&&C.prototype.render?t.__c=c=new C(m,_):(t.__c=c=new Pe(m,_),c.constructor=C,c.render=iv),w&&w.sub(c),c.props=m,c.state||(c.state={}),c.context=_,c.__n=r,d=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),C.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=st({},c.__s)),st(c.__s,C.getDerivedStateFromProps(m,c.__s))),f=c.props,p=c.state,c.__v=t,d)C.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(C.getDerivedStateFromProps==null&&m!==f&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(m,_),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(m,c.__s,_)===!1||t.__v===n.__v){for(t.__v!==n.__v&&(c.props=m,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(S){S&&(S.__=t)}),b=0;b2&&(a.children=arguments.length>3?Hn.call(arguments,2):n),Kn(e.type,a,r||e.key,i||e.ref,null)}function Ll(e,t){var n={__c:t="__cC"+pl++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&i.some(function(s){s.__e=!0,To(s)})},this.sub=function(a){i.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){i.splice(i.indexOf(a),1),s&&s.call(a)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Hn=hl.slice,N={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},cl=0,fn=!1,Pe.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=st({},this.state),typeof e=="function"&&(e=e(st({},n),this.props)),e&&st(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),To(this))},Pe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),To(this))},Pe.prototype.render=Le,Ft=[],fl=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Vr.__r=0,pl=0;const Rl=e=>{let t;const n=new Set,r=(l,u)=>{const c=typeof l=="function"?l(t):l;if(!Object.is(c,t)){const d=t;t=(u!=null?u:typeof c!="object")?c:Object.assign({},t,c),n.forEach(f=>f(t,d))}},i=()=>t,s={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>n.clear()};return t=e(r,i,s),s},av=e=>e?Rl(e):Rl;var wt,Q,Ro,Al,hn=0,Ul=[],jr=[],Ol=N.__b,Dl=N.__r,Pl=N.diffed,Nl=N.__c,Ml=N.unmount;function Ht(e,t){N.__h&&N.__h(Q,e,hn||t),hn=0;var n=Q.__H||(Q.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:jr}),n.__[e]}function ue(e){return hn=1,Ao(Kl,e)}function Ao(e,t,n){var r=Ht(wt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Kl(void 0,t),function(o){var a=r.__N?r.__N[0]:r.__[0],s=r.t(a,o);a!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=Q,!Q.u)){Q.u=!0;var i=Q.shouldComponentUpdate;Q.shouldComponentUpdate=function(o,a,s){if(!r.__c.__H)return!0;var l=r.__c.__H.__.filter(function(c){return c.__c});if(l.every(function(c){return!c.__N}))return!i||i.call(this,o,a,s);var u=!1;return l.forEach(function(c){if(c.__N){var d=c.__[0];c.__=c.__N,c.__N=void 0,d!==c.__[0]&&(u=!0)}}),!(!u&&r.__c.props===o)&&(!i||i.call(this,o,a,s))}}return r.__N||r.__}function Re(e,t){var n=Ht(wt++,3);!N.__s&&Do(n.__H,t)&&(n.__=e,n.i=t,Q.__H.__h.push(n))}function Gn(e,t){var n=Ht(wt++,4);!N.__s&&Do(n.__H,t)&&(n.__=e,n.i=t,Q.__h.push(n))}function bt(e){return hn=5,Br(function(){return{current:e}},[])}function Vl(e,t,n){hn=6,Gn(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function Br(e,t){var n=Ht(wt++,7);return Do(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function jl(e,t){return hn=8,Br(function(){return e},t)}function Bl(e){var t=Q.context[e.__c],n=Ht(wt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Q)),t.props.value):e.__}function Uo(e,t){N.useDebugValue&&N.useDebugValue(t?t(e):e)}function sv(e){var t=Ht(wt++,10),n=ue();return t.__=e,Q.componentDidCatch||(Q.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Fl(){var e=Ht(wt++,11);if(!e.__){for(var t=Q.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function lv(){for(var e;e=Ul.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Fr),e.__H.__h.forEach(Oo),e.__H.__h=[]}catch(t){e.__H.__h=[],N.__e(t,e.__v)}}N.__b=function(e){Q=null,Ol&&Ol(e)},N.__r=function(e){Dl&&Dl(e),wt=0;var t=(Q=e.__c).__H;t&&(Ro===Q?(t.__h=[],Q.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=jr,n.__N=n.i=void 0})):(t.__h.forEach(Fr),t.__h.forEach(Oo),t.__h=[])),Ro=Q},N.diffed=function(e){Pl&&Pl(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ul.push(t)!==1&&Al===N.requestAnimationFrame||((Al=N.requestAnimationFrame)||uv)(lv)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==jr&&(n.__=n.__V),n.i=void 0,n.__V=jr})),Ro=Q=null},N.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Fr),n.__h=n.__h.filter(function(r){return!r.__||Oo(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],N.__e(r,n.__v)}}),Nl&&Nl(e,t)},N.unmount=function(e){Ml&&Ml(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Fr(r)}catch(i){t=i}}),n.__H=void 0,t&&N.__e(t,n.__v))};var Hl=typeof requestAnimationFrame=="function";function uv(e){var t,n=function(){clearTimeout(r),Hl&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Hl&&(t=requestAnimationFrame(n))}function Fr(e){var t=Q,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Q=t}function Oo(e){var t=Q;e.__c=e.__(),Q=t}function Do(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Kl(e,t){return typeof t=="function"?t(e):t}function $l(e,t){for(var n in t)e[n]=t[n];return e}function Po(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function No(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Hr(e){this.props=e}function Gl(e,t){function n(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!a:Po(this.props,i)}function r(i){return this.shouldComponentUpdate=n,ee(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Hr.prototype=new Pe).isPureReactComponent=!0,Hr.prototype.shouldComponentUpdate=function(e,t){return Po(this.props,e)||Po(this.state,t)};var ql=N.__b;N.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ql&&ql(e)};var cv=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function zl(e){function t(n){var r=$l({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=cv,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Wl=function(e,t){return e==null?null:lt(lt(e).map(t))},Yl={map:Wl,forEach:Wl,count:function(e){return e?lt(e).length:0},only:function(e){var t=lt(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:lt},dv=N.__e;N.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}dv(e,t,n,r)};var Ql=N.unmount;function Zl(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=$l({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Zl(r,t,n)})),e}function Xl(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Xl(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function qn(){this.__u=0,this.t=null,this.__b=null}function Jl(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function eu(e){var t,n,r;function i(o){if(t||(t=e()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw t;return ee(n,o)}return i.displayName="Lazy",i.__f=!0,i}function vn(){this.u=null,this.o=null}N.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Ql&&Ql(e)},(qn.prototype=new Pe).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=Jl(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Xl(u,u.__c.__P,u.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.t.pop();)c.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},qn.prototype.componentWillUnmount=function(){this.t=[]},qn.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Zl(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&ee(Le,null,e.fallback);return i&&(i.__h=null),[ee(Le,null,t.__a?null:e.children),i]};var tu=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(r)}}),pn(ee(fv,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function nu(e,t){var n=ee(pv,{__v:e,i:t});return n.containerInfo=t,n}(vn.prototype=new Pe).__a=function(e){var t=this,n=Jl(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),tu(t,e,r)):i()};n?n(o):o()}},vn.prototype.render=function(e){this.u=null,this.o=new Map;var t=lt(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},vn.prototype.componentDidUpdate=vn.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){tu(e,n,t)})};var ru=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,hv=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,vv=typeof document<"u",mv=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function iu(e,t,n){return t.__k==null&&(t.textContent=""),pn(e,t),typeof n=="function"&&n(),e?e.__c:null}function ou(e,t,n){return Tl(e,t),typeof n=="function"&&n(),e?e.__c:null}Pe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Pe.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var au=N.event;function gv(){}function yv(){return this.cancelBubble}function _v(){return this.defaultPrevented}N.event=function(e){return au&&(e=au(e)),e.persist=gv,e.isPropagationStopped=yv,e.isDefaultPrevented=_v,e.nativeEvent=e};var su,lu={configurable:!0,get:function(){return this.class}},uu=N.vnode;N.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t=="string"){var i=t.indexOf("-")===-1;for(var o in r={},n){var a=n[o];vv&&o==="children"&&t==="noscript"||o==="value"&&"defaultValue"in n&&a==null||(o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&a===!0?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!mv(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&hv.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():a===null&&(a=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=a)}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=lt(n.children).forEach(function(s){s.props.selected=r.value.indexOf(s.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=lt(n.children).forEach(function(s){s.props.selected=r.multiple?r.defaultValue.indexOf(s.props.value)!=-1:r.defaultValue==s.props.value})),e.props=r,n.class!=n.className&&(lu.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",lu))}e.$$typeof=ru,uu&&uu(e)};var cu=N.__r;N.__r=function(e){cu&&cu(e),su=e.__c};var du={ReactCurrentDispatcher:{current:{readContext:function(e){return su.__n[e.__c].props.value}}}},wv="17.0.2";function fu(e){return ee.bind(null,e)}function Mo(e){return!!e&&e.$$typeof===ru}function pu(e){return Mo(e)?ov.apply(null,arguments):e}function hu(e){return!!e.__k&&(pn(null,e),!0)}function vu(e){return e&&(e.base||e.nodeType===1&&e)||null}var mu=function(e,t){return e(t)},gu=function(e,t){return e(t)},yu=Le;function Vo(e){e()}function _u(e){return e}function wu(){return[!1,Vo]}var bu=Gn;function Eu(e,t){var n=t(),r=ue({h:{__:n,v:t}}),i=r[0].h,o=r[1];return Gn(function(){i.__=n,i.v=t,No(i.__,t())||o({h:i})},[e,n,t]),Re(function(){return No(i.__,i.v())||o({h:i}),e(function(){No(i.__,i.v())||o({h:i})})},[e]),n}var bv={useState:ue,useId:Fl,useReducer:Ao,useEffect:Re,useLayoutEffect:Gn,useInsertionEffect:bu,useTransition:wu,useDeferredValue:_u,useSyncExternalStore:Eu,startTransition:Vo,useRef:bt,useImperativeHandle:Vl,useMemo:Br,useCallback:jl,useContext:Bl,useDebugValue:Uo,version:"17.0.2",Children:Yl,render:iu,hydrate:ou,unmountComponentAtNode:hu,createPortal:nu,createElement:ee,createContext:Ll,createFactory:fu,cloneElement:pu,createRef:ml,Fragment:Le,isValidElement:Mo,findDOMNode:vu,Component:Pe,PureComponent:Hr,memo:Gl,forwardRef:zl,flushSync:gu,unstable_batchedUpdates:mu,StrictMode:yu,Suspense:qn,SuspenseList:vn,lazy:eu,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:du};const Ev=Object.freeze(Object.defineProperty({__proto__:null,Children:Yl,PureComponent:Hr,StrictMode:yu,Suspense:qn,SuspenseList:vn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:du,cloneElement:pu,createFactory:fu,createPortal:nu,default:bv,findDOMNode:vu,flushSync:gu,forwardRef:zl,hydrate:ou,isValidElement:Mo,lazy:eu,memo:Gl,render:iu,startTransition:Vo,unmountComponentAtNode:hu,unstable_batchedUpdates:mu,useDeferredValue:_u,useInsertionEffect:bu,useSyncExternalStore:Eu,useTransition:wu,version:wv,Component:Pe,Fragment:Le,createContext:Ll,createElement:ee,createRef:ml,useCallback:jl,useContext:Bl,useDebugValue:Uo,useEffect:Re,useErrorBoundary:sv,useId:Fl,useImperativeHandle:Vl,useLayoutEffect:Gn,useMemo:Br,useReducer:Ao,useRef:bt,useState:ue},Symbol.toStringTag,{value:"Module"}));var xu={exports:{}},Cu={};const Su=kt(Ev);var Iu={exports:{}},ku={};/** - * @license React - * use-sync-external-store-shim.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var mn=Su;function xv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Cv=typeof Object.is=="function"?Object.is:xv,Sv=mn.useState,Iv=mn.useEffect,kv=mn.useLayoutEffect,Tv=mn.useDebugValue;function Lv(e,t){var n=t(),r=Sv({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return kv(function(){i.value=n,i.getSnapshot=t,jo(i)&&o({inst:i})},[e,n,t]),Iv(function(){return jo(i)&&o({inst:i}),e(function(){jo(i)&&o({inst:i})})},[e]),Tv(n),n}function jo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Cv(e,n)}catch{return!0}}function Rv(e,t){return t()}var Av=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Rv:Lv;ku.useSyncExternalStore=mn.useSyncExternalStore!==void 0?mn.useSyncExternalStore:Av,function(e){e.exports=ku}(Iu);/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Kr=Su,Uv=Iu.exports;function Ov(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dv=typeof Object.is=="function"?Object.is:Ov,Pv=Uv.useSyncExternalStore,Nv=Kr.useRef,Mv=Kr.useEffect,Vv=Kr.useMemo,jv=Kr.useDebugValue;Cu.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Nv(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Vv(function(){function l(p){if(!u){if(u=!0,c=p,p=r(p),i!==void 0&&a.hasValue){var h=a.value;if(i(h,p))return d=h}return d=p}if(h=d,Dv(c,p))return h;var v=r(p);return i!==void 0&&i(h,v)?h:(c=p,d=v)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var s=Pv(e,o[0],o[1]);return Mv(function(){a.hasValue=!0,a.value=s},[s]),jv(s),s},function(e){e.exports=Cu}(xu);const Bv=We(xu.exports),{useSyncExternalStoreWithSelector:Fv}=Bv;function Hv(e,t=e.getState,n){const r=Fv(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return Uo(r),r}const Tu=e=>{const t=typeof e=="function"?av(e):e,n=(r,i)=>Hv(t,r,i);return Object.assign(n,t),n},Lu=e=>e?Tu(e):Tu;var Bo=(e=>(e[e.And=1]="And",e[e.Or=2]="Or",e))(Bo||{});const Ru=1,Fo={eq(e,t){return e==t},neq(e,t){return!this.eq(e,t)},gt(e,t){return e>t},gte(e,t){return e>=t},lt(e,t){return ee.indexOf(n)===-1)},list_alo(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.some(i=>r.has(i))},list_dni(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.every(i=>!r.has(i))},contains(e,t){const n=e.toLowerCase(),r=t.toLowerCase();return n.includes(r)},notcontains(e,t){return!this.contains(e,t)}},Kv=(e,t,n)=>{switch(t){case L.VideoVoice:return Boolean(e&&e.value);case L.Open:return!!n;case L.MultipleSelect:return Boolean(n&&!!Object.keys(n).length);case L.RecordedTask:return(n==null?void 0:n.taskStatus)===ke.Completed;case L.TextUrlPrompt:return!e.value;case L.ConsentLegal:return n!==null;case L.MultipleChoice:return n!==void 0;case L.NPS:return n!==null;case L.Likert:return n!==null;default:return!0}},Au=({cards:e,index:t,hasEndCard:n,allResponses:r,uploadProgress:i={}})=>{if(t>=e.length||t<0)return null;const o=e[t];let a=t+1;const s=o.props.routingOptions||[];for(let c=0;cr.length)continue;let h=Uu({comparator:p.comparator,response:r[p.questionIndex],type:o.type,value:p.value});for(let v=1;vc.type===L.Uploading);let u;return l>0?u=n?e.length-3:e.length-2:u=e.length-1,t>=u||a===-1||a!==null&&a>u?l>0&&Object.values(i).some(d=>d.isSubmitted&&!d.isComplete)?l:n?e.length-1:null:a===-1?null:a},Uu=({comparator:e,response:t,type:n,value:r})=>{if(e===at.Answered)switch(n){case L.TextUrlPrompt:return t===void 0;case L.ConsentLegal:return t&&t.submitted===!0;case L.RecordedTask:return"taskStatus"in t&&t.taskStatus===ke.Completed;case L.Likert:return Number.isInteger(t);case L.Open:return t&&t.length>0;case L.MultipleChoice:case L.MultipleSelect:return Object.keys(t).length>0;case L.NPS:return Number.isInteger(t);case L.VideoVoice:return!!(t!=null&&t.mediaRecordingUid);default:return!1}if(e===at.Skipped)switch(n){case L.TextUrlPrompt:return t==null?void 0:t.skipped;case L.ConsentLegal:return t===null;case L.RecordedTask:return"taskStatus"in t&&t.taskStatus===ke.Abandoned;case L.Likert:return t===null;case L.Open:return(t==null?void 0:t.length)===0;case L.MultipleChoice:return t===void 0;case L.MultipleSelect:return(t==null?void 0:t.length)===0;case L.NPS:return t===null;case L.VideoVoice:return t===null;default:return!1}return e===at.GivenUp?n===L.RecordedTask?"taskStatus"in t&&t.taskStatus===ke.GivenUp:!0:Fo[e](t,r)},$v=13,Gv=(e,t)=>e.reduce((n,r)=>n.concat(n.map(i=>[...i,r])),[[]]).filter(n=>t||n.length>0),qv=e=>{var t,n;switch(e.type){case L.MultipleSelect:return!e||!e.props||!e.props.options?null:e.props.options.length>$v?e.props.options.map(r=>[r.value]):Gv(e.props.options.map(r=>r.value),!e.props.properties.required);case L.MultipleChoice:{if(!e||!e.props||!e.props.options)return null;const r=e.props.options.map(i=>i.value);return e.props.properties.required||r.push(void 0),r}case L.Likert:{const r=Number((n=(t=e.props)==null?void 0:t.properties)==null?void 0:n.range)||5;return[...Array.from(Array(r).keys()).map(o=>o+1),...e.props.properties.required?[]:[null]]}case L.NPS:return[0,1,2,3,4,5,6,7,8,9,10,...e.props.properties.required?[]:[null]];case L.VideoVoice:case L.Open:return["1",...e.props.properties.required?[]:[""]];case L.RecordedTask:return[{taskStatus:ke.Completed},{taskStatus:ke.GivenUp},...e.props.properties.required?[]:[{taskStatus:ke.Abandoned}]];case L.TextUrlPrompt:return[void 0,...e.props.properties.required?[]:[{skipped:!0}]];case L.ConsentLegal:return[Ru,...e.props.properties.required?[]:[null]];default:return[Ru]}},zv=e=>e in Fo,Wv=e=>typeof e=="object"&&e!==null&&"taskStatus"in e,Yv=(e,t=[])=>t.reduce((n,r)=>{const{group:i,target:o}=r;if(!(i!=null&&i.length))return[...n];const a=i.filter(s=>Number(s)?!0:typeof s=="object"?s.questionIndex===e:!1).map(s=>{const{comparator:l,value:u}=s;return{comparator:l,target:o,value:u}});return[...n,...a]},[]),Qv=(e,t)=>{const n=new Set([L.Thanks,L.Uploading]);if(t>=e.length||t<0||n.has(e[t].type))return 0;const r=e.filter(o=>!n.has(o.type));if(t===r.length-1)return 1;const i={[r.length-1]:1,[-1]:0};for(let o=r.length-2;o>=t;o--){const a=r[o],s=Yv(o,a.props.routingOptions);if(s.length===0){i[o]=i[o+1]+1;continue}let l=0,u=qv(a);if(u===null)return r.length-1-t;for(let c=0;c{const m=Kv({value:v},a.type,v);return!(m&&d===at.Answered||!m&&d===at.Skipped||d===at.GivenUp&&Wv(v)&&v.taskStatus===ke.GivenUp||m&&a.type===L.Open&&(d===at.Contains||d===at.DoesNotContain)||m&&zv(d)&&Fo[d](v,p))});if(h.length=r.length)return r.length-1-t;l=Math.max(i[v]+1,l)}u=h}u.length>0&&(l=Math.max(i[o+1]+1,l)),i[o]=l}return i[t]},Zv=e=>!(e.type===L.Thanks||e.type===L.Uploading),X=Lu()((e,t)=>({allResponses:[],answers:void 0,apiURL:"",border:"#000000",cards:[],close:async(n=Zt)=>{const r=t(),{fadeout:i,remove:o,trackHistory:a}=r;await i(n),Ho(r)||a({event:"closed"}),xi.enable(),o({initiator:Qe.Closed})},configureExitOnOverlayClick:()=>{},customMetadata:{},destroy:async n=>{const{eventEmitFn:r,fadeout:i,remove:o}=t();r(Se.SurveyComplete),await i(n),xi.enable(),o({initiator:Qe.Complete})},endCard:{headline:""},envId:"",eventEmitFn:H.emit.bind(H),fadeout:async n=>{const{eventEmitFn:r,headers:i,viewDocument:o}=t();return Xt(i)?Promise.resolve():(r(B.SurveyFadingOut),new Promise(a=>{const s=o.getElementById(n);s?(s.addEventListener("transitionend",()=>{a()}),s.classList.remove("ul-app--visible")):a()}))},forceBrandedLogo:!1,frame:document.createElement("iframe"),handleClickEmbedButton:n=>{const{cards:r,eventEmitFn:i,index:o}=t();i(n,{[Lt.QuestionId]:r[o].name,[Lt.Props]:r[o].props}),e(()=>({hasViewedEmbed:!0}))},handleUploadUpdate:({mediaRecordingUid:n,isComplete:r,progressPct:i,isSubmitted:o})=>{var f,p,h;const{cards:a,destroy:s,index:l,uploadProgress:u}=t(),c={...u,[n]:{progressPct:i||i===0?i:(f=u[n])==null?void 0:f.progressPct,isComplete:r||((p=u[n])==null?void 0:p.isComplete),isSubmitted:o||((h=u[n])==null?void 0:h.isSubmitted)}};if(a[l].type!==L.Uploading){e({uploadProgress:c});return}const d=Object.entries(u).every(([v,m])=>!m.isSubmitted||m.isComplete||n==v&&r);if(d&&l>=a.length-1){s(Zt);return}e({index:d?l+1:l,uploadingCardViewed:!0,uploadProgress:c})},hasViewedEmbed:!1,headers:{Authorization:"","Content-Type":"","userleap-platform":Rt.Web,"x-ul-environment-id":"","x-ul-installation-method":ft.Snippet,"x-ul-sdk-version":"","x-ul-visitor-id":""},index:0,isPreview:!1,marketingUrl:"https://sprig.com",meta:{ch:0,cw:0,l:"",mode:null,p:"",sh:0,sw:0},mode:void 0,next:n=>{const{allResponses:r,cards:i,eventEmitFn:o,index:a,responseGroupUid:s,submit:l,trackHistory:u,uploadProgress:c,viewedCardCount:d}=t(),f=Date.now(),p=[...i],h=p[a],{type:v}=n.data,m={...n.data},w=m.value;Zv(h)&&(h.value=w),m.answeredAt=f,delete m.type;const _={response:m,responseGroupUid:s,questionIndex:a};let b=v===L.MultipleChoice?Object.values(w).find(C=>C!==!1):w;v===L.MultipleSelect&&(b=p[a].props.options.reduce((C,S)=>(w[S.id]&&C.push(S.value),C),[]));const E=r.slice(0);E[a]=b,e({allResponses:E});const g=Au({cards:p,index:a,hasEndCard:!!n.endCard,uploadProgress:c,allResponses:E});if(g===null){_.completedAt=f,l(_),n.completeSurvey();return}else[L.Thanks,L.Uploading].includes(p[g].type)&&(_.completedAt=f);const x=l(_);[L.Thanks,L.Uploading].includes(p[g].type)||x.finally(()=>{u({event:"seen",index:g})});const I=p[g];p[g]&&o&&o(Se.CurrentQuestion,{[Lt.QuestionId]:I.name,[Lt.Props]:I.props}),e({cards:p,hasViewedEmbed:!1,index:g,viewedCardCount:d+1})},previewKey:null,recorder:()=>{},recorderEventEmitter:H,responseGroupUid:"",remove:({initiator:n})=>{const{frame:r,headers:i,eventEmitFn:o}=t();["ios","android"].includes(i["userleap-platform"])&&o(B.SurveyWillClose,{name:B.SurveyWillClose,initiator:n}),!Xt(i)&&(o(B.SurveyWillClose,{name:B.SurveyWillClose,initiator:n}),r.remove())},seen:async()=>{const{trackHistory:n}=t();return n({event:"seen",isNew:!0})},slugName:null,showStripes:!1,showSurveyBrand:!1,styleNonce:"",submit:async({completedAt:n,questionIndex:r,response:i,responseGroupUid:o})=>{const a=t();if(!o||Ho(a))return;const s={responseGroupUid:o,meta:a.meta,customMetadata:a.customMetadata,responses:[i],completedAt:n,previewKey:a.previewKey};n&&Jh({id:a.surveyId});const l=await Ze(`${a.apiURL}/sdk/1/environments/${a.envId}/visitors/${a.userId}/responses/submit`,{body:JSON.stringify(s),headers:a.headers,method:"POST"});if(!l.ok){l.reportError&&(console.warn("[Sprig] (ERR-427) Failed to submit response",l.error),await Ou(a,"submitResponse",l.error));return}a.eventEmitFn(B.QuestionAnswered,{...i,questionIndex:r})},surveyId:0,tabTitle:"",trackHistory:async({event:n,index:r,isNew:i=!1})=>{const o=t();if(Ho(o))return;const{cards:a,index:s}=o,l=r!==void 0?a[r]:a[s],u={sid:o.surveyId,qid:l.name,action:n,vid:o.userId,eid:o.envId,isNew:i,responseGroupUid:o.responseGroupUid,previewKey:o.previewKey},c=await Ze(`${o.apiURL}/sdk/1/visitors/${o.userId}/surveys/${o.surveyId}/history`,{body:JSON.stringify(u),headers:o.headers,method:"POST"});!c.ok&&c.reportError&&(console.warn("[Sprig] (ERR-428) Failed to track survey event",c.error),await Ou(o,"trackHistory",c.error))},update:()=>{const{headers:n,eventEmitFn:r,frame:i,viewDocument:o}=t();setTimeout(()=>{var s;const a=Wa(o);Xt(n)?r(B.SurveyHeight,{name:B.SurveyHeight,contentFrameHeight:a}):(s=i.setHeight)==null||s.call(i,a)},100)},uploadingCardViewed:!1,uploadProgress:{},useDesktopPrototype:void 0,useMobileStyling:!1,userId:"",viewDocument:window.document,viewedCardCount:0})),Ho=e=>!e.userId||e.meta&&e.meta.mode==="test"||e.isPreview,Ou=async(e,t,n)=>{const{mode:r,userId:i,envId:o,apiURL:a,headers:s,viewDocument:l}=e,u=l.documentElement,c={mode:r,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:u.clientWidth,clientHeight:u.clientHeight,location:window.location.href,language:window.navigator.language},d={action:t,err:{message:n==null?void 0:n.message,stack:n==null?void 0:n.stack},meta:c,vid:i,envId:o};(await Ze(`${a}/sdk/1/errors`,{method:"POST",headers:Object.assign({"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},s),body:JSON.stringify(d)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",n)},Xv=async(e,t)=>{var r;const n=await fetch(t,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(n.ok){const i=await n.json();return(r=i==null?void 0:i.upload)==null?void 0:r.url}else return null},Du=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",Pu=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:Du()};return new MediaRecorder(e,t)},Nu=(e,t,n)=>{n[t]=[],e.ondataavailable=function(r){n[t].push(r.data)},e.currentMediaRecordingUid=t,e.start()};function Mu(e,t,n,r,i,o){if(e&&e.state!=="inactive"){const{[K.BeginCallback]:a}=r,s=e.currentMediaRecordingUid;if(!s)return;a&&a(s),e.onstop=()=>Jv(t,e,n,r,s,i,o),e.stop()}}async function Jv(e,t,n,r,i,o,a){const s=X.getState().viewDocument,{[K.UploadCallback]:l,[K.ProgressCallback]:u}=r,c={mediaType:n,updatedAt:new Date().toISOString(),mediaRecordingUid:i,...r[K.PassthroughData]},d=await Xv(c,e);if(!d){l&&l(null,{message:"failed to get upload url"});return}const f=new Blob(a,{type:Du()});if(!s.defaultView)return;const p=new s.defaultView.File([f],`recording video ${Date.now()}`),h=o.createUpload({endpoint:d,file:p,chunkSize:5120});h.on("error",v=>{l&&l(null,v)}),h.on("progress",v=>{u&&u(i,v)}),h.on("success",()=>{l&&l(i,!0)})}const em={state:{...{chunks:{}}},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:n,screenRecorder:r,UpChunk:i}=this.state,o=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?Ie.Video:Ie.Audio;this.state.chunks&&t&&i&&(n!=null&&n.currentMediaRecordingUid&&Mu(n,t,o,e,i,this.state.chunks[n==null?void 0:n.currentMediaRecordingUid]),r!=null&&r.currentMediaRecordingUid&&Mu(r,t,Ie.Screen,e,i,this.state.chunks[r==null?void 0:r.currentMediaRecordingUid]))},handleCancelledStream(e){const t=e.getVideoTracks(),n=e.getAudioTracks();let r=t.length&&t[0];r=r||n.length&&n[0],r&&r.addEventListener("ended",()=>{[this.state.avRecorder,this.state.screenRecorder].map(i=>{i&&(i.state==="recording"&&i.stop(),i.stream.getTracks().map(o=>{o.readyState==="live"&&o.stop()}))}),Object.assign(this.state,{avStream:null,captureStream:null,avRecorder:null,screenRecorder:null})})},taskDurationMillisecond(){return this.state.startTime?new Date().getTime()-this.state.startTime.getTime():0},setUpChunk(e){this.state.UpChunk=e},configure(e,t){Object.assign(this.state,t),this.state.uploadApiEndpoint=`${t.apiURL}/2/environments/integrations/upload`,this.state.chunks={},e.on(ce.PermissionStatus,this.permissionStatusCallback.bind(this)),e.on(ce.AvPermission,async n=>{this.avPermissionCallback(n)}),e.on(ce.BeginRecording,this.beginRecordingCallback.bind(this)),e.on(ce.StartTask,this.startTaskCallback.bind(this)),e.on(ce.ScreenPermission,async n=>{this.screenPermissionCallback(n)}),e.on(ce.FinishTask,async n=>{this.finishTaskCallback(n)})},async avPermissionCallback(e){var r,i,o;const{[K.StreamReadyCallback]:t,[K.PermissionDescriptors]:n}=e;try{(r=this.state.avStream)!=null&&r.active&&(this.state.avStream.getTracks().map(a=>a.readyState==="live"&&a.stop()),((i=this.state.captureStream)==null?void 0:i.getAudioTracks().length)===1&&this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])),this.state.avStream=await navigator.mediaDevices.getUserMedia({video:n.includes(dn.Camera),audio:!0}),((o=this.state.captureStream)==null?void 0:o.getAudioTracks().length)===0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.avStream)}catch(a){console.warn("Error: failed to get permissions: "+a),t&&t(null,null);return}t&&t(this.state.avStream,this.state.captureStream)},async screenPermissionCallback(e){const{[K.ScreenPermissionRequested]:t,[K.StreamReadyCallback]:n}=e;t==null||t(!0);try{this.state.captureStream=await navigator.mediaDevices.getDisplayMedia({video:!0,cursor:"always",displaySurface:"browser",preferCurrentTab:!0})}catch(r){t==null||t(!1),console.warn("Error: failed to get permissions: "+r),n&&n(null,null);return}t==null||t(!1),this.state.avStream&&this.state.avStream.getAudioTracks().length>0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.captureStream),n&&n(this.state.avStream||null,this.state.captureStream)},beginRecordingCallback(e){const{[K.RecordingMediaTypes]:t,[K.StartRecordingCallback]:n}=e;if(!t)return;const r=[];if(t.includes(Ie.Video)&&this.state.avStream){this.state.avRecorder=Pu(this.state.avStream);const i=Ye();Nu(this.state.avRecorder,i,this.state.chunks),r.push(i)}if(t.includes(Ie.Screen)&&this.state.captureStream){this.state.screenRecorder=Pu(this.state.captureStream);const i=Ye();Nu(this.state.screenRecorder,i,this.state.chunks),r.push(i)}r&&n&&n(r)},async finishTaskCallback(e){const{[K.CurrentIndex]:t,[K.TaskResponse]:n,[K.TaskCompleteCallback]:r}=e;await this.stopRecording(e),r&&r(this.taskDurationMillisecond()),this.state.cards&&this.state.hasEndCard!==void 0&&this.lookAheadAndStopStream(t,n,this.state.cards,this.state.hasEndCard)},startTaskCallback(){this.state.startTime=new Date},permissionStatusCallback(e){var r;const{[K.PermissionStatusCallback]:t}=e,n=this.state.avStream;t&&t(n,n?(n==null?void 0:n.getVideoTracks().length)>0:!1,!!((r=this.state.captureStream)!=null&&r.active),this.state.captureStream)},lookAheadAndStopStream(e,t,n,r){const{avRecorder:i,screenRecorder:o}=this.state,{allResponses:a}=X.getState(),s=Au({cards:n,index:e,hasEndCard:r,allResponses:a});s!==null&&n[s].type===L.RecordedTask||[i,o].map(l=>{l&&(l.state==="recording"&&l.stop(),l.stream.getTracks().map(u=>{u.readyState==="live"&&u.stop()}))})}},$r=Object.create(em);Object.freeze($r);function Vu(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ty("button",{...e,className:G("ul-card-text__button",e.className),id:"ul-card-text__button"}),$e=({message:e,properties:t})=>{const n=t==null?void 0:t.captionText;return y(Le,{children:[e&&y("h1",{className:O.QuestionHeader,id:O.QuestionHeader,...n?{}:{style:{marginBottom:"15px"}},children:e}),n&&y("p",{className:O.Caption,id:O.Caption,children:n})]})},ju=({buttonText:e="View Prototype",handleClick:t})=>y("button",{className:"prototype-button",onClick:t,children:e},"prototype-btn"),Et=({defaultBody:e,embeddedType:t="prototype",properties:n})=>{var d;const{handleClickEmbedButton:r,hasViewedEmbed:i,headers:o,useDesktopPrototype:a}=X(f=>({handleClickEmbedButton:f.handleClickEmbedButton,hasViewedEmbed:f.hasViewedEmbed,headers:f.headers,useDesktopPrototype:f.useDesktopPrototype})),s=(n==null?void 0:n.conceptUrl)||((d=n==null?void 0:n.consentDocument)==null?void 0:d.url),l=window.innerWidth{f.preventDefault(),r(p)};if(!a&&l&&!i&&s&&["email","link"].includes(u)){if(t==="prototype")return y(ju,{handleClick:f=>{c(f,Se.ViewPrototypeClick)}});if(t==="pdf")return y(ju,{buttonText:(n==null?void 0:n.viewDocumentText)||"View Document",handleClick:f=>{c(f,Se.ViewAgreementClick)}})}return e()},Bu=(e,t)=>{const n=bt(0),r=()=>{if(e.current){const i=e.current;i.style.height="1px";const o=i.scrollHeight,a=i.offsetHeight-i.clientHeight,s=o+a,l=parseInt(window.getComputedStyle(i).getPropertyValue("max-height")),u=s<=l?s:l;n.current!==u&&t(),n.current=u,i.style.height=`${u}px`}};return Re(r,[]),r},Fu=({border:e,label:t,isSelected:n,value:r,text:i,id:o,isRadio:a,useMobileStyling:s,error:l,allowTextEntry:u,promptText:c,onUserInputChanged:d})=>{const{styleNonce:f,viewDocument:p}=X(S=>({styleNonce:S.styleNonce,viewDocument:S.viewDocument})),[h,v]=ue(!1);im(p,e,f);const m=({isSelected:S,userText:R})=>{d&&d({id:o||"",selected:S,value:r,userText:R})},w=S=>{S.stopPropagation(),m({isSelected:a||!n,userText:i}),v(!1)},_=()=>{h||v(!0)},b=()=>{h&&v(!1)},E=S=>{(S.key==="Enter"||S.key===" ")&&w(S)},g={onClick:S=>w(S),onKeyPress:S=>E(S)};"ontouchstart"in p.documentElement?(g.onTouchStart=b,g.onTouchCancel=b,g.onTouchEnd=b):(g.onMouseDown=_,g.onMouseLeave=b);const x=a?`radio-${o}`:`checkbox-${o}`,I=n||h?[Gr]:[],C=[...l?[Ku]:[],...I];return y("div",{className:G([...re(O.Choice,s),...C]),id:`choice-div-${o}`,style:l?{borderColor:bn}:{},...g,children:[y("div",{className:G([O.ChoiceLabelContainer]),children:[a?y("div",{"aria-labelledby":`label-${o}`,className:G([O.ChoiceRadio,...I]),id:x,role:"radio",tabIndex:0}):y("div",{"aria-checked":n,"aria-labelledby":`label-${o}`,className:O.ChoiceCheckbox,id:x,role:"checkbox",style:n?{backgroundColor:e,borderColor:e,boxShadow:"none"}:{},tabIndex:0,children:n&&y("svg",{fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg",children:y("path",{d:"M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",stroke:"white",strokeLinecap:"round",strokeWidth:"2"})})}),y("label",{className:G(re(O.ChoiceLabel,s)),htmlFor:x,id:`label-${o}`,children:t})]}),u&&n&&y("div",{className:G([O.ChoiceTextEntryContainer,...I]),children:y(nm,{onTextChange:S=>m({isSelected:n,userText:S}),promptText:c||"Please specify",textValue:i,useMobileStyling:s})})]})},nm=({promptText:e,textValue:t,onTextChange:n,useMobileStyling:r})=>{const i=bt(null),{update:o}=X(s=>({update:s.update})),a=Bu(i,()=>o());return Re(()=>{i.current&&i.current.focus()},[]),y("textarea",{"aria-label":e,"aria-multiline":"true","aria-placeholder":e,className:G(re(O.ChoiceTextInput,r)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:s=>{a(),s.stopPropagation(),n(s.currentTarget.value)},onClick:s=>{s.stopPropagation()},onKeyPress:s=>{s.stopPropagation()},placeholder:e,ref:i,role:"textbox",rows:1,value:t})},Hu="ul-select-style-element",Gr="ul-select-active-dynamic-style",Ku="ul-select-error-dynamic-style",rm=e=>e.tagName.toLowerCase()==="style",im=(e,t,n)=>{let r=e.getElementById(Hu),i=!1;r||(r=e.createElement("style"),i=!0),rm(r)&&(r.id=Hu,n&&(r.nonce=n),r.textContent=om(t),i&&e.head.appendChild(r))},om=e=>` - .${Gr} { - border-color: ${e}; - } - .${Gr} .${O.ChoiceRadio}, .${Gr}.${O.ChoiceRadio} { - border: 6px solid ${e}; - box-shadow: none; - } - .${Ku} { - border-color: ${bn}; - } - `,gn=e=>(e==null?void 0:e.buttonText)||"Next",Ko=e=>(e==null?void 0:e.skipButtonText)||"Skip",am=({className:e,message:t,next:n,properties:r,questionId:i,type:o})=>{const{useMobileStyling:a,border:s}=X(S=>({useMobileStyling:S.useMobileStyling,border:S.border})),[l,u]=ue(!1),[c,d]=ue(""),[f,p]=ue(!1),h=r==null?void 0:r.collectName,v=(r==null?void 0:r.nameLabelText)||"Full Name",m=(r==null?void 0:r.consentText)||"I agree to the stated conditions",w=(r==null?void 0:r.submitButtonText)||"Submit",_=!!c.trim(),b=l&&(!h||_),E=(S,R=!1)=>{S.preventDefault(),S.stopPropagation();let D=null;if(!R){if(!b){p(!0);return}D={submitted:!0},h&&(D.name=c)}n({value:D,questionId:i,type:o})},g=S=>{S.preventDefault(),S.stopPropagation(),d(S.currentTarget.value)},x=S=>{S.currentTarget.style.borderColor=f&&!_?bn:s},I=S=>{S.currentTarget.style.borderColor=f&&!_?bn:Ei},C=()=>y("div",{children:[y(Fu,{allowTextEntry:!1,border:s,error:f&&!l,index:0,isRadio:!1,isSelected:l,label:m,onUserInputChanged:({selected:S})=>{S!==l&&u(!l)},useMobileStyling:a}),h&&y("input",{"aria-label":v,"aria-placeholder":v,className:G(re(O.ConsentLegalNameInput,a)),"data-gramm":"false",maxLength:250,name:"name",onBlur:I,onFocus:x,onInput:g,placeholder:v,style:f&&!_?{borderColor:bn}:{},tabIndex:0,value:c}),y("div",{className:"ul-card__button-wrapper ul-card-vertical__button-wrapper",children:[y(Ee,{className:b?"":O.ButtonDisabled,onClick:E,children:w}),r.required===!1&&y("button",{className:O.SkipButton,onClick:S=>E(S,!0),children:Ko(r)})]})]});return y("div",{className:G([e,"ul-card__consent-legal",O.FadeInTransition]),children:[y($e,{message:t}),y("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:r&&r.richTextBody?{__html:r&&r.richTextBody}:void 0,id:"ul-card__consent-legal-body-container"}),y(Et,{properties:r,defaultBody:C,embeddedType:"pdf"})]},i)},sm=({activeValue:e,border:t,icon:n,isPressed:r,onSubmit:i,range:o,scaleLabelType:a,setActiveValue:s,setIsPressed:l,useMobileStyling:u,value:c})=>{const d=`option-${c}`,f=a===Bt.Number,p=a===Bt.Star,h=f&&c===e,[v,m]=(()=>c<=e&&p||c===e?r?[t,1]:[t,.3]:["",1])(),w=()=>{switch(a){case Bt.Star:return G([...re(O.LikertStar,u),...re(`${O.LikertStar}-${c}`,u)]);case Bt.Smiley:return G([...re(O.LikertSmiley,u),...re(`${O.LikertSmiley}-${c}`,u)]);default:return G(c===o?[...re(O.LikertNumber,u),...re(`${O.LikertNumber}-${c}`,u),...re("likert-last-option",u)]:[...re(O.LikertNumber,u),...re(`${O.LikertNumber}-${c}`,u)])}},_=()=>{s(-1),l(!1)};return y("div",{"aria-label":f?void 0:String(c),className:w(),dangerouslySetInnerHTML:{__html:n},id:d,onClick:()=>i(),onPointerDown:()=>l(!0),onPointerEnter:()=>s(c),onPointerLeave:_,role:"radio",style:{color:f?"":v,borderColor:h?v:"",fillOpacity:h?"":m,zIndex:h?3:"auto"},tabIndex:0})},lm=({className:e,labels:t,message:n,next:r,properties:i,questionId:o,type:a})=>{const{border:s,useMobileStyling:l}=X(C=>({border:C.border,useMobileStyling:C.useMobileStyling})),[u,c]=ue(-1),[d,f]=ue(!1),p=t&&t.left,h=t&&t.right;let v;const{range:m,scaleLabelType:w,ratingIcons:_}=i;m&&(v=Number(m));const b=v||5,E=C=>{var S,R;switch(w){case Bt.Star:return(S=_[0])==null?void 0:S.svg;case Bt.Smiley:return(R=_[C])==null?void 0:R.svg;default:return String(C+1)}},g=[...Array(b)].map((C,S)=>{const R=S+1;return y(sm,{activeValue:u,border:s,icon:E(S),isPressed:d,onSubmit:()=>r({value:R,questionId:o,type:a}),range:b,scaleLabelType:w,setActiveValue:c,setIsPressed:f,useMobileStyling:l,value:R},S)}),x=C=>{C.preventDefault(),C.stopPropagation(),r({value:null,questionId:o,type:a})},I=()=>y(Le,{children:[y("div",{"aria-label":`Rating (1 - ${b})`,className:"ul-card--likert__numbers",role:"radiogroup",children:g}),y("div",{className:"ul-card--likert__labels",children:[y("span",{children:p}),y("span",{children:h})]}),!i.required&&y("div",{className:"ul-vertical-centered-container",children:y(Ee,{onClick:x,children:gn(i)})})]});return y("form",{className:G([e,"ul-card--likert",O.FadeInTransition]),children:[y($e,{message:n,properties:i}),y(Et,{properties:i,defaultBody:I})]},o)},$u=({className:e,message:t,onSubmit:n,options:r=[],properties:i,questionId:o,type:a})=>{const{border:s,useMobileStyling:l}=X(g=>({border:g.border,useMobileStyling:g.useMobileStyling})),u=r.reduce((g,x)=>(g[x.id]={isSelected:!1},g),{}),[c,d]=ue(u),f=a===L.MultipleChoice,p=i.required,h=Object.entries(c).some(([g,x])=>{var S;const I=r.find(R=>`${R.id}`===g),C=x.userText===void 0||x.userText.trim()==="";return((S=I==null?void 0:I.optionProperties)==null?void 0:S.allowsTextEntry)&&C&&x.isSelected}),v=Object.values(c).some(g=>g.isSelected),m=h||p&&!v,w=r.map(({id:g,label:x,value:I,optionProperties:C},S)=>{var T,P;const R=`${g}`,{allowsTextEntry:D}=C||{allowsTextEntry:!1};return y(Fu,{allowTextEntry:D,border:s,error:!1,id:R,index:S,isRadio:f,isSelected:!!((T=c[R])!=null&&T.isSelected),label:x,onUserInputChanged:A=>b(A.id,A.selected,A.userText),promptText:"Please specify",text:(P=c[g])==null?void 0:P.userText,useMobileStyling:l,value:I},R)}),_=g=>{g.preventDefault(),g.stopPropagation(),n(c)},b=(g,x,I)=>{const C=Object.assign({},c);if(f&&x)for(const S of Object.values(C))S.isSelected=!1,delete S.userText;C[g]={isSelected:x,userText:I},d(C)},E=()=>y("div",{children:[y("div",{className:G(re(O.ChoiceGroup,l)),role:f?"radiogroup":"group",children:w}),y("div",{className:"ul-card__button-wrapper",children:y(Ee,{disabled:m,onClick:_,children:gn(i)})})]});return y("form",{className:G([e,"ul-card--multiple",O.FadeInTransition]),id:"text-form",onSubmit:_,children:[y($e,{message:t,properties:i}),y(Et,{properties:i,defaultBody:E})]},o)},um=e=>{const{questionId:t,type:n,next:r,options:i}=e;return y($u,{...e,onSubmit:a=>{const s=Object.entries(a).find(([,f])=>f.isSelected)||[void 0,void 0],[l,u]=s,c=i.find(f=>`${f.id}`===l),d=u!=null&&u.userText?{[l]:{userText:u.userText}}:null;r({value:c&&l?{[l]:c.value}:{},secondaryValue:d,questionId:t,type:n})}})},cm=e=>{const{questionId:t,type:n,next:r}=e;return y($u,{...e,onSubmit:o=>{const a={},s=Object.entries(o).reduce((u,[c,d])=>(u[c]=d.isSelected,u),a),l=Object.entries(o).reduce((u,[c,d])=>{if(!d.userText)return u;const f=u||{};return f[c]={userText:d.userText},f},null);r({value:s,secondaryValue:l,questionId:t,type:n})}})},dm=({className:e,props:{labels:t,message:n,properties:r},next:i,questionId:o,type:a})=>{const{border:s,useMobileStyling:l}=X(h=>({border:h.border,useMobileStyling:h.useMobileStyling})),u=t&&t.left,c=t&&t.right,d=[...Array(11)].map((h,v)=>y("div",{className:G([...re(O.NPSNumber,l),...re(`${O.NPSNumber}-${v}`,l)]),id:`option-${v}`,onClick:()=>i({value:v,questionId:o,type:a}),onKeyPress:m=>{m.preventDefault(),(m.key==="Enter"||m.key===" ")&&i({value:v,questionId:o,type:a})},onPointerDown:m=>{m.currentTarget.style.zIndex="2",m.currentTarget.style.borderColor=s},onPointerLeave:m=>{m.currentTarget.style.zIndex="auto",m.currentTarget.style.borderColor=Ei},role:"radio",tabIndex:0,children:v},v)),f=h=>{h.preventDefault(),h.stopPropagation(),i({value:null,questionId:o,type:a})},p=()=>y("div",{children:[y("div",{className:"ul-card--nps__numbers",children:d}),y("div",{className:"ul-card--nps__labels",children:[y("span",{children:u}),y("span",{children:c})]}),!r.required&&y("div",{className:"ul-vertical-centered-container",children:y(Ee,{onClick:f,children:gn(r)})})]});return y("form",{className:G([e,"ul-card--nps",O.FadeInTransition]),children:[y($e,{message:n,properties:r}),y(Et,{properties:r,defaultBody:p})]},o)},fm=({className:e,message:t,next:n,properties:r,questionId:i,type:o})=>{const{border:a,useMobileStyling:s,update:l}=X(g=>({border:g.border,useMobileStyling:g.useMobileStyling,update:g.update})),[u,c]=ue(""),d=bt(null),f=u.trim(),p=r.required===!0&&!f,h=Bu(d,()=>l()),v=g=>{h(),g.preventDefault(),g.stopPropagation(),c(g.currentTarget.value)},m=g=>{g.preventDefault(),g.stopPropagation(),n({value:u,questionId:i,type:o})},w=r&&r.openTextPlaceholder?r.openTextPlaceholder:"",_=g=>{g.currentTarget.style.borderColor=a},b=g=>{g.currentTarget.style.borderColor=Ei},E=()=>y("div",{className:"ul-card-text",children:[y("div",{className:"ul-card-text__container",children:y("textarea",{"aria-label":w,"aria-labelledby":O.QuestionHeader,"aria-multiline":"true","aria-placeholder":w,className:G(re(O.OpenTextInput,s)),"data-gramm":"false",maxLength:5e3,name:"text",onBlur:b,onChange:v,onFocus:_,placeholder:w,ref:d,role:"textbox",tabIndex:0})}),y(Ee,{disabled:p,onClick:m,style:{backgroundColor:p?"":a},children:gn(r)})]});return y("form",{className:G([e,"ul-card--text",O.FadeInTransition]),id:"text-form",children:[y($e,{message:t,properties:r}),y(Et,{defaultBody:E,properties:r})]},i)};var xt=(e=>(e[e.RequestNeeded=1]="RequestNeeded",e[e.TryAgain=2]="TryAgain",e[e.Ready=3]="Ready",e))(xt||{});const qr=e=>e.type===Te.AvPermission,Gu=e=>e.type===Te.ScreenPermission,pm=(e,t)=>!(qr(t)?t.permissionDescriptors:[]).includes(dn.Camera)||e.getVideoTracks().length>0,qu=(e,t)=>{if(e===void 0)return xt.RequestNeeded;if(e){if(!pm(e,t))return xt.RequestNeeded}else return xt.TryAgain;return xt.Ready},zu={avStream:null,currentPage:null,mediaRecordingUids:null,nextQuestion:()=>{},passthroughData:void 0,recordingMediaTypes:void 0,screenPermissionRequested:!1,type:void 0},Ge=Lu(e=>({...zu,reset:()=>{e(zu)},updatePage:t=>{e(t)}}));function $o({currentPage:e,pages:t}){const{avStream:n,recordingMediaTypes:r,updatePage:i}=Ge.getState(),{recorderEventEmitter:o}=X.getState();o.emit(ce.AvPermission,{[K.PermissionDescriptors]:e.permissionDescriptors,[K.StreamReadyCallback]:(a,s)=>{if(n===a)return;let l=e;if(a&&!e.permissionDescriptors.includes(dn.Camera)){const u=t.indexOf(e),c=s!=null&&s.active?u+2:u+1;(s==null?void 0:s.active)&&r&&o.emit(ce.BeginRecording,{[K.RecordingMediaTypes]:r,[K.StartRecordingCallback]:d=>i({mediaRecordingUids:d})}),l=t[c]}i({currentPage:l,avStream:a})}})}function hm({pages:e,userId:t,responseGroupUid:n,surveyId:r,questionId:i,next:o}){const{updatePage:a}=Ge.getState(),{eventEmitFn:s,recorderEventEmitter:l}=X.getState(),u={questionId:i,surveyId:r,visitorId:t,responseGroupUid:n};let c=0;l.emit(Se.RecordedTaskPermissionScreen),s(Se.RecordedTaskPermissionScreen),l.emit(ce.PermissionStatus,{[K.PermissionStatusCallback]:(f,p,h,v)=>{const m=e[c],{type:w}=m,_=[Ie.Screen];if(qr(m)){const{permissionDescriptors:b}=m,E=b==null?void 0:b.includes(dn.Microphone),g=b==null?void 0:b.includes(dn.Camera);E&&_.push(Ie.Audio),g&&_.push(Ie.Video);const x=(f==null?void 0:f.active)&&!g,I=(f==null?void 0:f.active)&&p;(x||I)&&c++}Gu(e[c])&&h&&(c++,l.emit(ce.BeginRecording,{[K.RecordingMediaTypes]:_,[K.StartRecordingCallback]:b=>a({mediaRecordingUids:b})})),a({currentPage:e[c],avStream:f,screenPermissionRequested:h,nextQuestion:o,type:w,passthroughData:u,recordingMediaTypes:_,captureStream:v})}});const d=e[c];return d.type===Te.AvPermission&&$o({currentPage:d,pages:e}),d}function Go({status:e}){const{nextQuestion:t,passthroughData:n,mediaRecordingUids:r,reset:i}=Ge.getState(),{recorderEventEmitter:o,handleUploadUpdate:a,index:s}=X.getState(),l={value:{taskStatus:e},type:L.RecordedTask,questionId:(n==null?void 0:n.questionId)||1};!n||o.emit(ce.FinishTask,{[K.BeginCallback]:u=>{a({mediaRecordingUid:u,isSubmitted:!0,progressPct:0,isComplete:!1})},[K.ProgressCallback]:(u,c)=>{a({mediaRecordingUid:u,progressPct:c.detail,isSubmitted:!1,isComplete:!1})},[K.UploadCallback]:u=>{u&&a({mediaRecordingUid:u,isComplete:!0,isSubmitted:!0,progressPct:100})},[K.PassthroughData]:n,[K.CurrentIndex]:s,[K.TaskResponse]:l,[K.TaskCompleteCallback]:u=>{l.value.taskDurationMillisecond=u,r&&(l.value.mediaRecordingUids=r),i(),t(l)}})}function qo({pages:e,setIsRequestingPermission:t}){const{recorderEventEmitter:n,eventEmitFn:r}=X.getState(),{updatePage:i,currentPage:o,recordingMediaTypes:a,screenPermissionRequested:s}=Ge.getState();if(!o)return;const l=e.indexOf(o);switch(o.type){case Te.AvPermission:{const u=s?l+2:l+1;s&&a&&n.emit(ce.BeginRecording,{[K.RecordingMediaTypes]:a,[K.StartRecordingCallback]:c=>{i({mediaRecordingUids:c})}}),i({currentPage:e[u]});return}case Te.ScreenPermission:n.emit(ce.ScreenPermission,{[K.ScreenPermissionRequested]:t,[K.StreamReadyCallback]:(u,c)=>{const d=c?e[l+1]:o;c&&a&&n.emit(ce.BeginRecording,{[K.RecordingMediaTypes]:a,[K.StartRecordingCallback]:f=>{i({captureStream:c,mediaRecordingUids:f})}}),i({currentPage:d,screenPermissionRequested:!0,captureStream:c})}});return;case Te.StartTask:r(Se.RecordedTaskStart),n.emit(Se.RecordedTaskStart),n.emit(ce.StartTask),i({currentPage:e[l+1],screenPermissionRequested:!0});return;case Te.CompleteTask:return}}const Wu="ul-permission-graphics-container",Yu="ul-permission-body",Qu=G([Wu,"ul_recorded-task-inset-spacing"]),zr=G(["ul-horizontal-button-container","ul-horizontal-button-container-left"]),Zu=({richTextBody:e})=>y("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:e},id:"ul-task-detail-container"}),Wr=({required:e,skipButtonText:t,bottom:n=!1})=>e?null:y(Ee,{className:G([n&&"ul-skip-button-below",O.InactiveButton]),onClick:Go.bind(null,{status:ke.Abandoned}),children:t||"Skip"}),zo=e=>{const{avStream:t,captureStream:n,recordingMediaTypes:r,updatePage:i}=Ge.getState(),o=(r==null?void 0:r.includes(Ie.Audio))||(r==null?void 0:r.includes(Ie.Video));Re(()=>{const a=setInterval(()=>{o&&t&&!t.active?i({avStream:null,currentPage:e[0]}):(!n||!n.active)&&i({captureStream:void 0,currentPage:e[o?1:0]})},1e3);return()=>clearInterval(a)},[t,n,o,e,r,i])},vm=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:i,taskDetail:o}=e;return zo(t),y("div",{className:"ul-task-page",children:[y(Zu,{richTextBody:o}),y("div",{className:zr,children:[y(Ee,{onClick:qo.bind(null,{pages:t}),children:r}),y(Wr,{required:n,skipButtonText:i})]})]},"start-task")},mm=({content:e,pages:t,properties:n})=>{const{buttonText:r,skipButtonText:i}=e;zo(t);const a=y(Et,{properties:n,defaultBody:()=>y("div",{className:zr,children:[y(Ee,{className:"ul-complete-task-button",onClick:Go.bind(null,{status:ke.Completed}),children:r}),y(Ee,{className:G([O.InactiveButton]),onClick:Go.bind(null,{status:ke.GivenUp}),children:i})]})});return y("div",{className:"ul-task-page",children:[y(Zu,{richTextBody:e.taskDetail}),a]},"complete-task")},gm=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:i}=e,[o]=X(l=>[l.tabTitle]),[a,s]=ue(!1);return y("div",{children:[y("div",{className:Qu,children:[y("p",{style:{marginTop:"auto"},children:e.selectTabText}),y("div",{className:"ul-select-tab-container",children:y("p",{className:Yu,children:o})})]}),y("div",{className:n?"":zr,children:[y(Ee,{disabled:a,onClick:qo.bind(null,{pages:t,setIsRequestingPermission:s}),children:r}),y(Wr,{required:n,skipButtonText:i})]})]})},ym=({content:e})=>y("div",{className:G([Wu,"ul_permission_svg_container","ul_recorded-task-inset-spacing","ul-center-horizontally"]),dangerouslySetInnerHTML:{__html:e.svg}},"ul-permission-request-graphic"),_m=({content:e,pages:t,required:n})=>{const{permissionDeniedHeadline:r,permissionDeniedBody:i,skipButtonText:o,tryAgainButtonText:a}=e,s=qr(t[0])?t[0]:null;return Re(()=>{const l=setInterval(()=>{s!==null&&$o({currentPage:s,pages:t})},1e3);return()=>clearInterval(l)},[s,t]),s?y("div",{children:[y("div",{className:Qu,children:y("p",{className:"ul-av-permission-denied-paragraph",children:[y("span",{className:"ul-av-permission-denied-headline",children:r}),y("span",{className:Yu,children:i})]})}),y("div",{className:zr,children:[y(Ee,{onClick:$o.bind(null,{currentPage:s,pages:t}),children:a}),y(Wr,{required:n,skipButtonText:o})]})]}):null},wm=({stream:e})=>y("video",{autoPlay:!0,className:G(["ul_recorded-task-inset-spacing"]),id:"ul-record-task-video-preview",muted:!0,ref:t=>{t&&(t.srcObject=e||null)}}),bm=({content:e,pages:t,required:n})=>{const{skipButtonText:r}=e,{avStream:i}=Ge.getState();return zo(t),y("div",{children:[y(wm,{stream:i}),y("div",{className:"ul-vertical-button-container-center",children:[y(Ee,{onClick:qo.bind(null,{pages:t}),children:e.buttonText}),y(Wr,{bottom:!0,required:n,skipButtonText:r})]})]})},Em=({properties:e})=>{const{pages:t,required:n}=e,{avStream:r,currentPage:i}=Ge.getState();if(i===void 0)return null;switch(i==null?void 0:i.type){case Te.AvPermission:{const o=qu(r,i);return o===xt.RequestNeeded?y(ym,{content:i}):o===xt.TryAgain?y(_m,{content:i,pages:t,required:n}):y(bm,{content:i,pages:t,required:n})}case Te.ScreenPermission:return y(gm,{content:i,pages:t,required:n});case Te.StartTask:return y(vm,{content:i,pages:t,required:n});case Te.CompleteTask:return y(mm,{content:i,pages:t,properties:e});default:return null}},xm=({className:e,properties:t,next:n,questionId:r})=>{const i=X(),{surveyId:o,responseGroupUid:a,userId:s}=i,l=Ge(),{screenPermissionRequested:u}=l,c=Ge(v=>v.avStream);let d=Ge(v=>v.currentPage);d||(d=hm({questionId:r,surveyId:o,next:v=>{n(v)},pages:t.pages,responseGroupUid:a,userId:s}));let f=d.headline,p=d.captionText;const h=qu(c,d);return Gu(d)&&u&&(f=d.permissionDeniedHeadline,p=d.permissionDeniedCaptionText),qr(d)&&h===xt.Ready&&(f=d.permissionGrantedHeadline,p=d.permissionGrantedCaptionText),y("div",{className:G([e,"ul-center-horizontally",O.FadeInTransition]),children:[y($e,{message:f,properties:{captionText:p}}),y(Em,{properties:t})]})},Cm={"{{user_id}}":"externalUserId","{{email}}":"email"},Sm=(e=void 0,t={})=>{if(!e)return e;let n=e;const r=[];for(const[l,u]of Object.entries(Cm))if(n.toLowerCase().includes(l))if(t[u]){const c=new RegExp(l,"gi");n=n.replace(c,t[u])}else r.push(l);if(r.length===0||!n.includes("?"))return n;const i=n.slice(0,n.indexOf("?")),a=n.slice(n.indexOf("?")+1).split("&").map(l=>l.split("=")).filter(l=>!r.includes(l[1]));if(a.length===0)return i;const s=a.map(l=>l.join("=")).join("&");return`${i}?${s}`},Im=({className:e,message:t,next:n,properties:r,questionId:i,type:o})=>{const{visitorAttributes:a}=X(d=>({visitorAttributes:d.visitorAttributes})),s=(d,f=!1)=>{n({value:f?{skipped:!0}:void 0,questionId:i,type:o})},l=d=>{(d.key==="Enter"||d.key===" ")&&n({value:void 0,questionId:i,type:o})},u=()=>{const d=Sm(r&&r.buttonUrl,a);return y("div",{className:"ul-card-button-group",children:[y("a",{className:"ul-card-text__button ul-card__text-url-prompt-button",href:d,id:"ul-card-text__button",onClick:s,onKeyPress:l,rel:"noreferrer",role:d?"link":"button",tabIndex:0,target:"_blank",children:gn(r)}),r.required===!1&&y("button",{className:O.SkipButton,onClick:f=>s(f,!0),children:Ko(r)})]})},c=(d,f)=>d?y("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:d},id:"ul-card__text-url-body-container"}):y("div",{className:"ul-rich-text-body",id:"ul-card__text-url-body-container",children:(f?f.split(/\n\s*\n/g):[]).map((p,h)=>y("p",{children:p},h))});return y("div",{className:G([e,"ul-card__text-url-prompt",O.FadeInTransition]),children:[y($e,{message:t}),c(r&&r.richTextBody,r&&r.body),y(Et,{defaultBody:u,properties:r})]},i)},km=({className:e,questionId:t})=>{const{border:n,destroy:r,endCard:i,forceBrandedLogo:o}=X(l=>({border:l.border,destroy:l.destroy,endCard:l.endCard,forceBrandedLogo:l.forceBrandedLogo}));Re(()=>{setTimeout(()=>{r(Zt)},o?4e3:2e3)},[r,o]);const a=i&&i.subheader?y("p",{className:O.Caption,children:i.subheader}):null,s=i&&i.headline?i.headline:"";return y("div",{className:G([e,"ul-card--thanks",O.FadeInTransition]),children:y("div",{children:y("div",{className:"ul-card--thanks-content",children:[y("div",{className:"ul-thanks-check",children:y("svg",{"aria-labelledby":"title",fill:"none",height:"99",viewBox:"0 0 81 99",width:"81",xmlns:"http://www.w3.org/2000/svg",children:[y("path",{clipRule:"evenodd",d:"M40.5 77C60.9345 77 77.5 60.4345 77.5 40C77.5 19.5655 60.9345 3 40.5 3C20.0655 3 3.5 19.5655 3.5 40C3.5 60.4345 20.0655 77 40.5 77ZM80.5 40C80.5 62.0914 62.5914 80 40.5 80C18.4086 80 0.5 62.0914 0.5 40C0.5 17.9086 18.4086 0 40.5 0C62.5914 0 80.5 17.9086 80.5 40Z",fill:n,fillRule:"evenodd"}),y("path",{clipRule:"evenodd",d:"M55.025 22.9046C55.6299 23.4705 55.6616 24.4198 55.0956 25.0247C54.8724 25.2634 54.6109 25.5285 54.3157 25.8277C52.2547 27.9168 48.5549 31.667 44.8135 39.6658C43.2818 42.9406 42.0864 45.8386 41.0823 48.2729C40.6539 49.3116 40.2603 50.2659 39.8902 51.129C39.287 52.5359 38.7248 53.7508 38.1744 54.625C37.8997 55.0613 37.5806 55.4905 37.2017 55.8245C36.8201 56.1607 36.2613 56.5 35.5457 56.5C34.6742 56.5 34.0892 55.9692 33.7774 55.6083C33.4502 55.2296 33.1752 54.7511 32.9396 54.301C32.7305 53.9013 32.5088 53.4367 32.2797 52.9565C32.2429 52.8794 32.2059 52.8019 32.1688 52.7243C31.8942 52.1499 31.5959 51.534 31.2537 50.8868C29.8886 48.305 27.8539 45.2878 24.2343 43.1382C23.522 42.7152 23.2875 41.7949 23.7105 41.0826C24.1335 40.3703 25.0539 40.1358 25.7662 40.5588C30.0556 43.1062 32.4149 46.6647 33.9058 49.4845C34.2776 50.1876 34.5973 50.8487 34.8753 51.4302C34.9147 51.5124 34.9529 51.5926 34.9902 51.6707C35.2222 52.1567 35.4164 52.5637 35.5978 52.9102C35.6151 52.9434 35.6321 52.9754 35.6485 53.0061C36.0565 52.3531 36.5341 51.3434 37.133 49.9468C37.4781 49.1418 37.8572 48.2229 38.2761 47.2074C39.2886 44.7532 40.5339 41.7347 42.0961 38.3948C46.0591 29.9221 50.0641 25.8648 52.1535 23.7482C52.4423 23.4556 52.6944 23.2002 52.9048 22.9753C53.4708 22.3703 54.42 22.3387 55.025 22.9046ZM35.1994 53.5892C35.1994 53.5892 35.2 53.5888 35.2012 53.5879C35.2 53.5889 35.1994 53.5893 35.1994 53.5892ZM36.0666 53.6682C36.0732 53.674 36.0765 53.6775 36.0765 53.6777C36.0765 53.678 36.0732 53.6751 36.0666 53.6682Z",fill:n,fillRule:"evenodd"}),y("path",{d:"M69.5 97C69.5 98.1046 56.2924 99 40 99C23.7076 99 10.5 98.1046 10.5 97C10.5 95.8954 23.7076 95 40 95C56.2924 95 69.5 95.8954 69.5 97Z",fill:"black",fillOpacity:"0.2"})]})}),y($e,{message:s}),a]})})},t)},Kt="https://cdn.sprig.com",V={document:void 0,videojs:void 0},Tm=`/* progress control styles */ -.video-js .vjs-control { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; -} - -.video-js .vjs-progress-control .vjs-progress-holder { - margin: 0 0px; -} - -.video-js .vjs-progress-control { - position: absolute; - height: 3px; - width: 100%; -} -/* position and align the buttons and button texts */ -.ul-control-panel { - bottom: 0; - width: 100%; - flex-direction: column; - background-color: white; - height: fit-content; - z-index: 2; -} - -.ul-buttons-panel { - color: black; - display: flex; - gap: 20px; - height: 50px; - justify-content: center; - margin: 10px; - padding: 2px 14px 0; -} - -.video-js .vjs-volume-panel { - height: 30px; - width: 40px; -} - -.ul-inactive { - opacity: 0.3; - cursor: default; - pointer-events: none; -} - -/* buttons */ -.ul-buttons-panel > .vjs-button { - background-color: rgba(0, 0, 0, 0.05); - border-radius: 50%; - display: flex; - height: 3em; - justify-content: center; - width: 3em; -} - -.vjs-button>.vjs-icon-placeholder:before { - align-items: center; - display: flex; - font-size: unset; - line-height: 0.5; - justify-content: center; -} - -span.ul-button-text { - align-self: flex-end; - position: relative; - top: 14px; -} - -#ul-camera-button { - white-space: nowrap; -} - -.video-js .vjs-volume-control.vjs-volume-horizontal { - background-color: #fff; - z-index: 1; -} - -.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level { - background-color: black; -} - -.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, -.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, -.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active { - width: 40px; -} - -.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active, -.video-js .vjs-volume-panel .vjs-volume-control:active, -.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control, -.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control, -.video-js .vjs-volume-panel:active .vjs-volume-control, -.video-js .vjs-volume-panel:focus .vjs-volume-control { - visibility: visible; - left: 40px; - position: absolute; - transition: visibility 0.1s, opacity 0.1s, height 0.1s, width 0.1s, left 0s, top 0s; -} - -/* play button customization */ -.video-js .vjs-play-control { - color: black; -} - -.video-js .vjs-play-control .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5363 6.40226L1.93958 10.7006C1.64037 10.8502 1.28833 10.6326 1.28833 10.2981V1.7014C1.28833 1.36688 1.64037 1.14931 1.93958 1.29891L10.5363 5.59727C10.868 5.76311 10.868 6.23642 10.5363 6.40226Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); -} - -/* position and style the current timer */ -.ul-time-panel { - position: absolute; - bottom: 80px; - left: 10px; - height: 22px; - color: black; - border: 1px solid #e0e0eb; - border-radius: 23px; - background-color: white; - width: fit-content; -} - -.video-js .vjs-current-time, -.vjs-no-flex .vjs-current-time { - display: flex; - align-items: center; - text-align: center; -} - -/* remove the dot progress indicator */ -.video-js .vjs-play-progress:before, -.video-js .vjs-volume-level:before, -.vjs-icon-circle:before, -.vjs-seek-to-live-control .vjs-icon-placeholder:before { - content: none; -} - -.video-js .vjs-mute-control .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='19' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.825.324A.75.75 0 019.25 1v11.667a.75.75 0 01-1.219.585l-3.96-3.169H1a.75.75 0 01-.75-.75v-5a.75.75 0 01.75-.75h3.07L8.031.414a.75.75 0 01.794-.09zM7.75 2.56L4.802 4.92a.75.75 0 01-.469.164H1.75v3.5h2.583a.75.75 0 01.469.165l2.948 2.358V2.56zM14.911.47a.75.75 0 011.061 0 9.084 9.084 0 010 12.844.75.75 0 01-1.06-1.06 7.584 7.584 0 000-10.724.75.75 0 010-1.06zM11.97 3.41a.75.75 0 011.06 0 4.917 4.917 0 010 6.953.75.75 0 11-1.06-1.06 3.417 3.417 0 000-4.832.75.75 0 010-1.06z' fill='%23262136'/%3E%3C/svg%3E"); -} - -.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='19' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.5 1.167L4.333 4.5H1v5h3.333L8.5 12.833V1.167zM17.17 4.5l-5 5M12.17 4.5l5 5' stroke='%23262136' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); -} - -.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.82489 0.32403C9.08474 0.44892 9.25 0.711703 9.25 1.00001V12.6667C9.25 12.955 9.08474 13.2178 8.82489 13.3427C8.56504 13.4675 8.25661 13.4324 8.03148 13.2523L4.07025 10.0833H1C0.585786 10.0833 0.25 9.74755 0.25 9.33334V4.33334C0.25 3.91913 0.585786 3.58334 1 3.58334H4.07025L8.03148 0.414355C8.25661 0.234253 8.56504 0.19914 8.82489 0.32403ZM7.75 2.56048L4.80185 4.91899C4.66887 5.02538 4.50364 5.08334 4.33333 5.08334H1.75V8.58334H4.33333C4.50364 8.58334 4.66887 8.6413 4.80185 8.74769L7.75 11.1062V2.56048Z' fill='%23262136'/%3E%3C/svg%3E%0A"); -} - -.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.82489 0.32403C9.08474 0.44892 9.25 0.711703 9.25 1.00001V12.6667C9.25 12.955 9.08474 13.2178 8.82489 13.3427C8.56504 13.4675 8.25661 13.4324 8.03148 13.2523L4.07025 10.0833H1C0.585786 10.0833 0.25 9.74755 0.25 9.33334V4.33334C0.25 3.91913 0.585786 3.58334 1 3.58334H4.07025L8.03148 0.414355C8.25661 0.234253 8.56504 0.19914 8.82489 0.32403ZM7.75 2.56048L4.80185 4.91899C4.66887 5.02538 4.50364 5.08334 4.33333 5.08334H1.75V8.58334H4.33333C4.50364 8.58334 4.66887 8.6413 4.80185 8.74769L7.75 11.1062V2.56048Z' fill='%23262136'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.9698 3.41124C12.2627 3.11839 12.7376 3.11846 13.0304 3.4114C13.9521 4.33341 14.4699 5.58376 14.4699 6.88748C14.4699 8.19121 13.9521 9.44156 13.0304 10.3636C12.7376 10.6565 12.2627 10.6566 11.9698 10.3637C11.6768 10.0709 11.6767 9.596 11.9696 9.30307C12.6101 8.66235 12.9699 7.79346 12.9699 6.88748C12.9699 5.98151 12.6101 5.11262 11.9696 4.4719C11.6767 4.17896 11.6768 3.70409 11.9698 3.41124Z' fill='%23262136'/%3E%3C/svg%3E%0A"); -} - -.video-js .vjs-volume-control:hover .vjs-mouse-display { - display: none !important; -} - -.video-js .vjs-play-progress { - background-color: black; -} - -/* position video player inside the container */ -.video-js .vjs-tech { - position: static; -} - -.video-js .vjs-time-tooltip { - padding: 0.25em 0.75em; - align-items: center; - color: #333; - background: #FCFCFD; - border-radius: 99px; - text-align: center; - border: 1px solid #E0E0EB; - display: flex; - align-items: center; - justify-content: center; - top: -25px; - font-size: 12px !important; - width: 50px !important; -} - -.video-js .vjs-play-progress.vjs-slider-bar .vjs-time-tooltip { - visibility: hidden !important; -} - -.video-js .vjs-progress-control .vjs-mouse-display { - z-index: 2; -} - -.ul-video-player { - width: 100%; - display: flex; - flex-direction: column; - height: auto; - border: 1px solid #E6E6E6; - background-color: white; - box-sizing: border-box; - border-radius: 4px; - background-clip: border-box; - overflow: hidden; -} - -.video-js.vjs-fullscreen:not(.vjs-ios-native-fs) { - border: none; -} - -#video-response-player-secondary-video-player { - max-width: 200px; - margin-right: 20px; - background-color: transparent; -} - -#ul-card-video__player_recorder-video-recorder.vjs-fullscreen { - display: table; -} - -.video-js div.vjs-progress-control { - margin-top: -3px; -} - -.video-js .vjs-progress-control .vjs-slider { - background-color: #B2BBBD; -} - -.vjs-record.video-js .vjs-control.vjs-button.vjs-fullscreen-control { - position:relative; -} - -.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.82143 2.54004L12.2614 2.54004C12.9242 2.54004 13.4614 3.0773 13.4614 3.74004L13.4614 6.18004' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6.17955 13.46L3.73955 13.46C3.07681 13.46 2.53955 12.9227 2.53955 12.26L2.53955 9.81996' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12.7772 3.22266L9.36475 6.63516' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6.29434 9.70605L2.88184 13.1186' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); -} - -.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.583 9.813H5.25a1 1 0 011 1v3.666M5.375 10.688L1 15.061M14.917 5.813H11.25a1 1 0 01-1-1V1.146M15.063 1l-4.376 4.375' stroke='%23262136' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); -} - -.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before, .video-js .vjs-icon-replay:before { - content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5363 6.40226L1.93958 10.7006C1.64037 10.8502 1.28833 10.6326 1.28833 10.2981V1.7014C1.28833 1.36688 1.64037 1.14931 1.93958 1.29891L10.5363 5.59727C10.868 5.76311 10.868 6.23642 10.5363 6.40226Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); -} - -.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before, .vjs-icon-pause:before { - content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3.61885' y='2.06074' width='3.16185' height='11.88' rx='0.9' fill='black' stroke='%23EDEDED' stroke-width='0.6' stroke-linecap='round'/%3E%3Crect x='9.21797' y='2.06074' width='3.16185' height='11.88' rx='0.9' fill='black' stroke='%23EDEDED' stroke-width='0.6' stroke-linecap='round'/%3E%3C/svg%3E%0A"); - padding: 2px; -} - -.vjs-error-display { - display: none; -} - -.ul-video-player-video { - position: relative; - top: 0; - left: 0; - width: 100%; -} - -.ul-video-container { - width: 100%; - height: auto; - left: 0px; - top: 0px; - - background-color: transparent; - border-radius: 4px; - - align-items: start; - display: flex; - flex-direction: column; - - /* Inside Auto Layout */ - - flex: none; - order: 0; - flex-grow: 0; - margin: 10px 0px; - position: relative; -} - -.vjs-record button.vjs-device-button.vjs-control { - background: rgba(255, 255, 255, 96); - width: 100%; - height: 100%; - left: 0; - top: 0; - margin: 0; - border-radius: 0; - line-height: 0.6; - padding: 10px; - display: flex; - align-items: center; - flex-direction: column; - justify-content: center; - z-index: 3; -} - -.vjs-record .vjs-device-button.vjs-control:before { - font-size: 14px !important; - color: #333; - content: "Your browser needs to access your camera and microphone for video recording"; - line-height: 135%; -} - -.vjs-record .vjs-device-button.vjs-control.permission-denied:before { - font-size: 16px !important; - color: #262136; - content: "Unable to access your camera and microphone"; -} - -.vjs-record .vjs-device-button.vjs-control:after { - display: inline-block; - background: #F0F0F5; - font-size: 13px; - border-radius: 4px; - content: "Request Permissions"; - padding: 1em 2em; - color: #333; - margin-top: 20px; -} - -.vjs-record .vjs-device-button.vjs-control.permission-denied:after { - display: inline-block; - background: white; - font-size: 13px; - content: "Please go to your browser settings and update permissions to enable recording"; - padding: 1em; - color: #4B575D; - margin: 5px; - line-height: 135%; - text-align: center; -} - -.vjs-control.vjs-button.ul-video-recorder-delete-button, .vjs-control.vjs-button.ul-video-recorder-toggle-button, .vjs-control.vjs-button.ul-video-recorder-camera-off-button-audio-only, .vjs-control.vjs-button.ul-video-recorder-camera-off-button { - cursor: pointer; -} - -.ul-video-recorder-delete-button .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.21234 7.37549V11.1193M2.53931 4.25595H13.4593H2.53931ZM5.57234 4.25595V3.00833C5.57222 2.84433 5.60354 2.68192 5.6645 2.53038C5.72546 2.37884 5.81488 2.24115 5.92762 2.12519C6.04037 2.00922 6.17424 1.91726 6.32158 1.85456C6.46892 1.79185 6.62683 1.75964 6.78628 1.75977H9.21234C9.37179 1.75964 9.5297 1.79185 9.67703 1.85456C9.82437 1.91726 9.95824 2.00922 10.071 2.12519C10.1837 2.24115 10.2732 2.37884 10.3341 2.53038C10.3951 2.68192 10.4264 2.84433 10.4263 3.00833V4.25595H5.57234ZM12.2463 4.25595V12.9912C12.2463 13.3223 12.1184 13.6399 11.8907 13.8741C11.6631 14.1082 11.3543 14.2398 11.0323 14.2398H4.96628C4.64432 14.2398 4.33555 14.1082 4.10789 13.8741C3.88023 13.6399 3.75234 13.3223 3.75234 12.9912V4.25595H12.2463ZM6.78628 7.37549V11.1193V7.37549Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); -} - -.ul-video-recorder-toggle-button .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0Z' fill='%23D15153'/%3E%3C/svg%3E"); -} - -.ul-video-recorder-toggle-button.ul-recording-in-session .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 10L12 2C12 0.89543 11.1046 -4.85396e-07 10 -4.37114e-07L2 -8.74228e-08C0.89543 -3.91405e-08 -4.85396e-07 0.895431 -4.37114e-07 2L-8.74228e-08 10C-3.91405e-08 11.1046 0.895431 12 2 12L10 12C11.1046 12 12 11.1046 12 10Z' fill='%23D15153'/%3E%3C/svg%3E%0A"); -} - -.ul-video-recorder-camera-off-button .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2645_4654)'%3E%3Cpath d='M15.1491 4.75L10.5991 8L15.1491 11.25V4.75Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.29912 3.4502H2.14912C1.43115 3.4502 0.849121 4.03223 0.849121 4.7502V11.2502C0.849121 11.9682 1.43115 12.5502 2.14912 12.5502H9.29912C10.0171 12.5502 10.5991 11.9682 10.5991 11.2502V4.7502C10.5991 4.03223 10.0171 3.4502 9.29912 3.4502Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2645_4654'%3E%3Crect width='15.6' height='15.6' fill='white' transform='translate(0.199951 0.200195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E"); -} - -.ul-video-recorder-camera-off-button-audio-only .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='22' height='15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M.75 3A2.75 2.75 0 013.5.25h9.081A2.75 2.75 0 0115.331 3v9a2.75 2.75 0 01-2.75 2.75H3.5A2.75 2.75 0 01.75 12V3zM3.5 1.75c-.69 0-1.25.56-1.25 1.25v9c0 .69.56 1.25 1.25 1.25h9.081c.69 0 1.25-.56 1.25-1.25V3c0-.69-.56-1.25-1.25-1.25H3.5z' fill='%23262136'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M14.53 2.03l-12 12-1.06-1.06 12-12 1.06 1.06zM20.87 1.525a.75.75 0 01.38.652v10.588a.75.75 0 01-1.134.644l-5.92-3.53a.75.75 0 01-.365-.643v-3.53a.75.75 0 01.366-.644l5.919-3.53a.75.75 0 01.754-.007zm-5.539 4.607V8.81l4.419 2.635V3.497l-4.419 2.635z' fill='%23262136'/%3E%3C/svg%3E"); - transform: scale(0.75); -} - -.ul-upload-progress-label { - padding: 0.15em 0.75em; - align-items: center; - font-size: 12px; - color: #333; - background: #FCFCFD; - border-radius: 99px; - text-align: center; - border: 1px solid #E0E0EB; - display: flex; - align-items: center; - justify-content: center; - position: absolute; - bottom: 75px; - left: calc(50% - 65px); - width: 130px; - z-index: 5; -} - -.ul-upload-progress-label__time { - display: inline-flex; - margin-left: 0.8em; - align-items: center; -} - -.ul-upload-progress-label__time:before { - content: ""; - display: inline-flex; - width: 1px; - height: 12px; - background-color: #E0E0EB; - margin-right: 0.8em; -} - -@keyframes grow { - 0% { - transform: scale(1); - background-color: #EEECFC; - } - 50% { - transform: scale(1.2); - background-color: #E1DFF4; - } - 100% { - transform: scale(1); - background-color: #EEECFC; - } -} - -.ul-audio-recorder-placeholder:before { - width: 80px; - height: 80px; - border-radius: 120px; - background-color: #EEECFC; - content: ""; - position: absolute; - left: calc(50% - 40px); - top: calc(50% - 40px); - animation: 6s infinite grow; - transform-origin: 50% 60%; -} - -.ul-audio-recorder-placeholder:after { - content: url("data:image/svg+xml,%3Csvg width='98' height='98' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='a' maskUnits='userSpaceOnUse' x='0' y='0' width='98' height='98'%3E%3Ccircle cx='49' cy='49' r='49' fill='%23EDECF8'/%3E%3C/mask%3E%3Cg mask='url(%23a)'%3E%3Ccircle cx='49' cy='49' r='50' fill='%23645CC2'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.422 81.812c5.405-15.547 20.187-26.706 37.576-26.706 17.39 0 32.172 11.159 37.577 26.707-9.164 10.43-22.601 17.013-37.576 17.013-14.976 0-28.414-6.583-37.577-17.014z' fill='%23fff' fill-opacity='.6'/%3E%3Ccircle cx='49' cy='29' r='17' fill='%23fff' fill-opacity='.7'/%3E%3C/g%3E%3C/svg%3E"); - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - transform: translate(-50%, -50%) scale(0.6); -} - -.ul-audio-recorder-placeholder { - min-height: 150px; - width: 100%; - background-color: #fcfcfd; - display: block; - position: relative; -} - -.vjs-fullscreen .ul-audio-recorder-placeholder { - vertical-align: middle; - display: table-cell; -} - -.vjs-fullscreen .ul-control-panel { - height: 80px; - position: absolute; - bottom: 0; - left: 0; - width: 100%; - max-width: 100%; - background-color: #F8F8F8; -} - -.vjs-playback-rate .vjs-playback-rate-value { - align-items: center; - display: flex; - font-size: 12px; - justify-content: center; -} - -.vjs-playback-rate .vjs-menu { - left: -5px; - bottom: 3px; -} - -.vjs-menu-button-popup .vjs-menu .vjs-menu-content { - background-color: white; - border: 1px solid rgba(0, 0, 0, 0.1); - box-sizing: border-box; - border-radius: 4px; -} - -.vjs-menu li { - font-size: 12px; - padding: 5px 0; -} - -.vjs-menu li.vjs-selected { - color: lightgray; -} - -.vjs-menu li.vjs-menu-item:hover { - background-color: rgba(0, 0, 0, 0.05); -} - -.vjs-fullscreen .ul-buttons-panel { - top: calc(50% - 30px); - position: relative; -} - -.vjs-fullscreen .vjs-record-indicator.vjs-control { - bottom: 90px !important; -} - -.vjs-record.video-js div.vjs-control.vjs-record-indicator { - padding: 0.3em 0.75em 0.15em 15px; - align-items: center; - font-size: 12px; - color: #333; - background: #FCFCFD; - border-radius: 99px; - text-align: center; - border: 1px solid #E0E0EB; - display: flex; - justify-content: center; - align-items: center; - position: absolute; - bottom: 75px; - top: auto; - left: calc(50% - 21px); - width: 43px; - height: 16px; - z-index: 4; -} - -.vjs-record.video-js div.vjs-control.vjs-record-indicator:after { - content: ""; - background-color: #EB5757; - width: 6px; - height: 6px; - border-radius: 8px; - animation: none; - top: 4px; - left: 5px; -} - -.vjs-record.video-js div.vjs-control.vjs-record-indicator:before { - position: relative; - font-size: 9px; - animation: none; - opacity: 1; - color: #333; - top: auto; - left: auto; -} - -.ul-video-player-loading { - display: inline-block; - position: relative; - width: 6rem; - height: 6rem; - -} -.ul-video-player-loading div { - box-sizing: border-box; - position: absolute; - display: block; - width: 80%; - height: 80%; - margin: 5px; - border: 5px solid #666; - border-radius: 50%; - animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite; - border-color: #666 transparent transparent transparent; -} - -.first { - animation-delay: -0.45s; -} -.second { - animation-delay: -0.3s; -} -.third { - animation-delay: -0.15s; -} - -@keyframes lds-ring { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } -} - -.ul-video-btn { - width: 100%; - border: 1px solid #E6E6E6; - border-radius: 4px; - background-color: rgba(0, 0, 0, 0.02); - padding: 8px; - font-weight: 500; - font-size: 15px; -} - -.ul-record-response-btn:before, .ul-record-response-btn:after, .ul-back-question-btn:before, .ul-back-question-btn:after { - margin: 0 5px; - vertical-align: middle; -} - -.ul-record-response-btn:before { - content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2645_4654)'%3E%3Cpath d='M15.1491 4.75L10.5991 8L15.1491 11.25V4.75Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.29912 3.4502H2.14912C1.43115 3.4502 0.849121 4.03223 0.849121 4.7502V11.2502C0.849121 11.9682 1.43115 12.5502 2.14912 12.5502H9.29912C10.0171 12.5502 10.5991 11.9682 10.5991 11.2502V4.7502C10.5991 4.03223 10.0171 3.4502 9.29912 3.4502Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2645_4654'%3E%3Crect width='15.6' height='15.6' fill='white' transform='translate(0.199951 0.200195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E"); - display: inline-block; - transform: translate(0px, 2px); -} - -.ul-record-response-btn:after { - content: 'Record your Response'; -} - -.ul-back-question-btn:before { - content: url("data:image/svg+xml,%3Csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.8757 8.22361L1.1118 14.6056C0.945578 14.6887 0.75 14.5678 0.75 14.382V1.61803C0.75 1.43219 0.945579 1.31131 1.1118 1.39443L13.8757 7.77639C14.06 7.86852 14.06 8.13148 13.8757 8.22361Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); - display: inline-block; - transform: scale(0.85) translate(0, 1px); - -moz-transform: scale(0.85) translate(0, 2px); -} - -.ul-back-question-btn:after { - content: 'Back to Question'; -} - -.hidden { - display: none !important; - opacity: 0; - visibility: hidden; -} - -.visible { - visibility: visible; - opacity: 1; - animation: fade 0.3s; -} - -@keyframes fade { - 0% { - opacity: 0; - } - - 100% { - opacity: 1; - } -} - -#ul-recording-countdown-screen { - width: 100%; - height: 100%; - color: black; - background-color: rgba(255, 255, 255, 0.8); - position: absolute; - text-align: center; - font-size: 15px; - z-index: 1; - display: table; -} - -.ul-countdown-text { - vertical-align: middle; - display: table-cell; - transform: translate(0, -25px); -} - -.vjs-fullscreen > #ul-recording-countdown-screen { - font-size: 25px; - transform: unset; -} - -.vjs-poster { - background-size: cover; -} -`,Lm=e=>{const t=V.document.createElement("div");return t.className="ul-video-player-loading",t.id=Wo(e),["first","second","third","fourth"].map(n=>{const r=V.document.createElement("div");r.className=n,t.appendChild(r)}),t},Wo=e=>e+"-loading-spiner",ae="hidden",Xu=".m3u8",Yo="questionId",Qo="ul-video-recorder-camera-off-button",Zo="ul-recording-in-session",Rm=[{type:"link",content:`${Kt}/dependencies/videojs-record-4.5.0.min.css`},{type:"script",content:`${Kt}/dependencies/RecordRTC-5.6.2.js`},{type:"script",content:`${Kt}/dependencies/adapter.8.0.0.min.js`},{type:"script",content:`${Kt}/dependencies/videojs-record-4.5.0.min.js`},{type:"script",content:`${Kt}/userleap-web-upchunk-v2.2.2.js`}],Ju=[{type:"link",content:`${Kt}/dependencies/video-js-7.18.0.min.css`},{type:"script",content:`${Kt}/dependencies/video-js-7.18.0.min.js`},{type:"style",content:Tm}],ec="-video-player",tc="-secondary-video-player",nc="-video-recorder";let qe,rc;const Ct=async({event:e,apiBase:t,headers:n,visitorId:r,envId:i,metadata:o})=>{const a=V.document.documentElement;if(!r||!i)return;const s={event:`SDK - ${e}`,visitorId:r,environmentId:i,metadata:{...o||{},screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:a.clientWidth,clientHeight:a.clientHeight,location:window.location.href,language:navigator.language}};(await fetch(`${t}/sdk/1/visitors/${r}/analytics`,{method:"POST",cache:"no-cache",headers:n,body:JSON.stringify(s)})).ok||console.warn("[Sprig] (ERR-444) Failed to track analytics",e)},ut=async(e,t,n,r,i,o)=>{Ct({event:`Video Error ${t}`,apiBase:n,headers:r,visitorId:i,envId:o,metadata:{errorMessage:e.message}});const a=V.document.documentElement,s={screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:a.clientWidth,clientHeight:a.clientHeight,location:window.location.href,language:navigator.language},l={action:t,err:{message:e.message,stack:e.stack},meta:s,vid:i,envId:o};(await fetch(`${n}/sdk/1/errors`,{method:"POST",cache:"no-cache",headers:{...r,"userleap-platform":"video_recorder","x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(l)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",e)},Am=(e,{type:t,content:n})=>new Promise(function(r,i){let o;t==="script"?(o=V.document.createElement("script"),o.src=n):t==="link"?(o=V.document.createElement("link"),o.rel="stylesheet",o.href=n,o.type="text/css"):(o=V.document.createElement("style"),o.innerHTML=n),o.onload=function(){r(n)},o.onerror=function(){i(n)},o.async=!1,o.id=btoa(n),e.appendChild(o)}),ic=(e,t)=>{if(e.length===0)return t&&t();Promise.all(e.reduce((n,r)=>(n.push(Am(V.document.head,r)),n),[])).then(()=>{V.videojs=V.document.defaultView.videojs,t&&t()}).catch(function(n){console.log(n+" failed to load")})},oc=(e,t,n)=>{if(t==="start"&&(e.style.visibility="visible"),t==="none")e.style.visibility=ae;else if(t==="success")e.style.visibility=ae,e.innerHTML="Upload succeeded!";else{const r=Math.round(parseFloat(n));e.innerHTML=`Uploading ${r}%`,e.style.background=`linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${r}%, #FCFCFD ${r}%, #FCFCFD 100%)`}},Xo=(e,t)=>{const n=V.videojs(e.id());return n==null?void 0:n.payload[t]},Um=(e,t,n,r,i)=>{const{surveyId:o,responseGroupUid:a,visitorId:s,envId:l}=e.payload;e.on("deviceError",function(){console.warn("device error: ",e.deviceErrorCode),e.deviceErrorCode.message==="Permission denied"?(e.deviceButton.addClass("permission-denied"),n&&n(F.ERROR,{type:F.PERMISSION_DENIED}),Ct({event:"Video Permission Denied",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{questionId:Xo(e,Yo),responseGroupUid:a,surveyId:o}})):(n&&n(F.ERROR,{type:F.OTHER}),ut(new Error(e.deviceErrorCode.message),"recorderDeviceError",t,i,s,l))}),e.on("error",function(u,c){ut(c||e.error(),"recorderError",t,i,s,l)}),e.on("startRecord",function(u,c){r(e.uploadProgressLabel,"none"),Ct({event:"Video Record Start",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{questionId:Xo(e,Yo),responseGroupUid:a,surveyId:o}})}),e.on("finishRecord",async function(){r(e.uploadProgressLabel,"start",0);const u=Xo(e,Yo);if(!o){const v="internal error: missing fields in payload";return n&&n(F.ERROR,{type:F.OTHER}),ut(new Error(v),"finishRecord",t,i,s,l),null}e.record().stopDevice();const c=e.cameraOff?F.MEDIA_TYPE_AUDIO:F.MEDIA_TYPE_VIDEO,d=Ye();Ct({event:"Video Record Finish",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{mediaRecordingUid:d,questionId:u,responseGroupUid:a,surveyId:o,mediaType:c}});const f={surveyId:o,updatedAt:new Date().toISOString(),mediaType:c,mediaRecordingUid:d};u&&(f.questionId=u),a&&(f.responseGroupUid=a),s&&(f.visitorId=s);const h=await(async()=>{const v=await fetch(`${t}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});if(v.ok){const m=await v.json();return n&&n(F.UPLOAD_STARTED,{[F.UPLOAD_ID]:m.upload.id,[F.MEDIA_TYPE]:c,[F.MEDIA_RECORDING_UID]:d}),m.upload.url}else return n&&n(F.ERROR,{type:F.OTHER,response:v}),ut(new Error("failed to get upload response with url"),"finishRecord",t,i,s,l),null})();!h||(qe=V.document.defaultView.UpChunk.createUpload({endpoint:h,file:new V.document.defaultView.File([e.recordedData],`recording ${c} ${Date.now()}`),chunkSize:5120}),qe.startTime=Date.now(),Ct({event:"Video Upload Start",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{mediaRecordingUid:d,questionId:u,responseGroupUid:a,surveyId:o,mediaType:c,url:h}}),qe.on("error",v=>{r(e.uploadProgressLabel,"none"),n&&n(F.UPLOAD_FINISHED,{[F.MEDIA_RECORDING_UID]:d}),ut(v,"finishRecord",t,i,s,l)}),qe.on("progress",v=>{n&&n(F.UPLOAD_PROGRESS,{[F.MEDIA_RECORDING_UID]:d,[F.UPLOAD_PROGRESS_PCT]:v.detail}),r(e.uploadProgressLabel,"progress",v.detail)}),qe.on("success",()=>{r(e.uploadProgressLabel,"success"),n&&n(F.UPLOAD_FINISHED,{[F.MEDIA_RECORDING_UID]:d}),Ct({event:"Video Upload Success",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{mediaRecordingUid:d,questionId:u,responseGroupUid:a,surveyId:o,mediaType:c,url:h,elapsedMs:qe.startTime&&Date.now()-qe.startTime}})}))})},ac=(e,t)=>{const n=new(V.videojs.getComponent("Component"))(e);return n.addClass("ul-buttons-panel"),t.map(r=>{n.addChild(r)}),Om(n),n},Om=e=>{e.children().forEach(t=>{if(Ne[t.name_]){const n=Yr(Ne[t.name_],`ul-${Ne[t.name_]}`);t.el_.appendChild(n)}})},Yr=(e,t="")=>{const n=V.document.createElement("span");return n.className="ul-button-text",n.innerHTML=e,n.id=t,n},sc=(e,t,n,r,i=!1,o)=>{e.addClass("ul-video-player");const a=new(V.videojs.getComponent("Component"))(e);a.addClass("ul-control-panel"),e.progressBar=a.addChild("ProgressControl"),n&&e.src(n),e.audioPlayerPlaceholder=new(V.videojs.getComponent("Component"))(e),e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const s=n&&n.src?Fm(n.src):null;n&&(i||!s)?(e.children()[0].classList.add("vjs-hidden"),V.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.audioPlayerPlaceholder.hide(),V.document.getElementById(`${e.id()}_html5_api`).style.height="100%",s&&e.poster(s)),e.on("play",()=>{!i&&n&&!s&&Nm(e,!1),o==null||o.play()}),e.on("pause",()=>{o==null||o.pause()}),e.on("seeked",()=>{o==null||o.currentTime(e.currentTime())}),e.on("ratechange",()=>{o==null||o.playbackRate(e.playbackRate())}),e.addChild(e.audioPlayerPlaceholder,{},1),a.addChild(t),e.addChild(a),r&&r(e)},Dm=(e,t,n)=>{e.addClass(`ul${tc}`);const r=new(V.videojs.getComponent("Component"))(e);t&&e.src(t),e.addChild(r),n&&n(e)},Pm=(e,t,n,r,i,o,a,s=!1)=>{rc=Date.now();const u=Qr(t,{controls:!1,bigPlayButton:!1,fluid:!1,width:1280,height:720,playsinline:!0,plugins:{record:{audio:!0,video:{mandatory:{minWidth:1280,minHeight:720}},frameWidth:1280,frameHeight:720,maxLength:600,autoMuteDevice:!0}}});if(!u)return;u.payload=n;const{surveyId:c,questionId:d,responseGroupUid:f,visitorId:p,envId:h}=n;let v;const m=D=>{const T=Qo,P=Qo+"-audio-only";oc(u.uploadProgressLabel,"none"),qe&&qe.startTime>=rc&&qe.abort();const A=V.document.getElementById("ul-camera-button");D?(u.children()[0].classList.add("vjs-hidden"),E.removeClass(T),E.addClass(P),A.innerHTML=Ne.TurnOnCamera,u.audioPlayerPlaceholder.removeClass("vjs-hidden"),v==null||v.getTracks().forEach(k=>{k.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then(k=>{v=k,k.getVideoTracks().forEach(J=>{J.enabled=!1}),u.record().onDeviceReady(k)}).catch(u.record().onDeviceError.bind(u.record()))):(v==null||v.getVideoTracks().forEach(k=>{k.enabled=!0}),u.children()[0].classList.remove("vjs-hidden"),u.record().getDevice(),E.removeClass(P),E.addClass(T),A.innerHTML=Ne.TurnOffCamera,u.audioPlayerPlaceholder.addClass("vjs-hidden"))},w=new(V.videojs.getComponent("Button"))(u,{clickHandler:()=>{w.hasClass(ae)||(Ct({event:"Video Delete Button Clicked",apiBase:r,headers:a,visitorId:p,envId:h,metadata:{questionId:d,responseGroupUid:f,surveyId:c}}),m(u.cameraOff),i(F.DELETE,{}),E.removeClass(ae),w.addClass(ae))}});w.addClass("ul-video-recorder-delete-button"),w.el_.appendChild(Yr(Ne.DeleteButton,"ul-delete-button"));const _=V.document.getElementById(t),b=()=>{_.classList.contains("vjs-fullscreen")&&u.cameraOff?_.style.display="table":_.style.display="flex"};b();const E=new(V.videojs.getComponent("Button"))(u,{clickHandler:()=>{u.record().isRecording()||(u.cameraOff=!u.cameraOff,Ct({event:"Video Camera Button Clicked",apiBase:r,headers:a,visitorId:n.visitorId,envId:n.envId,metadata:{questionId:d,responseGroupUid:f,surveyId:c,cameraOff:u.cameraOff}}),m(u.cameraOff),!w.hasClass(ae)&&w.addClass(ae),i(F.DELETE,{}),b())}});E.addClass(Qo),E.el_.appendChild(Yr(Ne.TurnOffCamera,"ul-camera-button"));const g=new(V.videojs.getComponent("Button"))(u,{clickHandler:()=>{const D=V.document.getElementById("ul-recorder-toggle");if(u.record().isRecording())u.record().stop(),D&&(D.innerHTML=Ne.RecordButton),g.removeClass(Zo),w.removeClass(ae);else{const T=V.document.getElementById("ul-recording-countdown-screen");if(T)T.remove(),D&&(D.innerHTML=Ne.RecordButton),m(u.cameraOff),i(F.DELETE,{}),E.removeClass(ae),w.addClass(ae),g.removeClass(Zo),C.show();else{g.addClass(Zo),C.hide(),E.addClass(ae),w.addClass(ae),D&&(D.innerHTML=Ne.StopButton);const P=V.document.createElement("div");P.id="ul-recording-countdown-screen",_.insertBefore(P,_.children[1]),P.style.height=`${_.offsetHeight}px`,lc(u,3)}}}});g.addClass("ul-video-recorder-toggle-button"),g.el_.appendChild(Yr(Ne.RecordButton,"ul-recorder-toggle"));const x=V.document.createElement("p");x.style.visibility="hidden",x.className="ul-upload-progress-label",e.appendChild(x),u.uploadProgressLabel=x;const I=ac(u,[w,E,"PlayToggle",g,"FullscreenToggle"]),C=I.children().find(D=>D.name_==="FullscreenToggle");C.hasClass("vjs-disabled")&&C.hide();const S=I.children().find(D=>D.name_==="PlayToggle");S.hide(),o&&E.addClass(ae),!o&&w.addClass(ae),sc(u,I,o,!1,s),u.on("stopRecord",()=>{g.hide(),S.show(),C.show(),w.removeClass(ae)}),u.on("deviceReady",()=>{g.show(),S.hide(),w.addClass(ae)}),Um(u,r,i,oc,a),o&&(u.deviceButton&&u.deviceButton.hide(),u.src(o),S.show(),g.hide(),w.removeClass(ae));const R=[{name:"microphone"}];!u.cameraOff&&R.push({name:"camera"}),Promise.all(R.map(D=>{var T;return(T=navigator==null?void 0:navigator.permissions)==null?void 0:T.query(D)})).then(D=>{D.reduce((P,A)=>P&A.state==="granted",!0)&&u&&(u.deviceButton&&u.deviceButton.hide(),!o&&u.record().getDevice())}).catch(D=>{})},lc=(e,t=3)=>{const n=V.document.getElementById("ul-recording-countdown-screen");n&&t===0?(n.remove(),e.record().start()):n&&(n.innerHTML=`Recording in... ${t}`,setTimeout(()=>{lc(e,t-1)},1e3))},uc=e=>{const t=V.document.createElement("div");return t.className="ul-video-container",t.appendChild(Lm(e)),t},Jo=(e,t)=>{const n=V.document.createElement("video");n.id=e,n.className="video-js vjs-default-skin ul-video-player-video";const r=V.document.createElement("p");r.className="vjs-no-js",r.innerHTML="To view this video please enable JavaScript, and consider upgrading to a web browser that";const i=V.document.createElement("a");return i.href="https://videojs.com/html5-video-support/",i.target="_blank",i.innerHTML="supports HTML5 video",r.appendChild(i),n.appendChild(r),t.appendChild(n),t},Nm=(e,t)=>{t?(e.children()[0].classList.add("vjs-hidden"),e.audioPlayerPlaceholder.show(),V.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),V.document.getElementById(`${e.id()}_html5_api`).style.height="100%")},Qr=(e,t)=>V.document.getElementById(e)?t?V.videojs(e,t):V.videojs(e):(console.error(`Error in finding player element with ID, ${e}`),null),Mm=(e,t,n,r=!1,i="https://api.sprig.com",o=document,a=null,s=null)=>{V.document=o;const l=e+ec,u=uc(l);return V.document.addEventListener("securitypolicyviolation",c=>{ut(new Error(`Voice & Video feature violates ${c.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",i,{})}),ic(Ju,()=>{V.document.getElementById(Wo(l)).remove(),Jo(l,u);const c={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const d=e+tc;Jo(d,u);const f=Qr(l,c),p=Qr(d,{muted:!0,...c});if(!f||!p)return;Dm(p,a,s),a||p.addClass(ae);const h=ac(f,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),v=h.children().find(m=>m.name_==="FullscreenToggle");v.hasClass("vjs-disabled")&&v.hide(),sc(f,h,t,n,r,p)}catch(d){ut(new Error(`Error when creating video player object ${d}`),"playerDeviceError",i,{});return}}),u},Vm=(e,t={},n="https://api.userleap.com",r,i,o,a=!1,s=document)=>{V.document=s;const l=e+nc,u=uc(l);return V.document.addEventListener("securitypolicyviolation",c=>{ut(new Error(`Voice & Video feature violates ${c.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",n,o,t.visitorId,t.envId)}),ic(Ju.concat(Rm),()=>{Jo(l,u),V.document.getElementById(Wo(l)).remove();try{Pm(u,l,t,n,r,i,o,a)}catch(c){ut(new Error(`Error when creating video recorder player object ${c}`),"recorderDeviceError",n,o,t.visitorId,t.envId);return}}),u},jm=e=>{const t=e+nc;if(!!V.document.getElementById(t)&&!!V.videojs){try{if(!V.videojs(t).record().stream)return}catch{return}V.videojs(t).record().stop(),V.videojs(t).record().stopDevice()}},Bm=e=>{const t=Qr(e+ec);t==null||t.pause()},Fm=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let n=t?t[1]:null;return n.includes(Xu)&&(n=n.replace(Xu,"")),n?`https://image.mux.com/${n}/thumbnail.jpg?time=0`:null},F={UPLOAD_STARTED:"upload.started",UPLOAD_PROGRESS:"upload.progress",UPLOAD_FINISHED:"upload.finished",DELETE:"delete",ERROR:"error",MEDIA_TYPE:"media.type",PERMISSION_DENIED:"permission_denied",OTHER:"other",UPLOAD_ID:"upload.id",UPLOAD_PROGRESS_PCT:"upload.progress.pct",MEDIA_RECORDING_UID:"media.recording.uid",MEDIA_TYPE_VIDEO:"video",MEDIA_TYPE_AUDIO:"audio"},Ne={PlaybackRateMenuButton:"Speed",PlayToggle:"Play",FullscreenToggle:"Expand",TurnOnCamera:"Turn on",TurnOffCamera:"Turn off",DeleteButton:"Delete",RecordButton:"Record",StopButton:"Stop",PauseButton:"Pause"},zn="ul-card-video__player_recorder",Hm="ul-card-video__skip_button",Km="ul-video-interview-form",cc="ul-video-btn",$m=({className:e,message:t,next:n,properties:r,questionId:i,type:o})=>{const{apiURL:a,envId:s,handleUploadUpdate:l,headers:u,responseGroupUid:c,surveyId:d,viewDocument:f,visitorId:p}=X(T=>({apiURL:T.apiURL,envId:T.envId,handleUploadUpdate:T.handleUploadUpdate,headers:T.headers,responseGroupUid:T.responseGroupUid,surveyId:T.surveyId,viewDocument:T.viewDocument,visitorId:T.userId})),[h,v]=ue(!1),[m,w]=ue(null),[_,b]=ue(null),[E,g]=ue(0),x=r&&r.videoUrl,I=(T,P)=>{T===F.UPLOAD_STARTED?(w(P[F.UPLOAD_ID]),b(P[F.MEDIA_RECORDING_UID]),v(!0)):T===F.DELETE?(w(null),b(null),v(!1)):T===F.UPLOAD_PROGRESS?isNaN(P[F.UPLOAD_PROGRESS_PCT])?l({mediaRecordingUid:P[F.MEDIA_RECORDING_UID],isComplete:!0}):l({mediaRecordingUid:P[F.MEDIA_RECORDING_UID],progressPct:P[F.UPLOAD_PROGRESS_PCT]}):T===F.UPLOAD_FINISHED&&l({mediaRecordingUid:P[F.MEDIA_RECORDING_UID],isComplete:!0})},C=T=>{if(T&&T.children.length===0){const P=Mm(zn,{src:x,type:"application/x-mpegURL"},void 0,r.mediaType===F.MEDIA_TYPE_AUDIO,a,f);T.appendChild(P)}},S=T=>{if(T&&T.children.length===0){const P=Vm(zn,{surveyId:d,responseGroupUid:c,questionId:i,visitorId:p,envId:s},a,I,void 0,{...u,"x-ul-video-recorder-origin":"sdk"},r.mediaType===F.MEDIA_TYPE_AUDIO,f);T.appendChild(P)}},R=T=>{T.preventDefault(),T.stopPropagation(),jm(zn),m&&_?(l({mediaRecordingUid:_,isSubmitted:!0}),n({value:{mediaRecordingUid:_},questionId:i,type:o})):n({value:null,questionId:i,type:o})},D=()=>y(Et,{defaultBody:()=>y("button",{className:`${cc} ul-record-response-btn`,onClick:T=>{T.preventDefault(),T.stopPropagation(),Bm(zn),g(1)}}),properties:r});return y("form",{className:G([e,O.VideoCard,O.FadeInTransition]),id:Km,children:[y($e,{message:t,properties:r}),y("div",{id:"ul-card-voice__video",children:[y("div",{children:[y("div",{id:"ul-question-player-container",style:{display:E===0?"":"none"},children:[y("div",{id:zn,ref:C}),D()]}),y("div",{style:{display:E===1?"block":"none"},children:[y("button",{className:`${cc} ul-back-question-btn`,onClick:T=>{T.preventDefault(),T.stopPropagation(),g(0)}}),y("div",{id:"ul-recorder-player-container",ref:S})]})]}),y(Ee,{disabled:!h,onClick:R,children:gn(r)}),y("button",{className:`ul-card-text__button ${O.InactiveButton} ${O.SkipButton}`,id:Hm,onClick:R,style:{display:r.required?"none":"block",...h?{display:"none"}:{}},children:Ko(r)})]})]})},Gm=({className:e})=>{const{uploadProgress:t}=X(o=>({uploadProgress:o.uploadProgress}));let n,r;Object.values(t).filter(o=>o.isSubmitted).length>1?(n="Your responses are processing",r="Please keep this tab open until your responses are fully processed."):(n="Your response is processing",r="Please keep this tab open until your response is fully processed.");const i=Math.round(Math.min(99,...Object.values(t).filter(o=>o.isSubmitted).map(o=>o.progressPct)));return y("div",{className:G([e,"ul-card--uploading",O.FadeInTransition]),children:[y("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:O.LoadingSpinnerContainer,role:"progressbar",children:y("div",{className:O.LoadingSpinner,children:[y("div",{className:O.LoadingSpinnerFirst}),y("div",{className:O.LoadingSpinnerSecond}),y("div",{className:O.LoadingSpinnerThird}),y("div",{className:O.LoadingSpinnerFourth})]})}),y($e,{message:`${n} (${i}% complete)`}),y("p",{className:O.Caption,children:r})]})},dc=({logoOnly:e=!1,style:t={}})=>y("svg",{alt:`${e?"Powered by ":""}Sprig`,width:e?"35":"112",height:"15",viewBox:e?"79 0 31 15":"0 0 112 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",...t},children:[!e&&y("path",{d:"M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.7812 4.99121 44.9619 6.38135 44.9619 8.45068V8.93311H40.0742C40.0996 10.2534 40.8232 11.0215 41.9595 11.0215C42.8418 11.0215 43.3687 10.5835 43.5337 10.228L43.5591 10.1772L44.8857 10.1709L44.873 10.228C44.6445 11.1357 43.6924 12.1514 41.9277 12.1514ZM41.8643 6.12109C40.9248 6.12109 40.2139 6.76221 40.0933 7.94922H43.5972C43.4893 6.71777 42.7974 6.12109 41.8643 6.12109ZM49.1133 12.1323C47.3804 12.1323 46.2568 10.7422 46.2568 8.57764V8.56494C46.2568 6.38135 47.3613 5.00391 49.1133 5.00391C50.0591 5.00391 50.8652 5.47363 51.2334 6.21631H51.3413V2.42041H52.7124V12.0181H51.3413V10.9326H51.2334C50.8335 11.688 50.0781 12.1323 49.1133 12.1323ZM49.5068 10.958C50.6558 10.958 51.3604 10.0503 51.3604 8.57764V8.56494C51.3604 7.09229 50.6494 6.18457 49.5068 6.18457C48.3516 6.18457 47.6597 7.08594 47.6597 8.56494V8.57764C47.6597 10.0566 48.3516 10.958 49.5068 10.958ZM61.98 12.1323C61.0151 12.1323 60.2598 11.688 59.8599 10.9326H59.7583V12.0181H58.3809V2.42041H59.7583V6.21631H59.8599C60.228 5.47363 61.0342 5.00391 61.98 5.00391C63.7319 5.00391 64.8364 6.38135 64.8364 8.56494V8.57764C64.8364 10.7422 63.7192 12.1323 61.98 12.1323ZM61.5928 10.958C62.7417 10.958 63.4336 10.0566 63.4336 8.57764V8.56494C63.4336 7.08594 62.7417 6.18457 61.5928 6.18457C60.4438 6.18457 59.7329 7.09229 59.7329 8.56494V8.57764C59.7329 10.0503 60.4438 10.958 61.5928 10.958ZM66.8867 14.4429C66.7153 14.4429 66.5122 14.4302 66.3345 14.4111V13.3257C66.4678 13.3447 66.6392 13.3511 66.7979 13.3511C67.439 13.3511 67.8262 13.0781 68.0293 12.3799L68.1309 12.0244L65.6299 5.12451H67.1152L68.8418 10.6343H68.9624L70.6826 5.12451H72.1299L69.5654 12.2847C68.9814 13.9287 68.2832 14.4429 66.8867 14.4429Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M81.1088 6.63629C79.6878 6.32154 78.9672 5.76865 78.9672 4.99369C78.9672 4.19299 79.736 3.5886 80.7556 3.5886C81.8066 3.5886 82.5995 4.25285 82.5995 5.13336V5.20352H84.0518V5.13336C84.0518 3.52424 82.6405 2.30774 80.7693 2.30774C79.8676 2.30774 79.0414 2.58451 78.4433 3.08655C78.1463 3.33144 77.9077 3.63818 77.7448 3.98479C77.5818 4.33141 77.4984 4.70934 77.5005 5.09153C77.4946 5.44197 77.5675 5.78934 77.714 6.10857C77.8605 6.42779 78.0769 6.71092 78.3475 6.93752C78.8512 7.37584 79.5659 7.70024 80.4709 7.90299C81.9949 8.23898 82.7676 8.81054 82.7676 9.60094C82.7676 10.4576 81.9258 11.1032 80.813 11.1032C79.6571 11.1032 78.7854 10.3856 78.7854 9.43424V9.36408H77.3318V9.43424C77.3318 11.1167 78.8219 12.3847 80.7973 12.3847C81.7421 12.3847 82.6093 12.0983 83.2393 11.5769C83.5519 11.3237 83.8034 11.0048 83.9753 10.6433C84.1472 10.2818 84.2352 9.88702 84.2329 9.48766C84.2329 8.05875 83.1833 7.09907 81.1088 6.63629Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M89.2394 4.68276C88.6963 4.67605 88.1596 4.79915 87.6751 5.04156C87.1905 5.28397 86.7725 5.63851 86.4566 6.07497V4.85204H85.0747V14.8479H86.4566V11.0356C86.7725 11.472 87.1906 11.8265 87.6751 12.0688C88.1596 12.3111 88.6963 12.434 89.2394 12.4272C91.3836 12.4272 93 10.7627 93 8.55495C93 6.34723 91.3836 4.68276 89.2394 4.68276ZM91.5608 8.84202C91.5057 9.41605 91.2512 9.95356 90.8406 10.3633C90.4299 10.773 89.8883 11.0296 89.3078 11.0896C88.5363 11.1669 87.8177 10.9461 87.2841 10.4692C86.7505 9.99222 86.4566 9.3106 86.4566 8.55495C86.4566 7.10159 87.5538 6.00546 89.0087 6.00546C89.7619 6.00546 90.4421 6.29124 90.9171 6.81002C91.407 7.34232 91.6357 8.06385 91.5608 8.84202Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M109.95 4.85407V6.06349C109.298 5.18298 108.292 4.68286 107.153 4.68286C105.017 4.68286 103.406 6.31709 103.406 8.48426C103.406 10.6514 105.017 12.285 107.153 12.285C108.296 12.285 109.303 11.79 109.95 10.9185V11.1046C109.95 12.6101 108.993 13.5826 107.513 13.5826C106.513 13.5826 105.68 13.1494 105.284 12.424L105.264 12.3867H103.838L103.871 12.48C104.112 13.1892 104.583 13.8001 105.211 14.2179C105.841 14.6324 106.637 14.8512 107.513 14.8512C108.637 14.8512 109.594 14.4972 110.28 13.8285C110.967 13.1597 111.332 12.2194 111.332 11.1213V4.85407H109.95ZM109.175 10.3502C108.588 10.905 107.752 11.138 106.879 10.9887C106.361 10.8984 105.886 10.6475 105.523 10.2725C105.16 9.89751 104.927 9.41787 104.859 8.90328C104.736 8.03757 104.999 7.21756 105.581 6.655C106.069 6.19093 106.723 5.93643 107.401 5.94699C107.565 5.94713 107.729 5.96026 107.891 5.98625C108.946 6.15489 109.781 7.01609 109.921 8.0852C110.039 8.96507 109.766 9.78958 109.175 10.3502Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M101.89 2.12378C101.63 2.06766 101.358 2.11486 101.133 2.25518C100.908 2.39551 100.747 2.61769 100.687 2.87371C100.626 3.12973 100.67 3.39902 100.809 3.62339C100.947 3.84775 101.17 4.00917 101.428 4.07275C101.503 4.08936 101.58 4.09778 101.657 4.09786C101.906 4.09824 102.146 4.0083 102.331 3.84518C102.517 3.68206 102.636 3.45714 102.664 3.21327C102.693 2.9694 102.63 2.72361 102.487 2.5227C102.344 2.32179 102.132 2.17981 101.89 2.12378Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M100.967 10.934H99.7755C98.9285 10.934 98.4196 10.3644 98.4196 9.40982C98.4196 8.4791 98.8757 7.36945 99.8054 6.01778L99.8178 5.99976V5.61807L95.8571 5.06453C95.8585 4.90331 95.8162 4.74466 95.7346 4.60501C95.653 4.46536 95.5352 4.34979 95.3932 4.27027C95.0381 4.07718 94.6498 4.07717 94.3279 4.26383C94.1667 4.35799 94.035 4.4945 93.9476 4.65816C93.8602 4.82182 93.8205 5.00623 93.8328 5.19087C93.8452 5.37552 93.9092 5.55315 94.0176 5.70402C94.1261 5.85489 94.2748 5.97309 94.4472 6.04546L93.2151 12.258H94.5833L95.7196 6.35891L97.8593 6.7155C97.284 7.73439 96.9921 8.68442 96.9921 9.53919C96.9921 11.1168 97.9577 12.1498 99.5187 12.2496V12.258H102.346V4.87723H100.967V10.934Z",fill:"black",fillOpacity:"0.7"})]}),qm=()=>{const{border:e,cards:t,forceBrandedLogo:n,headers:r,index:i,marketingUrl:o,showSurveyBrand:a,slugName:s,surveyId:l,viewedCardCount:u}=X(b=>({border:b.border,cards:b.cards,forceBrandedLogo:b.forceBrandedLogo,headers:b.headers,index:b.index,marketingUrl:b.marketingUrl,showSurveyBrand:b.showSurveyBrand,slugName:b.slugName,surveyId:b.surveyId,viewedCardCount:b.viewedCardCount})),c=bt(null),d=t.filter(b=>b.type!==L.Uploading&&b.type!==L.Thanks),f=Qv(t,i),p=u+1,h=p/(p+f),v=`${o}?utm_source=survey_branding&utm_medium=website&utm_campaign=${s}&utm_content=${l}${n&&"&utm_term=poweredby_pill"}`;Re(()=>{c.current&&(c.current.style.width=`${h*100}%`)},[h]);const m=()=>y(Le,{children:[d.length>1&&y("div",{id:"ul-progress-bar-container",children:y("div",{id:"ul-progress-bar-current",ref:c,style:{border:`1px solid ${e||"#000"}`}})}),a?y("div",{className:n?"yellow-footer-logo":"",style:{marginTop:"4px"},children:y("a",{href:v,rel:"noreferrer",target:"_blank",children:y("div",{style:{display:"flex"},children:[y(dc,{logoOnly:!1}),n&&y(fc,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}):null]}),w=()=>y("a",{dir:"ltr",href:v,rel:"noreferrer",target:"_blank",children:y("div",{className:"thank-you-card-link",children:[y("div",{className:"sprig-box-logo",children:y(dc,{logoOnly:!0,style:{margin:"auto"}})}),y("div",{children:y("p",{children:["Capture insights about your own product",y(fc,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}),_=t[i].type===L.Thanks;return y("footer",{className:`ul-footer ${r["userleap-platform"]==="link"?"ul-footer__link":""}`,style:a?{}:{marginBottom:"10px"},children:_&&n?w():m()})},fc=({style:e})=>y("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[y("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),y("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),zm=()=>{const{answers:e,border:t,cards:n,close:r,configureExitOnOverlayClick:i,destroy:o,endCard:a,eventEmitFn:s,fontFamily:l,headers:u,index:c,next:d,showStripes:f,update:p,useMobileStyling:h,viewDocument:v}=X(A=>({answers:A.answers,border:A.border,cards:A.cards,close:A.close,configureExitOnOverlayClick:A.configureExitOnOverlayClick,destroy:A.destroy,endCard:A.endCard,eventEmitFn:A.eventEmitFn,fontFamily:A.fontFamily,headers:A.headers,index:A.index,next:A.next,showStripes:A.showStripes,update:A.update,useMobileStyling:A.useMobileStyling,viewDocument:A.viewDocument})),m=bt(null),w=bt(!1),_=u["userleap-platform"],{props:b,type:E,name:g}=n[c],x=n.length;Re(()=>{m.current&&(m.current.classList.contains("ul-app--visible")||m.current.classList.add("ul-app--visible"),!w.current&&s&&(w.current=!0,s(B.SurveyAppeared)))},[s]),Re(()=>{p()},[c,p]),Re(()=>{i(()=>r())},[r,i]);const I=()=>r(Zt),C=A=>{A.key==="Enter"&&I()},S=async function(A){d({data:A,completeSurvey:()=>{o(Zt)},endCard:a}),Rf(v)};if(e){for(const A of e)if(A.questionId===g){let k;if(E===L.MultipleChoice){const J=b.options.find(({value:ve})=>ve===A.value);if(!J)break;k={[J.id]:J.value}}else k=A.value;S({value:k,type:E,questionId:A.questionId});break}}const R=()=>[Rt.Email,Rt.Link].includes(u["userleap-platform"])?!1:!a||c+1!==x,D=()=>h?{borderColor:t}:{borderColor:t,margin:"15px"},T=()=>{const A={className:"ul-card",next:S,questionId:g,type:E};switch(E){case L.ConsentLegal:return ee(am,{...A,...b,key:g});case L.Likert:return ee(lm,{...A,...b,key:g});case L.MultipleChoice:return ee(um,{...A,...b,key:g});case L.MultipleSelect:return ee(cm,{...A,...b,key:g});case L.NPS:return ee(dm,{...A,key:g,props:b});case L.Open:return ee(fm,{...A,...b,key:g});case L.RecordedTask:return ee(xm,{...A,...b,key:g});case L.TextUrlPrompt:return ee(Im,{...A,...b,key:g});case L.Thanks:return ee(km,{...A,...b,key:g});case L.Uploading:return ee(Gm,{...A,...b,key:g});case L.VideoVoice:return ee($m,{...A,...b,key:g});default:return null}},P=A=>{var Ve;const k=window.sprigAPI,J=A.target;if(!k||!J)return;const ve=[J,J.parentElement];for(const me of ve)if(((Ve=me==null?void 0:me.tagName)==null?void 0:Ve.toLowerCase())==="a"){A.preventDefault(),k==null||k.openUrl(me.href);return}};return y("div",{className:G("ul-app",Xt(u)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:Zt,onClick:P,ref:m,style:{"--theme":t,...l?{fontFamily:l.replace(";","")}:{}},children:y("div",{className:"ul-app__container",children:y("div",{className:G(re(O.CardContainer,h)),style:D(),children:[R()&&y("div",{className:G(re(O.CloseContainer,h)),children:y("div",{"aria-label":"Close button",className:O.CloseButton,onClick:I,onKeyPress:C,role:"button",tabIndex:0,children:y("svg",{fill:"none",height:"18px",viewBox:"0 0 13 13",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:y("path",{d:"M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z",fill:"#262136"})})})}),f&&y("div",{className:"ul-header__container",dir:"ltr",children:y("div",{className:"ul-header",children:"For development purposes only"})}),y("div",{className:G(Uf(O.CardMainContent,_)),children:T()}),y(qm,{})]})})})},Wm=`html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;margin:auto}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.ul-card__container{background:#ffffff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;overflow:auto;padding:20px 20px 5px;position:relative;text-align:center;word-break:break-word}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;margin-bottom:3px;display:flex;gap:16px;justify-content:center}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email{flex-grow:55;display:flex}.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{margin-bottom:5px}.ul-question{color:#343442;display:block;font-size:20px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-caption{flex:1 0 auto;margin-top:8px;margin-bottom:15px;font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.select-checkbox{height:16px;width:16px;border-radius:3px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 3px 3px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.fade-in-transition{animation:fadeIn .4s ease-in;-webkit-animation:fadeIn .4s ease-in;-moz-animation:fadeIn .4s ease-in;-o-animation:fadeIn .4s ease-in;-ms-animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-ms-keyframes fadeIn{0%{opacity:0}to{opacity:1}}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{box-shadow:unset;border-radius:unset;border:none!important;position:unset}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:rgba(0,0,0,.01);box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:white}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-text{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:rgba(0,0,0,.01);box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:white}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}#ul-card-voice__video{align-items:center;display:flex;flex-direction:column}#ul-card-voice__video>div{margin-bottom:10px;width:100%}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#ffffff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:30px;justify-content:center}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;left:0;position:absolute;top:0;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:auto;flex-grow:1;width:100%}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:rgba(0,0,0,.01);border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:rgba(0,0,0,.03)}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:rgba(249,198,0,1);border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%}.close-btn{cursor:pointer;height:18px;margin-inline-end:-10px;position:relative;top:-10px;width:18px;z-index:1}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}#ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px;max-width:250px;margin:25px 0}#ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{width:100%;background:rgba(0,0,0,.01);border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:1;margin:0;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer} -`,Ym=(e,t)=>{const n=[...e],r=new Set([L.VideoVoice,L.RecordedTask]);return e.some(i=>r.has(i.type))&&n.push({name:-2,props:{routingOptions:[]},type:L.Uploading}),t&&n.push({name:-1,props:{routingOptions:[]},type:L.Thanks}),n},Qm=({mode:e=null,viewWindow:t,viewDocument:n})=>{const r=n.documentElement;return{mode:e,sw:t.screen.width,sh:t.screen.height,cw:r.clientWidth,ch:r.clientHeight,p:t.location.href,l:t.navigator.language}};function Zm(e,t=!0){var g;const{answers:n,apiURL:r,customStyles:i,endCard:o,eventEmitFn:a,fontFamilyURL:s,frame:l,previewKey:u,viewDocument:c,viewWindow:d}=e,f=Xt(e.headers)?e.frame:c.body,p=e.UpChunk||window.UpChunk,h=H,v=Ym(e.cards,!!o);$r.configure(h,{cards:v,hasEndCard:!!o,apiURL:r,UpChunk:p}),X.setState({apiURL:r,answers:n,border:e.border,index:e.startingQuestionIdx||0,cards:v,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:a,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:l,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:Qm({mode:e.mode,viewWindow:d,viewDocument:c}),mode:e.mode,previewKey:u,recorder:$r,recorderEventEmitter:h,responseGroupUid:e.responseGroupUid,showStripes:e.showStripes,showSurveyBrand:e.showSurveyBrand,slugName:e.slugName,styleNonce:e.styleNonce,surveyId:e.surveyId,tabTitle:e.tabTitle,uploadingCardViewed:!1,uploadProgress:{},useMobileStyling:e.useMobileStyling,useDesktopPrototype:e.useDesktopPrototype,userId:e.userId,viewDocument:e.viewDocument,visitorAttributes:e.visitorAttributes,viewedCardCount:e.startingQuestionIdx||0});const{seen:m}=X.getState();m();const{head:w}=c,_=c.createElement("style");if(_.id="sprig-style",_.textContent=Wm,_.nonce=e.styleNonce,w.appendChild(_),e.fontFamily&&s&&parent){const x=c.createElement("link");x.rel="stylesheet",x.href=s,w.appendChild(x)}if(e.customStyles&&za(c,i,e.styleNonce),!p)if(e.installationMethod!==ft.Npm){const x=c.createElement("script");x.src="https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js",x.onload=()=>{$r.setUpChunk(d.UpChunk)},x.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},w.appendChild(x)}else console.warn("[Sprig] - recording functionality not configured due to missing UpChunk dependency");const b="2.24.12-beta.0",E=a||((g=l.eventEmitter)==null?void 0:g.emit);E==null||E(Se.VerifyViewVersion,{[Lt.ViewVersion]:b}),f&&t&&pn(y(zm,{}),f)}const Xm={configure:Zm};window.UserLeap&&window.Sprig&&(window.Sprig._gtm?window.Sprig=window.UserLeap:window.UserLeap=window.Sprig),window.UserLeap||(window.UserLeap=window.Sprig),window.Sprig||(window.Sprig=window.UserLeap);const Jm="rgba(255,255,255, 0.95)",eg="rgba(0,0,0,0.9)",tg="360px",ea="0px",pc=()=>{window.UserLeap.container=document.createElement("div"),window.UserLeap.container.className="ul-container",document.body.appendChild(window.UserLeap.container)},hc=e=>{ag();const t=window.UserLeap.container;if(!(!t||!t.parentNode))try{t.parentNode.removeChild(t),window.UserLeap.container=null,xe("trackStartUrl",null),H.emit(B.SurveyLifeCycle,{state:"dismissed"}),H.emit(B.SurveyClosed,{name:B.SurveyClosed,initiator:e})}catch(n){console.warn(`[Sprig] (ERR-412) Error removing UserLeap container by ${e} `+t),n instanceof Error&&window.UserLeap.reportError("dismissActiveSurvey",n)}},vc=()=>{H.on(B.SurveyWillClose,({initiator:e})=>{hc(e)})},ng=(e,t)=>{const r={...{position:"fixed",overflow:"auto",top:"0px",left:"0px",display:"none",height:"100%",width:"100%",transition:"background-color 0.3s ease-out",zIndex:2147483646}},i=t?e.overlayStyleMobile:e.overlayStyle;r["background-color"]=i==="light"?Jm:eg,t||(r.margin="auto"),window.UserLeap.container&&Object.assign(window.UserLeap.container.style,r)},rg=(e,t,n)=>{var s,l;const r={position:"fixed",bottom:"0px",right:ea,border:0,backgroundColor:"rgba(0,0,0,0)",zIndex:2147483646},i=Object.assign({},t,window.UserLeap);let o,a=!1;return n?((s=window.UserLeap.windowDimensions)!=null&&s.width?r.width=`${window.UserLeap.windowDimensions.width}px`:r.width="100%",(l=window.UserLeap.windowDimensions)!=null&&l.height?r.maxHeight=`${window.UserLeap.windowDimensions.height-20}px`:window.UserLeap.maxHeight?r.maxHeight=window.UserLeap.maxHeight:r.maxHeight=`${document.body.clientHeight-20}px`,["light","dark"].includes(i.overlayStyleMobile)&&(a=!0)):(r.width=tg,r.maxHeight=window.UserLeap.maxHeight||"66vh",i.framePosition===En.BottomLeft?o={left:ea}:i.framePosition===En.TopLeft?o={left:ea,top:"0px"}:i.framePosition===En.TopRight?o={top:"0px"}:i.framePosition===En.Center&&(a=!0,o={margin:"auto",position:"static"},r.maxHeight=null)),a&&ng(i,n),Object.assign(e.style,r,o),a},ig=(e,t)=>{var s,l;const n="ul-frame";pc(),og();const r=document.createElement("iframe");r.id=n,r.setAttribute("title","Sprig User Feedback Dialog");const i=rg(r,e,t);vc(),r.setHeight=u=>{parseInt(r.style.height)!=u&&(r.style.height=`${u}px`,H.emit(B.SurveyHeight,{name:B.SurveyHeight,contentFrameHeight:u}))},(s=window.UserLeap.container)==null||s.appendChild(r),e&&(t?e.exitOnOverlayClickMobile:e.exitOnOverlayClick)&&window.UserLeap.container&&(window.UserLeap.container.onclick=()=>{H.emit(B.CloseSurveyOnOverlayClick)}),H.emit(B.SurveyLifeCycle,{state:"presented"}),H.emit(B.SurveyPresented,{name:B.SurveyPresented});const o=(l=r.contentWindow)==null?void 0:l.document;o&&(o.open("text/html","replace"),o.write(""),o.close());const a=o==null?void 0:o.head;return{frameId:n,contentWinDocHead:a,contentWindow:r.contentWindow,hasOverlay:i,iframe:r}},mc={[B.SurveyFadingOut]:()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{"background-color":"rgba(0,0,0,0)"})}},og=()=>{Object.entries(mc).forEach(([e,t])=>{H.on(e,t)})},ag=()=>{Object.entries(mc).forEach(([e,t])=>{H.off(e,t)})},sg="!launch_darkly_";class lg{constructor(){se(this,"_ldData",{})}getAllLaunchDarklyVariations(){return this._ldData}setLDFlagsVariations(t){try{return!t||typeof t!="object"||Array.isArray(t)?!1:(Object.keys(this._ldData).forEach(n=>{delete this._ldData[n]}),Object.keys(t).forEach(n=>{var r;return this._ldData[`${sg}${n}`]=((r=t[n])!=null?r:0)+1}),!0)}catch(n){return n instanceof Error&&window.UserLeap.reportError("setAllLDFlagsVariations",n),console.warn("[Sprig] An issue had occured when setting LaunchDarkly flags and variations."),!1}}}const ta=new lg;Object.freeze(ta);const ug="!optimizely_experiments_";class cg{constructor(){se(this,"_optimizelyData",{})}setOptimizelyExperiment(t,n=!0){if(!t||typeof t!="object")return!1;const{experiments:r}=t;try{return n&&Object.keys(this._optimizelyData).map(i=>{delete this._optimizelyData[i]}),r&&r.map(i=>{const{id:o,variation:a}=i,s=this.transformExperimentId(o);a&&typeof a=="string"&&(this._optimizelyData[s]=a)}),!0}catch(i){return i instanceof Error&&window.UserLeap.reportError("setOptimizelyExperiment",i),!1}}getAllOptimizelyExperiments(){return this._optimizelyData}getOptimizelyVariationName(t){return this._optimizelyData[this.transformExperimentId(t)]}transformExperimentId(t){return ug+t}getAndSetWebOptimizelyExperiments(){var t;try{if(window&&window.optimizely&&typeof window.optimizely.get=="function"){const n=(t=window.optimizely.get("state"))==null?void 0:t.getExperimentStates({isActive:!0});if(n){const r=Object.keys(n).map(i=>{var o,a;return(o=n[i].variation)!=null&&o.name?{id:i,variation:(a=n[i].variation)==null?void 0:a.name}:{id:i,variation:"Original"}});return this.setOptimizelyExperiment({experiments:r},!1),!0}return!1}return!1}catch(n){return n instanceof Error&&window.UserLeap.reportError("getAndSetWebOptimizely",n),!1}}}const Zr=new cg;Object.freeze(Zr);class dg{constructor(t,n){se(this,"paused");se(this,"queue");se(this,"ul");this.ul=t,this.paused=!1,this.queue=[],this.flush(n)}flush(t){const n=t.length;if(n)for(let r=0;r{};const r=new Promise(function(i){n=function(){i(t())}});return this.queue.push(n),r}else return t()}empty(){this.queue.length=0}}var Me=(e=>(e.Ready="ready",e.NoSurvey="no survey",e))(Me||{}),gc=(e=>(e.Preview="sprigPreviewKey",e))(gc||{});const fg=["popState","pushState","replaceState"],pg={test:"test"},Wn="!email",hg=["ios","android"],$t="environments",na="pageUrl",Gt="visitors",yc="ul-view-sdk-script",_c=Object.freeze({contains:(e,t)=>t.includes(e),notContains:(e,t)=>!t.includes(e),exactly:(e,t)=>t===e,notExactly:(e,t)=>t!==e,startsWith:(e,t)=>t.startsWith(e),endsWith:(e,t)=>t.endsWith(e),regex:(e,t)=>new RegExp(e).test(t),legacy:(e,t)=>new RegExp(e,"i").test(t)});function ra(e,t){const{matchType:n,pattern:r}=e,i=n?_c[n]:_c.legacy;let o=!1;try{o=i(r,t)}catch(a){const s=`[Sprig] (ERR-445) Failed to check url match with pattern ${r}`;a instanceof Error&&(console.warn(s,a),a.stack=JSON.stringify(e),window.UserLeap.reportError(s,a))}return o}function vg(e,t){const{pageUrlEvents:n,interactiveEvents:r,dismissOnPageChange:i}=window.UserLeap._config;if(!i)return!0;const o=[];n&&n.length&&o.push(...n),r&&r.length&&o.push(...r);const a=e&&o.find(s=>s.id===e);return a?ra(a,window.location.href):t===window.location.href}function Yn(e){const{pageUrlEvents:t,interactiveEvents:n,dismissOnPageChange:r,platform:i}=window.UserLeap._config;if(i&&i!==Rt.Web)return;const o=qt("trackStartUrl"),a=o?String(o):null;t&&xc(window.location.href),n&&(bc(),mg()),r&&a&&a!==window.location.href&&e&&fg.includes(e.type)&&window.UserLeap("dismissActiveSurvey",Qe.PageChange)}const wc={capture:!0},mg=()=>{const t=window.UserLeap._config.interactiveEvents.filter(r=>ra(r,window.location.href)).map(r=>{const{name:i,properties:o}=r,{selector:a,innerText:s}=o;return a?l=>{if(qa(l.target))try{l.target.closest(a)&&window.UserLeap("track",i)}catch{}return!1}:l=>(qa(l.target)&&l.target.innerText===s&&window.UserLeap("track",i),!1)}),n=r=>t.forEach(i=>i(r));window.UserLeap._config.interactiveEventsHandler=n,window.addEventListener("click",n,wc)},bc=()=>{window.UserLeap._config.interactiveEventsHandler&&window.removeEventListener("click",window.UserLeap._config.interactiveEventsHandler,wc),delete window.UserLeap._config.interactiveEventsHandler};function gg(){["hashchange","popstate"].forEach(e=>window.addEventListener(e,Yn,!0))}function yg(){["hashchange","popstate"].forEach(e=>window.removeEventListener(e,Yn,!0)),window.UserLeap._config.interactiveEvents&&bc()}function ct(e,t,n){const r=[window.UserLeap._API_URL,"sdk",e];return t&&t.forEach(i=>{r.push(i),i===$t?r.push(window.UserLeap.envId):i===Gt&&r.push(ia())}),n&&r.push(n),r.join("/")}function _g(e,t){let n=ct("1",[$t],"questions?");return e!=null&&(n+=`&vid=${e}`),t&&(t.surveyId&&(n+=`&surveyid=${t.surveyId}`),t.surveyTemplateId&&(n+=`&surveytemplateid=${t.surveyTemplateId}`),t.previewLanguage&&(n+=`&previewLanguage=${encodeURIComponent(t.previewLanguage)}`)),n}function qt(e){const t=_e.getItem(ye.Credentials);if(t)try{const r=JSON.parse(t)[window.UserLeap.envId];return r&&r[e]||null}catch(n){n instanceof Error&&(n.stack=t,window.UserLeap.reportError("Failed to parse local storage credentials",n)),console.warn("[Sprig] (ERR-427) Failed to lookup saved ids",n)}return null}function xe(e,t){const n=_e.getItem(ye.Credentials);let r={};if(n)try{r=JSON.parse(n)}catch(o){o instanceof Error&&(o.stack=n,window.UserLeap.reportError("Failed to parse local storage credentials",o)),console.warn("[Sprig] (ERR-427) Failed to lookup saved ids",o)}let i=r[window.UserLeap.envId];i?i[e]=t:i={[e]:t},r[window.UserLeap.envId]=i;try{_e.setItem(ye.Credentials,JSON.stringify(r))}catch(o){o instanceof Error&&console.warn(`[Sprig] (ERR-426) Unable to write to Local Storage:: ${o.message}`)}}function Ec(){window.previewMode||(window.UserLeap.visitorId=Ye(),xe("vid",window.UserLeap.visitorId),H.emit(B.VisitorIDUpdated,{visitorId:window.UserLeap.visitorId}))}function ia(){return window.previewMode?"0":window.UserLeap.visitorId||""}function xc(e,t,n){if(e.endsWith("mock_snippet.html"))return;const r=window.UserLeap._config.pageUrlEvents;let i=!1;if(r&&r.length)for(let c=0;c0){const c=s[s.length-1],d=(Date.now()-c.viewedAt)/1e3;c.location!=e&&d>a&&ul({url:e}),(c.location!=e&&d>a||d>o)&&(window.UserLeap._queue.push(["track",na,t,{url:e},n]),s.push(l))}else window.UserLeap._queue.push(["track",na,t,{url:e},n]),s.push(l),ul({url:e});s.length>5&&s.splice(0,s.length-5);try{_e.setItem(ye.PageViews,JSON.stringify(s))}catch(c){c instanceof Error&&console.warn(`[Sprig] Unable to write to Local Storage: ${c.message}`)}}catch(c){c instanceof Error&&window.UserLeap.reportError("trackPageView",c,{pageViewsStorage:u}),console.warn("[Sprig] (ERR-425) Failed to update page views in local storage")}}function wg(){const e="Backbone"in window&&window.Backbone&&window.Backbone.history?window.Backbone.history:window.history;"pushState"in e&&(e.pushState=(t=>function(...r){const i=t.apply(this,r),o=new Event("pushState");return window.dispatchEvent(o),Yn(o),i})(e.pushState)),"replaceState"in e&&(e.replaceState=(t=>function(...r){const i=t.apply(this,r),o=new Event("replaceState");return window.dispatchEvent(o),Yn(o),i})(e.replaceState)),gg()}async function oa(e,t){const n=ia();e&&!t&&(window.UserLeap._config.mode=pg.test);const r=await St(_g(n,{...e,previewLanguage:window.UserLeap._config.previewLanguage}),{},0,!0);return r.ok?(r.json.delay&&await sr(r.json.delay),Cc(r.json)):(r.reportError&&r.error&&(console.warn("[Sprig] (ERR-414) Failed to request questions from the server",r.error),window.UserLeap.reportError("getQuestions",r.error)),{success:!1,surveyState:Me.NoSurvey})}const Cc=async e=>{var T,P,A;const{context:t,forceBrandedLogo:n,endCard:r,locale:i,productConfig:o,questions:a,responseGroupUid:s,surveyId:l,uuid:u,vid:c,sessionReplay:d}=e,f=Jt(window.UserLeap),p=aa(f),h=bg(f);if(d)if(p){const k={mediaRecordingUid:Ye(),mediaType:Ie.Screen,questionId:1,responseGroupUid:s,surveyId:l,updatedAt:new Date().toISOString(),visitorId:window.UserLeap.visitorId,isReplay:!0};H.emit(B.ReplayCapture,{responseGroupUid:s,hasQuestions:!!(a!=null&&a.length),surveyId:l,uploadId:d.uploadId,replayType:(T=d.replayDurationType)!=null?T:Vt.Before,seconds:d.replayDurationSeconds,generateVideoUploadUrlPayload:k})}else sl({responseGroupId:s,surveyId:l,visitorId:c,replayParams:d,completeUploadHeaders:f,apiUrl:window.UserLeap._API_URL,triggerTimestamp:Date.now(),isStandalone:a.length===0});if(c==null||!a||!a.length)return{success:!1,message:"[Sprig] no survey found",surveyState:Me.NoSurvey};if(window.UserLeap.container){const k="[Sprig] (ERR-409) Found an existing Survey container, aborting rendering of this survey";return console.warn(k),{success:!1,message:k,surveyState:Me.NoSurvey}}if(c!==window.UserLeap.visitorId&&u!==window.UserLeap.visitorId&&!window.previewMode){const k="Attempted to display survey to a different visitor";return window.UserLeap.reportError("DisplaySurvey",new Error(k)),{success:!1,message:k,surveyState:Me.NoSurvey}}Xh({id:l}),xi.disable(),H.emit(B.SurveyWillPresent,{name:B.SurveyWillPresent,[Ha.SurveyId]:l});let v,m=document.createElement("div"),w,_,b;const E=k=>{const{[Lt.ViewVersion]:J}=k;J!==f["x-ul-sdk-version"]&&hc(),H.removeListener(Se.VerifyViewVersion,E)};H.on(Se.VerifyViewVersion,E),Xt(f)?(v="ul-direct-embeded-frame",w=document.head,_=window,b=!1,p&&(pc(),m.id=v,window.UserLeap.container.appendChild(m),vc(),H.emit(B.SurveyLifeCycle,{state:"presented"}),H.emit(B.SurveyPresented,{name:B.SurveyPresented}))):{frameId:v,contentWinDocHead:w,contentWindow:_,hasOverlay:b,iframe:m}=ig(o,h),window.UserLeap.frameId=v,window.UserLeap.useMobileStyling=h;const g=k=>{H.on(B.CloseSurveyOnOverlayClick,k)},x=Object.assign({frame:m,envId:window.UserLeap.envId,surveyId:l,userId:u,visitorAttributes:{externalUserId:window.UserLeap.userId,email:window.UserLeap.email},cards:a,context:t,locale:i,fontFamily:window.UserLeap.fontFamily,fontFamilyURL:window.UserLeap.fontFamilyURL,apiURL:window.UserLeap._API_URL,responseGroupUid:s,headers:f,endCard:r,useMobileStyling:h,mobileSDKVersion:window.UserLeap.mobileSDKVersion,configureExitOnOverlayClick:g,eventEmitFn:H.emit.bind(H),ulEvents:Ka,viewDocument:_==null?void 0:_.document,viewWindow:_,tabTitle:document.title,startingQuestionIdx:(P=window.UserLeap.config)==null?void 0:P.startingQuestionIdx,styleNonce:window.UserLeap.styleNonce,previewKey:_e.getItem(ye.Preview),forceBrandedLogo:n},window.UserLeap._config);(A=window.UserLeap.config)!=null&&A.startingQuestionIdx&&(window.UserLeap.config={...window.UserLeap.config,startingQuestionIdx:null}),window.UserLeap.customStyles&&(x.customStyles=window.UserLeap.customStyles),_&&(_.__cfg=x);function I(){const k=document.createElement("script");return window.UserLeap.nonce&&k.setAttribute("nonce",window.UserLeap.nonce),k.id=yc,k}const C=window.UserLeap.viewSDKURL?window.UserLeap.viewSDKURL:x.path,S=document.getElementById(yc);S&&S.remove();const R=I(),D=()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{display:"flex"})};return x.installationMethod===ft.Npm||x.installationMethod===ft.NpmBundled?(Xm.configure(x),b&&window.UserLeap.container&&D()):C&&(R.src=C,b&&R.addEventListener("load",()=>{window.UserLeap.container&&D()}),_==null||_.addEventListener("error",k=>{k.target instanceof HTMLScriptElement&&k.target.src===C&&window.UserLeap.reportError("loadFrameScript",new Error("Frame script failed to load"))},{capture:!0,once:!0})),w==null||w.appendChild(R),{success:!0,surveyState:Me.Ready,surveyId:l,responseGroupUid:s}};function bg(e){if(window.UserLeap.useMobileStyling!==void 0)return window.UserLeap.useMobileStyling;const t=window.UserLeap.windowDimensions&&window.UserLeap.windowDimensions.width||document.body.clientWidth;return aa(e)||t>10&&t{var v,m,w,_,b;const{userId:i,anonymousId:o,metadata:a={},properties:s,showSurveyCallback:l}=r;let{eventName:u}=r;if(window.UserLeap.debugMode&&u!==na&&console.info("[DEBUG] Sprig track",r),e.mode==="test")return;const c=(v=_e.getItem(ye.Preview))!=null?v:void 0;if(e.requireUserIdForTracking&&!window.UserLeap.userId&&!i){const E="[Sprig] - Skipping tracking without userId";return console.warn(E),{success:!1,message:E,surveyState:Me.NoSurvey}}if(!u||u.trim().length===0){u=u?String(u):"";const E="[Sprig] - Invalid event name "+u;return console.warn(E),{success:!1,message:E,surveyState:Me.NoSurvey}}const d=window.location.href;if(a.url||(a.url=d),xe("trackStartUrl",d),(w=(m=window.UserLeap)==null?void 0:m._config)!=null&&w.optimizelyEnabled){const E=Jt(window.UserLeap);aa(E)||Zr.getAndSetWebOptimizelyExperiments(),a.optimizelyExperiments=Object.assign({},Zr.getAllOptimizelyExperiments())}(b=(_=window.UserLeap)==null?void 0:_._config)!=null&&b.launchDarklyEnabled&&(a.launchDarklyFlags=ta.getAllLaunchDarklyVariations()),i&&(window.UserLeap.userId=i),o&&(window.UserLeap.partnerAnonymousId=o),s&&(a.eventProperties=s),Zh({name:u});const f=window.UserLeap.delayingSurvey?await St(ct("1",[Gt],"events/batch"),{body:JSON.stringify({events:[{event:u,metadata:a}],previewKey:c}),method:"POST"},0,!0):await St(ct("1",[Gt],"events"),{body:JSON.stringify({event:u,metadata:a,previewKey:c}),method:"POST"},0,!0);if(!f.ok){const E="[Sprig] (ERR-421) Failed to track event";return f.reportError&&(console.warn(E,f.error),f.error&&window.UserLeap.reportError("track",f.error)),{success:!1,message:E,error:f.error,surveyState:Me.NoSurvey}}i&&xe("uid",i),o&&xe("aid",o);const p=f.json;return p.invalidPreviewKey&&_e.removeItem(ye.Preview),await Cg(f,l)?vg(p.eventId,d)?Cc(p):{success:!1,message:"Study should not be displayed after page navigation",surveyState:Me.NoSurvey}:{success:!1,message:"[Sprig] Callback returned false, aborting rendering of survey",surveyState:Me.NoSurvey}},n={async displaySurvey(r){return console.warn("[Sprig] displaySurvey should only be used to debug your studies; not intended for production usage."),window.UserLeap("dismissActiveSurvey",Qe.Override),oa({surveyId:r},!0)},_previewSurvey(r){window.UserLeap("dismissActiveSurvey",Qe.Override),oa({surveyTemplateId:r},!1)},_reviewSurvey(r){window.UserLeap("dismissActiveSurvey",Qe.Override),oa({surveyId:r},!1)},previewSurvey(r){n._previewSurvey(r)},reviewSurvey(r){n._reviewSurvey(r)},mute(){window.UserLeap._queue.pause()},unmute(){window.UserLeap._queue.unpause()},setVisitorToken(){console.warn("[Sprig] setVisitorToken is deprecated.")},dismissActiveSurvey(r=Qe.API){H.emit(B.SurveyWillClose,{name:B.SurveyWillClose,initiator:r})},async setAttribute(r,i){if(!r||!i&&i!==0){const o="[Sprig] - Disregarding empty attribute / value provided";return console.warn(o),{success:!1,message:o}}return this.setAttributes({[r]:i})},async setAttributes(r){if(r==null||Object.keys(r).length===0){const i="[Sprig] - Disregarding empty attributes provided";return console.warn(i),{success:!1,message:i}}return this.identifyAndSetAttributes({attributes:r})},async identifyAndSetAttributes(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig identifyAndSetAttributes",r),e.mode==="test")return;if(r===null||typeof r!="object"||!(r.userId||r.anonymousId||r.attributes)){const u="[Sprig] - Disregarding empty payload provided";return console.warn(u),{success:!1,message:u}}const{userId:i,anonymousId:o,attributes:a}=r;if(e.requireUserIdForTracking&&!window.UserLeap.userId&&!i){const u="[Sprig] - Skipping tracking without userId";return console.warn(u),{success:!1,message:u}}if(!a&&(!i||window.UserLeap.userId===i)&&(!o||window.UserLeap.partnerAnonymousId===o))return{success:!0};const s={};i&&(s.userId=window.UserLeap.userId=i),o&&(s.partnerAnonymousId=window.UserLeap.partnerAnonymousId=o);let l;return a?(a.email&&!Object.prototype.hasOwnProperty.call(a,Wn)&&(a[Wn]=a.email,delete a.email),l=await St(ct("1",[$t,Gt],"attributes"),{body:JSON.stringify(a),method:"PUT"}),!l.ok&&l.reportError&&(console.warn("[Sprig] (ERR-432) identifyAndSetAttributes failed",l.error),l.error&&window.UserLeap.reportError("identifyAndSetAttributes",l.error))):l=await St(ct("1",[$t,Gt]),{body:JSON.stringify(s),method:"PUT"}),a&&a[Wn]&&(window.UserLeap.email=a[Wn]),l.ok&&(i&&xe("uid",i),o&&xe("aid",o)),{success:!!l.ok}},async removeAttributes(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig removeAttributes",r),e.mode==="test")return;if(r==null||r.length===0){const o="[Sprig] - Disregarding empty attributes provided";return console.warn(o),{success:!1,message:o}}if(e.requireUserIdForTracking&&!window.UserLeap.userId){const o="[Sprig] - Skipping tracking without userId";return console.warn(o),{success:!1,message:o}}const i=await St(ct("1",[$t,Gt],"attributes"),{body:JSON.stringify({delete:r}),method:"DELETE"});return!i.ok&&i.reportError&&(console.warn("[Sprig] (ERR-433) Remove attributes failed",i.error),i.error&&window.UserLeap.reportError("removeAttributes",i.error)),{success:!!i.ok}},async addSurveyListener(r){H.on(B.SurveyLifeCycle,r)},async removeSurveyListener(r){H.removeListener(B.SurveyLifeCycle,r)},async addListener(r,i){H.on(r,i)},async removeListener(r,i){H.removeListener(r,i)},async removeAllListeners(){H.removeAllListeners()},setPreviewKey(r){!r||typeof r!="string"||_e.isStorageAvailable&&r&&_e.setItem(ye.Preview,r)},async setUserId(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig setUserId",r),r==null){const a=`[Sprig] - Invalid userId ${r}`;return console.warn(a),{success:!1,message:a}}if(e.mode==="test"||r===window.UserLeap.userId)return;window.UserLeap.userId=r;const i=window.UserLeap.visitorId,o=await St(ct("1",[$t,Gt]),{body:JSON.stringify({userId:r}),method:"PUT"});if(!o.ok){o.reportError&&(console.warn("[Sprig] (ERR-420) Failed to set user id",o.error),o.error&&window.UserLeap.reportError("setUserId",o.error));return}i!==window.UserLeap.visitorId&&ll(),xe("uid",r)},async setPartnerAnonymousId(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig setPartnerAnonymousId",r),r==null){const i=`[Sprig] - Invalid partnerAnonymousId ${r}`;return console.warn(i),{success:!1,message:i}}return window.UserLeap.partnerAnonymousId=r,xe("aid",r),{success:!0}},async track(r,i,o={},a=void 0){return t({eventName:r,properties:i,metadata:o,showSurveyCallback:a})},async identifyAndTrack(r){return await t(r)},trackPageView(r,i=void 0,o=void 0){xc(r,i,o)},applyStyles(r){if(window.UserLeap.customStyles=r,window.UserLeap.container){const i=window.UserLeap.container.children[0].contentDocument;if(i){const o=i.getElementById(O.CustomStyle);o?o.textContent=r:za(i,r,window.UserLeap.styleNonce)}}},setWindowDimensions(r,i){var l,u;const o=typeof r=="string"?parseInt(r,10):r,a=typeof i=="string"?parseInt(i,10):i;if(!isNaN(o)&&!isNaN(a)&&(window.UserLeap.windowDimensions={width:o,height:a}),!window.UserLeap.frameId)return;const s=document.getElementById(window.UserLeap.frameId);!s||(window.UserLeap.useMobileStyling&&((l=window.UserLeap.windowDimensions)!=null&&l.width&&(s.style.width=`${window.UserLeap.windowDimensions.width}px`),(u=window.UserLeap.windowDimensions)!=null&&u.height&&(s.style.maxHeight=`${window.UserLeap.windowDimensions.height-20}px`),s.contentDocument&&(s.style.height=String(Wa(s.contentDocument))+"px")),H.emit(B.SurveyDimensions,{name:B.SurveyDimensions,contentFrameWidth:s.clientWidth,contentFrameHeight:s.clientHeight}))},logoutUser(){window.UserLeap.debugMode&&console.info("[DEBUG] Sprig logout"),window.UserLeap.visitorId=null,window.UserLeap.userId=null,window.UserLeap.partnerAnonymousId=null,window.UserLeap.token=null,window.UserLeap.email=null,_e.removeItem(ye.Credentials),_e.removeItem(ye.PageViews),window.UserLeap._queue.isPaused()&&window.UserLeap._queue.empty(),Ec(),ll(),window.UserLeap._queue.unpause()},teardown(){yg(),window.UserLeap("dismissActiveSurvey",Qe.API),delete window.UserLeap,delete window.Sprig,delete window._Sprig},integrateOptimizely(r,i=!0){var o,a;if(!((a=(o=window.UserLeap)==null?void 0:o._config)!=null&&a.optimizelyEnabled)){console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");return}try{const s=typeof r=="string"?JSON.parse(r):r;Zr.setOptimizelyExperiment(s,i)}catch(s){console.warn("[Sprig] Error with integrating Optimizely data"),s instanceof Error&&window.UserLeap.reportError("integrateOptimizely",s)}},integrateOptimizelyClient(r){var o,a;if(!((a=(o=window.UserLeap)==null?void 0:o._config)!=null&&a.optimizelyEnabled)){console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");return}const i=({experiment:s,variation:l})=>{const u={experiments:[{id:s.id,variation:l.key}]};window.UserLeap("integrateOptimizely",u,!1)};r.notificationCenter.addNotificationListener(Ef.NOTIFICATION_TYPES.ACTIVATE,i)},importLaunchDarklyData(r){var i,o;if(!((o=(i=window.UserLeap)==null?void 0:i._config)!=null&&o.launchDarklyEnabled)){console.warn("[SPRIG] LaunchDarkly integration is currently not enabled for your product.");return}ta.setLDFlagsVariations(r)},setVisitorAttribute(r,i){return console.warn("[Sprig] setVisitorAttribute is deprecated. Please use setAttribute"),n.setAttribute(r,i)},async setEmail(r){return n.setAttribute(Wn,r)},async setVisitorEmail(r){return console.warn("[Sprig] setVisitorEmail is deprecated. Please use setEmail"),n.setEmail(r)},async _generateVideoUploadUrl(r){return Tg(r)},async _completeSessionReplay({surveyId:r,responseGroupUuid:i,eventDigest:o}){if(!r||!i)return;const a=window.UserLeap._API_URL;try{await is({surveyId:r,responseGroupUuid:i,eventDigest:o,apiUrl:a,headers:Jt(window.UserLeap)},!0)}catch(s){console.warn("[Sprig] Error with completing session replay"),s instanceof Error&&window.UserLeap.reportError("completeSessionReplay",s)}}};Object.assign(window.UserLeap,n)};async function Ig(e){const t=Jt(window.UserLeap);document.addEventListener("securitypolicyviolation",Ci);const n=await Ze(ct("1",[$t],"config"),{headers:t}),r="TypeError";if(window.UserLeap.error=n.error,!n.ok&&n.error&&n.error.name===r?(window.UserLeap._API_URL="https://api.sprig.com",window.UserLeap.reportError("sprigDomainRequest",n.error)):document.removeEventListener("securitypolicyviolation",Ci),!n.ok)return n.reportError&&(console.warn("[Sprig] (ERR-422) Failed to load configuration",n.error),n.error&&window.UserLeap.reportError("applyRemoteConfig",n.error)),Si("Disabled: failed to fetch configuration"),e;const i=n.json;return i!=null&&i.disabled?(Si(`Disabled: ${i.disabled}`),{disabled:i.disabled}):Object.assign({},i,e)}async function kg(e,t,n={}){const r=window.__cfg&&window.__cfg.mode,i=ia(),o=window.UserLeap.envId,a=window.document.documentElement,s={mode:r,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:a.clientWidth,clientHeight:a.clientHeight,location:window.location.href,language:window.navigator.language,...n},l={action:e,err:{message:t.message,stack:t.stack},meta:s,vid:i,envId:o};(await St(ct("1",null,"errors"),{method:"POST",headers:{[Fe.Error]:window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(l)},0,!0)).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",t)}async function Tg(e){var n;if(!e)return;const t=`${window.UserLeap._API_URL}/2/environments/integrations/upload`;try{const r=await fetch(t,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(r.ok){const i=await r.json();return(n=i==null?void 0:i.upload)==null?void 0:n.url}else return null}catch(r){console.warn("[Sprig] Error with generating video upload url"),r instanceof Error&&window.UserLeap.reportError("generateVideoUploadUrl",r)}}function Lg(e={}){var r;const t=(r=new URLSearchParams(window.location.search).get(gc.Preview))!=null?r:"";window.UserLeap.UPDATES=Ka,window.UserLeap("setPreviewKey",t);async function n(){if(window.UserLeap.loaded)return;if(window.UserLeap.reportError=kg,window.UserLeap.loaded=!0,window.UserLeap._config=Object.assign({},e,window.UserLeap.config),window.UserLeap.delayingSurvey=!1,window.UserLeap._config&&typeof window.UserLeap._config=="object")for(const l in window.UserLeap._config)window.UserLeap[l]=window.UserLeap._config[l];if(!window.UserLeap.envId)if(window.UserLeap.appId)window.UserLeap.envId=window.UserLeap.appId;else throw new Error("Missing Environment id");window.UserLeap.debugMode&&console.info("[DEBUG] Sprig debug mode enabled");const i=window.UserLeap.sampleRate;if(i){let l=qt("sampled");if(l===null&&(l=Math.random()` +`+r).join("")):""}var Zr=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],En=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Zr),zs={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function et(e,t){this._e=De(),this.name=e,this.message=t}function ei(e,t){return e+". Errors: "+Object.keys(t).map(n=>t[n].toString()).filter((n,r,i)=>i.indexOf(n)===r).join(` +`)}function Ft(e,t,n,r){this._e=De(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=ei(e,t)}function pt(e,t){this._e=De(),this.name="BulkError",this.failures=Object.keys(t).map(n=>t[n]),this.failuresByPos=t,this.message=ei(e,t)}Xe(et).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Sn(this._e,2))}},toString:function(){return this.name+": "+this.message}}),Xe(Ft).from(et),Xe(pt).from(et);var Ln=En.reduce((e,t)=>(e[t]=t+"Error",e),{});const Gs=et;var x=En.reduce((e,t)=>{var n=t+"Error";function r(i,s){this._e=De(),this.name=n,i?typeof i=="string"?(this.message=`${i}${s?` + `+s:""}`,this.inner=s||null):typeof i=="object"&&(this.message=`${i.name} ${i.message}`,this.inner=i):(this.message=zs[t]||n,this.inner=null)}return Xe(r).from(Gs),e[t]=r,e},{});x.Syntax=SyntaxError,x.Type=TypeError,x.Range=RangeError;var ti=Zr.reduce((e,t)=>(e[t+"Error"]=x[t],e),{}),Mt=En.reduce((e,t)=>(["Syntax","Type","Range"].indexOf(t)===-1&&(e[t+"Error"]=x[t]),e),{});function T(){}function ft(e){return e}function Hs(e,t){return e==null||e===ft?t:function(n){return t(e(n))}}function Pe(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function Ys(e,t){return e===T?t:function(){var n=e.apply(this,arguments);n!==void 0&&(arguments[0]=n);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var s=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?Pe(r,this.onsuccess):r),i&&(this.onerror=this.onerror?Pe(i,this.onerror):i),s!==void 0?s:n}}function Js(e,t){return e===T?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Pe(n,this.onsuccess):n),r&&(this.onerror=this.onerror?Pe(r,this.onerror):r)}}function Qs(e,t){return e===T?t:function(n){var r=e.apply(this,arguments);G(n,r);var i=this.onsuccess,s=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?Pe(i,this.onsuccess):i),s&&(this.onerror=this.onerror?Pe(s,this.onerror):s),r===void 0?o===void 0?void 0:o:G(r,o)}}function Xs(e,t){return e===T?t:function(){return t.apply(this,arguments)!==!1&&e.apply(this,arguments)}}function kn(e,t){return e===T?t:function(){var n=e.apply(this,arguments);if(n&&typeof n.then=="function"){for(var r=this,i=arguments.length,s=new Array(i);i--;)s[i]=arguments[i];return n.then(function(){return t.apply(r,s)})}return t.apply(this,arguments)}}Mt.ModifyError=Ft,Mt.DexieError=et,Mt.BulkError=pt;var yt={};const ni=100,[In,$t,Un]=typeof Promise>"u"?[]:(()=>{let e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,ut(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,ut(t),e]})(),ri=$t&&$t.then,Vt=In&&In.constructor,xn=!!Un;var An=!1,Zs=Un?()=>{Un.then(Gt)}:j.setImmediate?setImmediate.bind(null,Gt):j.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{Gt(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Gt,0)},mt=function(e,t){gt.push([e,t]),qt&&(Zs(),qt=!1)},On=!0,qt=!0,Re=[],Wt=[],Dn=null,Pn=ft,tt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:pi,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{pi(e[0],e[1])}catch{}})}},U=tt,gt=[],Ce=0,zt=[];function k(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=T,this._lib=!1;var t=this._PSD=U;if(ae&&(this._stackHolder=De(),this._prev=null,this._numPrev=0),typeof e!="function"){if(e!==yt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Cn(this,this._value))}this._state=null,this._value=null,++t.ref,si(this,e)}const Rn={get:function(){var e=U,t=Jt;function n(r,i){var s=!e.global&&(e!==U||t!==Jt);const o=s&&!pe();var a=new k((l,u)=>{Tn(this,new ii(Xt(r,e,s,o),Xt(i,e,s,o),l,u,e))});return ae&&li(a,this),a}return n.prototype=yt,n},set:function(e){ue(this,"then",e&&e.prototype===yt?Rn:{get:function(){return e},set:Rn.set})}};function ii(e,t,n,r,i){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=n,this.reject=r,this.psd=i}function si(e,t){try{t(n=>{if(e._state===null){if(n===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&wt();n&&typeof n.then=="function"?si(e,(i,s)=>{n instanceof k?n._then(i,s):n.then(i,s)}):(e._state=!0,e._value=n,oi(e)),r&&vt()}},Cn.bind(null,e))}catch(n){Cn(e,n)}}function Cn(e,t){if(Wt.push(t),e._state===null){var n=e._lib&&wt();t=Pn(t),e._state=!1,e._value=t,ae&&t!==null&&typeof t=="object"&&!t._promise&&function(r,i,s){try{r.apply(null,s)}catch(o){i&&i(o)}}(()=>{var r=gn(t,"stack");t._promise=e,ue(t,"stack",{get:()=>An?r&&(r.get?r.get.apply(t):r.value):e.stack})}),function(r){Re.some(i=>i._value===r._value)||Re.push(r)}(e),oi(e),n&&vt()}}function oi(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n{--Ce==0&&Bn()},[]))}function Tn(e,t){if(e._state!==null){var n=e._state?t.onFulfilled:t.onRejected;if(n===null)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Ce,mt(eo,[n,e,t])}else e._listeners.push(t)}function eo(e,t,n){try{Dn=t;var r,i=t._value;t._state?r=e(i):(Wt.length&&(Wt=[]),r=e(i),Wt.indexOf(i)===-1&&function(s){for(var o=Re.length;o;)if(Re[--o]._value===s._value)return void Re.splice(o,1)}(t)),n.resolve(r)}catch(s){n.reject(s)}finally{Dn=null,--Ce==0&&Bn(),--n.psd.ref||n.psd.finalize()}}function ai(e,t,n){if(t.length===n)return t;var r="";if(e._state===!1){var i,s,o=e._value;o!=null?(i=o.name||"Error",s=o.message||o,r=Sn(o,0)):(i=o,s=""),t.push(i+(s?": "+s:"")+r)}return ae&&((r=Sn(e._stackHolder,2))&&t.indexOf(r)===-1&&t.push(r),e._prev&&ai(e._prev,t,n)),t}function li(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function Gt(){wt()&&vt()}function wt(){var e=On;return On=!1,qt=!1,e}function vt(){var e,t,n;do for(;gt.length>0;)for(e=gt,gt=[],n=e.length,t=0;t0);On=!0,qt=!0}function Bn(){var e=Re;Re=[],e.forEach(r=>{r._PSD.onunhandled.call(null,r._value,r)});for(var t=zt.slice(0),n=t.length;n;)t[--n]()}function Ht(e){return new k(yt,!1,e)}function K(e,t){var n=U;return function(){var r=wt(),i=U;try{return Se(n,!0),e.apply(this,arguments)}catch(s){t&&t(s)}finally{Se(i,!1),r&&vt()}}}Qe(k.prototype,{then:Rn,_then:function(e,t){Tn(this,new ii(null,null,e,t,U))},catch:function(e){if(arguments.length===1)return this.then(null,e);var t=arguments[0],n=arguments[1];return typeof t=="function"?this.then(null,r=>r instanceof t?n(r):Ht(r)):this.then(null,r=>r&&r.name===t?n(r):Ht(r))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),Ht(t)))},stack:{get:function(){if(this._stack)return this._stack;try{An=!0;var e=ai(this,[],20).join(` +From previous: `);return this._state!==null&&(this._stack=e),e}finally{An=!1}}},timeout:function(e,t){return e<1/0?new k((n,r)=>{var i=setTimeout(()=>r(new x.Timeout(t)),e);this.then(n,r).finally(clearTimeout.bind(null,i))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&ue(k.prototype,Symbol.toStringTag,"Dexie.Promise"),tt.env=ci(),Qe(k,{all:function(){var e=he.apply(null,arguments).map(Qt);return new k(function(t,n){e.length===0&&t([]);var r=e.length;e.forEach((i,s)=>k.resolve(i).then(o=>{e[s]=o,--r||t(e)},n))})},resolve:e=>{if(e instanceof k)return e;if(e&&typeof e.then=="function")return new k((n,r)=>{e.then(n,r)});var t=new k(yt,!0,e);return li(t,Dn),t},reject:Ht,race:function(){var e=he.apply(null,arguments).map(Qt);return new k((t,n)=>{e.map(r=>k.resolve(r).then(t,n))})},PSD:{get:()=>U,set:e=>U=e},totalEchoes:{get:()=>Jt},newPSD:_e,usePSD:rt,scheduler:{get:()=>mt,set:e=>{mt=e}},rejectionMapper:{get:()=>Pn,set:e=>{Pn=e}},follow:(e,t)=>new k((n,r)=>_e((i,s)=>{var o=U;o.unhandleds=[],o.onunhandled=s,o.finalize=Pe(function(){(function(a){function l(){a(),zt.splice(zt.indexOf(l),1)}zt.push(l),++Ce,mt(()=>{--Ce==0&&Bn()},[])})(()=>{this.unhandleds.length===0?i():s(this.unhandleds[0])})},o.finalize),e()},t,n,r))}),Vt&&(Vt.allSettled&&ue(k,"allSettled",function(){const e=he.apply(null,arguments).map(Qt);return new k(t=>{e.length===0&&t([]);let n=e.length;const r=new Array(n);e.forEach((i,s)=>k.resolve(i).then(o=>r[s]={status:"fulfilled",value:o},o=>r[s]={status:"rejected",reason:o}).then(()=>--n||t(r)))})}),Vt.any&&typeof AggregateError<"u"&&ue(k,"any",function(){const e=he.apply(null,arguments).map(Qt);return new k((t,n)=>{e.length===0&&n(new AggregateError([]));let r=e.length;const i=new Array(r);e.forEach((s,o)=>k.resolve(s).then(a=>t(a),a=>{i[o]=a,--r||n(new AggregateError(i))}))})}));const z={awaits:0,echoes:0,id:0};var to=0,Yt=[],jn=0,Jt=0,no=0;function _e(e,t,n,r){var i=U,s=Object.create(i);s.parent=i,s.ref=0,s.global=!1,s.id=++no;var o=tt.env;s.env=xn?{Promise:k,PromiseProp:{value:k,configurable:!0,writable:!0},all:k.all,race:k.race,allSettled:k.allSettled,any:k.any,resolve:k.resolve,reject:k.reject,nthen:di(o.nthen,s),gthen:di(o.gthen,s)}:{},t&&G(s,t),++i.ref,s.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=rt(s,e,n,r);return s.ref===0&&s.finalize(),a}function nt(){return z.id||(z.id=++to),++z.awaits,z.echoes+=ni,z.id}function pe(){return!!z.awaits&&(--z.awaits==0&&(z.id=0),z.echoes=z.awaits*ni,!0)}function Qt(e){return z.echoes&&e&&e.constructor===Vt?(nt(),e.then(t=>(pe(),t),t=>(pe(),F(t)))):e}function ro(e){++Jt,z.echoes&&--z.echoes!=0||(z.echoes=z.id=0),Yt.push(U),Se(e,!0)}function io(){var e=Yt[Yt.length-1];Yt.pop(),Se(e,!1)}function Se(e,t){var n=U;if((t?!z.echoes||jn++&&e===U:!jn||--jn&&e===U)||ui(t?ro.bind(null,e):io),e!==U&&(U=e,n===tt&&(tt.env=ci()),xn)){var r=tt.env.Promise,i=e.env;$t.then=i.nthen,r.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(j,"Promise",i.PromiseProp),r.all=i.all,r.race=i.race,r.resolve=i.resolve,r.reject=i.reject,i.allSettled&&(r.allSettled=i.allSettled),i.any&&(r.any=i.any))}}function ci(){var e=j.Promise;return xn?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(j,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:$t.then,gthen:e.prototype.then}:{}}function rt(e,t,n,r,i){var s=U;try{return Se(e,!0),t(n,r,i)}finally{Se(s,!1)}}function ui(e){ri.call(In,e)}function Xt(e,t,n,r){return typeof e!="function"?e:function(){var i=U;n&&nt(),Se(t,!0);try{return e.apply(this,arguments)}finally{Se(i,!1),r&&ui(pe)}}}function di(e,t){return function(n,r){return e.call(this,Xt(n,t),Xt(r,t))}}(""+ri).indexOf("[native code]")===-1&&(nt=pe=T);const hi="unhandledrejection";function pi(e,t){var n;try{n=t.onuncatched(e)}catch{}if(n!==!1)try{var r,i={promise:t,reason:e};if(j.document&&document.createEvent?((r=document.createEvent("Event")).initEvent(hi,!0,!0),G(r,i)):j.CustomEvent&&G(r=new CustomEvent(hi,{detail:i}),i),r&&j.dispatchEvent&&(dispatchEvent(r),!j.PromiseRejectionEvent&&j.onunhandledrejection))try{j.onunhandledrejection(r)}catch{}ae&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch{}}var F=k.reject;function Kn(e,t,n,r){if(e.idbdb&&(e._state.openComplete||U.letThrough||e._vip)){var i=e._createTransaction(t,n,e._dbSchema);try{i.create(),e._state.PR1398_maxLoop=3}catch(s){return s.name===Ln.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(()=>Kn(e,t,n,r))):F(s)}return i._promise(t,(s,o)=>_e(()=>(U.trans=i,r(s,o,i)))).then(s=>i._completion.then(()=>s))}if(e._state.openComplete)return F(new x.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return F(new x.DatabaseClosed);e.open().catch(T)}return e._state.dbReadyPromise.then(()=>Kn(e,t,n,r))}const fi="3.2.4",Te="ï¿¿",Nn=-1/0,fe="Invalid key provided. Keys must be of type string, number, Date or Array.",yi="String expected.",bt=[],Zt=typeof navigator<"u"&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),so=Zt,oo=Zt,mi=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),en="__dbnames",Fn="readonly",Mn="readwrite";function Be(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const gi={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function tn(e){return typeof e!="string"||/\./.test(e)?t=>t:t=>(t[e]===void 0&&e in t&&delete(t=ht(t))[e],t)}class ao{_trans(t,n,r){const i=this._tx||U.trans,s=this.name;function o(l,u,c){if(!c.schema[s])throw new x.NotFound("Table "+s+" not part of transaction");return n(c.idbtrans,c)}const a=wt();try{return i&&i.db===this.db?i===U.trans?i._promise(t,o,r):_e(()=>i._promise(t,o,r),{trans:i,transless:U.transless||U}):Kn(this.db,t,[this.name],o)}finally{a&&vt()}}get(t,n){return t&&t.constructor===Object?this.where(t).first(n):this._trans("readonly",r=>this.core.get({trans:r,key:t}).then(i=>this.hook.reading.fire(i))).then(n)}where(t){if(typeof t=="string")return new this.db.WhereClause(this,t);if(W(t))return new this.db.WhereClause(this,`[${t.join("+")}]`);const n=N(t);if(n.length===1)return this.where(n[0]).equals(t[n[0]]);const r=this.schema.indexes.concat(this.schema.primKey).filter(u=>u.compound&&n.every(c=>u.keyPath.indexOf(c)>=0)&&u.keyPath.every(c=>n.indexOf(c)>=0))[0];if(r&&this.db._maxKey!==Te)return this.where(r.name).equals(r.keyPath.map(u=>t[u]));!r&&ae&&console.warn(`The query ${JSON.stringify(t)} on ${this.name} would benefit of a compound index [${n.join("+")}]`);const{idxByName:i}=this.schema,s=this.db._deps.indexedDB;function o(u,c){try{return s.cmp(u,c)===0}catch{return!1}}const[a,l]=n.reduce(([u,c],h)=>{const d=i[h],p=t[h];return[u||d,u||!d?Be(c,d&&d.multi?g=>{const y=de(g,h);return W(y)&&y.some(w=>o(p,w))}:g=>o(p,de(g,h))):c]},[null,null]);return a?this.where(a.name).equals(t[a.keyPath]).filter(l):r?this.filter(l):this.where(n).equals("")}filter(t){return this.toCollection().and(t)}count(t){return this.toCollection().count(t)}offset(t){return this.toCollection().offset(t)}limit(t){return this.toCollection().limit(t)}each(t){return this.toCollection().each(t)}toArray(t){return this.toCollection().toArray(t)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(t){return new this.db.Collection(new this.db.WhereClause(this,W(t)?`[${t.join("+")}]`:t))}reverse(){return this.toCollection().reverse()}mapToClass(t){this.schema.mappedClass=t;const n=r=>{if(!r)return r;const i=Object.create(t.prototype);for(var s in r)if(Z(r,s))try{i[s]=r[s]}catch{}return i};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=n,this.hook("reading",n),t}defineClass(){return this.mapToClass(function(t){G(this,t)})}add(t,n){const{auto:r,keyPath:i}=this.schema.primKey;let s=t;return i&&r&&(s=tn(i)(t)),this._trans("readwrite",o=>this.core.mutate({trans:o,type:"add",keys:n!=null?[n]:null,values:[s]})).then(o=>o.numFailures?k.reject(o.failures[0]):o.lastResult).then(o=>{if(i)try{ne(t,i,o)}catch{}return o})}update(t,n){if(typeof t!="object"||W(t))return this.where(":id").equals(t).modify(n);{const r=de(t,this.schema.primKey.keyPath);if(r===void 0)return F(new x.InvalidArgument("Given object does not contain its primary key"));try{typeof n!="function"?N(n).forEach(i=>{ne(t,i,n[i])}):n(t,{value:t,primKey:r})}catch{}return this.where(":id").equals(r).modify(n)}}put(t,n){const{auto:r,keyPath:i}=this.schema.primKey;let s=t;return i&&r&&(s=tn(i)(t)),this._trans("readwrite",o=>this.core.mutate({trans:o,type:"put",values:[s],keys:n!=null?[n]:null})).then(o=>o.numFailures?k.reject(o.failures[0]):o.lastResult).then(o=>{if(i)try{ne(t,i,o)}catch{}return o})}delete(t){return this._trans("readwrite",n=>this.core.mutate({trans:n,type:"delete",keys:[t]})).then(n=>n.numFailures?k.reject(n.failures[0]):void 0)}clear(){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"deleteRange",range:gi})).then(t=>t.numFailures?k.reject(t.failures[0]):void 0)}bulkGet(t){return this._trans("readonly",n=>this.core.getMany({keys:t,trans:n}).then(r=>r.map(i=>this.hook.reading.fire(i))))}bulkAdd(t,n,r){const i=Array.isArray(n)?n:void 0,s=(r=r||(i?void 0:n))?r.allKeys:void 0;return this._trans("readwrite",o=>{const{auto:a,keyPath:l}=this.schema.primKey;if(l&&i)throw new x.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(i&&i.length!==t.length)throw new x.InvalidArgument("Arguments objects and keys must have the same length");const u=t.length;let c=l&&a?t.map(tn(l)):t;return this.core.mutate({trans:o,type:"add",keys:i,values:c,wantResults:s}).then(({numFailures:h,results:d,lastResult:p,failures:g})=>{if(h===0)return s?d:p;throw new pt(`${this.name}.bulkAdd(): ${h} of ${u} operations failed`,g)})})}bulkPut(t,n,r){const i=Array.isArray(n)?n:void 0,s=(r=r||(i?void 0:n))?r.allKeys:void 0;return this._trans("readwrite",o=>{const{auto:a,keyPath:l}=this.schema.primKey;if(l&&i)throw new x.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(i&&i.length!==t.length)throw new x.InvalidArgument("Arguments objects and keys must have the same length");const u=t.length;let c=l&&a?t.map(tn(l)):t;return this.core.mutate({trans:o,type:"put",keys:i,values:c,wantResults:s}).then(({numFailures:h,results:d,lastResult:p,failures:g})=>{if(h===0)return s?d:p;throw new pt(`${this.name}.bulkPut(): ${h} of ${u} operations failed`,g)})})}bulkDelete(t){const n=t.length;return this._trans("readwrite",r=>this.core.mutate({trans:r,type:"delete",keys:t})).then(({numFailures:r,lastResult:i,failures:s})=>{if(r===0)return i;throw new pt(`${this.name}.bulkDelete(): ${r} of ${n} operations failed`,s)})}}function _t(e){var t={},n=function(o,a){if(a){for(var l=arguments.length,u=new Array(l-1);--l;)u[l-1]=arguments[l];return t[o].subscribe.apply(null,u),e}if(typeof o=="string")return t[o]};n.addEventType=s;for(var r=1,i=arguments.length;rBe(r(),t()):t,e.justLimit=n&&!r}function nn(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new x.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function wi(e,t,n){const r=nn(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:e.dir==="prev",unique:!!e.unique,query:{index:r,range:e.range}})}function rn(e,t,n,r){const i=e.replayFilter?Be(e.filter,e.replayFilter()):e.filter;if(e.or){const s={},o=(a,l,u)=>{if(!i||i(l,u,d=>l.stop(d),d=>l.fail(d))){var c=l.primaryKey,h=""+c;h==="[object ArrayBuffer]"&&(h=""+new Uint8Array(c)),Z(s,h)||(s[h]=!0,t(a,l,u))}};return Promise.all([e.or._iterate(o,n),vi(wi(e,r,n),e.algorithm,o,!e.keysOnly&&e.valueMapper)])}return vi(wi(e,r,n),Be(e.algorithm,i),t,!e.keysOnly&&e.valueMapper)}function vi(e,t,n,r){var i=K(r?(s,o,a)=>n(r(s),o,a):n);return e.then(s=>{if(s)return s.start(()=>{var o=()=>s.continue();t&&!t(s,a=>o=a,a=>{s.stop(a),o=T},a=>{s.fail(a),o=T})||i(s.value,s,a=>o=a),o()})})}function H(e,t){try{const n=bi(e),r=bi(t);if(n!==r)return n==="Array"?1:r==="Array"?-1:n==="binary"?1:r==="binary"?-1:n==="string"?1:r==="string"?-1:n==="Date"?1:r!=="Date"?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:ern(n,t,r,n.table.core))}count(t){return this._read(n=>{const r=this._ctx,i=r.table.core;if(it(r,!0))return i.count({trans:n,query:{index:nn(r,i.schema),range:r.range}}).then(o=>Math.min(o,r.limit));var s=0;return rn(r,()=>(++s,!1),n,i).then(()=>s)}).then(t)}sortBy(t,n){const r=t.split(".").reverse(),i=r[0],s=r.length-1;function o(u,c){return c?o(u[r[c]],c-1):u[i]}var a=this._ctx.dir==="next"?1:-1;function l(u,c){var h=o(u,s),d=o(c,s);return hd?a:0}return this.toArray(function(u){return u.sort(l)}).then(n)}toArray(t){return this._read(n=>{var r=this._ctx;if(r.dir==="next"&&it(r,!0)&&r.limit>0){const{valueMapper:i}=r,s=nn(r,r.table.core.schema);return r.table.core.query({trans:n,limit:r.limit,values:!0,query:{index:s,range:r.range}}).then(({result:o})=>i?o.map(i):o)}{const i=[];return rn(r,s=>i.push(s),n,r.table.core).then(()=>i)}},t)}offset(t){var n=this._ctx;return t<=0||(n.offset+=t,it(n)?Vn(n,()=>{var r=t;return(i,s)=>r===0||(r===1?(--r,!1):(s(()=>{i.advance(r),r=0}),!1))}):Vn(n,()=>{var r=t;return()=>--r<0})),this}limit(t){return this._ctx.limit=Math.min(this._ctx.limit,t),Vn(this._ctx,()=>{var n=t;return function(r,i,s){return--n<=0&&i(s),n>=0}},!0),this}until(t,n){return $n(this._ctx,function(r,i,s){return!t(r.value)||(i(s),n)}),this}first(t){return this.limit(1).toArray(function(n){return n[0]}).then(t)}last(t){return this.reverse().first(t)}filter(t){var n,r;return $n(this._ctx,function(i){return t(i.value)}),n=this._ctx,r=t,n.isMatch=Be(n.isMatch,r),this}and(t){return this.filter(t)}or(t){return new this.db.WhereClause(this._ctx.table,t,this)}reverse(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,i){t(i.key,i)})}eachUniqueKey(t){return this._ctx.unique="unique",this.eachKey(t)}eachPrimaryKey(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,i){t(i.primaryKey,i)})}keys(t){var n=this._ctx;n.keysOnly=!n.isMatch;var r=[];return this.each(function(i,s){r.push(s.key)}).then(function(){return r}).then(t)}primaryKeys(t){var n=this._ctx;if(n.dir==="next"&&it(n,!0)&&n.limit>0)return this._read(i=>{var s=nn(n,n.table.core.schema);return n.table.core.query({trans:i,values:!1,limit:n.limit,query:{index:s,range:n.range}})}).then(({result:i})=>i).then(t);n.keysOnly=!n.isMatch;var r=[];return this.each(function(i,s){r.push(s.primaryKey)}).then(function(){return r}).then(t)}uniqueKeys(t){return this._ctx.unique="unique",this.keys(t)}firstKey(t){return this.limit(1).keys(function(n){return n[0]}).then(t)}lastKey(t){return this.reverse().firstKey(t)}distinct(){var t=this._ctx,n=t.index&&t.table.schema.idxByName[t.index];if(!n||!n.multi)return this;var r={};return $n(this._ctx,function(i){var s=i.primaryKey.toString(),o=Z(r,s);return r[s]=!0,!o}),this}modify(t){var n=this._ctx;return this._write(r=>{var i;if(typeof t=="function")i=t;else{var s=N(t),o=s.length;i=function(y){for(var w=!1,m=0;m{const{failures:m,numFailures:f}=w;d+=y-f;for(let v of N(m))h.push(m[v])};return this.clone().primaryKeys().then(y=>{const w=m=>{const f=Math.min(c,y.length-m);return a.getMany({trans:r,keys:y.slice(m,m+f),cache:"immutable"}).then(v=>{const b=[],_=[],E=l?[]:null,S=[];for(let L=0;L0&&a.mutate({trans:r,type:"add",values:b}).then(L=>{for(let B in L.failures)S.splice(parseInt(B),1);g(b.length,L)})).then(()=>(_.length>0||O&&typeof t=="object")&&a.mutate({trans:r,type:"put",keys:E,values:_,criteria:O,changeSpec:typeof t!="function"&&t}).then(L=>g(_.length,L))).then(()=>(S.length>0||O&&t===qn)&&a.mutate({trans:r,type:"delete",keys:S,criteria:O}).then(L=>g(S.length,L))).then(()=>y.length>m+f&&w(m+c))})};return w(0).then(()=>{if(h.length>0)throw new Ft("Error modifying one or more objects",h,d,p);return y.length})})})}delete(){var t=this._ctx,n=t.range;return it(t)&&(t.isPrimKey&&!oo||n.type===3)?this._write(r=>{const{primaryKey:i}=t.table.core.schema,s=n;return t.table.core.count({trans:r,query:{index:i,range:s}}).then(o=>t.table.core.mutate({trans:r,type:"deleteRange",range:s}).then(({failures:a,lastResult:l,results:u,numFailures:c})=>{if(c)throw new Ft("Could not delete some values",Object.keys(a).map(h=>a[h]),o-c);return o-c}))}):this.modify(qn)}}const qn=(e,t)=>t.value=null;function co(e,t){return et?-1:e===t?0:1}function ee(e,t,n){var r=e instanceof Ei?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function st(e){return new e.Collection(e,()=>Si("")).limit(0)}function ho(e,t,n,r,i,s){for(var o=Math.min(e.length,r.length),a=-1,l=0;l=0?e.substr(0,a)+t[a]+n.substr(a+1):null;i(e[l],u)<0&&(a=l)}return otypeof y=="string"))return ee(e,yi);function d(y){i=function(m){return m==="next"?f=>f.toUpperCase():f=>f.toLowerCase()}(y),s=function(m){return m==="next"?f=>f.toLowerCase():f=>f.toUpperCase()}(y),o=y==="next"?co:uo;var w=n.map(function(m){return{lower:s(m),upper:i(m)}}).sort(function(m,f){return o(m.lower,f.lower)});a=w.map(function(m){return m.upper}),l=w.map(function(m){return m.lower}),u=y,c=y==="next"?"":r}d("next");var p=new e.Collection(e,()=>Ee(a[0],l[h-1]+r));p._ondirectionchange=function(y){d(y)};var g=0;return p._addAlgorithm(function(y,w,m){var f=y.key;if(typeof f!="string")return!1;var v=s(f);if(t(v,l,g))return!0;for(var b=null,_=g;_0)&&(b=E)}return w(b!==null?function(){y.continue(b+c)}:m),!1}),p}function Ee(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Si(e){return{type:1,lower:e,upper:e}}class Ei{get Collection(){return this._ctx.table.db.Collection}between(t,n,r,i){r=r!==!1,i=i===!0;try{return this._cmp(t,n)>0||this._cmp(t,n)===0&&(r||i)&&(!r||!i)?st(this):new this.Collection(this,()=>Ee(t,n,!r,!i))}catch{return ee(this,fe)}}equals(t){return t==null?ee(this,fe):new this.Collection(this,()=>Si(t))}above(t){return t==null?ee(this,fe):new this.Collection(this,()=>Ee(t,void 0,!0))}aboveOrEqual(t){return t==null?ee(this,fe):new this.Collection(this,()=>Ee(t,void 0,!1))}below(t){return t==null?ee(this,fe):new this.Collection(this,()=>Ee(void 0,t,!1,!0))}belowOrEqual(t){return t==null?ee(this,fe):new this.Collection(this,()=>Ee(void 0,t))}startsWith(t){return typeof t!="string"?ee(this,yi):this.between(t,t+Te,!0,!0)}startsWithIgnoreCase(t){return t===""?this.startsWith(t):sn(this,(n,r)=>n.indexOf(r[0])===0,[t],Te)}equalsIgnoreCase(t){return sn(this,(n,r)=>n===r[0],[t],"")}anyOfIgnoreCase(){var t=he.apply(Ze,arguments);return t.length===0?st(this):sn(this,(n,r)=>r.indexOf(n)!==-1,t,"")}startsWithAnyOfIgnoreCase(){var t=he.apply(Ze,arguments);return t.length===0?st(this):sn(this,(n,r)=>r.some(i=>n.indexOf(i)===0),t,Te)}anyOf(){const t=he.apply(Ze,arguments);let n=this._cmp;try{t.sort(n)}catch{return ee(this,fe)}if(t.length===0)return st(this);const r=new this.Collection(this,()=>Ee(t[0],t[t.length-1]));r._ondirectionchange=s=>{n=s==="next"?this._ascending:this._descending,t.sort(n)};let i=0;return r._addAlgorithm((s,o,a)=>{const l=s.key;for(;n(l,t[i])>0;)if(++i,i===t.length)return o(a),!1;return n(l,t[i])===0||(o(()=>{s.continue(t[i])}),!1)}),r}notEqual(t){return this.inAnyRange([[Nn,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const t=he.apply(Ze,arguments);if(t.length===0)return new this.Collection(this);try{t.sort(this._ascending)}catch{return ee(this,fe)}const n=t.reduce((r,i)=>r?r.concat([[r[r.length-1][1],i]]):[[Nn,i]],null);return n.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(n,{includeLowers:!1,includeUppers:!1})}inAnyRange(t,n){const r=this._cmp,i=this._ascending,s=this._descending,o=this._min,a=this._max;if(t.length===0)return st(this);if(!t.every(f=>f[0]!==void 0&&f[1]!==void 0&&i(f[0],f[1])<=0))return ee(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",x.InvalidArgument);const l=!n||n.includeLowers!==!1,u=n&&n.includeUppers===!0;let c,h=i;function d(f,v){return h(f[0],v[0])}try{c=t.reduce(function(f,v){let b=0,_=f.length;for(;b<_;++b){const E=f[b];if(r(v[0],E[1])<0&&r(v[1],E[0])>0){E[0]=o(E[0],v[0]),E[1]=a(E[1],v[1]);break}}return b===_&&f.push(v),f},[]),c.sort(d)}catch{return ee(this,fe)}let p=0;const g=u?f=>i(f,c[p][1])>0:f=>i(f,c[p][1])>=0,y=l?f=>s(f,c[p][0])>0:f=>s(f,c[p][0])>=0;let w=g;const m=new this.Collection(this,()=>Ee(c[0][0],c[c.length-1][1],!l,!u));return m._ondirectionchange=f=>{f==="next"?(w=g,h=i):(w=y,h=s),c.sort(d)},m._addAlgorithm((f,v,b)=>{for(var _=f.key;w(_);)if(++p,p===c.length)return v(b),!1;return!!function(E){return!g(E)&&!y(E)}(_)||(this._cmp(_,c[p][1])===0||this._cmp(_,c[p][0])===0||v(()=>{h===i?f.continue(c[p][0]):f.continue(c[p][1])}),!1)}),m}startsWithAnyOf(){const t=he.apply(Ze,arguments);return t.every(n=>typeof n=="string")?t.length===0?st(this):this.inAnyRange(t.map(n=>[n,n+Te])):ee(this,"startsWithAnyOf() only works with strings")}}function le(e){return K(function(t){return Et(t),e(t.target.error),!1})}function Et(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const Lt="storagemutated",Le="x-storagemutated-1",ke=_t(null,Lt);class po{_lock(){return dt(!U.global),++this._reculock,this._reculock!==1||U.global||(U.lockOwnerFor=this),this}_unlock(){if(dt(!U.global),--this._reculock==0)for(U.global||(U.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{rt(t[1],t[0])}catch{}}return this}_locked(){return this._reculock&&U.lockOwnerFor!==this}create(t){if(!this.mode)return this;const n=this.db.idbdb,r=this.db._state.dbOpenError;if(dt(!this.idbtrans),!t&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new x.DatabaseClosed(r);case"MissingAPIError":throw new x.MissingAPI(r.message,r);default:throw new x.OpenFailed(r)}if(!this.active)throw new x.TransactionInactive;return dt(this._completion._state===null),(t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=K(i=>{Et(i),this._reject(t.error)}),t.onabort=K(i=>{Et(i),this.active&&this._reject(new x.Abort(t.error)),this.active=!1,this.on("abort").fire(i)}),t.oncomplete=K(()=>{this.active=!1,this._resolve(),"mutatedParts"in t&&ke.storagemutated.fire(t.mutatedParts)}),this}_promise(t,n,r){if(t==="readwrite"&&this.mode!=="readwrite")return F(new x.ReadOnly("Transaction is readonly"));if(!this.active)return F(new x.TransactionInactive);if(this._locked())return new k((s,o)=>{this._blockedFuncs.push([()=>{this._promise(t,n,r).then(s,o)},U])});if(r)return _e(()=>{var s=new k((o,a)=>{this._lock();const l=n(o,a,this);l&&l.then&&l.then(o,a)});return s.finally(()=>this._unlock()),s._lib=!0,s});var i=new k((s,o)=>{var a=n(s,o,this);a&&a.then&&a.then(s,o)});return i._lib=!0,i}_root(){return this.parent?this.parent._root():this}waitFor(t){var n=this._root();const r=k.resolve(t);if(n._waitingFor)n._waitingFor=n._waitingFor.then(()=>r);else{n._waitingFor=r,n._waitingQueue=[];var i=n.idbtrans.objectStore(n.storeNames[0]);(function o(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(i.get(-1/0).onsuccess=o)})()}var s=n._waitingFor;return new k((o,a)=>{r.then(l=>n._waitingQueue.push(K(o.bind(null,l))),l=>n._waitingQueue.push(K(a.bind(null,l)))).finally(()=>{n._waitingFor===s&&(n._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new x.Abort))}table(t){const n=this._memoizedTables||(this._memoizedTables={});if(Z(n,t))return n[t];const r=this.schema[t];if(!r)throw new x.NotFound("Table "+t+" not part of transaction");const i=new this.db.Table(t,r,this);return i.core=this.db.core.table(t),n[t]=i,i}}function Wn(e,t,n,r,i,s,o){return{name:e,keyPath:t,unique:n,multi:r,auto:i,compound:s,src:(n&&!o?"&":"")+(r?"*":"")+(i?"++":"")+Li(t)}}function Li(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function ki(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:Gr(n,r=>[r.name,r])}}let kt=e=>{try{return e.only([[]]),kt=()=>[[]],[[]]}catch{return kt=()=>Te,Te}};function zn(e){return e==null?()=>{}:typeof e=="string"?function(t){return t.split(".").length===1?r=>r[t]:r=>de(r,t)}(e):t=>de(t,e)}function Ii(e){return[].slice.call(e)}let fo=0;function It(e){return e==null?":id":typeof e=="string"?e:`[${e.join("+")}]`}function yo(e,t,n){function r(l){if(l.type===3)return null;if(l.type===4)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:u,upper:c,lowerOpen:h,upperOpen:d}=l;return u===void 0?c===void 0?null:t.upperBound(c,!!d):c===void 0?t.lowerBound(u,!!h):t.bound(u,c,!!h,!!d)}const{schema:i,hasGetAll:s}=function(l,u){const c=Ii(l.objectStoreNames);return{schema:{name:l.name,tables:c.map(h=>u.objectStore(h)).map(h=>{const{keyPath:d,autoIncrement:p}=h,g=W(d),y=d==null,w={},m={name:h.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:y,compound:g,keyPath:d,autoIncrement:p,unique:!0,extractKey:zn(d)},indexes:Ii(h.indexNames).map(f=>h.index(f)).map(f=>{const{name:v,unique:b,multiEntry:_,keyPath:E}=f,S={name:v,compound:W(E),keyPath:E,unique:b,multiEntry:_,extractKey:zn(E)};return w[It(E)]=S,S}),getIndexByKeyPath:f=>w[It(f)]};return w[":id"]=m.primaryKey,d!=null&&(w[It(d)]=m.primaryKey),m})},hasGetAll:c.length>0&&"getAll"in u.objectStore(c[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),o=i.tables.map(l=>function(u){const c=u.name;return{name:c,schema:u,mutate:function({trans:h,type:d,keys:p,values:g,range:y}){return new Promise((w,m)=>{w=K(w);const f=h.objectStore(c),v=f.keyPath==null,b=d==="put"||d==="add";if(!b&&d!=="delete"&&d!=="deleteRange")throw new Error("Invalid operation type: "+d);const{length:_}=p||g||{length:1};if(p&&g&&p.length!==g.length)throw new Error("Given keys array must have same length as given values array.");if(_===0)return w({numFailures:0,failures:{},results:[],lastResult:void 0});let E;const S=[],O=[];let L=0;const B=$=>{++L,Et($)};if(d==="deleteRange"){if(y.type===4)return w({numFailures:L,failures:O,results:[],lastResult:void 0});y.type===3?S.push(E=f.clear()):S.push(E=f.delete(r(y)))}else{const[$,M]=b?v?[g,p]:[g,null]:[p,null];if(b)for(let A=0;A<_;++A)S.push(E=M&&M[A]!==void 0?f[d]($[A],M[A]):f[d]($[A])),E.onerror=B;else for(let A=0;A<_;++A)S.push(E=f[d]($[A])),E.onerror=B}const R=$=>{const M=$.target.result;S.forEach((A,xe)=>A.error!=null&&(O[xe]=A.error)),w({numFailures:L,failures:O,results:d==="delete"?p:S.map(A=>A.result),lastResult:M})};E.onerror=$=>{B($),R($)},E.onsuccess=R})},getMany:({trans:h,keys:d})=>new Promise((p,g)=>{p=K(p);const y=h.objectStore(c),w=d.length,m=new Array(w);let f,v=0,b=0;const _=S=>{const O=S.target;m[O._pos]=O.result,++b===v&&p(m)},E=le(g);for(let S=0;Snew Promise((p,g)=>{p=K(p);const y=h.objectStore(c).get(d);y.onsuccess=w=>p(w.target.result),y.onerror=le(g)}),query:function(h){return d=>new Promise((p,g)=>{p=K(p);const{trans:y,values:w,limit:m,query:f}=d,v=m===1/0?void 0:m,{index:b,range:_}=f,E=y.objectStore(c),S=b.isPrimaryKey?E:E.index(b.name),O=r(_);if(m===0)return p({result:[]});if(h){const L=w?S.getAll(O,v):S.getAllKeys(O,v);L.onsuccess=B=>p({result:B.target.result}),L.onerror=le(g)}else{let L=0;const B=w||!("openKeyCursor"in S)?S.openCursor(O):S.openKeyCursor(O),R=[];B.onsuccess=$=>{const M=B.result;return M?(R.push(w?M.value:M.primaryKey),++L===m?p({result:R}):void M.continue()):p({result:R})},B.onerror=le(g)}})}(s),openCursor:function({trans:h,values:d,query:p,reverse:g,unique:y}){return new Promise((w,m)=>{w=K(w);const{index:f,range:v}=p,b=h.objectStore(c),_=f.isPrimaryKey?b:b.index(f.name),E=g?y?"prevunique":"prev":y?"nextunique":"next",S=d||!("openKeyCursor"in _)?_.openCursor(r(v),E):_.openKeyCursor(r(v),E);S.onerror=le(m),S.onsuccess=K(O=>{const L=S.result;if(!L)return void w(null);L.___id=++fo,L.done=!1;const B=L.continue.bind(L);let R=L.continuePrimaryKey;R&&(R=R.bind(L));const $=L.advance.bind(L),M=()=>{throw new Error("Cursor not stopped")};L.trans=h,L.stop=L.continue=L.continuePrimaryKey=L.advance=()=>{throw new Error("Cursor not started")},L.fail=K(m),L.next=function(){let A=1;return this.start(()=>A--?this.continue():this.stop()).then(()=>this)},L.start=A=>{const xe=new Promise((J,qe)=>{J=K(J),S.onerror=le(qe),L.fail=qe,L.stop=Ot=>{L.stop=L.continue=L.continuePrimaryKey=L.advance=M,J(Ot)}}),at=()=>{if(S.result)try{A()}catch(J){L.fail(J)}else L.done=!0,L.start=()=>{throw new Error("Cursor behind last entry")},L.stop()};return S.onsuccess=K(J=>{S.onsuccess=at,at()}),L.continue=B,L.continuePrimaryKey=R,L.advance=$,at(),xe},w(L)},m)})},count({query:h,trans:d}){const{index:p,range:g}=h;return new Promise((y,w)=>{const m=d.objectStore(c),f=p.isPrimaryKey?m:m.index(p.name),v=r(g),b=v?f.count(v):f.count();b.onsuccess=K(_=>y(_.target.result)),b.onerror=le(w)})}}}(l)),a={};return o.forEach(l=>a[l.name]=l),{stack:"dbcore",transaction:e.transaction.bind(e),table(l){if(!a[l])throw new Error(`Table '${l}' not found`);return a[l]},MIN_KEY:-1/0,MAX_KEY:kt(t),schema:i}}function Gn({_novip:e},t){const n=t.db,r=function(i,s,{IDBKeyRange:o,indexedDB:a},l){return{dbcore:function(c,h){return h.reduce((d,{create:p})=>({...d,...p(d)}),c)}(yo(s,o,l),i.dbcore)}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach(i=>{const s=i.name;e.core.schema.tables.some(o=>o.name===s)&&(i.core=e.core.table(s),e[s]instanceof e.Table&&(e[s].core=i.core))})}function on({_novip:e},t,n,r){n.forEach(i=>{const s=r[i];t.forEach(o=>{const a=gn(o,i);(!a||"value"in a&&a.value===void 0)&&(o===e.Transaction.prototype||o instanceof e.Transaction?ue(o,i,{get(){return this.table(i)},set(l){qr(this,i,{value:l,writable:!0,configurable:!0,enumerable:!0})}}):o[i]=new e.Table(i,s))})})}function Hn({_novip:e},t){t.forEach(n=>{for(let r in n)n[r]instanceof e.Table&&delete n[r]})}function mo(e,t){return e._cfg.version-t._cfg.version}function go(e,t,n,r){const i=e._dbSchema,s=e._createTransaction("readwrite",e._storeNames,i);s.create(n),s._completion.catch(r);const o=s._reject.bind(s),a=U.transless||U;_e(()=>{U.trans=s,U.transless=a,t===0?(N(i).forEach(l=>{Yn(n,l,i[l].primKey,i[l].indexes)}),Gn(e,n),k.follow(()=>e.on.populate.fire(s)).catch(o)):function({_novip:l},u,c,h){const d=[],p=l._versions;let g=l._dbSchema=Qn(l,l.idbdb,h),y=!1;const w=p.filter(f=>f._cfg.version>=u);function m(){return d.length?k.resolve(d.shift()(c.idbtrans)).then(m):k.resolve()}return w.forEach(f=>{d.push(()=>{const v=g,b=f._cfg.dbschema;Xn(l,v,h),Xn(l,b,h),g=l._dbSchema=b;const _=Ui(v,b);_.add.forEach(S=>{Yn(h,S[0],S[1].primKey,S[1].indexes)}),_.change.forEach(S=>{if(S.recreate)throw new x.Upgrade("Not yet support for changing primary key");{const O=h.objectStore(S.name);S.add.forEach(L=>Jn(O,L)),S.change.forEach(L=>{O.deleteIndex(L.name),Jn(O,L)}),S.del.forEach(L=>O.deleteIndex(L))}});const E=f._cfg.contentUpgrade;if(E&&f._cfg.version>u){Gn(l,h),c._memoizedTables={},y=!0;let S=Hr(b);_.del.forEach(R=>{S[R]=v[R]}),Hn(l,[l.Transaction.prototype]),on(l,[l.Transaction.prototype],N(S),S),c.schema=S;const O=_n(E);let L;O&&nt();const B=k.follow(()=>{if(L=E(c),L&&O){var R=pe.bind(null,null);L.then(R,R)}});return L&&typeof L.then=="function"?k.resolve(L):B.then(()=>L)}}),d.push(v=>{(!y||!so)&&function(b,_){[].slice.call(_.db.objectStoreNames).forEach(E=>b[E]==null&&_.db.deleteObjectStore(E))}(f._cfg.dbschema,v),Hn(l,[l.Transaction.prototype]),on(l,[l.Transaction.prototype],l._storeNames,l._dbSchema),c.schema=l._dbSchema})}),m().then(()=>{var f,v;v=h,N(f=g).forEach(b=>{v.db.objectStoreNames.contains(b)||Yn(v,b,f[b].primKey,f[b].indexes)})})}(e,t,s,n).catch(o)})}function Ui(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const i=e[r],s=t[r];if(i){const o={name:r,def:s,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(s.primKey.keyPath||"")||i.primKey.auto!==s.primKey.auto&&!Zt)o.recreate=!0,n.change.push(o);else{const a=i.idxByName,l=s.idxByName;let u;for(u in a)l[u]||o.del.push(u);for(u in l){const c=a[u],h=l[u];c?c.src!==h.src&&o.change.push(h):o.add.push(h)}(o.del.length>0||o.add.length>0||o.change.length>0)&&n.change.push(o)}}else n.add.push([r,s])}return n}function Yn(e,t,n,r){const i=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach(s=>Jn(i,s)),i}function Jn(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Qn(e,t,n){const r={};return Nt(t.objectStoreNames,0).forEach(i=>{const s=n.objectStore(i);let o=s.keyPath;const a=Wn(Li(o),o||"",!1,!1,!!s.autoIncrement,o&&typeof o!="string",!0),l=[];for(let c=0;c{if(t[r]!==null){var i=t[r].split(",").map((o,a)=>{const l=(o=o.trim()).replace(/([&*]|\+\+)/g,""),u=/^\[/.test(l)?l.match(/^\[(.*)\]$/)[1].split("+"):l;return Wn(l,u||null,/\&/.test(o),/\*/.test(o),/\+\+/.test(o),W(u),a===0)}),s=i.shift();if(s.multi)throw new x.Schema("Primary key cannot be multi-valued");i.forEach(o=>{if(o.auto)throw new x.Schema("Only primary key can be marked as autoIncrement (++)");if(!o.keyPath)throw new x.Schema("Index must have a name and cannot be an empty string")}),n[r]=ki(r,s,i)}})}stores(t){const n=this.db;this._cfg.storesSource=this._cfg.storesSource?G(this._cfg.storesSource,t):t;const r=n._versions,i={};let s={};return r.forEach(o=>{G(i,o._cfg.storesSource),s=o._cfg.dbschema={},o._parseStoresSpec(i,s)}),n._dbSchema=s,Hn(n,[n._allTables,n,n.Transaction.prototype]),on(n,[n._allTables,n,n.Transaction.prototype,this._cfg.tables],N(s),s),n._storeNames=N(s),this}upgrade(t){return this._cfg.contentUpgrade=kn(this._cfg.contentUpgrade||T,t),this}}function Zn(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new je(en,{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function er(e){return e&&typeof e.databases=="function"}function tr(e){return _e(function(){return U.letThrough=!0,e()})}function vo(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()}).finally(function(){return clearInterval(e)}):Promise.resolve()}function bo(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(()=>t.dbOpenError?F(t.dbOpenError):e);ae&&(t.openCanceller._stackHolder=De()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function i(){if(t.openCanceller!==r)throw new x.DatabaseClosed("db.open() was cancelled")}let s=t.dbReadyResolve,o=null,a=!1;return k.race([r,(typeof navigator>"u"?k.resolve():vo()).then(()=>new k((l,u)=>{if(i(),!n)throw new x.MissingAPI;const c=e.name,h=t.autoSchema?n.open(c):n.open(c,Math.round(10*e.verno));if(!h)throw new x.MissingAPI;h.onerror=le(u),h.onblocked=K(e._fireOnBlocked),h.onupgradeneeded=K(d=>{if(o=h.transaction,t.autoSchema&&!e._options.allowEmptyDB){h.onerror=Et,o.abort(),h.result.close();const g=n.deleteDatabase(c);g.onsuccess=g.onerror=K(()=>{u(new x.NoSuchDatabase(`Database ${c} doesnt exist`))})}else{o.onerror=le(u);var p=d.oldVersion>Math.pow(2,62)?0:d.oldVersion;a=p<1,e._novip.idbdb=h.result,go(e,p/10,o,u)}},u),h.onsuccess=K(()=>{o=null;const d=e._novip.idbdb=h.result,p=Nt(d.objectStoreNames);if(p.length>0)try{const y=d.transaction((g=p).length===1?g[0]:g,"readonly");t.autoSchema?function({_novip:w},m,f){w.verno=m.version/10;const v=w._dbSchema=Qn(0,m,f);w._storeNames=Nt(m.objectStoreNames,0),on(w,[w._allTables],N(v),v)}(e,d,y):(Xn(e,e._dbSchema,y),function(w,m){const f=Ui(Qn(0,w.idbdb,m),w._dbSchema);return!(f.add.length||f.change.some(v=>v.add.length||v.change.length))}(e,y)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Gn(e,y)}catch{}var g;bt.push(e),d.onversionchange=K(y=>{t.vcFired=!0,e.on("versionchange").fire(y)}),d.onclose=K(y=>{e.on("close").fire(y)}),a&&function({indexedDB:y,IDBKeyRange:w},m){!er(y)&&m!==en&&Zn(y,w).put({name:m}).catch(T)}(e._deps,c),l()},u)}))]).then(()=>(i(),t.onReadyBeingFired=[],k.resolve(tr(()=>e.on.ready.fire(e.vip))).then(function l(){if(t.onReadyBeingFired.length>0){let u=t.onReadyBeingFired.reduce(kn,T);return t.onReadyBeingFired=[],k.resolve(tr(()=>u(e.vip))).then(l)}}))).finally(()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1}).then(()=>e).catch(l=>{t.dbOpenError=l;try{o&&o.abort()}catch{}return r===t.openCanceller&&e._close(),F(l)}).finally(()=>{t.openComplete=!0,s()})}function nr(e){var t=s=>e.next(s),n=i(t),r=i(s=>e.throw(s));function i(s){return o=>{var a=s(o),l=a.value;return a.done?l:l&&typeof l.then=="function"?l.then(n,r):W(l)?Promise.all(l).then(n,r):n(l)}}return i(t)()}function _o(e,t,n){var r=arguments.length;if(r<2)throw new x.InvalidArgument("Too few arguments");for(var i=new Array(r-1);--r;)i[r-1]=arguments[r];return n=i.pop(),[e,Yr(i),n]}function xi(e,t,n,r,i){return k.resolve().then(()=>{const s=U.transless||U,o=e._createTransaction(t,n,e._dbSchema,r),a={trans:o,transless:s};if(r)o.idbtrans=r.idbtrans;else try{o.create(),e._state.PR1398_maxLoop=3}catch(h){return h.name===Ln.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(()=>xi(e,t,n,null,i))):F(h)}const l=_n(i);let u;l&&nt();const c=k.follow(()=>{if(u=i.call(o,o),u)if(l){var h=pe.bind(null,null);u.then(h,h)}else typeof u.next=="function"&&typeof u.throw=="function"&&(u=nr(u))},a);return(u&&typeof u.then=="function"?k.resolve(u).then(h=>o.active?h:F(new x.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):c.then(()=>u)).then(h=>(r&&o._resolve(),o._completion.then(()=>h))).catch(h=>(o._reject(h),F(h)))})}function an(e,t,n){const r=W(e)?e.slice():[e];for(let i=0;i0,m={...d,isVirtual:w,keyTail:h,keyLength:y,extractKey:zn(c),unique:!w&&d.unique};return g.push(m),m.isPrimaryKey||s.push(m),y>1&&o(y===2?c[0]:c.slice(0,y-1),h+1,d),g.sort((f,v)=>f.keyTail-v.keyTail),m}const a=o(r.primaryKey.keyPath,0,r.primaryKey);i[":id"]=[a];for(const c of r.indexes)o(c.keyPath,0,c);function l(c){const h=c.query.index;return h.isVirtual?{...c,query:{index:h,range:(d=c.query.range,p=h.keyTail,{type:d.type===1?2:d.type,lower:an(d.lower,d.lowerOpen?e.MAX_KEY:e.MIN_KEY,p),lowerOpen:!0,upper:an(d.upper,d.upperOpen?e.MIN_KEY:e.MAX_KEY,p),upperOpen:!0})}}:c;var d,p}return{...n,schema:{...r,primaryKey:a,indexes:s,getIndexByKeyPath:function(c){const h=i[It(c)];return h&&h[0]}},count:c=>n.count(l(c)),query:c=>n.query(l(c)),openCursor(c){const{keyTail:h,isVirtual:d,keyLength:p}=c.query.index;return d?n.openCursor(l(c)).then(g=>g&&function(y){return Object.create(y,{continue:{value:function(m){m!=null?y.continue(an(m,c.reverse?e.MAX_KEY:e.MIN_KEY,h)):c.unique?y.continue(y.key.slice(0,p).concat(c.reverse?e.MIN_KEY:e.MAX_KEY,h)):y.continue()}},continuePrimaryKey:{value(m,f){y.continuePrimaryKey(an(m,e.MAX_KEY,h),f)}},primaryKey:{get:()=>y.primaryKey},key:{get(){const m=y.key;return p===1?m[0]:m.slice(0,p)}},value:{get:()=>y.value}})}(g)):n.openCursor(c)}}}}}};function rr(e,t,n,r){return n=n||{},r=r||"",N(e).forEach(i=>{if(Z(t,i)){var s=e[i],o=t[i];if(typeof s=="object"&&typeof o=="object"&&s&&o){const a=vn(s);a!==vn(o)?n[r+i]=t[i]:a==="Object"?rr(s,o,n,r+i+"."):s!==o&&(n[r+i]=t[i])}else s!==o&&(n[r+i]=t[i])}else n[r+i]=void 0}),N(t).forEach(i=>{Z(e,i)||(n[r+i]=t[i])}),n}const Eo={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema;return{...n,mutate(s){const o=U.trans,{deleting:a,creating:l,updating:u}=o.table(t).hook;switch(s.type){case"add":if(l.fire===T)break;return o._promise("readwrite",()=>c(s),!0);case"put":if(l.fire===T&&u.fire===T)break;return o._promise("readwrite",()=>c(s),!0);case"delete":if(a.fire===T)break;return o._promise("readwrite",()=>c(s),!0);case"deleteRange":if(a.fire===T)break;return o._promise("readwrite",()=>function(d){return h(d.trans,d.range,1e4)}(s),!0)}return n.mutate(s);function c(d){const p=U.trans,g=d.keys||function(y,w){return w.type==="delete"?w.keys:w.keys||w.values.map(y.extractKey)}(r,d);if(!g)throw new Error("Keys missing");return(d=d.type==="add"||d.type==="put"?{...d,keys:g}:{...d}).type!=="delete"&&(d.values=[...d.values]),d.keys&&(d.keys=[...d.keys]),function(y,w,m){return w.type==="add"?Promise.resolve([]):y.getMany({trans:w.trans,keys:m,cache:"immutable"})}(n,d,g).then(y=>{const w=g.map((m,f)=>{const v=y[f],b={onerror:null,onsuccess:null};if(d.type==="delete")a.fire.call(b,m,v,p);else if(d.type==="add"||v===void 0){const _=l.fire.call(b,m,d.values[f],p);m==null&&_!=null&&(m=_,d.keys[f]=m,r.outbound||ne(d.values[f],r.keyPath,m))}else{const _=rr(v,d.values[f]),E=u.fire.call(b,_,m,v,p);if(E){const S=d.values[f];Object.keys(E).forEach(O=>{Z(S,O)?S[O]=E[O]:ne(S,O,E[O])})}}return b});return n.mutate(d).then(({failures:m,results:f,numFailures:v,lastResult:b})=>{for(let _=0;_(w.forEach(f=>f.onerror&&f.onerror(m)),Promise.reject(m)))})}function h(d,p,g){return n.query({trans:d,values:!1,query:{index:r,range:p},limit:g}).then(({result:y})=>c({type:"delete",keys:y,trans:d}).then(w=>w.numFailures>0?Promise.reject(w.failures[0]):y.length({table:t=>{const n=e.table(t);return{...n,getMany:r=>{if(!r.cache)return n.getMany(r);const i=Ai(r.keys,r.trans._cache,r.cache==="clone");return i?k.resolve(i):n.getMany(r).then(s=>(r.trans._cache={keys:r.keys,values:r.cache==="clone"?ht(s):s},s))},mutate:r=>(r.type!=="add"&&(r.trans._cache=null),n.mutate(r))}}})};function ir(e){return!("from"in e)}const ye=function(e,t){if(!this){const n=new ye;return e&&"d"in e&&G(n,e),n}G(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Ut(e,t,n){const r=H(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(ir(e))return G(e,{from:t,to:n,d:1});const i=e.l,s=e.r;if(H(n,e.from)<0)return i?Ut(i,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Oi(e);if(H(t,e.to)>0)return s?Ut(s,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Oi(e);H(t,e.from)<0&&(e.from=t,e.l=null,e.d=s?s.d+1:1),H(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const o=!e.r;i&&!e.l&&ln(e,i),s&&o&&ln(e,s)}function ln(e,t){ir(t)||function n(r,{from:i,to:s,l:o,r:a}){Ut(r,i,s),o&&n(r,o),a&&n(r,a)}(e,t)}function ko(e,t){const n=sr(t);let r=n.next();if(r.done)return!1;let i=r.value;const s=sr(e);let o=s.next(i.from),a=o.value;for(;!r.done&&!o.done;){if(H(a.from,i.to)<=0&&H(a.to,i.from)>=0)return!0;H(i.from,a.from)<0?i=(r=n.next(a.from)).value:a=(o=s.next(i.from)).value}return!1}function sr(e){let t=ir(e)?null:{s:0,n:e};return{next(n){const r=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&H(n,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||H(n,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Oi(e){var t,n;const r=(((t=e.r)===null||t===void 0?void 0:t.d)||0)-(((n=e.l)===null||n===void 0?void 0:n.d)||0),i=r>1?"r":r<-1?"l":"";if(i){const s=i==="r"?"l":"r",o={...e},a=e[i];e.from=a.from,e.to=a.to,e[i]=a[i],o[i]=a[s],e[s]=o,o.d=Di(o)}e.d=Di(e)}function Di({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}Qe(ye.prototype,{add(e){return ln(this,e),this},addKey(e){return Ut(this,e,e),this},addKeys(e){return e.forEach(t=>Ut(this,t,t)),this},[bn](){return sr(this)}});const Io={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new ye(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const i=e.table(r),{schema:s}=i,{primaryKey:o}=s,{extractKey:a,outbound:l}=o,u={...i,mutate:d=>{const p=d.trans,g=p.mutatedParts||(p.mutatedParts={}),y=E=>{const S=`idb://${t}/${r}/${E}`;return g[S]||(g[S]=new ye)},w=y(""),m=y(":dels"),{type:f}=d;let[v,b]=d.type==="deleteRange"?[d.range]:d.type==="delete"?[d.keys]:d.values.length<50?[[],d.values]:[];const _=d.trans._cache;return i.mutate(d).then(E=>{if(W(v)){f!=="delete"&&(v=E.results),w.addKeys(v);const S=Ai(v,_);S||f==="add"||m.addKeys(v),(S||b)&&function(O,L,B,R){function $(M){const A=O(M.name||"");function xe(J){return J!=null?M.extractKey(J):null}const at=J=>M.multiEntry&&W(J)?J.forEach(qe=>A.addKey(qe)):A.addKey(J);(B||R).forEach((J,qe)=>{const Ot=B&&xe(B[qe]),Er=R&&xe(R[qe]);H(Ot,Er)!==0&&(Ot!=null&&at(Ot),Er!=null&&at(Er))})}L.indexes.forEach($)}(y,s,S,b)}else if(v){const S={from:v.lower,to:v.upper};m.add(S),w.add(S)}else w.add(n),m.add(n),s.indexes.forEach(S=>y(S.name).add(n));return E})}},c=({query:{index:d,range:p}})=>{var g,y;return[d,new ye((g=p.lower)!==null&&g!==void 0?g:e.MIN_KEY,(y=p.upper)!==null&&y!==void 0?y:e.MAX_KEY)]},h={get:d=>[o,new ye(d.key)],getMany:d=>[o,new ye().addKeys(d.keys)],count:c,query:c,openCursor:c};return N(h).forEach(d=>{u[d]=function(p){const{subscr:g}=U;if(g){const y=b=>{const _=`idb://${t}/${r}/${b}`;return g[_]||(g[_]=new ye)},w=y(""),m=y(":dels"),[f,v]=h[d](p);if(y(f.name||"").add(v),!f.isPrimaryKey){if(d!=="count"){const b=d==="query"&&l&&p.values&&i.query({...p,values:!1});return i[d].apply(this,arguments).then(_=>{if(d==="query"){if(l&&p.values)return b.then(({result:S})=>(w.addKeys(S),_));const E=p.values?_.result.map(a):_.result;p.values?w.addKeys(E):m.addKeys(E)}else if(d==="openCursor"){const E=_,S=p.values;return E&&Object.create(E,{key:{get:()=>(m.addKey(E.primaryKey),E.key)},primaryKey:{get(){const O=E.primaryKey;return m.addKey(O),O}},value:{get:()=>(S&&w.addKey(E.primaryKey),E.value)}})}return _})}m.add(n)}}return i[d].apply(this,arguments)}}),u}}}};class je{constructor(t,n){this._middlewares={},this.verno=0;const r=je.dependencies;this._options=n={addons:je.addons,autoOpen:!0,indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange,...n},this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};const{addons:i}=n;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const s={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:T,dbReadyPromise:null,cancelOpen:T,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var o;s.dbReadyPromise=new k(a=>{s.dbReadyResolve=a}),s.openCanceller=new k((a,l)=>{s.cancelOpen=l}),this._state=s,this.name=t,this.on=_t(this,"populate","blocked","versionchange","close",{ready:[kn,T]}),this.on.ready.subscribe=Wr(this.on.ready.subscribe,a=>(l,u)=>{je.vip(()=>{const c=this._state;if(c.openComplete)c.dbOpenError||k.resolve().then(l),u&&a(l);else if(c.onReadyBeingFired)c.onReadyBeingFired.push(l),u&&a(l);else{a(l);const h=this;u||a(function d(){h.on.ready.unsubscribe(l),h.on.ready.unsubscribe(d)})}})}),this.Collection=(o=this,St(lo.prototype,function(a,l){this.db=o;let u=gi,c=null;if(l)try{u=l()}catch(g){c=g}const h=a._ctx,d=h.table,p=d.hook.reading.fire;this._ctx={table:d,index:h.index,isPrimKey:!h.index||d.schema.primKey.keyPath&&h.index===d.schema.primKey.name,range:u,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:c,or:h.or,valueMapper:p!==ft?p:null}})),this.Table=function(a){return St(ao.prototype,function(l,u,c){this.db=a,this._tx=c,this.name=l,this.schema=u,this.hook=a._allTables[l]?a._allTables[l].hook:_t(null,{creating:[Ys,T],reading:[Hs,ft],updating:[Qs,T],deleting:[Js,T]})})}(this),this.Transaction=function(a){return St(po.prototype,function(l,u,c,h,d){this.db=a,this.mode=l,this.storeNames=u,this.schema=c,this.chromeTransactionDurability=h,this.idbtrans=null,this.on=_t(this,"complete","error","abort"),this.parent=d||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new k((p,g)=>{this._resolve=p,this._reject=g}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},p=>{var g=this.active;return this.active=!1,this.on.error.fire(p),this.parent?this.parent._reject(p):g&&this.idbtrans&&this.idbtrans.abort(),F(p)})})}(this),this.Version=function(a){return St(wo.prototype,function(l){this.db=a,this._cfg={version:l,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(a){return St(Ei.prototype,function(l,u,c){this.db=a,this._ctx={table:l,index:u===":id"?null:u,or:c};const h=a._deps.indexedDB;if(!h)throw new x.MissingAPI;this._cmp=this._ascending=h.cmp.bind(h),this._descending=(d,p)=>h.cmp(p,d),this._max=(d,p)=>h.cmp(d,p)>0?d:p,this._min=(d,p)=>h.cmp(d,p)<0?d:p,this._IDBKeyRange=a._deps.IDBKeyRange})}(this),this.on("versionchange",a=>{a.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",a=>{!a.newVersion||a.newVersionnew this.Transaction(a,l,u,this._options.chromeTransactionDurability,c),this._fireOnBlocked=a=>{this.on("blocked").fire(a),bt.filter(l=>l.name===this.name&&l!==this&&!l._state.vcFired).map(l=>l.on("versionchange").fire(a))},this.use(So),this.use(Eo),this.use(Io),this.use(Lo),this.vip=Object.create(this,{_vip:{value:!0}}),i.forEach(a=>a(this))}version(t){if(isNaN(t)||t<.1)throw new x.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new x.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);const n=this._versions;var r=n.filter(i=>i._cfg.version===t)[0];return r||(r=new this.Version(t),n.push(r),n.sort(mo),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(t){return this.idbdb&&(this._state.openComplete||U.letThrough||this._vip)?t():new k((n,r)=>{if(this._state.openComplete)return r(new x.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void r(new x.DatabaseClosed);this.open().catch(T)}this._state.dbReadyPromise.then(n,r)}).then(t)}use({stack:t,create:n,level:r,name:i}){i&&this.unuse({stack:t,name:i});const s=this._middlewares[t]||(this._middlewares[t]=[]);return s.push({stack:t,create:n,level:r??10,name:i}),s.sort((o,a)=>o.level-a.level),this}unuse({stack:t,name:n,create:r}){return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter(i=>r?i.create!==r:!!n&&i.name!==n)),this}open(){return bo(this)}_close(){const t=this._state,n=bt.indexOf(this);if(n>=0&&bt.splice(n,1),this.idbdb){try{this.idbdb.close()}catch{}this._novip.idbdb=null}t.dbReadyPromise=new k(r=>{t.dbReadyResolve=r}),t.openCanceller=new k((r,i)=>{t.cancelOpen=i})}close(){this._close();const t=this._state;this._options.autoOpen=!1,t.dbOpenError=new x.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)}delete(){const t=arguments.length>0,n=this._state;return new k((r,i)=>{const s=()=>{this.close();var o=this._deps.indexedDB.deleteDatabase(this.name);o.onsuccess=K(()=>{(function({indexedDB:a,IDBKeyRange:l},u){!er(a)&&u!==en&&Zn(a,l).delete(u).catch(T)})(this._deps,this.name),r()}),o.onerror=le(i),o.onblocked=this._fireOnBlocked};if(t)throw new x.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(s):s()})}backendDB(){return this.idbdb}isOpen(){return this.idbdb!==null}hasBeenClosed(){const t=this._state.dbOpenError;return t&&t.name==="DatabaseClosed"}hasFailed(){return this._state.dbOpenError!==null}dynamicallyOpened(){return this._state.autoSchema}get tables(){return N(this._allTables).map(t=>this._allTables[t])}transaction(){const t=_o.apply(this,arguments);return this._transaction.apply(this,t)}_transaction(t,n,r){let i=U.trans;i&&i.db===this&&t.indexOf("!")===-1||(i=null);const s=t.indexOf("?")!==-1;let o,a;t=t.replace("!","").replace("?","");try{if(a=n.map(u=>{var c=u instanceof this.Table?u.name:u;if(typeof c!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return c}),t=="r"||t===Fn)o=Fn;else{if(t!="rw"&&t!=Mn)throw new x.InvalidArgument("Invalid transaction mode: "+t);o=Mn}if(i){if(i.mode===Fn&&o===Mn){if(!s)throw new x.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&a.forEach(u=>{if(i&&i.storeNames.indexOf(u)===-1){if(!s)throw new x.SubTransaction("Table "+u+" not included in parent transaction.");i=null}}),s&&i&&!i.active&&(i=null)}}catch(u){return i?i._promise(null,(c,h)=>{h(u)}):F(u)}const l=xi.bind(null,this,o,a,i,r);return i?i._promise(o,l,"lock"):U.trans?rt(U.transless,()=>this._whenReady(l)):this._whenReady(l)}table(t){if(!Z(this._allTables,t))throw new x.InvalidTable(`Table ${t} does not exist`);return this._allTables[t]}}const Uo=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable";class xo{constructor(t){this._subscribe=t}subscribe(t,n,r){return this._subscribe(t&&typeof t!="function"?t:{next:t,error:n,complete:r})}[Uo](){return this}}function Pi(e,t){return N(t).forEach(n=>{ln(e[n]||(e[n]=new ye),t[n])}),e}function Ao(e){let t,n=!1;const r=new xo(i=>{const s=_n(e);let o=!1,a={},l={};const u={get closed(){return o},unsubscribe:()=>{o=!0,ke.storagemutated.unsubscribe(p)}};i.start&&i.start(u);let c=!1,h=!1;function d(){return N(l).some(y=>a[y]&&ko(a[y],l[y]))}const p=y=>{Pi(a,y),d()&&g()},g=()=>{if(c||o)return;a={};const y={},w=function(m){s&&nt();const f=()=>_e(e,{subscr:m,trans:null}),v=U.trans?rt(U.transless,f):f();return s&&v.then(pe,pe),v}(y);h||(ke(Lt,p),h=!0),c=!0,Promise.resolve(w).then(m=>{n=!0,t=m,c=!1,o||(d()?g():(a={},l=y,i.next&&i.next(m)))},m=>{c=!1,n=!1,i.error&&i.error(m),u.unsubscribe()})};return g(),u});return r.hasValue=()=>n,r.getValue=()=>t,r}let or;try{or={indexedDB:j.indexedDB||j.mozIndexedDB||j.webkitIndexedDB||j.msIndexedDB,IDBKeyRange:j.IDBKeyRange||j.webkitIDBKeyRange}}catch{or={indexedDB:null,IDBKeyRange:null}}const Ke=je;function cn(e){let t=me;try{me=!0,ke.storagemutated.fire(e)}finally{me=t}}Qe(Ke,{...Mt,delete:e=>new Ke(e,{addons:[]}).delete(),exists:e=>new Ke(e,{addons:[]}).open().then(t=>(t.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return function({indexedDB:t,IDBKeyRange:n}){return er(t)?Promise.resolve(t.databases()).then(r=>r.map(i=>i.name).filter(i=>i!==en)):Zn(t,n).toCollection().primaryKeys()}(Ke.dependencies).then(e)}catch{return F(new x.MissingAPI)}},defineClass:()=>function(e){G(this,e)},ignoreTransaction:e=>U.trans?rt(U.transless,e):e(),vip:tr,async:function(e){return function(){try{var t=nr(e.apply(this,arguments));return t&&typeof t.then=="function"?t:k.resolve(t)}catch(n){return F(n)}}},spawn:function(e,t,n){try{var r=nr(e.apply(n,t||[]));return r&&typeof r.then=="function"?r:k.resolve(r)}catch(i){return F(i)}},currentTransaction:{get:()=>U.trans||null},waitFor:function(e,t){const n=k.resolve(typeof e=="function"?Ke.ignoreTransaction(e):e).timeout(t||6e4);return U.trans?U.trans.waitFor(n):n},Promise:k,debug:{get:()=>ae,set:e=>{Qr(e,e==="dexie"?()=>!0:mi)}},derive:Xe,extend:G,props:Qe,override:Wr,Events:_t,on:ke,liveQuery:Ao,extendObservabilitySet:Pi,getByKeyPath:de,setByKeyPath:ne,delByKeyPath:function(e,t){typeof t=="string"?ne(e,t,void 0):"length"in t&&[].map.call(t,function(n){ne(e,n,void 0)})},shallowClone:Hr,deepClone:ht,getObjectDiff:rr,cmp:H,asap:zr,minKey:Nn,addons:[],connections:bt,errnames:Ln,dependencies:or,semVer:fi,version:fi.split(".").map(e=>parseInt(e)).reduce((e,t,n)=>e+t/Math.pow(10,2*n))}),Ke.maxKey=kt(Ke.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(ke(Lt,e=>{if(!me){let t;Zt?(t=document.createEvent("CustomEvent"),t.initCustomEvent(Le,!0,!0,e)):t=new CustomEvent(Le,{detail:e}),me=!0,dispatchEvent(t),me=!1}}),addEventListener(Le,({detail:e})=>{me||cn(e)}));let me=!1;if(typeof BroadcastChannel<"u"){const e=new BroadcastChannel(Le);typeof e.unref=="function"&&e.unref(),ke(Lt,t=>{me||e.postMessage(t)}),e.onmessage=t=>{t.data&&cn(t.data)}}else if(typeof self<"u"&&typeof navigator<"u"){ke(Lt,t=>{try{me||(typeof localStorage<"u"&&localStorage.setItem(Le,JSON.stringify({trig:Math.random(),changedParts:t})),typeof self.clients=="object"&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(n=>n.postMessage({type:Le,changedParts:t})))}catch{}}),typeof addEventListener<"u"&&addEventListener("storage",t=>{if(t.key===Le){const n=JSON.parse(t.newValue);n&&cn(n.changedParts)}});const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:t}){t&&t.type===Le&&cn(t.changedParts)})}k.rejectionMapper=function(e,t){if(!e||e instanceof et||e instanceof TypeError||e instanceof SyntaxError||!e.name||!ti[e.name])return e;var n=new ti[e.name](t||e.message,e);return"stack"in e&&ue(n,"stack",{get:function(){return this.inner.stack}}),n},Qr(ae,mi);var ot=(e=>(e.ReadyForUpload="ReadyForUpload",e.UploadComplete="UploadComplete",e))(ot||{}),Ne=(e=>(e.After="after",e.Before="before",e.BeforeAndAfter="beforeAndAfter",e))(Ne||{});const ar="sprig.sessionId",Ri="sprig.disableReplayRecording",Oo=30,Ci=()=>{ve.setItem(Ri,"disabled")},Fe=()=>!!ve.getItem(Ri),Do=["did not allow mutations","called in an invalid security context"],Po=e=>{if(!e)return!0;for(const t of Do)if(e.toLowerCase().includes(t))return!1;return!0},Ro=(e,t,n)=>{Fe()||t instanceof Error&&(Ci(),Po(t==null?void 0:t.message)&&(window.UserLeap.reportError(e,t,n),To()))},Co=async(e,t)=>{var r;let n;try{if((r=window.navigator.storage)!=null&&r.estimate){const{quota:i,usage:s}=await window.navigator.storage.estimate();n={availableSpaceInMB:i&&s?(i-s)/(1024*1024):void 0,quota:i,usage:s}}}catch(i){window.UserLeap.reportError("Error getting storage estimate",i)}Ro(e,t,n)},Y=(()=>{const e=ve.getItem(ar);if(e)return I(`Found saved session id: ${e}`),ve.removeItem(ar),e;const t=We();return I(`Generating new uuid: ${t}`),t})();window.addEventListener("beforeunload",()=>{I(`Before page unload saving session id: ${Y}`),ve.setItem(ar,Y)});const To=async()=>{try{await Promise.allSettled([C.events.clear(),C.chunkUploads.clear(),C.pendingCaptures.clear()])}catch{}},lr=(e,t,n=()=>!0)=>C.table(t).where("timestamp").below(e).and(n).delete(),Bo=()=>{C.events.where("sessionId").equals(Y).delete(),C.pendingCaptures.where("sessionId").equals(Y).delete()},jo=e=>{const t=e.map(n=>({...n,sessionId:n.sessionId??Y}));return C.events.bulkAdd(t)},Ko=(e,t)=>C.events.where("[sessionId+timestamp]").between([Y,e],[Y,t]).toArray(),No=(e,t,n)=>{const r=new Date,i=r.setMinutes(r.getMinutes()+(n??Oo));return C.events.where("[sessionId+timestamp]").between([Y,e],[Y,t]).modify({expiredAt:i})},Fo=e=>C.chunkUploads.add({...e,sessionId:e.sessionId??Y}),Mo=(e,t)=>C.chunkUploads.update(e,{data:null,etag:t,status:ot.UploadComplete}),$o=({status:e,uploadId:t})=>t?C.chunkUploads.where({uploadId:t,status:e}).toArray():C.chunkUploads.where({sessionId:Y,status:e}).toArray(),Vo=e=>C.chunkUploads.where({uploadId:e,status:ot.UploadComplete}).toArray(),qo=e=>C.chunkUploads.where({uploadId:e,status:ot.UploadComplete}).delete(),Wo=e=>C.pendingCaptures.add({...e,sessionId:e.sessionId??Y,canUpload:!1}),zo=()=>C.pendingCaptures.where("sessionId").equals(Y).and(e=>e.targetTimestampC.pendingCaptures.where("sessionId").equals(Y).toArray(),Ho=e=>C.pendingCaptures.where("sessionId").equals(Y).and(t=>t.captureParams.responseGroupId===e).modify({canUpload:!0}),Yo=async e=>{var t;if((t=window.navigator.storage)!=null&&t.estimate){const{quota:n,usage:r}=await window.navigator.storage.estimate();if(n&&r&&(n-r)/1073741824{jr(`Error opening replay storage: ${JSON.stringify(e)}`),Ci()});const Qo=async(e,t,n)=>new Promise((r,i)=>{const s=e.createElement("script");s.src=t,s.onload=r,s.onerror=i,n&&(s.nonce=n),e.head.appendChild(s)});let Ti=1,cr=5e3,un=6e4;const Xo=5,Bi=1e3,ji=30,dn=ji+Xo,ur="sprig.pendingCount";let Ki=0,Ni=Date.now(),dr=!1;var hr=(e=>(e.Left="left_click",e.Right="right_click",e))(hr||{});const Zo=async(e,t,n,r=2,i)=>{try{if(Fe()){I("Not initializing replay because recording is disabled");return}if(!t){I("Not initializing replay because config didn't specify maxReplayDurationSeconds");return}if(i!=null&&i.minAvailableGb&&(Ti=i.minAvailableGb),!await Yo(Ti)){Br("Minimum storage not available");return}I("Initializing replay"),i!=null&&i.minDuration&&(cr=i.minDuration),i!=null&&i.batchDuration&&(un=i.batchDuration),Ts(r),oa(),na(t+dn,30*60,t+dn),ra(),window.rrwebRecord||(I("Loading recording script"),await Qo(e,"https://cdn.sprig.com/dependencies/record-2.0.0-alpha.6.min.js",n),I("Recording script finished loading"));const s=window.rrwebRecord;if(!s){Br("Record script failed to set global function");return}let o=!0;s({checkoutEveryNms:ji*1e3,sampling:{input:"last",scroll:250,media:800},emit:(a,l)=>{if(Fe())return;Ni=Date.now();const u=o||!!l;o=!1,ea({uuid:We(),event:JSON.stringify(a),isValidStart:u,timestamp:Date.now()})},...i}),dr=!0,Ki||(Ki=window.setInterval(()=>{Date.now()-Ni>Bi&&Ie("Sprig_Noop",{})},Bi))}catch(s){return re("Error initializing replay",s)}};let pr=!1,fr=[];const ea=e=>{fr.push(e),pr||ta()},ta=()=>{pr=!0,setTimeout(async()=>{if(Fe())return;const e=fr;fr=[],pr=!1;try{await jo(e)}catch(t){re("Error storing replay events",t)}},500)},na=(e=6*60,t=30*60,n=4*60)=>{const r=setInterval(()=>{const i=Date.now();Fe()||(ct(`Performing periodic replay data cleanup / Event Seconds ${e} / Chunk Seconds ${t} / Pending Capture Seconds ${n}`),C.transaction("rw!",C.events,C.chunkUploads,C.pendingCaptures,()=>{lr(i-e*1e3,"events",s=>s.expiredAt===void 0||s.expiredAts.canUpload===void 0||s.canUpload===!1)}).catch(s=>{clearInterval(r),re("Error deleting table rows",s)}),I("Cleanup complete"))},3e4)},ra=(e=5)=>{setInterval(da,e*1e3)},ia=async(e,t,n,r,i)=>{try{const s=Math.min(e+i,n),o=`from: ${new Date(e).toLocaleTimeString()} to ${new Date(s).toLocaleTimeString()}`;I(`Getting event batch ${o}`);const a=await Ko(e,s);if(!(a!=null&&a.length))return I(`No events found ${o}`),[r,[]];if(!r){I(`Searching for valid start in ${a.length} events ${o}`);let l=-1;if(a==null||a.forEach((c,h)=>{if(!c.isValidStart)return;const d=c.timestamp<=t;(l<0||d)&&(l=h)}),l<0)return I(`No valid start found in ${a.length} events ${o}`),[];const u=a[l].timestamp;return I(`Found valid start at: ${new Date(u).toLocaleTimeString()} in events ${o}`),[!0,a==null?void 0:a.slice(l)]}return[r,a]}catch(s){re("Error getting events batch",s)}},sa=(e,t,n)=>{const r=e.length,i=t*1024*1024,s=Math.ceil(r/n),o=Math.max(i,s);I(`Total file bytes: ${r} / target chunk size: ${o}`);const a=[];let l=0;for(;lPromise.all(e.map(async t=>{const n=await js(t);return await Mo(t.uuid,n),t.uploadId})),Mi=async e=>{I(`Marking upload complete if finished: ${e}`);const t=await Vo(e);if(!(t!=null&&t.length)){I(`No finished chunks found for upload: ${e}`);return}const n=t.reduce((s,o)=>(s.find(a=>a.chunkIndex===o.chunkIndex)||s.push(o),s),[]);n.sort((s,o)=>s.chunkIndex-o.chunkIndex);const r=n.map(s=>({ETag:s.etag,PartNumber:s.chunkIndex})).filter(s=>s.ETag!==null),i=n[0];await Vr({apiUrl:i.apiUrl,surveyId:i.surveyId,uploadId:e,responseGroupUuid:i.responseGroupId,etags:r,headers:i.completeUploadHeaders,replayDuration:i.replayDuration}),I(`Cleaning up chunks for ${e}`),await qo(e),I(`Done cleaning up chunks for ${e}`)},oa=async()=>{try{let e=[];if(await C.transaction("rw",C.chunkUploads,async()=>{e=await $o({status:ot.ReadyForUpload}).catch(n=>{re("chunkUploads transaction error",n)})}),!(e!=null&&e.length))return;const t=await Fi(e);I(`Finished uploading unfinished chunks for ${t}`),t!=null&&t.length&&await Promise.all(t.map(async n=>{n&&await Mi(n)}))}catch(e){re("Error getting chunk upload uuids",e)}},aa=async(e,t)=>{await Fi(t),I(`Done uploading chunks for uploads: ${e.join(",")}`),await Promise.all(e.map(n=>Mi(n)))},la=e=>{let t=0;e.forEach(i=>{t+=i.length});const n=new Uint8Array(t);let r=0;return e.forEach(i=>{n.set(i,r),r+=i.length}),n},$i=async(e,t,n)=>{const r=new TextEncoder;let i=null,s=null,o=null,a=!1,l=!1,[u,c]=[0,0];const h=e-dn*1e3,d=[];let p=[];I(`Getting events between ${new Date(e).toLocaleTimeString()} and ${new Date(t).toLocaleTimeString()}`),I(`Using batch duration: ${un}ms`);for(let y=h;yf.event).join(",")}`,m=r.encode(w);n?(s===null&&(ct("Attempting compression"),o=new window.CompressionStream("gzip"),s=o.writable.getWriter()),s.write(m)):d.push(m),a=!0}if(c-u{const n=window.CompressionStream!==void 0;let r=null;const i=t??Date.now(),s=i-e;try{r=await $i(s,i,n)}catch(o){if(o instanceof Error&&window.UserLeap.reportError("Error compressing replay",o),n)try{r=await $i(s,i,!1)}catch(a){re("fileData fallback failed",a)}}return r},Vi=async e=>{const{surveyId:t,responseGroupId:n,visitorId:r,apiUrl:i,completeUploadHeaders:s,replayParams:o,triggerTimestamp:a}=e,l=await ca(o.replayDurationSeconds*1e3,a);if(l!=null&&l.length)I(`Found file data for survey: ${t}`);else{I(`File data is empty for survey: ${t}`);return}const u=sa(l,o.minimumChunkSizeMb,o.signedUrls.length);I(`Got ${u.length} chunks for survey: ${t}`);const c=await Promise.all(u.map(async(h,d)=>{const p=We(),g={apiUrl:i,chunkIndex:d+1,completeUploadHeaders:s,etag:null,responseGroupId:n,status:ot.ReadyForUpload,surveyId:t,timestamp:a,totalChunks:u.length,data:h,uploadId:o.uploadId,uploadUrl:o.signedUrls[d].url,uuid:p,visitorId:r};return I(`Recording chunk upload: ${JSON.stringify({index:g.chunkIndex,surveyId:g.surveyId,uploadId:g.uploadId,size:h.length,id:p},null,2)}`),await Fo(g),I(`Done creating chunk upload: ${p}`),g}));I(`All chunk records created. Beginning upload for survey: ${t}`),await aa([o.uploadId],c)},qi=async(e,t)=>{try{if(I(`Attempting replay capture: ${JSON.stringify({isStandalone:e.isStandalone,duration:e.replayParams.replayDurationSeconds,type:e.replayParams.replayDurationType,responseGroupId:e.responseGroupId,surveyId:e.surveyId,triggerTimestamp:e.triggerTimestamp,visitorId:e.visitorId},null,2)}`),Fe()){I(`Replay recording is disabled: ${e.surveyId}`);return}I(`Replay recording enabled: ${e.surveyId}`);const{isStandalone:n,replayParams:r,triggerTimestamp:i,responseGroupId:s}=e,o=async()=>{setTimeout(()=>P.removeListener(D.QuestionAnswered,o),0),r.replayDurationType===Ne.Before?await Vi(e):await Ho(s)};if(r.replayDurationType===Ne.After||r.replayDurationType===Ne.BeforeAndAfter){n||(I("Attaching QuestionAnswered listener for non-standalone replay"),P.on(D.QuestionAnswered,o)),I(`Scheduling capture for replay of type: ${r.replayDurationType}`),await ua(e);return}if(n||t)I(`Proceeding to capture replay for survey: ${e.surveyId} / standalone? ${n} / canUpload? ${t}`),await Vi(e);else{const a=dn+r.replayDurationSeconds,l=i-a*1e3,u=i;I(`Setting expiry minutes to ${r.expirationTimeLimitMinutes} for events from ${new Date(l).toLocaleTimeString()} to ${new Date(u).toLocaleTimeString()}`),await No(l,u,r.expirationTimeLimitMinutes),I("Attaching QuestionAnswered listener"),P.on(D.QuestionAnswered,o)}}catch(n){re("Error scheduling or capturing replay",n)}},Wi=()=>{if(Fe()){ct("Not clearing user data, replay is disabled");return}try{Bo()}catch(e){re("Error clearing session event data",e)}};let ge=ve.getItem(ur);const ua=async e=>{I(`Scheduling replay capture: ${JSON.stringify(e)}`);const{surveyId:t}=e,n=await Go(),r=n==null?void 0:n.filter(o=>o.captureParams.surveyId===t);if(r!=null&&r.length){I(`Pending capture exists for survey: ${t}`);return}const i={...e,replayParams:{...e.replayParams}};e.replayParams.replayDurationType===Ne.BeforeAndAfter&&(i.replayParams.replayDurationSeconds*=2),i.replayParams.replayDurationType=Ne.Before;const s=e.triggerTimestamp+e.replayParams.replayDurationSeconds*1e3;return i.triggerTimestamp=s,ge=ge?(parseInt(ge)+1).toString():"1",ve.setItem(ur,ge),Wo({uuid:We(),targetTimestamp:s,timestamp:Date.now(),captureParams:i})},da=async()=>{try{if(ge&&parseInt(ge)>0){const e=await zo();e.length&&await Promise.all(e.map(async t=>{await C.pendingCaptures.delete(t.uuid),await qi(t.captureParams,t.canUpload)})),ge=(parseInt(ge)-e.length).toString(),ve.setItem(ur,ge)}}catch(e){re("Error initiating pending captures",e)}},Ie=(e,t)=>{var n,r;if(dr)try{(r=(n=window.rrwebRecord)==null?void 0:n.addCustomEvent)==null||r.call(n,e,t)}catch(i){re("Error recording custom event",i)}},zi=e=>{Ie("Sprig_PageView",e)},ha=e=>{Ie("Sprig_TrackEvent",e)},pa=e=>{Ie("Sprig_ShowSurvey",e)},fa=e=>{Ie("Sprig_Click",e)},ya=()=>{Ie("Sprig_Refresh",{})},ma=()=>{Ie("Sprig_BackForward",{})},ga=e=>{Ie("Sprig_Keystroke",e)},re=(e,t)=>(dr=!1,jr(`${e} - ${JSON.stringify(t)}`),Co(e,t)),yr={capture:!0},wa=["a","button","input","option","li","link"],va=["Escape","Enter","Backspace","F5","Tab"],ba=["label","type","role","title","placeholder","errormessage","valuetext","href"],Gi="aria-",_a=e=>{const t=e.getAttribute("type");return t?`${t} ${e.tagName.toLowerCase()}`:e.tagName.toLowerCase()},Hi=e=>{if(e.tagName.toLowerCase()==="html")return{element:"html"};const t=e.textContent,n=t?{text:t}:{};n.element=_a(e);for(const r of e.attributes){let i=r.name;const s=r.value;i.startsWith(Gi)&&(i=i.substring(Gi.length)),ba.includes(i)&&(n[i]=s)}return n},Sa=e=>{if(!e)return{};const n={...Hi(e)},r=e.parentElement;if(r&&wa.includes(r.tagName.toLowerCase())){const i=Hi(r);Object.assign(n,i)}return n},Yi=(e,t)=>{fa({x:t.x,y:t.y,type:e,elementAttributes:Sa(t.target)})},Ea=e=>t=>Yi(e,t),La=e=>{va.includes(e.key)&&ga({key:e.key})},ka=()=>{window.performance.getEntriesByType("navigation").map(t=>t.type).includes("reload")&&ya()},Ia=()=>{window.performance.getEntriesByType("navigation").map(t=>t.type).includes("back_forward")&&ma()},Ua=()=>{window.addEventListener("click",Ea(hr.Left),yr),window.addEventListener("mousedown",e=>{e.button===2&&Yi(hr.Right,e)},yr),window.addEventListener("keydown",La,yr),ka(),Ia()};window.UserLeap&&window.Sprig&&(window.Sprig._gtm?window.Sprig=window.UserLeap:window.UserLeap=window.Sprig),window.UserLeap||(window.UserLeap=window.Sprig),window.Sprig||(window.Sprig=window.UserLeap);const xa="rgba(255,255,255, 0.95)",Aa="rgba(0,0,0,0.9)",Oa="360px",mr="0px",Ji=()=>{window.UserLeap.container=document.createElement("div"),window.UserLeap.container.className="ul-container",document.body.appendChild(window.UserLeap.container)},Qi=e=>{Ta();const t=window.UserLeap.container;if(!(!t||!t.parentNode))try{t.parentNode.removeChild(t),window.UserLeap.container=null,te("trackStartUrl",null),P.emit(D.SurveyLifeCycle,{state:"dismissed"}),P.emit(D.SurveyClosed,{name:D.SurveyClosed,initiator:e})}catch(n){console.warn(`[Sprig] (ERR-412) Error removing UserLeap container by ${e} `+t),n instanceof Error&&window.UserLeap.reportError("dismissActiveSurvey",n)}},Xi=()=>{P.on(D.SurveyWillClose,({initiator:e})=>{Qi(e)})},Da=(e,t)=>{const r={...{position:"fixed",overflow:"auto",top:"0px",left:"0px",display:"none",height:"100%",width:"100%",transition:"background-color 0.3s ease-out",zIndex:2147483646}},i=t?e.overlayStyleMobile:e.overlayStyle;r["background-color"]=i==="light"?xa:Aa,t||(r.margin="auto"),window.UserLeap.container&&Object.assign(window.UserLeap.container.style,r)},Pa=(e,t,n)=>{var a,l;const r={position:"fixed",bottom:"0px",right:mr,border:0,backgroundColor:"rgba(0,0,0,0)",zIndex:2147483646,transition:"width 0.2s ease-in-out, height 0.2s ease-in-out"},i=Object.assign({},t,window.UserLeap);let s,o=!1;return n?((a=window.UserLeap.windowDimensions)!=null&&a.width?r.width=`${window.UserLeap.windowDimensions.width}px`:r.width="100%",(l=window.UserLeap.windowDimensions)!=null&&l.height?r.maxHeight=`${window.UserLeap.windowDimensions.height-20}px`:window.UserLeap.maxHeight?r.maxHeight=window.UserLeap.maxHeight:r.maxHeight=`${document.body.clientHeight-20}px`,["light","dark"].includes(i.overlayStyleMobile)&&(o=!0)):(r.width=Oa,r.maxHeight=window.UserLeap.maxHeight||"66vh",i.framePosition===lt.BottomLeft?s={left:mr}:i.framePosition===lt.TopLeft?s={left:mr,top:0}:i.framePosition===lt.TopRight?s={top:0}:i.framePosition===lt.Center&&(o=!0,s={margin:"auto",position:"static"},r.maxHeight=null)),o&&Da(i,n),Object.assign(e.style,r,s),o},Ra=(e,t,n)=>{var l,u;const r="ul-frame";Ji(),Ca();const i=document.createElement("iframe");i.id=r,i.setAttribute("title","Sprig User Feedback Dialog");const s=Pa(i,e,t);Xi(),i.setHeight=c=>{parseInt(i.style.height)!=c&&(i.style.height=`${c}px`,P.emit(D.SurveyHeight,{name:D.SurveyHeight,contentFrameHeight:c}))},i.setWidth=c=>{parseInt(i.style.width)!=c&&(i.style.width=`${c}px`,P.emit(D.SurveyWidth,{name:D.SurveyWidth,contentFrameWidth:c}))},(l=window.UserLeap.container)==null||l.appendChild(i),e&&(t?e.exitOnOverlayClickMobile:e.exitOnOverlayClick)&&window.UserLeap.container&&(window.UserLeap.container.onclick=()=>{P.emit(D.CloseSurveyOnOverlayClick)}),P.emit(D.SurveyLifeCycle,{state:"presented"}),P.emit(D.SurveyPresented,{name:D.SurveyPresented,[Pt.SurveyId]:n});const o=(u=i.contentWindow)==null?void 0:u.document;o&&(o.open("text/html","replace"),o.write(""),o.close());const a=o==null?void 0:o.head;return{frameId:r,contentWinDocHead:a,contentWindow:i.contentWindow,hasOverlay:s,iframe:i}},Zi={[D.SurveyFadingOut]:()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{"background-color":"rgba(0,0,0,0)"})}},Ca=()=>{Object.entries(Zi).forEach(([e,t])=>{P.on(e,t)})},Ta=()=>{Object.entries(Zi).forEach(([e,t])=>{P.off(e,t)})},Ba="!launch_darkly_";class ja{constructor(){V(this,"_ldData",{})}getAllLaunchDarklyVariations(){return this._ldData}setLDFlagsVariations(t){try{return!t||typeof t!="object"||Array.isArray(t)?!1:(Object.keys(this._ldData).forEach(n=>{delete this._ldData[n]}),Object.keys(t).forEach(n=>this._ldData[`${Ba}${n}`]=(t[n]??0)+1),!0)}catch(n){return n instanceof Error&&window.UserLeap.reportError("setAllLDFlagsVariations",n),console.warn("[Sprig] An issue had occured when setting LaunchDarkly flags and variations."),!1}}}const gr=new ja;Object.freeze(gr);const Ka="!optimizely_experiments_";class Na{constructor(){V(this,"_optimizelyData",{})}setOptimizelyExperiment(t,n=!0){if(!t||typeof t!="object")return!1;const{experiments:r}=t;try{return n&&Object.keys(this._optimizelyData).map(i=>{delete this._optimizelyData[i]}),r&&r.map(i=>{const{id:s,variation:o}=i,a=this.transformExperimentId(s);o&&typeof o=="string"&&(this._optimizelyData[a]=o)}),!0}catch(i){return i instanceof Error&&window.UserLeap.reportError("setOptimizelyExperiment",i),!1}}getAllOptimizelyExperiments(){return this._optimizelyData}getOptimizelyVariationName(t){return this._optimizelyData[this.transformExperimentId(t)]}transformExperimentId(t){return Ka+t}getAndSetWebOptimizelyExperiments(){var t;try{if(window&&window.optimizely&&typeof window.optimizely.get=="function"){const n=(t=window.optimizely.get("state"))==null?void 0:t.getExperimentStates({isActive:!0});if(n){const r=Object.keys(n).map(i=>{var s,o;return(s=n[i].variation)!=null&&s.name?{id:i,variation:(o=n[i].variation)==null?void 0:o.name}:{id:i,variation:"Original"}});return this.setOptimizelyExperiment({experiments:r},!1),!0}return!1}return!1}catch(n){return n instanceof Error&&window.UserLeap.reportError("getAndSetWebOptimizely",n),!1}}}const hn=new Na;Object.freeze(hn);class Fa{constructor(t,n){V(this,"paused");V(this,"queue");V(this,"ul");this.ul=t,this.paused=!1,this.queue=[],this.flush(n)}flush(t){const n=t.length;if(n)for(let r=0;r{};const r=new Promise(function(i){n=function(){i(t())}});return this.queue.push(n),r}else return t()}empty(){this.queue.length=0}}var ie=(e=>(e.Ready="ready",e.NoSurvey="no survey",e))(ie||{}),es=(e=>(e.Preview="sprigPreviewKey",e))(es||{});const Ma=["popState","pushState","replaceState"],$a={test:"test"},xt="!email",Va=["ios","android"],Me="environments",wr="pageUrl",$e="visitors",ts="ul-view-sdk-script",ns=Object.freeze({contains:(e,t)=>t.includes(e),notContains:(e,t)=>!t.includes(e),exactly:(e,t)=>t===e,notExactly:(e,t)=>t!==e,startsWith:(e,t)=>t.startsWith(e),endsWith:(e,t)=>t.endsWith(e),regex:(e,t)=>new RegExp(e).test(t),legacy:(e,t)=>new RegExp(e,"i").test(t)});function vr(e,t){const{matchType:n,pattern:r}=e,i=n?ns[n]:ns.legacy;let s=!1;try{s=i(r,t)}catch(o){const a=`[Sprig] (ERR-445) Failed to check url match with pattern ${r}`;o instanceof Error&&(console.warn(a,o),o.stack=JSON.stringify(e),window.UserLeap.reportError(a,o))}return s}function qa(e,t){const{pageUrlEvents:n,interactiveEvents:r,dismissOnPageChange:i}=window.UserLeap._config;if(!i)return!0;const s=[];n&&n.length&&s.push(...n),r&&r.length&&s.push(...r);const o=e&&s.find(a=>a.id===e);return o?vr(o,window.location.href):t===window.location.href}function At(e){const{pageUrlEvents:t,interactiveEvents:n,dismissOnPageChange:r,platform:i}=window.UserLeap._config;if(i&&i!==Rt.Web)return;const s=Ve("trackStartUrl"),o=s?String(s):null;t&&os(window.location.href),n&&(is(),Wa()),r&&o&&o!==window.location.href&&e&&Ma.includes(e.type)&&window.UserLeap("dismissActiveSurvey",Oe.PageChange)}const rs={capture:!0},Wa=()=>{const t=window.UserLeap._config.interactiveEvents.filter(r=>vr(r,window.location.href)).map(r=>{const{name:i,properties:s}=r,{selector:o,innerText:a}=s;return o?l=>{if(Or(l.target))try{l.target.closest(o)&&window.UserLeap("track",i)}catch{}return!1}:l=>(Or(l.target)&&l.target.innerText===a&&window.UserLeap("track",i),!1)}),n=r=>t.forEach(i=>i(r));window.UserLeap._config.interactiveEventsHandler=n,window.addEventListener("click",n,rs)},is=()=>{window.UserLeap._config.interactiveEventsHandler&&window.removeEventListener("click",window.UserLeap._config.interactiveEventsHandler,rs),delete window.UserLeap._config.interactiveEventsHandler};function za(){["hashchange","popstate"].forEach(e=>window.addEventListener(e,At,!0))}function Ga(){["hashchange","popstate"].forEach(e=>window.removeEventListener(e,At,!0)),window.UserLeap._config.interactiveEvents&&is()}function we(e,t,n){const r=[window.UserLeap._API_URL,"sdk",e];return t&&t.forEach(i=>{r.push(i),i===Me?r.push(window.UserLeap.envId):i===$e&&r.push(br())}),n&&r.push(n),r.join("/")}function Ha(e,t){let n=we("1",[Me],"questions?");return e!=null&&(n+=`&vid=${e}`),t&&(t.surveyId&&(n+=`&surveyid=${t.surveyId}`),t.surveyTemplateId&&(n+=`&surveytemplateid=${t.surveyTemplateId}`),t.previewLanguage&&(n+=`&previewLanguage=${encodeURIComponent(t.previewLanguage)}`)),n}function Ve(e){const t=X.getItem(Q.Credentials);if(t)try{const r=JSON.parse(t)[window.UserLeap.envId];return r&&r[e]||null}catch(n){n instanceof Error&&(n.stack=t,window.UserLeap.reportError("Failed to parse local storage credentials",n)),console.warn("[Sprig] (ERR-427) Failed to lookup saved ids",n)}return null}function te(e,t){const n=X.getItem(Q.Credentials);let r={};if(n)try{r=JSON.parse(n)}catch(s){s instanceof Error&&(s.stack=n,window.UserLeap.reportError("Failed to parse local storage credentials",s)),console.warn("[Sprig] (ERR-427) Failed to lookup saved ids",s)}let i=r[window.UserLeap.envId];i?i[e]=t:i={[e]:t},r[window.UserLeap.envId]=i;try{X.setItem(Q.Credentials,JSON.stringify(r))}catch(s){s instanceof Error&&console.warn(`[Sprig] (ERR-426) Unable to write to Local Storage:: ${s.message}`)}}function ss(){window.previewMode||(window.UserLeap.visitorId=We(),I(`Generating new vid: ${window.UserLeap.visitorId}`),te("vid",window.UserLeap.visitorId),P.emit(D.VisitorIDUpdated,{visitorId:window.UserLeap.visitorId}))}function br(){return window.previewMode?"0":window.UserLeap.visitorId||""}function os(e,t,n){if(e.endsWith("mock_snippet.html"))return;I(`Tracking page view: ${e}`);const r=window.UserLeap._config.pageUrlEvents;let i=!1;if(r&&r.length)for(let c=0;c0){const c=a[a.length-1],h=(Date.now()-c.viewedAt)/1e3;c.location!=e&&h>o&&zi({url:e,referrer:document.referrer,description:document.title}),(c.location!=e&&h>o||h>s)&&(window.UserLeap._queue.push(["track",wr,t,{url:e},n]),a.push(l))}else window.UserLeap._queue.push(["track",wr,t,{url:e},n]),a.push(l),zi({url:e});a.length>5&&a.splice(0,a.length-5),X.setItem(Q.PageViews,JSON.stringify(a))}catch(c){c instanceof Error&&window.UserLeap.reportError("trackPageView",c,{pageViewsStorage:u}),console.warn("[Sprig] (ERR-425) Failed to update page views in local storage")}}function Ya(){const e="Backbone"in window&&window.Backbone&&window.Backbone.history?window.Backbone.history:window.history;"pushState"in e&&(e.pushState=(t=>function(...r){const i=t.apply(this,r),s=new Event("pushState");return window.dispatchEvent(s),At(s),i})(e.pushState)),"replaceState"in e&&(e.replaceState=(t=>function(...r){const i=t.apply(this,r),s=new Event("replaceState");return window.dispatchEvent(s),At(s),i})(e.replaceState)),za()}async function _r(e,t){const n=br();e&&!t&&(window.UserLeap._config.mode=$a.test);const r=await Ue(Ha(n,{...e,previewLanguage:window.UserLeap._config.previewLanguage}),{},0,!0);return r.ok?(r.json.delay&&await Ct(r.json.delay),as(r.json)):(r.reportError&&r.error&&(console.warn("[Sprig] (ERR-414) Failed to request questions from the server",r.error),window.UserLeap.reportError("getQuestions",r.error)),{success:!1,surveyState:ie.NoSurvey})}const as=async e=>{var $,M;const{context:t,forceBrandedLogo:n,endCard:r,locale:i,productConfig:s,questions:o,responseGroupUid:a,surveyId:l,uuid:u,vid:c,sessionReplay:h}=e,d=Ye(window.UserLeap),p=Sr(d),g=Ja(d);if(I(`Attempting to display survey: ${l}`),h)if(I("Survey has replay attached"),p){const A={mediaRecordingUid:We(),mediaType:Ur.Screen,questionId:1,responseGroupUid:a,surveyId:l,updatedAt:new Date().toISOString(),visitorId:window.UserLeap.visitorId,isReplay:!0};P.emit(D.ReplayCapture,{responseGroupUid:a,hasQuestions:!!(o!=null&&o.length),surveyId:l,uploadId:h.uploadId,replayType:h.replayDurationType??Ne.Before,seconds:h.replayDurationSeconds,generateVideoUploadUrlPayload:A})}else qi({responseGroupId:a,surveyId:l,visitorId:c,replayParams:h,completeUploadHeaders:d,apiUrl:window.UserLeap._API_URL,triggerTimestamp:Date.now(),isStandalone:o.length===0});if(c==null||!o||!o.length)return I(`Not displaying survey: vid: ${c} / questions: ${o}`),{success:!1,message:"[Sprig] no survey found",surveyState:ie.NoSurvey};if(window.UserLeap.container){I("Already displaying a survey");const A="[Sprig] (ERR-409) Found an existing Survey container, aborting rendering of this survey";return console.warn(A),{success:!1,message:A,surveyState:ie.NoSurvey}}if(c!==window.UserLeap.visitorId&&u!==window.UserLeap.visitorId&&!window.previewMode){const A="Attempted to display survey to a different visitor";return I(A),window.UserLeap.reportError("DisplaySurvey",new Error(A)),{success:!1,message:A,surveyState:ie.NoSurvey}}I(`Showing survey: ${l}`),pa({id:l}),ds.disable(),P.emit(D.SurveyWillPresent,{name:D.SurveyWillPresent,[Pt.SurveyId]:l});let y,w=document.createElement("div"),m,f,v;const b=A=>{const{[Ir.ViewVersion]:xe}=A;xe!==d["x-ul-sdk-version"]&&Qi(),P.removeListener(pn.VerifyViewVersion,b)};P.on(pn.VerifyViewVersion,b),gs(d)?(y="ul-direct-embeded-frame",m=document.head,f=window,v=!1,p&&(Ji(),w.id=y,window.UserLeap.container.appendChild(w),Xi(),P.emit(D.SurveyLifeCycle,{state:"presented"}),P.emit(D.SurveyPresented,{name:D.SurveyPresented,[Pt.SurveyId]:l}))):{frameId:y,contentWinDocHead:m,contentWindow:f,hasOverlay:v,iframe:w}=Ra(s,g,l),window.UserLeap.frameId=y,window.UserLeap.useMobileStyling=g;const _=A=>{P.on(D.CloseSurveyOnOverlayClick,A)},E=Object.assign({frame:w,envId:window.UserLeap.envId,surveyId:l,userId:u,visitorAttributes:{externalUserId:window.UserLeap.userId,email:window.UserLeap.email},cards:o,context:t,locale:i,fontFamily:window.UserLeap.fontFamily,fontFamilyURL:window.UserLeap.fontFamilyURL,apiURL:window.UserLeap._API_URL,responseGroupUid:a,headers:d,endCard:r,useMobileStyling:g,mobileSDKVersion:window.UserLeap.mobileSDKVersion,configureExitOnOverlayClick:_,eventEmitFn:P.emit.bind(P),ulEvents:kr,viewDocument:f==null?void 0:f.document,viewWindow:f,tabTitle:document.title,startingQuestionIdx:($=window.UserLeap.config)==null?void 0:$.startingQuestionIdx,styleNonce:window.UserLeap.styleNonce,previewKey:X.getItem(Q.Preview),forceBrandedLogo:n},window.UserLeap._config);(M=window.UserLeap.config)!=null&&M.startingQuestionIdx&&(window.UserLeap.config={...window.UserLeap.config,startingQuestionIdx:null}),window.UserLeap.customStyles&&(E.customStyles=window.UserLeap.customStyles),f&&(f.__cfg=E);function S(){const A=document.createElement("script");return window.UserLeap.nonce&&A.setAttribute("nonce",window.UserLeap.nonce),A.id=ts,A}const O=window.UserLeap.viewSDKURL?window.UserLeap.viewSDKURL:E.path,L=document.getElementById(ts);L&&L.remove();const B=S(),R=()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{display:"flex"})};if(E.installationMethod===ze.Npm||E.installationMethod===ze.NpmBundled){const{default:A}=await import("../view/view.tsx");A.configure(E),v&&window.UserLeap.container&&R()}else O&&(B.src=O,v&&B.addEventListener("load",()=>{window.UserLeap.container&&R()}),f==null||f.addEventListener("error",A=>{A.target instanceof HTMLScriptElement&&A.target.src===O&&window.UserLeap.reportError("loadFrameScript",new Error("Frame script failed to load"))},{capture:!0,once:!0}));return m==null||m.appendChild(B),{success:!0,surveyState:ie.Ready,surveyId:l,responseGroupUid:a}};function Ja(e){if(window.UserLeap.useMobileStyling!==void 0)return window.UserLeap.useMobileStyling;const t=window.UserLeap.windowDimensions&&window.UserLeap.windowDimensions.width||document.body.clientWidth;return Sr(e)||t>10&&t{var y,w,m,f;const{userId:i,anonymousId:s,metadata:o={},properties:a,showSurveyCallback:l}=r;let{eventName:u}=r;if(window.UserLeap.debugMode&&u!==wr&&console.info("[DEBUG] Sprig track",r),e.mode==="test")return;const c=X.getItem(Q.Preview)??void 0;if(e.requireUserIdForTracking&&!window.UserLeap.userId&&!i){const v="[Sprig] - Skipping tracking without userId";return console.warn(v),{success:!1,message:v,surveyState:ie.NoSurvey}}if(!u||u.trim().length===0){u=u?String(u):"";const v="[Sprig] - Invalid event name "+u;return console.warn(v),{success:!1,message:v,surveyState:ie.NoSurvey}}const h=window.location.href;if(o.url||(o.url=h),te("trackStartUrl",h),(w=(y=window.UserLeap)==null?void 0:y._config)!=null&&w.optimizelyEnabled){const v=Ye(window.UserLeap);Sr(v)||hn.getAndSetWebOptimizelyExperiments(),o.optimizelyExperiments=Object.assign({},hn.getAllOptimizelyExperiments())}(f=(m=window.UserLeap)==null?void 0:m._config)!=null&&f.launchDarklyEnabled&&(o.launchDarklyFlags=gr.getAllLaunchDarklyVariations()),i&&(window.UserLeap.userId=i),s&&(window.UserLeap.partnerAnonymousId=s),a&&(o.eventProperties=a),ha({name:u,url:o.url}),I(`Tracking event: ${u}`);const d=window.UserLeap.delayingSurvey?await Ue(we("1",[$e],"events/batch"),{body:JSON.stringify({events:[{event:u,metadata:o}],previewKey:c}),method:"POST"},0,!0):await Ue(we("1",[$e],"events"),{body:JSON.stringify({event:u,metadata:o,previewKey:c}),method:"POST"},0,!0);if(!d.ok){const v="[Sprig] (ERR-421) Failed to track event";return d.reportError&&(console.warn(v,d.error),d.error&&window.UserLeap.reportError("track",d.error)),{success:!1,message:v,error:d.error,surveyState:ie.NoSurvey}}i&&te("uid",i),s&&te("aid",s);const p=d.json;return p.invalidPreviewKey&&X.removeItem(Q.Preview),await Za(d,l)?qa(p.eventId,h)?as(p):{success:!1,message:"Study should not be displayed after page navigation",surveyState:ie.NoSurvey}:{success:!1,message:"[Sprig] Callback returned false, aborting rendering of survey",surveyState:ie.NoSurvey}},n={async displaySurvey(r){return console.warn("[Sprig] displaySurvey should only be used to debug your studies; not intended for production usage."),window.UserLeap("dismissActiveSurvey",Oe.Override),_r({surveyId:r},!0)},_previewSurvey(r){window.UserLeap("dismissActiveSurvey",Oe.Override),_r({surveyTemplateId:r},!1)},_reviewSurvey(r){window.UserLeap("dismissActiveSurvey",Oe.Override),_r({surveyId:r},!1)},previewSurvey(r){n._previewSurvey(r)},reviewSurvey(r){n._reviewSurvey(r)},mute(){window.UserLeap._queue.pause()},unmute(){window.UserLeap._queue.unpause()},setVisitorToken(){console.warn("[Sprig] setVisitorToken is deprecated.")},dismissActiveSurvey(r=Oe.API){P.emit(D.SurveyWillClose,{name:D.SurveyWillClose,initiator:r})},async setAttribute(r,i){if(!r||!i&&i!==0){const s="[Sprig] - Disregarding empty attribute / value provided";return console.warn(s),{success:!1,message:s}}return this.setAttributes({[r]:i})},async setAttributes(r){if(r==null||Object.keys(r).length===0){const i="[Sprig] - Disregarding empty attributes provided";return console.warn(i),{success:!1,message:i}}return this.identifyAndSetAttributes({attributes:r})},async identifyAndSetAttributes(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig identifyAndSetAttributes",r),e.mode==="test")return;if(r===null||typeof r!="object"||!(r.userId||r.anonymousId||r.attributes)){const u="[Sprig] - Disregarding empty payload provided";return console.warn(u),{success:!1,message:u}}const{userId:i,anonymousId:s,attributes:o}=r;if(e.requireUserIdForTracking&&!window.UserLeap.userId&&!i){const u="[Sprig] - Skipping tracking without userId";return console.warn(u),{success:!1,message:u}}if(!o&&(!i||window.UserLeap.userId===i)&&(!s||window.UserLeap.partnerAnonymousId===s))return{success:!0};const a={};i&&(a.userId=window.UserLeap.userId=i),s&&(a.partnerAnonymousId=window.UserLeap.partnerAnonymousId=s);let l;return o?(o.email&&!Object.prototype.hasOwnProperty.call(o,xt)&&(o[xt]=o.email,delete o.email),I(`Setting attributes: ${JSON.stringify(o)}`),l=await Ue(we("1",[Me,$e],"attributes"),{body:JSON.stringify(o),method:"PUT"}),!l.ok&&l.reportError&&(console.warn("[Sprig] (ERR-432) identifyAndSetAttributes failed",l.error),l.error&&window.UserLeap.reportError("identifyAndSetAttributes",l.error))):l=await Ue(we("1",[Me,$e]),{body:JSON.stringify(a),method:"PUT"}),o&&o[xt]&&(window.UserLeap.email=o[xt]),l.ok&&(i&&te("uid",i),s&&te("aid",s)),{success:!!l.ok}},async removeAttributes(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig removeAttributes",r),e.mode==="test")return;if(r==null||r.length===0){const s="[Sprig] - Disregarding empty attributes provided";return console.warn(s),{success:!1,message:s}}if(e.requireUserIdForTracking&&!window.UserLeap.userId){const s="[Sprig] - Skipping tracking without userId";return console.warn(s),{success:!1,message:s}}const i=await Ue(we("1",[Me,$e],"attributes"),{body:JSON.stringify({delete:r}),method:"DELETE"});return!i.ok&&i.reportError&&(console.warn("[Sprig] (ERR-433) Remove attributes failed",i.error),i.error&&window.UserLeap.reportError("removeAttributes",i.error)),{success:!!i.ok}},async addSurveyListener(r){P.on(D.SurveyLifeCycle,r)},async removeSurveyListener(r){P.removeListener(D.SurveyLifeCycle,r)},async addListener(r,i){P.on(r,i)},async removeListener(r,i){P.removeListener(r,i)},async removeAllListeners(){P.removeAllListeners()},setPreviewKey(r){!r||typeof r!="string"||X.isStorageAvailable&&r&&X.setItem(Q.Preview,r)},async setUserId(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig setUserId",r),r==null){const o=`[Sprig] - Invalid userId ${r}`;return console.warn(o),{success:!1,message:o}}if(e.mode==="test"||r===window.UserLeap.userId)return;window.UserLeap.userId=r;const i=window.UserLeap.visitorId,s=await Ue(we("1",[Me,$e]),{body:JSON.stringify({userId:r}),method:"PUT"});if(!s.ok){s.reportError&&(console.warn("[Sprig] (ERR-420) Failed to set user id",s.error),s.error&&window.UserLeap.reportError("setUserId",s.error));return}i!==window.UserLeap.visitorId&&Wi(),te("uid",r)},async setPartnerAnonymousId(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig setPartnerAnonymousId",r),r==null){const i=`[Sprig] - Invalid partnerAnonymousId ${r}`;return console.warn(i),{success:!1,message:i}}return window.UserLeap.partnerAnonymousId=r,te("aid",r),{success:!0}},async track(r,i,s={},o=void 0){return t({eventName:r,properties:i,metadata:s,showSurveyCallback:o})},async identifyAndTrack(r){return await t(r)},trackPageView(r,i=void 0,s=void 0){os(r,i,s)},applyStyles(r){if(window.UserLeap.customStyles=r,window.UserLeap.container){const i=window.UserLeap.container.children[0].contentDocument;if(i){const s=i.getElementById(Dt.CustomStyle);s?s.textContent=r:ps(i,r,window.UserLeap.styleNonce)}}},setWindowDimensions(r,i){var l,u;const s=typeof r=="string"?parseInt(r,10):r,o=typeof i=="string"?parseInt(i,10):i;if(!isNaN(s)&&!isNaN(o)&&(window.UserLeap.windowDimensions={width:s,height:o}),!window.UserLeap.frameId)return;const a=document.getElementById(window.UserLeap.frameId);a&&(window.UserLeap.useMobileStyling&&((l=window.UserLeap.windowDimensions)!=null&&l.width&&(a.style.width=`${window.UserLeap.windowDimensions.width}px`),(u=window.UserLeap.windowDimensions)!=null&&u.height&&(a.style.maxHeight=`${window.UserLeap.windowDimensions.height-20}px`),a.contentDocument&&(a.style.height=String(ys(a.contentDocument)[0])+"px")),P.emit(D.SurveyDimensions,{name:D.SurveyDimensions,contentFrameWidth:a.clientWidth,contentFrameHeight:a.clientHeight}))},logoutUser(){window.UserLeap.debugMode&&console.info("[DEBUG] Sprig logout"),I(`Logging out user: ${window.UserLeap.userId} / vid: ${window.UserLeap.visitorId}`),window.UserLeap.visitorId=null,window.UserLeap.userId=null,window.UserLeap.partnerAnonymousId=null,window.UserLeap.token=null,window.UserLeap.email=null,X.removeItem(Q.Credentials),X.removeItem(Q.PageViews),window.UserLeap._queue.isPaused()&&window.UserLeap._queue.empty(),ss(),Wi(),window.UserLeap._queue.unpause()},teardown(){Ga(),window.UserLeap("dismissActiveSurvey",Oe.API),delete window.UserLeap,delete window.Sprig,delete window._Sprig},integrateOptimizely(r,i=!0){var s,o;if(!((o=(s=window.UserLeap)==null?void 0:s._config)!=null&&o.optimizelyEnabled)){console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");return}try{const a=typeof r=="string"?JSON.parse(r):r;hn.setOptimizelyExperiment(a,i)}catch(a){console.warn("[Sprig] Error with integrating Optimizely data"),a instanceof Error&&window.UserLeap.reportError("integrateOptimizely",a)}},integrateOptimizelyClient(r){var s,o;if(!((o=(s=window.UserLeap)==null?void 0:s._config)!=null&&o.optimizelyEnabled)){console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");return}const i=({experiment:a,variation:l})=>{const u={experiments:[{id:a.id,variation:l.key}]};window.UserLeap("integrateOptimizely",u,!1)};r.notificationCenter.addNotificationListener("ACTIVATE:experiment, user_id,attributes, variation, event",i)},importLaunchDarklyData(r){var i,s;if(!((s=(i=window.UserLeap)==null?void 0:i._config)!=null&&s.launchDarklyEnabled)){console.warn("[SPRIG] LaunchDarkly integration is currently not enabled for your product.");return}gr.setLDFlagsVariations(r)},setVisitorAttribute(r,i){return console.warn("[Sprig] setVisitorAttribute is deprecated. Please use setAttribute"),n.setAttribute(r,i)},async setEmail(r){return n.setAttribute(xt,r)},async setVisitorEmail(r){return console.warn("[Sprig] setVisitorEmail is deprecated. Please use setEmail"),n.setEmail(r)},async _generateVideoUploadUrl(r){return il(r)},async _completeSessionReplay({surveyId:r,responseGroupUuid:i,eventDigest:s}){if(!r||!i)return;const o=window.UserLeap._API_URL;try{await Vr({surveyId:r,responseGroupUuid:i,eventDigest:s,apiUrl:o,headers:Ye(window.UserLeap)},!0)}catch(a){console.warn("[Sprig] Error with completing session replay"),a instanceof Error&&window.UserLeap.reportError("completeSessionReplay",a)}}};Object.assign(window.UserLeap,n)};async function tl(e){const t=Ye(window.UserLeap);document.addEventListener("securitypolicyviolation",yn);const n=await Je(we("1",[Me],"config"),{headers:t}),r="TypeError";if(window.UserLeap.error=n.error,!n.ok&&n.error&&n.error.name===r?(window.UserLeap._API_URL="https://api.sprig.com",window.UserLeap.reportError("sprigDomainRequest",n.error)):document.removeEventListener("securitypolicyviolation",yn),!n.ok)return n.reportError&&(console.warn("[Sprig] (ERR-422) Failed to load configuration",n.error),n.error&&window.UserLeap.reportError("applyRemoteConfig",n.error)),mn("Disabled: failed to fetch configuration"),e;const i=n.json;return i!=null&&i.disabled?(mn(`Disabled: ${i.disabled}`),{disabled:i.disabled}):Object.assign({},i,e)}const nl=e=>typeof e=="object"&&e&&"inner"in e&&!!e.inner&&typeof e.inner=="object";async function rl(e,t,n={}){var h,d;const r=window.__cfg&&window.__cfg.mode,i=br(),s=window.UserLeap.envId,o=window.document.documentElement,a=nl(t)?{inner:{message:(h=t.inner)==null?void 0:h.message,stack:(d=t.inner)==null?void 0:d.stack}}:{},l={mode:r,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:o.clientWidth,clientHeight:o.clientHeight,location:window.location.href,language:window.navigator.language,...n,...a},u={action:e,err:{message:t.message,stack:t.stack},meta:l,vid:i,envId:s},c=await Ue(we("1",null,"errors"),{method:"POST",headers:{[oe.Error]:window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(u)},0,!0);if(!c.ok)console.warn("[Sprig] (ERR-444) Failed to report error to API",t);else{const{presignedUrl:p}=c.json;As(p)}}async function il(e){var n;if(!e)return;const t=`${window.UserLeap._API_URL}/2/environments/integrations/upload`;try{const r=await fetch(t,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(r.ok){const i=await r.json();return(n=i==null?void 0:i.upload)==null?void 0:n.url}else return null}catch(r){console.warn("[Sprig] Error with generating video upload url"),r instanceof Error&&window.UserLeap.reportError("generateVideoUploadUrl",r)}}function sl(e={}){const t=new URLSearchParams(window.location.search).get(es.Preview)??"";window.UserLeap.UPDATES=kr,window.UserLeap("setPreviewKey",t);async function n(){if(window.UserLeap.loaded)return;if(I("Loading sprig on page load"),window.UserLeap.reportError=rl,window.UserLeap.loaded=!0,window.UserLeap._config=Object.assign({},e,window.UserLeap.config),window.UserLeap.delayingSurvey=!1,window.UserLeap._config&&typeof window.UserLeap._config=="object")for(const a in window.UserLeap._config)window.UserLeap[a]=window.UserLeap._config[a];if(!window.UserLeap.envId)if(window.UserLeap.appId)window.UserLeap.envId=window.UserLeap.appId;else throw new Error("Missing Environment id");window.UserLeap.debugMode&&console.info("[DEBUG] Sprig debug mode enabled");const r=window.UserLeap.sampleRate;if(r){let a=Ve("sampled");if(a===null&&(a=Math.random(){Ua()}),Os(o.logBufferLimit,o.logLevel),el(o),await Xa(o),window.UserLeap._queue.unpause(),P.emit(D.SDKReady,{maxMobileReplayDurationSeconds:o.maxMobileReplayDurationSeconds,mobileReplaySettings:o.mobileReplaySettings}),P.emit(D.VisitorIDUpdated,{visitorId:window.UserLeap.visitorId})}document.readyState==="complete"?n():window.attachEvent?window.attachEvent("onload",n):window.addEventListener("load",()=>{n()},!1)}const ol="sprig-web-view-sdk";let ls;ls={path:`https://cdn.sprig.com/${ol}-v2.26.2.js`},sl(ls)})(); //# sourceMappingURL=shim.js.map diff --git a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/sprig_web_assets.bundle/snippet.js b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/sprig_web_assets.bundle/snippet.js index f8044f4..a79d754 100644 --- a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/sprig_web_assets.bundle/snippet.js +++ b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/sprig_web_assets.bundle/snippet.js @@ -37,19 +37,24 @@ function handleSurveyCallback(surveyState, callbackId) { } // Function to get the background property -function getBackgroundColor(cssString, selector) { - const hexColorRegex = /^#([0-9A-F]{3}){1,2}$/i; - const cssRegex = new RegExp(`${selector}\\s*{[^}]*background\\s*:\\s*([^;}]+)`, 'i'); +function getBackgroundColor(selector, cssString = '') { + try { + if (cssString && typeof cssString === 'string') { + const hexColorRegex = /^#([0-9A-F]{3}){1,2}$/i; + const cssRegex = new RegExp(`${selector}\\s*{[^}]*background\\s*:\\s*([^;}]+)`, 'i'); - const match = cssString.match(cssRegex); + const match = cssString.match(cssRegex); - if (match?.[1]) { - const backgroundColor = match[1].trim(); - if (hexColorRegex.test(backgroundColor)) { - return backgroundColor; + if (match?.[1]) { + const backgroundColor = match[1].trim(); + if (hexColorRegex.test(backgroundColor)) { + return backgroundColor; + } + } } + } catch (e) { + console.log('Failed to get backgroundColor', e); } - // Return a default value if not found or not a valid hex color return '#ffffff'; } @@ -58,10 +63,10 @@ Sprig('addListener', 'visitor.id.updated', (payload) => { window.webkit.messageHandlers.sprigWebController.postMessage({type: 'visitorIdUpdated', visitorId: payload.visitorId}); }); Sprig('addListener', 'sdk.ready', (payload) => { - window.webkit.messageHandlers.sprigWebController.postMessage({type: 'sdkReady', maxMobileReplayDurationSeconds: JSON.stringify(payload.maxMobileReplayDurationSeconds), mobileReplaySettings: JSON.stringify(payload.mobileReplaySettings), cardBgColor: getBackgroundColor(S._config.customStyles, '.ul-card__container') }); + window.webkit.messageHandlers.sprigWebController.postMessage({type: 'sdkReady', maxMobileReplayDurationSeconds: JSON.stringify(payload.maxMobileReplayDurationSeconds), mobileReplaySettings: JSON.stringify(payload.mobileReplaySettings), cardBgColor: getBackgroundColor('.ul-card__container', S._config.customStyles) }); }); Sprig('addListener', 'replay.capture', (payload) => { - window.webkit.messageHandlers.sprigWebController.postMessage({type: 'replayCapture', responseGroupUid: payload.responseGroupUid, hasQuestions: JSON.stringify(payload.hasQuestions), surveyId: JSON.stringify(payload.surveyId), uploadId: payload.uploadId, replayType: payload.type, seconds: JSON.stringify(payload.seconds), uploadUrl: payload.uploadUrl, generateVideoUploadUrlPayload: JSON.stringify(payload.generateVideoUploadUrlPayload) }); + window.webkit.messageHandlers.sprigWebController.postMessage({type: 'replayCapture', responseGroupUid: payload.responseGroupUid, hasQuestions: JSON.stringify(payload.hasQuestions), surveyId: JSON.stringify(payload.surveyId), uploadId: payload.uploadId, replayType: payload.replayType, seconds: JSON.stringify(payload.seconds), uploadUrl: payload.uploadUrl, generateVideoUploadUrlPayload: payload.generateVideoUploadUrlPayload }); }); Sprig('addListener', 'survey.height', (payload) => { window.webkit.messageHandlers.sprigWebController.postMessage({type: 'setHeight', height: payload.contentFrameHeight.toString() }); diff --git a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/sprig_web_assets.bundle/view.js b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/sprig_web_assets.bundle/view.js index 7124fce..f0d1bdf 100644 --- a/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/sprig_web_assets.bundle/view.js +++ b/UserLeapKit.xcframework/ios-arm64/UserLeapKit.framework/sprig_web_assets.bundle/view.js @@ -1,4 +1,4 @@ -(function(ce){typeof define=="function"&&define.amd?define(ce):ce()})(function(){"use strict";var Ad=Object.defineProperty;var Dd=(ce,D,ze)=>D in ce?Ad(ce,D,{enumerable:!0,configurable:!0,writable:!0,value:ze}):ce[D]=ze;var Ee=(ce,D,ze)=>(Dd(ce,typeof D!="symbol"?D+"":D,ze),ze);var ce,D,ze,mt,it,Si,Ti,Pi,dn={},Ii=[],Ds=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function je(e,t){for(var n in t)e[n]=t[n];return e}function Ri(e){var t=e.parentNode;t&&t.removeChild(e)}function Y(e,t,n){var r,i,o,a={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?ce.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return Bt(e,a,r,i,null)}function Bt(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++ze:i};return i==null&&D.vnode!=null&&D.vnode(o),o}function Ai(){return{current:null}}function he(e){return e.children}function Os(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||fn(e,o,null,n[o],r);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||fn(e,o,t[o],n[o],r)}function Di(e,t,n){t[0]==="-"?e.setProperty(t,n==null?"":n):e[t]=n==null?"":typeof n!="number"||Ds.test(t)?n:n+"px"}function fn(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Di(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Di(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?ji:Oi,o):e.removeEventListener(t,o?ji:Oi,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n==null?"":n;break e}catch{}typeof n=="function"||(n==null||n===!1&&t.indexOf("-")==-1?e.removeAttribute(t):e.setAttribute(t,n))}}function Oi(e){mt=!0;try{return this.l[e.type+!1](D.event?D.event(e):e)}finally{mt=!1}}function ji(e){mt=!0;try{return this.l[e.type+!0](D.event?D.event(e):e)}finally{mt=!1}}function _e(e,t){this.props=e,this.context=t}function Nt(e,t){if(t==null)return e.__?Nt(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&it.sort(function(l,c){return l.__v.__b-c.__v.__b}));pn.__r=0}function Mi(e,t,n,r,i,o,a,s,l,c){var u,d,f,v,p,h,g,_=r&&r.__k||Ii,b=_.length;for(n.__k=[],u=0;u0?Bt(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)!=null){if(v.__=n,v.__b=n.__b+1,(f=_[u])===null||f&&v.key==f.key&&v.type===f.type)_[u]=void 0;else for(d=0;d=0;t--)if((n=e.__k[t])&&(r=Ui(n)))return r}return null}function ir(e,t,n,r,i,o,a,s,l){var c,u,d,f,v,p,h,g,_,b,x,w,m,C,S,k=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(l=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(c=D.__b)&&c(t);try{e:if(typeof k=="function"){if(g=t.props,_=(c=k.contextType)&&r[c.__c],b=c?_?_.props.value:c.__:r,n.__c?h=(u=t.__c=n.__c).__=u.__E:("prototype"in k&&k.prototype.render?t.__c=u=new k(g,b):(t.__c=u=new _e(g,b),u.constructor=k,u.render=Ms),_&&_.sub(u),u.props=g,u.state||(u.state={}),u.context=b,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),k.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=je({},u.__s)),je(u.__s,k.getDerivedStateFromProps(g,u.__s))),f=u.props,v=u.state,u.__v=t,d)k.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(k.getDerivedStateFromProps==null&&g!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(g,b),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(g,u.__s,b)===!1||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(E){E&&(E.__=t)}),x=0;x2&&(a.children=arguments.length>3?ce.call(arguments,2):n),Bt(e.type,a,r||e.key,i||e.ref,null)}function Ki(e,t){var n={__c:t="__cC"+Pi++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&i.some(function(s){s.__e=!0,rr(s)})},this.sub=function(a){i.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){i.splice(i.indexOf(a),1),s&&s.call(a)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}ce=Ii.slice,D={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},ze=0,mt=!1,_e.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=je({},this.state),typeof e=="function"&&(e=e(je({},n),this.props)),e&&je(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),rr(this))},_e.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),rr(this))},_e.prototype.render=he,it=[],Ti=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,pn.__r=0,Pi=0;var or=(e=>(e.Closed="close.click",e.Complete="survey.completed",e.PageChange="page.change",e.API="api",e.Override="override",e))(or||{}),Se=(e=>(e.ReplayCapture="replay.capture",e.SDKReady="sdk.ready",e.SurveyAppeared="survey.appeared",e.SurveyClosed="survey.closed",e.SurveyDimensions="survey.dimensions",e.SurveyFadingOut="survey.fadingOut",e.SurveyHeight="survey.height",e.SurveyPresented="survey.presented",e.SurveyLifeCycle="survey.lifeCycle",e.SurveyWillClose="survey.willClose",e.SurveyWillPresent="survey.will.present",e.CloseSurveyOnOverlayClick="close.survey.overlayClick",e.VisitorIDUpdated="visitor.id.updated",e.QuestionAnswered="question.answered",e))(Se||{}),Te=(e=>(e.VerifyViewVersion="verify.view.version",e.CurrentQuestion="survey.question",e.ViewPrototypeClick="question.prototype.click",e.ViewAgreementClick="question.agreement.click",e.RecordedTaskStart="recorded.task.start",e.RecordedTaskPermissionScreen="recorded.task.permission.screen",e.SurveyComplete="survey.complete",e))(Te||{}),yt=(e=>(e.ViewVersion="view.version",e.QuestionId="qid",e.Props="props",e))(yt||{});const _t="ul-app";var O=(e=>(e.Caption="ul-caption",e.CardContainer="ul-card__container",e.CardMainContent="ul-card-main-content",e.Choice="choice",e.ChoiceCheckbox="select-checkbox",e.ChoiceGroup="ul-card__choices",e.ChoiceLabel="select-label",e.ChoiceLabelContainer="choice-label-container",e.ChoiceRadio="select-radio",e.ChoiceTextEntryContainer="choice-text-entry-container",e.ChoiceTextInput="choice-text-input",e.CloseButton="close-btn",e.CloseContainer="close-container",e.ConsentLegalNameInput="ul-consent-legal__name-input",e.CustomStyle="ul-custom-style",e.DesktopSuffix="--desktop",e.FadeInTransition="fade-in-transition",e.LikertNumber="likert-number",e.LikertSmiley="likert-smiley",e.LikertStar="likert-star",e.LoadingSpinner="ul-loading-spinner",e.LoadingSpinnerContainer="ul-loading-spinner-container",e.LoadingSpinnerFirst="first",e.LoadingSpinnerFourth="fourth",e.LoadingSpinnerSecond="second",e.LoadingSpinnerThird="third",e.MobileSuffix="--mobile",e.NPSNumber="nps-number",e.OpenTextInput="ul-card-text__input",e.QuestionHeader="ul-question",e.VideoCard="ul-card--video",e.CheckmarkButton="ul-button-checkmark",e.InactiveButton="ul-button-inactive",e.LeftAlignButton="ul-button-left-align",e.ButtonDisabled="sprig-button-disabled",e.SkipButton="ul-card-skip__button",e))(O||{});const ar="#e6e6e6",Ut="#bd282a",Ns=1030,Us=1,Vs=(e,t,n)=>{const r=e.createElement("style");n&&(r.nonce=n),r.textContent=t,r.id=O.CustomStyle,e.head.appendChild(r)},Fs=e=>{const t=e.querySelector(`.${O.CardContainer}`);let n=600,r=0;if(t){n=t.scrollHeight;const i=getComputedStyle(t),o=parseFloat(i.marginTop)+parseFloat(i.marginBottom),a=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth);r=o+a}return n+r+Us},Hs=e=>{const t=e.querySelector(`.${O.CardContainer}`);t&&(t.scrollTop=0)};var $s=class extends Error{constructor(e,t,n){super(`Possible EventEmitter memory leak detected. ${n} ${t.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`),this.emitter=e,this.type=t,this.count=n,this.name="MaxListenersExceededWarning"}},zi=class{static listenerCount(e,t){return e.listenerCount(t)}constructor(){this.events=new Map,this.maxListeners=zi.defaultMaxListeners,this.hasWarnedAboutPotentialMemoryLeak=!1}_emitInternalEvent(e,t,n){this.emit(e,t,n)}_getListeners(e){return Array.prototype.concat.apply([],this.events.get(e))||[]}_removeListener(e,t){const n=e.indexOf(t);return n>-1&&e.splice(n,1),[]}_wrapOnceListener(e,t){const n=(...r)=>(this.removeListener(e,n),t.apply(this,r));return Object.defineProperty(n,"name",{value:t.name}),n}setMaxListeners(e){return this.maxListeners=e,this}getMaxListeners(){return this.maxListeners}eventNames(){return Array.from(this.events.keys())}emit(e,...t){const n=this._getListeners(e);return n.forEach(r=>{r.apply(this,t)}),n.length>0}addListener(e,t){this._emitInternalEvent("newListener",e,t);const n=this._getListeners(e).concat(t);if(this.events.set(e,n),this.maxListeners>0&&this.listenerCount(e)>this.maxListeners&&!this.hasWarnedAboutPotentialMemoryLeak){this.hasWarnedAboutPotentialMemoryLeak=!0;const r=new $s(this,e,this.listenerCount(e));console.warn(r)}return this}on(e,t){return this.addListener(e,t)}once(e,t){return this.addListener(e,this._wrapOnceListener(e,t))}prependListener(e,t){const n=this._getListeners(e);if(n.length>0){const r=[t].concat(n);this.events.set(e,r)}else this.events.set(e,n.concat(t));return this}prependOnceListener(e,t){return this.prependListener(e,this._wrapOnceListener(e,t))}removeListener(e,t){const n=this._getListeners(e);return n.length>0&&(this._removeListener(n,t),this.events.set(e,n),this._emitInternalEvent("removeListener",e,t)),this}off(e,t){return this.removeListener(e,t)}removeAllListeners(e){return e?this.events.delete(e):this.events.clear(),this}listeners(e){return Array.from(this._getListeners(e))}listenerCount(e){return this._getListeners(e).length}rawListeners(e){return this.listeners(e)}},qi=zi;qi.defaultMaxListeners=10;const hn=new qi;var ot=(e=>(e.Error="x-ul-error",e.EnvironmentID="x-ul-environment-id",e.InstallationMethod="x-ul-installation-method",e.PartnerAnonymousId="x-ul-anonymous-id",e.Platform="userleap-platform",e.PreviewMode="x-ul-preview-mode",e.UserID="x-ul-user-id",e.VisitorID="x-ul-visitor-id",e))(ot||{}),bt=(e=>(e.Email="email",e.Link="link",e.Web="web",e))(bt||{}),xt=(e=>(e.Npm="web-npm",e.NpmBundled="web-npm-bundled",e.Gtm="web-gtm",e.Segment="web-segment",e.SegmentAndroid="android-segment",e.SegmentReactNative="react-native-segment",e.SegmentIOS="ios-segment",e.Snippet="web-snippet",e))(xt||{});const Wi=e=>new Promise(t=>{setTimeout(()=>{t()},e)}),Vt=({"userleap-platform":e})=>e!==bt.Web,X=(e,t)=>{const n=t?O.MobileSuffix:O.DesktopSuffix;return[e+n,e]},Ks=(e,t)=>[e,`${e}__${t}`];class Gi{constructor(t){Ee(this,"storage");Ee(this,"tempStorage",{});Ee(this,"isStorageAvailable");this.storage=window[t],this.isStorageAvailable=this.checkIfStorageAvailable()}checkIfStorageAvailable(){try{const t="__storage_test__";return this.storage.setItem(t,t),this.storage.removeItem(t),!0}catch{return!1}}setItem(t,n){this.isStorageAvailable?this.storage.setItem(t,n):this.tempStorage[t]=n}getItem(t){return this.isStorageAvailable?this.storage.getItem(t):this.tempStorage[t]}removeItem(t){this.isStorageAvailable?this.storage.removeItem(t):delete this.tempStorage[t]}clear(){this.isStorageAvailable?this.storage.clear():this.tempStorage={}}}const Ft=new Gi("sessionStorage");new Gi("localStorage");var T=(e=>(e.ConsentLegal="consentlegal",e.Likert="likert",e.MultipleChoice="multiplechoice",e.MultipleSelect="multipleselect",e.NPS="nps",e.Open="open",e.RecordedTask="recordedtask",e.TextUrlPrompt="texturlprompt",e.Thanks="thanks",e.Uploading="uploading",e.VideoVoice="videovoice",e))(T||{}),Me=(e=>(e.Answered="answered",e.Equal="eq",e.NotEqual="neq",e.Skipped="skipped",e.LessThan="lt",e.LessThanOrEqual="lte",e.GivenUp="given_up",e.GreaterThan="gt",e.GreaterThanOrEqual="gte",e.ListAll="list_all",e.ListAtLeastOne="list_alo",e.ListExact="list_exact",e.DoesNotInclude="list_dni",e.Contains="contains",e.DoesNotContain="notcontains",e))(Me||{}),wt=(e=>(e.Camera="camera",e.Microphone="microphone",e.Screen="screen",e))(wt||{}),ve=(e=>(e.AvPermission="av_permission",e.ScreenPermission="screen_permission",e.StartTask="start_task",e.CompleteTask="complete_task",e))(ve||{}),at=(e=>(e.Number="number",e.Smiley="smiley",e.Star="star",e))(at||{});let vn;const zs=new Uint8Array(16);function qs(){if(!vn&&(vn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!vn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vn(zs)}const te=[];for(let e=0;e<256;++e)te.push((e+256).toString(16).slice(1));function Ws(e,t=0){return(te[e[t+0]]+te[e[t+1]]+te[e[t+2]]+te[e[t+3]]+"-"+te[e[t+4]]+te[e[t+5]]+"-"+te[e[t+6]]+te[e[t+7]]+"-"+te[e[t+8]]+te[e[t+9]]+"-"+te[e[t+10]]+te[e[t+11]]+te[e[t+12]]+te[e[t+13]]+te[e[t+14]]+te[e[t+15]]).toLowerCase()}const Zi={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function mn(e,t,n){if(Zi.randomUUID&&!t&&!e)return Zi.randomUUID();e=e||{};const r=e.random||(e.rng||qs)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return Ws(r)}var be=(e=>(e.Video="video",e.Audio="audio",e.Screen="screen",e))(be||{}),re=(e=>(e.PermissionStatus="permission.status",e.AvPermission="av.permission",e.ScreenPermission="screen.permission",e.BeginRecording="begin.recording",e.StartTask="start.task",e.FinishTask="finish.task",e))(re||{}),me=(e=>(e.Abandoned="abandoned",e.GivenUp="given.up",e.Completed="completed",e))(me||{}),F=(e=>(e.ScreenPermissionRequested="screen.permission.requested",e.PermissionDescriptors="permission.descriptors",e.PermissionStatusCallback="permission.status.callback",e.StreamReadyCallback="stream.ready.callback",e.StreamCanceledCallback="stream.canceled.callback",e.TaskCompleteCallback="task.complete.callback",e.TaskResponse="task.response",e.TaskStatus="task.status",e.RecordingMediaTypes="recording.media.types",e.StartRecordingCallback="start.recording.callback",e.PassthroughData="passthrough.data",e.CurrentIndex="current.index",e.UploadCallback="upload.callback",e.ProgressCallback="progress.callback",e.BeginCallback="begin.callback",e))(F||{});const Yi=e=>{let t;const n=new Set,r=(l,c)=>{const u=typeof l=="function"?l(t):l;if(!Object.is(u,t)){const d=t;t=(c!=null?c:typeof u!="object")?u:Object.assign({},t,u),n.forEach(f=>f(t,d))}},i=()=>t,s={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>n.clear()};return t=e(r,i,s),s},Gs=e=>e?Yi(e):Yi;var qe,z,sr,Qi,Ct=0,Xi=[],gn=[],Ji=D.__b,eo=D.__r,to=D.diffed,no=D.__c,ro=D.unmount;function st(e,t){D.__h&&D.__h(z,e,Ct||t),Ct=0;var n=z.__H||(z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:gn}),n.__[e]}function ne(e){return Ct=1,lr(uo,e)}function lr(e,t,n){var r=st(qe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):uo(void 0,t),function(o){var a=r.__N?r.__N[0]:r.__[0],s=r.t(a,o);a!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.u)){z.u=!0;var i=z.shouldComponentUpdate;z.shouldComponentUpdate=function(o,a,s){if(!r.__c.__H)return!0;var l=r.__c.__H.__.filter(function(u){return u.__c});if(l.every(function(u){return!u.__N}))return!i||i.call(this,o,a,s);var c=!1;return l.forEach(function(u){if(u.__N){var d=u.__[0];u.__=u.__N,u.__N=void 0,d!==u.__[0]&&(c=!0)}}),!(!c&&r.__c.props===o)&&(!i||i.call(this,o,a,s))}}return r.__N||r.__}function ge(e,t){var n=st(qe++,3);!D.__s&&dr(n.__H,t)&&(n.__=e,n.i=t,z.__H.__h.push(n))}function Ht(e,t){var n=st(qe++,4);!D.__s&&dr(n.__H,t)&&(n.__=e,n.i=t,z.__h.push(n))}function We(e){return Ct=5,yn(function(){return{current:e}},[])}function io(e,t,n){Ct=6,Ht(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function yn(e,t){var n=st(qe++,7);return dr(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function oo(e,t){return Ct=8,yn(function(){return e},t)}function ao(e){var t=z.context[e.__c],n=st(qe++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(z)),t.props.value):e.__}function ur(e,t){D.useDebugValue&&D.useDebugValue(t?t(e):e)}function Zs(e){var t=st(qe++,10),n=ne();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function so(){var e=st(qe++,11);if(!e.__){for(var t=z.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Ys(){for(var e;e=Xi.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(_n),e.__H.__h.forEach(cr),e.__H.__h=[]}catch(t){e.__H.__h=[],D.__e(t,e.__v)}}D.__b=function(e){z=null,Ji&&Ji(e)},D.__r=function(e){eo&&eo(e),qe=0;var t=(z=e.__c).__H;t&&(sr===z?(t.__h=[],z.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=gn,n.__N=n.i=void 0})):(t.__h.forEach(_n),t.__h.forEach(cr),t.__h=[])),sr=z},D.diffed=function(e){to&&to(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Xi.push(t)!==1&&Qi===D.requestAnimationFrame||((Qi=D.requestAnimationFrame)||Qs)(Ys)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==gn&&(n.__=n.__V),n.i=void 0,n.__V=gn})),sr=z=null},D.__c=function(e,t){t.some(function(n){try{n.__h.forEach(_n),n.__h=n.__h.filter(function(r){return!r.__||cr(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],D.__e(r,n.__v)}}),no&&no(e,t)},D.unmount=function(e){ro&&ro(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{_n(r)}catch(i){t=i}}),n.__H=void 0,t&&D.__e(t,n.__v))};var lo=typeof requestAnimationFrame=="function";function Qs(e){var t,n=function(){clearTimeout(r),lo&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);lo&&(t=requestAnimationFrame(n))}function _n(e){var t=z,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),z=t}function cr(e){var t=z;e.__c=e.__(),z=t}function dr(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function uo(e,t){return typeof t=="function"?t(e):t}function co(e,t){for(var n in t)e[n]=t[n];return e}function fr(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function bn(e){this.props=e}function fo(e,t){function n(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!a:fr(this.props,i)}function r(i){return this.shouldComponentUpdate=n,Y(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(bn.prototype=new _e).isPureReactComponent=!0,bn.prototype.shouldComponentUpdate=function(e,t){return fr(this.props,e)||fr(this.state,t)};var po=D.__b;D.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),po&&po(e)};var Xs=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ho(e){function t(n){var r=co({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Xs,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var vo=function(e,t){return e==null?null:Le(Le(e).map(t))},mo={map:vo,forEach:vo,count:function(e){return e?Le(e).length:0},only:function(e){var t=Le(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Le},Js=D.__e;D.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Js(e,t,n,r)};var go=D.unmount;function yo(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=co({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return yo(r,t,n)})),e}function _o(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return _o(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function $t(){this.__u=0,this.t=null,this.__b=null}function bo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function xo(e){var t,n,r;function i(o){if(t||(t=e()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw t;return Y(n,o)}return i.displayName="Lazy",i.__f=!0,i}function kt(){this.u=null,this.o=null}D.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),go&&go(e)},($t.prototype=new _e).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=bo(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=_o(c,c.__c.__P,c.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.t.pop();)u.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},$t.prototype.componentWillUnmount=function(){this.t=[]},$t.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=yo(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&Y(he,null,e.fallback);return i&&(i.__h=null),[Y(he,null,t.__a?null:e.children),i]};var wo=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(r)}}),gt(Y(el,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Co(e,t){var n=Y(tl,{__v:e,i:t});return n.containerInfo=t,n}(kt.prototype=new _e).__a=function(e){var t=this,n=bo(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),wo(t,e,r)):i()};n?n(o):o()}},kt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Le(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},kt.prototype.componentDidUpdate=kt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){wo(e,n,t)})};var ko=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,nl=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,rl=typeof document<"u",il=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Eo(e,t,n){return t.__k==null&&(t.textContent=""),gt(e,t),typeof n=="function"&&n(),e?e.__c:null}function So(e,t,n){return $i(e,t),typeof n=="function"&&n(),e?e.__c:null}_e.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(_e.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var To=D.event;function ol(){}function al(){return this.cancelBubble}function sl(){return this.defaultPrevented}D.event=function(e){return To&&(e=To(e)),e.persist=ol,e.isPropagationStopped=al,e.isDefaultPrevented=sl,e.nativeEvent=e};var Po,Io={configurable:!0,get:function(){return this.class}},Ro=D.vnode;D.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t=="string"){var i=t.indexOf("-")===-1;for(var o in r={},n){var a=n[o];rl&&o==="children"&&t==="noscript"||o==="value"&&"defaultValue"in n&&a==null||(o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&a===!0?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!il(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&nl.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():a===null&&(a=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=a)}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=Le(n.children).forEach(function(s){s.props.selected=r.value.indexOf(s.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=Le(n.children).forEach(function(s){s.props.selected=r.multiple?r.defaultValue.indexOf(s.props.value)!=-1:r.defaultValue==s.props.value})),e.props=r,n.class!=n.className&&(Io.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",Io))}e.$$typeof=ko,Ro&&Ro(e)};var Ao=D.__r;D.__r=function(e){Ao&&Ao(e),Po=e.__c};var Do={ReactCurrentDispatcher:{current:{readContext:function(e){return Po.__n[e.__c].props.value}}}},ll="17.0.2";function Oo(e){return Y.bind(null,e)}function hr(e){return!!e&&e.$$typeof===ko}function jo(e){return hr(e)?Bs.apply(null,arguments):e}function Lo(e){return!!e.__k&&(gt(null,e),!0)}function Mo(e){return e&&(e.base||e.nodeType===1&&e)||null}var Bo=function(e,t){return e(t)},No=function(e,t){return e(t)},Uo=he;function vr(e){e()}function Vo(e){return e}function Fo(){return[!1,vr]}var Ho=Ht;function $o(e,t){var n=t(),r=ne({h:{__:n,v:t}}),i=r[0].h,o=r[1];return Ht(function(){i.__=n,i.v=t,pr(i.__,t())||o({h:i})},[e,n,t]),ge(function(){return pr(i.__,i.v())||o({h:i}),e(function(){pr(i.__,i.v())||o({h:i})})},[e]),n}var ul={useState:ne,useId:so,useReducer:lr,useEffect:ge,useLayoutEffect:Ht,useInsertionEffect:Ho,useTransition:Fo,useDeferredValue:Vo,useSyncExternalStore:$o,startTransition:vr,useRef:We,useImperativeHandle:io,useMemo:yn,useCallback:oo,useContext:ao,useDebugValue:ur,version:"17.0.2",Children:mo,render:Eo,hydrate:So,unmountComponentAtNode:Lo,createPortal:Co,createElement:Y,createContext:Ki,createFactory:Oo,cloneElement:jo,createRef:Ai,Fragment:he,isValidElement:hr,findDOMNode:Mo,Component:_e,PureComponent:bn,memo:fo,forwardRef:ho,flushSync:No,unstable_batchedUpdates:Bo,StrictMode:Uo,Suspense:$t,SuspenseList:kt,lazy:xo,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Do};const cl=Object.freeze(Object.defineProperty({__proto__:null,Children:mo,PureComponent:bn,StrictMode:Uo,Suspense:$t,SuspenseList:kt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Do,cloneElement:jo,createFactory:Oo,createPortal:Co,default:ul,findDOMNode:Mo,flushSync:No,forwardRef:ho,hydrate:So,isValidElement:hr,lazy:xo,memo:fo,render:Eo,startTransition:vr,unmountComponentAtNode:Lo,unstable_batchedUpdates:Bo,useDeferredValue:Vo,useInsertionEffect:Ho,useSyncExternalStore:$o,useTransition:Fo,version:ll,Component:_e,Fragment:he,createContext:Ki,createElement:Y,createRef:Ai,useCallback:oo,useContext:ao,useDebugValue:ur,useEffect:ge,useErrorBoundary:Zs,useId:so,useImperativeHandle:io,useLayoutEffect:Ht,useMemo:yn,useReducer:lr,useRef:We,useState:ne},Symbol.toStringTag,{value:"Module"}));var dl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pl(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Ko={exports:{}},zo={};const qo=pl(cl);var Wo={exports:{}},Go={};/** +var pd=Object.defineProperty;var fd=(ge,T,Fe)=>T in ge?pd(ge,T,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):ge[T]=Fe;var he=(ge,T,Fe)=>(fd(ge,typeof T!="symbol"?T+"":T,Fe),Fe);(function(){"use strict";var ge,T,Fe,et,So,Eo,er,Po,Lt={},To=[],Ra=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ln=Array.isArray;function je(e,t){for(var n in t)e[n]=t[n];return e}function Io(e){var t=e.parentNode;t&&t.removeChild(e)}function G(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?ge.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Nt(e,s,r,o,null)}function Nt(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++Fe,__i:-1,__u:0};return o==null&&T.vnode!=null&&T.vnode(i),i}function jo(){return{current:null}}function le(e){return e.children}function ve(e,t){this.props=e,this.context=t}function ft(e,t){if(t==null)return e.__?ft(e.__,e.__i+1):null;for(var n;tt&&et.sort(er));cn.__r=0}function Ro(e,t,n,r,o,i,s,a,l,u,d){var c,h,p,y,f,_=r&&r.__k||To,m=t.length;for(n.__d=l,Da(n,t,_),l=n.__d,c=0;c0?Nt(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=Aa(o,n,s=r+c,d),o.__i=a,i=null,a!==-1&&(d--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&c--,typeof o.type!="function"&&(o.__u|=65536)):a!==s&&(a===s+1?c++:a>s?d>l-s?c+=a-s:c--:c=a(l!=null&&!(131072&l.__u)?1:0))for(;s>=0||a=0){if((l=t[s])&&!(131072&l.__u)&&o==l.key&&i===l.type)return s;s--}if(a2&&(a.children=arguments.length>3?ge.call(arguments,2):n),Nt(e.type,a,r||e.key,o||e.ref,null)}function Bo(e,t){var n={__c:t="__cC"+Po++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&o.some(function(a){a.__e=!0,tr(a)})},this.sub=function(s){o.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){o.splice(o.indexOf(s),1),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}ge=To.slice,T={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},Fe=0,ve.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=je({},this.state),typeof e=="function"&&(e=e(je({},n),this.props)),e&&je(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),tr(this))},ve.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),tr(this))},ve.prototype.render=le,et=[],Eo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,er=function(e,t){return e.__v.__b-t.__v.__b},cn.__r=0,Po=0;function Uo(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t=n.__.length&&n.__.push({__V:dn}),n.__[e]}function X(e){return gt=1,sr(Xo,e)}function sr(e,t,n){var r=tt(Re++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Xo(void 0,t),function(a){var l=r.__N?r.__N[0]:r.__[0],u=r.t(l,a);l!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=H,!H.u)){var o=function(a,l,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(h){return h.__c});if(d.every(function(h){return!h.__N}))return!i||i.call(this,a,l,u);var c=!1;return d.forEach(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(c=!0)}}),!(!c&&r.__c.props===a)&&(!i||i.call(this,a,l,u))};H.u=!0;var i=H.shouldComponentUpdate,s=H.componentWillUpdate;H.componentWillUpdate=function(a,l,u){if(this.__e){var d=i;i=void 0,o(a,l,u),i=d}s&&s.call(this,a,l,u)},H.shouldComponentUpdate=o}return r.__N||r.__}function pe(e,t){var n=tt(Re++,3);!T.__s&&cr(n.__H,t)&&(n.__=e,n.i=t,H.__H.__h.push(n))}function Mt(e,t){var n=tt(Re++,4);!T.__s&&cr(n.__H,t)&&(n.__=e,n.i=t,H.__h.push(n))}function He(e){return gt=5,hn(function(){return{current:e}},[])}function Go(e,t,n){gt=6,Mt(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function hn(e,t){var n=tt(Re++,7);return cr(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Zo(e,t){return gt=8,hn(function(){return e},t)}function Yo(e){var t=H.context[e.__c],n=tt(Re++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(H)),t.props.value):e.__}function ar(e,t){T.useDebugValue&&T.useDebugValue(t?t(e):e)}function $a(e){var t=tt(Re++,10),n=X();return t.__=e,H.componentDidCatch||(H.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Qo(){var e=tt(Re++,11);if(!e.__){for(var t=H.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Ba(){for(var e;e=Fo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pn),e.__H.__h.forEach(lr),e.__H.__h=[]}catch(t){e.__H.__h=[],T.__e(t,e.__v)}}T.__b=function(e){H=null,Ho&&Ho(e)},T.__r=function(e){qo&&qo(e),Re=0;var t=(H=e.__c).__H;t&&(ir===H?(t.__h=[],H.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=dn,n.__N=n.i=void 0})):(t.__h.forEach(pn),t.__h.forEach(lr),t.__h=[],Re=0)),ir=H},T.diffed=function(e){Ko&&Ko(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Fo.push(t)!==1&&Vo===T.requestAnimationFrame||((Vo=T.requestAnimationFrame)||Ua)(Ba)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==dn&&(n.__=n.__V),n.i=void 0,n.__V=dn})),ir=H=null},T.__c=function(e,t){t.some(function(n){try{n.__h.forEach(pn),n.__h=n.__h.filter(function(r){return!r.__||lr(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],T.__e(r,n.__v)}}),zo&&zo(e,t)},T.unmount=function(e){Wo&&Wo(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{pn(r)}catch(o){t=o}}),n.__H=void 0,t&&T.__e(t,n.__v))};var Jo=typeof requestAnimationFrame=="function";function Ua(e){var t,n=function(){clearTimeout(r),Jo&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Jo&&(t=requestAnimationFrame(n))}function pn(e){var t=H,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),H=t}function lr(e){var t=H;e.__c=e.__(),H=t}function cr(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Xo(e,t){return typeof t=="function"?t(e):t}function ei(e,t){for(var n in t)e[n]=t[n];return e}function ur(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function fn(e){this.props=e}function ti(e,t){function n(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:ur(this.props,o)}function r(o){return this.shouldComponentUpdate=n,G(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(fn.prototype=new ve).isPureReactComponent=!0,fn.prototype.shouldComponentUpdate=function(e,t){return ur(this.props,e)||ur(this.state,t)};var ni=T.__b;T.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ni&&ni(e)};var Va=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ri(e){function t(n){var r=ei({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Va,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var oi=function(e,t){return e==null?null:Oe(Oe(e).map(t))},ii={map:oi,forEach:oi,count:function(e){return e?Oe(e).length:0},only:function(e){var t=Oe(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Oe},Fa=T.__e;T.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}Fa(e,t,n,r)};var si=T.unmount;function ai(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=ei({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return ai(r,t,n)})),e}function li(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return li(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function $t(){this.__u=0,this.t=null,this.__b=null}function ci(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ui(e){var t,n,r;function o(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return G(n,i)}return o.displayName="Lazy",o.__f=!0,o}function vt(){this.u=null,this.o=null}T.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),si&&si(e)},($t.prototype=new ve).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=ci(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=li(l,l.__c.__P,l.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.t.pop();)u.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},$t.prototype.componentWillUnmount=function(){this.t=[]},$t.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=ai(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&G(le,null,e.fallback);return o&&(o.__u&=-33),[G(le,null,t.__a?null:e.children),o]};var di=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(r)}}),mt(G(Ha,{context:t.context},e.__v),t.l)}function hi(e,t){var n=G(qa,{__v:e,i:t});return n.containerInfo=t,n}(vt.prototype=new ve).__a=function(e){var t=this,n=ci(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),di(t,e,r)):o()};n?n(i):i()}},vt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Oe(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},vt.prototype.componentDidUpdate=vt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){di(e,n,t)})};var pi=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ka=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,za=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Wa=/[A-Z0-9]/g,Ga=typeof document<"u",Za=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function fi(e,t,n){return t.__k==null&&(t.textContent=""),mt(e,t),typeof n=="function"&&n(),e?e.__c:null}function mi(e,t,n){return $o(e,t),typeof n=="function"&&n(),e?e.__c:null}ve.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ve.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var gi=T.event;function Ya(){}function Qa(){return this.cancelBubble}function Ja(){return this.defaultPrevented}T.event=function(e){return gi&&(e=gi(e)),e.persist=Ya,e.isPropagationStopped=Qa,e.isDefaultPrevented=Ja,e.nativeEvent=e};var dr,Xa={enumerable:!1,configurable:!0,get:function(){return this.class}},vi=T.vnode;T.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||Ga&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":a==="ondoubleclick"?i="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||Za(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":za.test(i)?i=a:r.indexOf("-")===-1&&Ka.test(i)?i=i.replace(Wa,"-$&").toLowerCase():s===null&&(s=void 0):a=i="oninput",a==="oninput"&&o[i=a]&&(i="oninputCapture"),o[i]=s}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=Oe(n.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=Oe(n.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",Xa)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=pi,vi&&vi(e)};var yi=T.__r;T.__r=function(e){yi&&yi(e),dr=e.__c};var _i=T.diffed;T.diffed=function(e){_i&&_i(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),dr=null};var bi={ReactCurrentDispatcher:{current:{readContext:function(e){return dr.__n[e.__c].props.value}}}},el="17.0.2";function xi(e){return G.bind(null,e)}function Bt(e){return!!e&&e.$$typeof===pi}function wi(e){return Bt(e)&&e.type===le}function ki(e){return Bt(e)?Ma.apply(null,arguments):e}function Ci(e){return!!e.__k&&(mt(null,e),!0)}function Si(e){return e&&(e.base||e.nodeType===1&&e)||null}var Ei=function(e,t){return e(t)},Pi=function(e,t){return e(t)},Ti=le;function hr(e){e()}function Ii(e){return e}function ji(){return[!1,hr]}var Oi=Mt,Ri=Bt;function Di(e,t){var n=t(),r=X({h:{__:n,v:t}}),o=r[0].h,i=r[1];return Mt(function(){o.__=n,o.v=t,pr(o)&&i({h:o})},[e,n,t]),pe(function(){return pr(o)&&i({h:o}),e(function(){pr(o)&&i({h:o})})},[e]),n}function pr(e){var t,n,r=e.v,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var tl={useState:X,useId:Qo,useReducer:sr,useEffect:pe,useLayoutEffect:Mt,useInsertionEffect:Oi,useTransition:ji,useDeferredValue:Ii,useSyncExternalStore:Di,startTransition:hr,useRef:He,useImperativeHandle:Go,useMemo:hn,useCallback:Zo,useContext:Yo,useDebugValue:ar,version:"17.0.2",Children:ii,render:fi,hydrate:mi,unmountComponentAtNode:Ci,createPortal:hi,createElement:G,createContext:Bo,createFactory:xi,cloneElement:ki,createRef:jo,Fragment:le,isValidElement:Bt,isElement:Ri,isFragment:wi,findDOMNode:Si,Component:ve,PureComponent:fn,memo:ti,forwardRef:ri,flushSync:Pi,unstable_batchedUpdates:Ei,StrictMode:Ti,Suspense:$t,SuspenseList:vt,lazy:ui,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:bi};const nl=Object.freeze(Object.defineProperty({__proto__:null,Children:ii,Component:ve,Fragment:le,PureComponent:fn,StrictMode:Ti,Suspense:$t,SuspenseList:vt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:bi,cloneElement:ki,createContext:Bo,createElement:G,createFactory:xi,createPortal:hi,createRef:jo,default:tl,findDOMNode:Si,flushSync:Pi,forwardRef:ri,hydrate:mi,isElement:Ri,isFragment:wi,isValidElement:Bt,lazy:ui,memo:ti,render:fi,startTransition:hr,unmountComponentAtNode:Ci,unstable_batchedUpdates:Ei,useCallback:Zo,useContext:Yo,useDebugValue:ar,useDeferredValue:Ii,useEffect:pe,useErrorBoundary:$a,useId:Qo,useImperativeHandle:Go,useInsertionEffect:Oi,useLayoutEffect:Mt,useMemo:hn,useReducer:sr,useRef:He,useState:X,useSyncExternalStore:Di,useTransition:ji,version:el},Symbol.toStringTag,{value:"Module"})),yt="ul-app";var j=(e=>(e.Caption="ul-caption",e.CardContainer="ul-card__container",e.CardMainContent="ul-card-main-content",e.Choice="choice",e.ChoiceCheckbox="select-checkbox",e.ChoiceGroup="ul-card__choices",e.ChoiceLabel="select-label",e.ChoiceLabelContainer="choice-label-container",e.ChoiceRadio="select-radio",e.ChoiceTextEntryContainer="choice-text-entry-container",e.ChoiceTextInput="choice-text-input",e.CloseButton="close-btn",e.CloseContainer="close-container",e.ConsentLegalNameInput="ul-consent-legal__name-input",e.CustomStyle="ul-custom-style",e.DesktopSuffix="--desktop",e.FadeInTransition="fade-in-transition",e.LikertNumber="likert-number",e.LikertSmiley="likert-smiley",e.LikertStar="likert-star",e.LoadingSpinner="ul-loading-spinner",e.LoadingSpinnerContainer="ul-loading-spinner-container",e.LoadingSpinnerFirst="first",e.LoadingSpinnerFourth="fourth",e.LoadingSpinnerSecond="second",e.LoadingSpinnerThird="third",e.MobileSuffix="--mobile",e.NPSNumber="nps-number",e.OpenTextInput="ul-card-text__input",e.QuestionHeader="ul-question",e.VideoCard="ul-card--video",e.CheckmarkButton="ul-button-checkmark",e.InactiveButton="ul-button-inactive",e.LeftAlignButton="ul-button-left-align",e.ButtonDisabled="sprig-button-disabled",e.SkipButton="ul-card-skip__button",e))(j||{});const fr="#e6e6e6",Ut="#bd282a",rl=1030;var nt=(e=>(e.Error="x-ul-error",e.EnvironmentID="x-ul-environment-id",e.InstallationMethod="x-ul-installation-method",e.PartnerAnonymousId="x-ul-anonymous-id",e.Platform="userleap-platform",e.PreviewMode="x-ul-preview-mode",e.UserID="x-ul-user-id",e.VisitorID="x-ul-visitor-id",e))(nt||{}),_t=(e=>(e.Email="email",e.Link="link",e.Web="web",e))(_t||{}),bt=(e=>(e.Npm="web-npm",e.NpmBundled="web-npm-bundled",e.Gtm="web-gtm",e.Segment="web-segment",e.SegmentAndroid="android-segment",e.SegmentReactNative="react-native-segment",e.SegmentIOS="ios-segment",e.Snippet="web-snippet",e))(bt||{});const Ai=e=>new Promise(t=>{setTimeout(()=>{t()},e)}),mn=({"userleap-platform":e})=>e!==_t.Web,Q=(e,t)=>{const n=t?j.MobileSuffix:j.DesktopSuffix;return[e+n,e]},ol=(e,t)=>[e,`${e}__${t}`];class Li{constructor(t){he(this,"storage");he(this,"tempStorage",{});he(this,"isStorageAvailable");this.storage=window[t],this.isStorageAvailable=this.checkIfStorageAvailable()}checkIfStorageAvailable(){try{const t="__storage_test__";return this.storage.setItem(t,t),this.storage.removeItem(t),!0}catch{return!1}}setItem(t,n){this.isStorageAvailable?this.storage.setItem(t,n):this.tempStorage[t]=n}getItem(t){return this.isStorageAvailable?this.storage.getItem(t):this.tempStorage[t]}removeItem(t){this.isStorageAvailable?this.storage.removeItem(t):delete this.tempStorage[t]}clear(){this.isStorageAvailable?this.storage.clear():this.tempStorage={}}}const Vt=new Li("sessionStorage");new Li("localStorage");const Ni=e=>{let t;const n=new Set,r=(l,u)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const c=t;t=u??typeof d!="object"?d:Object.assign({},t,d),n.forEach(h=>h(t,c))}},o=()=>t,a={setState:r,getState:o,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>n.clear()};return t=e(r,o,a),a},il=e=>e?Ni(e):Ni;var sl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function al(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var $i={exports:{}},Bi={};const Ui=al(nl);var Vi={exports:{}},Fi={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -6,7 +6,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Et=qo;function hl(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vl=typeof Object.is=="function"?Object.is:hl,ml=Et.useState,gl=Et.useEffect,yl=Et.useLayoutEffect,_l=Et.useDebugValue;function bl(e,t){var n=t(),r=ml({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return yl(function(){i.value=n,i.getSnapshot=t,mr(i)&&o({inst:i})},[e,n,t]),gl(function(){return mr(i)&&o({inst:i}),e(function(){mr(i)&&o({inst:i})})},[e]),_l(n),n}function mr(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vl(e,n)}catch{return!0}}function xl(e,t){return t()}var wl=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?xl:bl;Go.useSyncExternalStore=Et.useSyncExternalStore!==void 0?Et.useSyncExternalStore:wl,function(e){e.exports=Go}(Wo);/** + */var xt=Ui;function ll(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cl=typeof Object.is=="function"?Object.is:ll,ul=xt.useState,dl=xt.useEffect,hl=xt.useLayoutEffect,pl=xt.useDebugValue;function fl(e,t){var n=t(),r=ul({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return hl(function(){o.value=n,o.getSnapshot=t,mr(o)&&i({inst:o})},[e,n,t]),dl(function(){return mr(o)&&i({inst:o}),e(function(){mr(o)&&i({inst:o})})},[e]),pl(n),n}function mr(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!cl(e,n)}catch{return!0}}function ml(e,t){return t()}var gl=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ml:fl;Fi.useSyncExternalStore=xt.useSyncExternalStore!==void 0?xt.useSyncExternalStore:gl,Vi.exports=Fi;var vl=Vi.exports;/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -14,35 +14,25 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var xn=qo,Cl=Wo.exports;function kl(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var El=typeof Object.is=="function"?Object.is:kl,Sl=Cl.useSyncExternalStore,Tl=xn.useRef,Pl=xn.useEffect,Il=xn.useMemo,Rl=xn.useDebugValue;zo.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Tl(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Il(function(){function l(v){if(!c){if(c=!0,u=v,v=r(v),i!==void 0&&a.hasValue){var p=a.value;if(i(p,v))return d=p}return d=v}if(p=d,El(u,v))return p;var h=r(v);return i!==void 0&&i(p,h)?p:(u=v,d=h)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var s=Sl(e,o[0],o[1]);return Pl(function(){a.hasValue=!0,a.value=s},[s]),Rl(s),s},function(e){e.exports=zo}(Ko);const Al=fl(Ko.exports),{useSyncExternalStoreWithSelector:Dl}=Al;function Ol(e,t=e.getState,n){const r=Dl(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return ur(r),r}const Zo=e=>{const t=typeof e=="function"?Gs(e):e,n=(r,i)=>Ol(t,r,i);return Object.assign(n,t),n},Yo=e=>e?Zo(e):Zo,Qo=()=>{try{return window.parent.Intercom}catch(e){return console.error(e),null}},Xo=[Object.freeze(Object.defineProperty({__proto__:null,enable:()=>{const e=Qo();!e||(e.ul_wasVisible&&e("update",{hide_default_launcher:!1}),delete e.ul_wasVisible)},disable:()=>{const e=Qo();!e||(e.ul_wasVisible=!!document.querySelector("iframe.intercom-launcher-frame"),e.ul_wasVisible&&e("update",{hide_default_launcher:!0}))}},Symbol.toStringTag,{value:"Module"}))];class Jo{static disable(){Xo.forEach(t=>t.disable())}static enable(){Xo.forEach(t=>t.enable())}}class jl{constructor(t){Ee(this,"payload");Ee(this,"promise");Ee(this,"reject",()=>{});Ee(this,"resolve",()=>{});this.payload=t,this.promise=new Promise((n,r)=>{this.reject=r,this.resolve=n})}resolveRequest(t){this.resolve(t)}}const Ll={RATELIMIT_RESET_DEFAULT:10};let ea=!1,ta="",wn=!1,Ml=!1,Cn=[];const Bl=e=>e._config&&e._config.installationMethod?e._config.installationMethod:e._gtm?xt.Gtm:e._segment?xt.Segment:xt.Snippet,Nl=(e="")=>{ea=!0,ta=e};function Ul(e={}){const t={"Content-Type":"application/json","userleap-platform":bt.Web,"x-ul-sdk-version":"2.24.12-beta.0",[ot.InstallationMethod]:Bl(e)};if(e.envId&&(t[ot.EnvironmentID]=e.envId),e.token&&(t.Authorization="Bearer "+e.token),e.userId&&(t[ot.UserID]=e.userId),e.visitorId&&(t[ot.VisitorID]=e.visitorId),e.partnerAnonymousId&&(t[ot.PartnerAnonymousId]=e.partnerAnonymousId),e.mobileHeadersJSON){const n=JSON.parse(e.mobileHeadersJSON);Object.assign(t,n)}return e.locale&&(t["accept-language"]=e.locale),window.previewMode&&(t[ot.PreviewMode]="1"),t}const na=async(e,t,n)=>{if(e)return{status:429};{const r=new jl(n);return Cn.push(r),r.promise}},St=async(e,t,n=0,r=!1,i=!1)=>{const o={url:e,options:t,attempt:n,shouldDropOnRateLimit:r};if(wn&&!i)return na(r,i,o);const a={ok:!1,reportError:!1};if(ea)return console.info(`UserLeap - ${ta}`),a;try{t.headers=Object.assign(Ul(),t.headers);const s=await fetch(e,t);if(s.status===429)if(!wn&&!r||i){wn=!0;const c=s.headers.has("ratelimit-reset")?Number(s.headers.get("ratelimit-reset")):Ll.RATELIMIT_RESET_DEFAULT;return await Wi(c*1e3),St(e,t,0,r,!0)}else return na(r,!1,o);if(wn=!1,Cn.length&&(Cn.map(l=>{const{url:c,options:u,attempt:d,shouldDropOnRateLimit:f}=l.payload;St(c,u,d,f).then(v=>{l.resolveRequest(v)})}),Cn=[]),s.ok){if(s.status===249)return Nl(),a;const l=await s.text();try{return l&&l!=="OK"&&(s.json=JSON.parse(l)),s}catch{return{ok:!1,reportError:!1,error:new Error(`failed parsing response json for ${e} - ${l}`)}}}return s}catch(s){const l=n+1;return l>5||Ml?{ok:!1,reportError:!1,error:s}:(await Wi(Math.pow(2,n)*1e3),St(e,t,l))}};var ra={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(dl,function(){var n=function(o,a){if(a=a||{},typeof o!="function")throw new i("fetch must be a function");if(typeof a!="object")throw new i("defaults must be an object");if(a.retries!==void 0&&!r(a.retries))throw new i("retries must be a positive integer");if(a.retryDelay!==void 0&&!r(a.retryDelay)&&typeof a.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(a.retryOn!==void 0&&!Array.isArray(a.retryOn)&&typeof a.retryOn!="function")throw new i("retryOn property expects an array or function");var s={retries:3,retryDelay:1e3,retryOn:[]};return a=Object.assign(s,a),function(c,u){var d=a.retries,f=a.retryDelay,v=a.retryOn;if(u&&u.retries!==void 0)if(r(u.retries))d=u.retries;else throw new i("retries must be a positive integer");if(u&&u.retryDelay!==void 0)if(r(u.retryDelay)||typeof u.retryDelay=="function")f=u.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(u&&u.retryOn)if(Array.isArray(u.retryOn)||typeof u.retryOn=="function")v=u.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(p,h){var g=function(b){var x=typeof Request<"u"&&c instanceof Request?c.clone():c;o(x,u).then(function(w){if(Array.isArray(v)&&v.indexOf(w.status)===-1)p(w);else if(typeof v=="function")try{return Promise.resolve(v(b,null,w)).then(function(m){m?_(b,null,w):p(w)}).catch(h)}catch(m){h(m)}else b=0}function i(o){this.name="ArgumentError",this.message=o}return n})})(ra);const Vl=ra.exports;Vl(fetch);/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var H=function(){return H=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u"?Q:Reflect.ownKeys)(t).forEach(function(n){Be(e,n,t[n])})}var ia=Object.defineProperty;function Be(e,t,n,r){ia(e,t,ae(n&&de(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function Pt(e){return{from:function(t){return e.prototype=Object.create(t.prototype),Be(e.prototype,"constructor",e),{extend:Tt.bind(null,e.prototype)}}}}var Hl=Object.getOwnPropertyDescriptor;function yr(e,t){var n=Hl(e,t),r;return n||(r=Kt(e))&&yr(r,t)}var $l=[].slice;function kn(e,t,n){return $l.call(e,t,n)}function oa(e,t){return t(e)}function zt(e){if(!e)throw new Error("Assertion Failed")}function aa(e){q.setImmediate?setImmediate(e):setTimeout(e,0)}function sa(e,t){return e.reduce(function(n,r,i){var o=t(r,i);return o&&(n[o[0]]=o[1]),n},{})}function Kl(e,t,n){try{e.apply(null,n)}catch(r){t&&t(r)}}function Ne(e,t){if(de(e,t))return e[t];if(!t)return e;if(typeof t!="string"){for(var n=[],r=0,i=t.length;r=0)t=e;else{var i=Kt(e);t=i===Object.prototype?{}:Object.create(i),Ge&&Ge.set(e,t);for(var o in e)de(e,o)&&(t[o]=_r(e[o]))}return t}var Gl={}.toString;function br(e){return Gl.call(e).slice(8,-1)}var xr=typeof Symbol<"u"?Symbol.iterator:"@@iterator",Zl=typeof xr=="symbol"?function(e){var t;return e!=null&&(t=e[xr])&&t.apply(e)}:function(){return null},It={};function Ue(e){var t,n,r,i;if(arguments.length===1){if(ie(e))return e.slice();if(this===It&&typeof e=="string")return[e];if(i=Zl(e)){for(n=[];r=i.next(),!r.done;)n.push(r.value);return n}if(e==null)return[e];if(t=e.length,typeof t=="number"){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}var wr=typeof Symbol<"u"?function(e){return e[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},Pe=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function da(e,t){Pe=e,fa=t}var fa=function(){return!0},Yl=!new Error("").stack;function lt(){if(Yl)try{throw lt.arguments,new Error}catch(e){return e}return new Error}function Cr(e,t){var n=e.stack;return n?(t=t||0,n.indexOf(e.name)===0&&(t+=(e.name+e.message).split(` + */var gn=Ui,yl=vl;function _l(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bl=typeof Object.is=="function"?Object.is:_l,xl=yl.useSyncExternalStore,wl=gn.useRef,kl=gn.useEffect,Cl=gn.useMemo,Sl=gn.useDebugValue;Bi.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=wl(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Cl(function(){function l(p){if(!u){if(u=!0,d=p,p=r(p),o!==void 0&&s.hasValue){var y=s.value;if(o(y,p))return c=y}return c=p}if(y=c,bl(d,p))return y;var f=r(p);return o!==void 0&&o(y,f)?y:(d=p,c=f)}var u=!1,d,c,h=n===void 0?null:n;return[function(){return l(t())},h===null?void 0:function(){return l(h())}]},[t,n,r,o]);var a=xl(e,i[0],i[1]);return kl(function(){s.hasValue=!0,s.value=a},[a]),Sl(a),a},$i.exports=Bi;var El=$i.exports;const Pl=Mi(El),{useSyncExternalStoreWithSelector:Tl}=Pl;function Il(e,t=e.getState,n){const r=Tl(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return ar(r),r}const Hi=e=>{const t=typeof e=="function"?il(e):e,n=(r,o)=>Il(t,r,o);return Object.assign(n,t),n},qi=e=>e?Hi(e):Hi;var gr=(e=>(e.Closed="close.click",e.Complete="survey.completed",e.PageChange="page.change",e.API="api",e.Override="override",e))(gr||{}),Ce=(e=>(e.ReplayCapture="replay.capture",e.SDKReady="sdk.ready",e.SurveyAppeared="survey.appeared",e.SurveyClosed="survey.closed",e.SurveyDimensions="survey.dimensions",e.SurveyFadingOut="survey.fadingOut",e.SurveyHeight="survey.height",e.SurveyPresented="survey.presented",e.SurveyLifeCycle="survey.lifeCycle",e.SurveyWidth="survey.width",e.SurveyWillClose="survey.willClose",e.SurveyWillPresent="survey.will.present",e.CloseSurveyOnOverlayClick="close.survey.overlayClick",e.VisitorIDUpdated="visitor.id.updated",e.QuestionAnswered="question.answered",e))(Ce||{}),Ki=(e=>(e.SurveyId="survey.id",e))(Ki||{}),Se=(e=>(e.VerifyViewVersion="verify.view.version",e.CurrentQuestion="survey.question",e.ViewPrototypeClick="question.prototype.click",e.ViewAgreementClick="question.agreement.click",e.RecordedTaskStart="recorded.task.start",e.RecordedTaskPermissionScreen="recorded.task.permission.screen",e.SurveyComplete="survey.complete",e))(Se||{}),wt=(e=>(e.ViewVersion="view.version",e.QuestionId="qid",e.Props="props",e))(wt||{}),jl=class extends Error{constructor(e,t,n){super(`Possible EventEmitter memory leak detected. ${n} ${t.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`),this.emitter=e,this.type=t,this.count=n,this.name="MaxListenersExceededWarning"}},zi=class{static listenerCount(e,t){return e.listenerCount(t)}constructor(){this.events=new Map,this.maxListeners=zi.defaultMaxListeners,this.hasWarnedAboutPotentialMemoryLeak=!1}_emitInternalEvent(e,t,n){this.emit(e,t,n)}_getListeners(e){return Array.prototype.concat.apply([],this.events.get(e))||[]}_removeListener(e,t){const n=e.indexOf(t);return n>-1&&e.splice(n,1),[]}_wrapOnceListener(e,t){const n=(...r)=>(this.removeListener(e,n),t.apply(this,r));return Object.defineProperty(n,"name",{value:t.name}),n}setMaxListeners(e){return this.maxListeners=e,this}getMaxListeners(){return this.maxListeners}eventNames(){return Array.from(this.events.keys())}emit(e,...t){const n=this._getListeners(e);return n.forEach(r=>{r.apply(this,t)}),n.length>0}addListener(e,t){this._emitInternalEvent("newListener",e,t);const n=this._getListeners(e).concat(t);if(this.events.set(e,n),this.maxListeners>0&&this.listenerCount(e)>this.maxListeners&&!this.hasWarnedAboutPotentialMemoryLeak){this.hasWarnedAboutPotentialMemoryLeak=!0;const r=new jl(this,e,this.listenerCount(e));console.warn(r)}return this}on(e,t){return this.addListener(e,t)}once(e,t){return this.addListener(e,this._wrapOnceListener(e,t))}prependListener(e,t){const n=this._getListeners(e);if(n.length>0){const r=[t].concat(n);this.events.set(e,r)}else this.events.set(e,n.concat(t));return this}prependOnceListener(e,t){return this.prependListener(e,this._wrapOnceListener(e,t))}removeListener(e,t){const n=this._getListeners(e);return n.length>0&&(this._removeListener(n,t),this.events.set(e,n),this._emitInternalEvent("removeListener",e,t)),this}off(e,t){return this.removeListener(e,t)}removeAllListeners(e){return e?this.events.delete(e):this.events.clear(),this}listeners(e){return Array.from(this._getListeners(e))}listenerCount(e){return this._getListeners(e).length}rawListeners(e){return this.listeners(e)}},Wi=zi;Wi.defaultMaxListeners=10;const vn=new Wi;let yn;const Ol=new Uint8Array(16);function Rl(){if(!yn&&(yn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!yn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return yn(Ol)}const te=[];for(let e=0;e<256;++e)te.push((e+256).toString(16).slice(1));function Dl(e,t=0){return te[e[t+0]]+te[e[t+1]]+te[e[t+2]]+te[e[t+3]]+"-"+te[e[t+4]]+te[e[t+5]]+"-"+te[e[t+6]]+te[e[t+7]]+"-"+te[e[t+8]]+te[e[t+9]]+"-"+te[e[t+10]]+te[e[t+11]]+te[e[t+12]]+te[e[t+13]]+te[e[t+14]]+te[e[t+15]]}const Gi={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _n(e,t,n){if(Gi.randomUUID&&!t&&!e)return Gi.randomUUID();e=e||{};const r=e.random||(e.rng||Rl)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return Dl(r)}var ye=(e=>(e.Video="video",e.Audio="audio",e.Screen="screen",e))(ye||{}),re=(e=>(e.PermissionStatus="permission.status",e.AvPermission="av.permission",e.ScreenPermission="screen.permission",e.BeginRecording="begin.recording",e.StartTask="start.task",e.FinishTask="finish.task",e))(re||{}),fe=(e=>(e.Abandoned="abandoned",e.GivenUp="given.up",e.Completed="completed",e))(fe||{}),V=(e=>(e.ScreenPermissionRequested="screen.permission.requested",e.PermissionDescriptors="permission.descriptors",e.PermissionStatusCallback="permission.status.callback",e.StreamReadyCallback="stream.ready.callback",e.StreamCanceledCallback="stream.canceled.callback",e.TaskCompleteCallback="task.complete.callback",e.TaskResponse="task.response",e.TaskStatus="task.status",e.RecordingMediaTypes="recording.media.types",e.StartRecordingCallback="start.recording.callback",e.PassthroughData="passthrough.data",e.CurrentIndex="current.index",e.UploadCallback="upload.callback",e.ProgressCallback="progress.callback",e.BeginCallback="begin.callback",e))(V||{});const Zi=()=>{try{return window.parent.Intercom}catch(e){return console.error(e),null}},Yi=[Object.freeze(Object.defineProperty({__proto__:null,disable:()=>{const e=Zi();e&&(e.ul_wasVisible=!!document.querySelector("iframe.intercom-launcher-frame"),e.ul_wasVisible&&e("update",{hide_default_launcher:!0}))},enable:()=>{const e=Zi();e&&(e.ul_wasVisible&&e("update",{hide_default_launcher:!1}),delete e.ul_wasVisible)}},Symbol.toStringTag,{value:"Module"}))];class Qi{static disable(){Yi.forEach(t=>t.disable())}static enable(){Yi.forEach(t=>t.enable())}}const Al=1,Ll=(e,t,n)=>{const r=e.createElement("style");n&&(r.nonce=n),r.textContent=t,r.id=j.CustomStyle,e.head.appendChild(r)},Ji=()=>{try{return window.parent.innerWidth}catch{return window.innerWidth}},Nl=e=>{const t=e.querySelector(`.${j.CardContainer}`);let n=600,r=360;if(t){n=t.scrollHeight;const o=getComputedStyle(t),i=parseFloat(o.marginTop)+parseFloat(o.marginBottom),s=parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth);n+=i+s,r=t.scrollWidth;const a=parseFloat(o.marginLeft)+parseFloat(o.marginRight),l=parseFloat(o.borderLeftWidth)+parseFloat(o.borderRightWidth);r+=a+l}return[n+Al,Math.min(r,Ji())]},Ml=e=>{const t=e.querySelector(`.${j.CardContainer}`);t&&(t.scrollTop=0)};var Xi={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(sl,function(){var n=function(i,s){if(s=s||{},typeof i!="function")throw new o("fetch must be a function");if(typeof s!="object")throw new o("defaults must be an object");if(s.retries!==void 0&&!r(s.retries))throw new o("retries must be a positive integer");if(s.retryDelay!==void 0&&!r(s.retryDelay)&&typeof s.retryDelay!="function")throw new o("retryDelay must be a positive integer or a function returning a positive integer");if(s.retryOn!==void 0&&!Array.isArray(s.retryOn)&&typeof s.retryOn!="function")throw new o("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return s=Object.assign(a,s),function(u,d){var c=s.retries,h=s.retryDelay,p=s.retryOn;if(d&&d.retries!==void 0)if(r(d.retries))c=d.retries;else throw new o("retries must be a positive integer");if(d&&d.retryDelay!==void 0)if(r(d.retryDelay)||typeof d.retryDelay=="function")h=d.retryDelay;else throw new o("retryDelay must be a positive integer or a function returning a positive integer");if(d&&d.retryOn)if(Array.isArray(d.retryOn)||typeof d.retryOn=="function")p=d.retryOn;else throw new o("retryOn property expects an array or function");return new Promise(function(y,f){var _=function(v){var w=typeof Request<"u"&&u instanceof Request?u.clone():u;i(w,d).then(function(k){if(Array.isArray(p)&&p.indexOf(k.status)===-1)y(k);else if(typeof p=="function")try{return Promise.resolve(p(v,null,k)).then(function(b){b?m(v,null,k):y(k)}).catch(f)}catch(b){f(b)}else v=0}function o(i){this.name="ArgumentError",this.message=i}return n})})(Xi);var $l=Xi.exports;const es=Mi($l),Bl=es(fetch),vr={Error:1,Warn:2,Info:3,Debug:4};let Ul=1e3,Vl=vr.Debug,bn=[];const Fl=e=>e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3}),Hl=(e,t)=>`${Fl(t)}:${e}`,ql=()=>{bn.length>Ul&&bn.shift()},ts=(e,t)=>{e>Vl||(bn.push({level:e,line:Hl(t,new Date)}),ql())},kt=e=>{ts(vr.Info,e)},Kl=e=>{ts(vr.Error,e)},zl=()=>bn.map(e=>e.line),Wl=()=>new TextEncoder().encode(zl().join(` +`)),Gl=async e=>{if(!e)return;const t=Wl();return Bl(e,{body:t,method:"PUT",retries:3,retryDelay:n=>Math.pow(2,n)*1e3})};class Zl{constructor(t){he(this,"payload");he(this,"promise");he(this,"reject",()=>{});he(this,"resolve",()=>{});this.payload=t,this.promise=new Promise((n,r)=>{this.reject=r,this.resolve=n})}resolveRequest(t){this.resolve(t)}}const Yl={RATELIMIT_RESET_DEFAULT:10};let ns=!1,rs="",xn=!1,Ql=!1,wn=[];const Jl=e=>e._config&&e._config.installationMethod?e._config.installationMethod:e._gtm?bt.Gtm:e._segment?bt.Segment:bt.Snippet,Xl=(e="")=>{ns=!0,rs=e};function ec(e={}){const t={"Content-Type":"application/json","userleap-platform":_t.Web,"x-ul-sdk-version":"2.26.2",[nt.InstallationMethod]:Jl(e)};if(e.envId&&(t[nt.EnvironmentID]=e.envId),e.token&&(t.Authorization="Bearer "+e.token),e.userId&&(t[nt.UserID]=e.userId),e.visitorId&&(t[nt.VisitorID]=e.visitorId),e.partnerAnonymousId&&(t[nt.PartnerAnonymousId]=e.partnerAnonymousId),e.mobileHeadersJSON){const n=JSON.parse(e.mobileHeadersJSON);Object.assign(t,n)}return e.locale&&(t["accept-language"]=e.locale),window.previewMode&&(t[nt.PreviewMode]="1"),t}const os=async(e,t,n)=>{if(e)return{status:429};{const r=new Zl(n);return wn.push(r),r.promise}},Ct=async(e,t,n=0,r=!1,o=!1)=>{const i={url:e,options:t,attempt:n,shouldDropOnRateLimit:r};if(xn&&!o)return os(r,o,i);const s={ok:!1,reportError:!1};if(ns)return console.info(`UserLeap - ${rs}`),s;try{t.headers=Object.assign(ec(),t.headers);const a=await fetch(e,t);if(a.status===429)if(!xn&&!r||o){xn=!0;const u=a.headers.has("ratelimit-reset")?Number(a.headers.get("ratelimit-reset")):Yl.RATELIMIT_RESET_DEFAULT;return await Ai(u*1e3),Ct(e,t,0,r,!0)}else return os(r,!1,i);if(xn=!1,wn.length&&(wn.map(l=>{const{url:u,options:d,attempt:c,shouldDropOnRateLimit:h}=l.payload;Ct(u,d,c,h).then(p=>{l.resolveRequest(p)})}),wn=[]),a.ok){if(a.status===249)return Xl(),s;const l=await a.text();try{return l&&l!=="OK"&&(a.json=JSON.parse(l)),a}catch{return{ok:!1,reportError:!1,error:new Error(`failed parsing response json for ${e} - ${l}`)}}}return a}catch(a){const l=n+1;return l>5||Ql?{ok:!1,reportError:!1,error:a}:(await Ai(Math.pow(2,n)*1e3),Ct(e,t,l))}};es(fetch);const K=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Y=Object.keys,oe=Array.isArray;function se(e,t){return typeof t!="object"||Y(t).forEach(function(n){e[n]=t[n]}),e}typeof Promise>"u"||K.Promise||(K.Promise=Promise);const Ft=Object.getPrototypeOf,tc={}.hasOwnProperty;function ue(e,t){return tc.call(e,t)}function St(e,t){typeof t=="function"&&(t=t(Ft(e))),(typeof Reflect>"u"?Y:Reflect.ownKeys)(t).forEach(n=>{De(e,n,t[n])})}const is=Object.defineProperty;function De(e,t,n,r){is(e,t,se(n&&ue(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function Et(e){return{from:function(t){return e.prototype=Object.create(t.prototype),De(e.prototype,"constructor",e),{extend:St.bind(null,e.prototype)}}}}const nc=Object.getOwnPropertyDescriptor;function yr(e,t){let n;return nc(e,t)||(n=Ft(e))&&yr(n,t)}const rc=[].slice;function kn(e,t,n){return rc.call(e,t,n)}function ss(e,t){return t(e)}function Ht(e){if(!e)throw new Error("Assertion Failed")}function as(e){K.setImmediate?setImmediate(e):setTimeout(e,0)}function ls(e,t){return e.reduce((n,r,o)=>{var i=t(r,o);return i&&(n[i[0]]=i[1]),n},{})}function Ae(e,t){if(ue(e,t))return e[t];if(!t)return e;if(typeof t!="string"){for(var n=[],r=0,o=t.length;r["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>K[e]),ic=ds.map(e=>K[e]);ls(ds,e=>[e,!0]);let qe=null;function qt(e){qe=typeof WeakMap<"u"&&new WeakMap;const t=_r(e);return qe=null,t}function _r(e){if(!e||typeof e!="object")return e;let t=qe&&qe.get(e);if(t)return t;if(oe(e)){t=[],qe&&qe.set(e,t);for(var n=0,r=e.length;n=0)t=e;else{const i=Ft(e);for(var o in t=i===Object.prototype?{}:Object.create(i),qe&&qe.set(e,t),e)ue(e,o)&&(t[o]=_r(e[o]))}return t}const{toString:sc}={};function br(e){return sc.call(e).slice(8,-1)}const xr=typeof Symbol<"u"?Symbol.iterator:"@@iterator",ac=typeof xr=="symbol"?function(e){var t;return e!=null&&(t=e[xr])&&t.apply(e)}:function(){return null},Pt={};function Le(e){var t,n,r,o;if(arguments.length===1){if(oe(e))return e.slice();if(this===Pt&&typeof e=="string")return[e];if(o=ac(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(e==null)return[e];if(typeof(t=e.length)=="number"){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const wr=typeof Symbol<"u"?e=>e[Symbol.toStringTag]==="AsyncFunction":()=>!1;var Ee=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function hs(e,t){Ee=e,ps=t}var ps=()=>!0;const lc=!new Error("").stack;function rt(){if(lc)try{throw rt.arguments,new Error}catch(e){return e}return new Error}function kr(e,t){var n=e.stack;return n?(t=t||0,n.indexOf(e.name)===0&&(t+=(e.name+e.message).split(` `).length),n.split(` -`).slice(t).filter(fa).map(function(r){return` -`+r}).join("")):""}var Ql=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"],pa=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],kr=Ql.concat(pa),Xl={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Rt(e,t){this._e=lt(),this.name=e,this.message=t}Pt(Rt).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Cr(this._e,2))}},toString:function(){return this.name+": "+this.message}});function ha(e,t){return e+". Errors: "+Object.keys(t).map(function(n){return t[n].toString()}).filter(function(n,r,i){return i.indexOf(n)===r}).join(` -`)}function En(e,t,n,r){this._e=lt(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=ha(e,t)}Pt(En).from(Rt);function Wt(e,t){this._e=lt(),this.name="BulkError",this.failures=Object.keys(t).map(function(n){return t[n]}),this.failuresByPos=t,this.message=ha(e,t)}Pt(Wt).from(Rt);var Er=kr.reduce(function(e,t){return e[t]=t+"Error",e},{}),Jl=Rt,U=kr.reduce(function(e,t){var n=t+"Error";function r(i,o){this._e=lt(),this.name=n,i?typeof i=="string"?(this.message=""+i+(o?` - `+o:""),this.inner=o||null):typeof i=="object"&&(this.message=i.name+" "+i.message,this.inner=i):(this.message=Xl[t]||n,this.inner=null)}return Pt(r).from(Jl),e[t]=r,e},{});U.Syntax=SyntaxError,U.Type=TypeError,U.Range=RangeError;var va=pa.reduce(function(e,t){return e[t+"Error"]=U[t],e},{});function eu(e,t){if(!e||e instanceof Rt||e instanceof TypeError||e instanceof SyntaxError||!e.name||!va[e.name])return e;var n=new va[e.name](t||e.message,e);return"stack"in e&&Be(n,"stack",{get:function(){return this.inner.stack}}),n}var Sn=kr.reduce(function(e,t){return["Syntax","Type","Range"].indexOf(t)===-1&&(e[t+"Error"]=U[t]),e},{});Sn.ModifyError=En,Sn.DexieError=Rt,Sn.BulkError=Wt;function K(){}function Gt(e){return e}function tu(e,t){return e==null||e===Gt?t:function(n){return t(e(n))}}function ut(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function nu(e,t){return e===K?t:function(){var n=e.apply(this,arguments);n!==void 0&&(arguments[0]=n);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?ut(r,this.onsuccess):r),i&&(this.onerror=this.onerror?ut(i,this.onerror):i),o!==void 0?o:n}}function ru(e,t){return e===K?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?ut(n,this.onsuccess):n),r&&(this.onerror=this.onerror?ut(r,this.onerror):r)}}function iu(e,t){return e===K?t:function(n){var r=e.apply(this,arguments);ae(n,r);var i=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?ut(i,this.onsuccess):i),o&&(this.onerror=this.onerror?ut(o,this.onerror):o),r===void 0?a===void 0?void 0:a:ae(r,a)}}function ou(e,t){return e===K?t:function(){return t.apply(this,arguments)===!1?!1:e.apply(this,arguments)}}function Sr(e,t){return e===K?t:function(){var n=e.apply(this,arguments);if(n&&typeof n.then=="function"){for(var r=this,i=arguments.length,o=new Array(i);i--;)o[i]=arguments[i];return n.then(function(){return t.apply(r,o)})}return t.apply(this,arguments)}}var Zt={},au=100,su=20,ma=100,Tr=typeof Promise>"u"?[]:function(){var e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,Kt(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,Kt(t),e]}(),Pr=Tr[0],Tn=Tr[1],Ir=Tr[2],ga=Tn&&Tn.then,Pn=Pr&&Pr.constructor,Rr=!!Ir,Ar=!1,lu=Ir?function(){Ir.then(Dn)}:q.setImmediate?setImmediate.bind(null,Dn):q.MutationObserver?function(){var e=document.createElement("div");new MutationObserver(function(){Dn(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(Dn,0)},Yt=function(e,t){Qt.push([e,t]),In&&(lu(),In=!1)},Dr=!0,In=!0,ct=[],Rn=[],Or=null,jr=Gt,At={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ta,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(function(e){try{Ta(e[0],e[1])}catch{}})}},B=At,Qt=[],dt=0,An=[];function I(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=K,this._lib=!1;var t=this._PSD=B;if(Pe&&(this._stackHolder=lt(),this._prev=null,this._numPrev=0),typeof e!="function"){if(e!==Zt)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Mr(this,this._value);return}this._state=null,this._value=null,++t.ref,_a(this,e)}var Lr={get:function(){var e=B,t=Ln;function n(r,i){var o=this,a=!e.global&&(e!==B||t!==Ln),s=a&&!Ve(),l=new I(function(c,u){Br(o,new ya(Bn(r,e,a,s),Bn(i,e,a,s),c,u,e))});return Pe&&wa(l,this),l}return n.prototype=Zt,n},set:function(e){Be(this,"then",e&&e.prototype===Zt?Lr:{get:function(){return e},set:Lr.set})}};Tt(I.prototype,{then:Lr,_then:function(e,t){Br(this,new ya(null,null,e,t,B))},catch:function(e){if(arguments.length===1)return this.then(null,e);var t=arguments[0],n=arguments[1];return typeof t=="function"?this.then(null,function(r){return r instanceof t?n(r):On(r)}):this.then(null,function(r){return r&&r.name===t?n(r):On(r)})},finally:function(e){return this.then(function(t){return e(),t},function(t){return e(),On(t)})},stack:{get:function(){if(this._stack)return this._stack;try{Ar=!0;var e=xa(this,[],su),t=e.join(` -From previous: `);return this._state!==null&&(this._stack=t),t}finally{Ar=!1}}},timeout:function(e,t){var n=this;return e<1/0?new I(function(r,i){var o=setTimeout(function(){return i(new U.Timeout(t))},e);n.then(r,i).finally(clearTimeout.bind(null,o))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&Be(I.prototype,Symbol.toStringTag,"Dexie.Promise"),At.env=Ca();function ya(e,t,n,r,i){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=n,this.reject=r,this.psd=i}Tt(I,{all:function(){var e=Ue.apply(null,arguments).map(Mn);return new I(function(t,n){e.length===0&&t([]);var r=e.length;e.forEach(function(i,o){return I.resolve(i).then(function(a){e[o]=a,--r||t(e)},n)})})},resolve:function(e){if(e instanceof I)return e;if(e&&typeof e.then=="function")return new I(function(n,r){e.then(n,r)});var t=new I(Zt,!0,e);return wa(t,Or),t},reject:On,race:function(){var e=Ue.apply(null,arguments).map(Mn);return new I(function(t,n){e.map(function(r){return I.resolve(r).then(t,n)})})},PSD:{get:function(){return B},set:function(e){return B=e}},totalEchoes:{get:function(){return Ln}},newPSD:Ze,usePSD:Ot,scheduler:{get:function(){return Yt},set:function(e){Yt=e}},rejectionMapper:{get:function(){return jr},set:function(e){jr=e}},follow:function(e,t){return new I(function(n,r){return Ze(function(i,o){var a=B;a.unhandleds=[],a.onunhandled=o,a.finalize=ut(function(){var s=this;cu(function(){s.unhandleds.length===0?i():o(s.unhandleds[0])})},a.finalize),e()},t,n,r)})}}),Pn&&(Pn.allSettled&&Be(I,"allSettled",function(){var e=Ue.apply(null,arguments).map(Mn);return new I(function(t){e.length===0&&t([]);var n=e.length,r=new Array(n);e.forEach(function(i,o){return I.resolve(i).then(function(a){return r[o]={status:"fulfilled",value:a}},function(a){return r[o]={status:"rejected",reason:a}}).then(function(){return--n||t(r)})})})}),Pn.any&&typeof AggregateError<"u"&&Be(I,"any",function(){var e=Ue.apply(null,arguments).map(Mn);return new I(function(t,n){e.length===0&&n(new AggregateError([]));var r=e.length,i=new Array(r);e.forEach(function(o,a){return I.resolve(o).then(function(s){return t(s)},function(s){i[a]=s,--r||n(new AggregateError(i))})})})}));function _a(e,t){try{t(function(n){if(e._state===null){if(n===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&Xt();n&&typeof n.then=="function"?_a(e,function(i,o){n instanceof I?n._then(i,o):n.then(i,o)}):(e._state=!0,e._value=n,ba(e)),r&&Jt()}},Mr.bind(null,e))}catch(n){Mr(e,n)}}function Mr(e,t){if(Rn.push(t),e._state===null){var n=e._lib&&Xt();t=jr(t),e._state=!1,e._value=t,Pe&&t!==null&&typeof t=="object"&&!t._promise&&Kl(function(){var r=yr(t,"stack");t._promise=e,Be(t,"stack",{get:function(){return Ar?r&&(r.get?r.get.apply(t):r.value):e.stack}})}),du(e),ba(e),n&&Jt()}}function ba(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n0;)for(e=Qt,Qt=[],n=e.length,t=0;t0);Dr=!0,In=!0}function Nr(){var e=ct;ct=[],e.forEach(function(r){r._PSD.onunhandled.call(null,r._value,r)});for(var t=An.slice(0),n=t.length;n;)t[--n]()}function cu(e){function t(){e(),An.splice(An.indexOf(t),1)}An.push(t),++dt,Yt(function(){--dt===0&&Nr()},[])}function du(e){ct.some(function(t){return t._value===e._value})||ct.push(e)}function fu(e){for(var t=ct.length;t;)if(ct[--t]._value===e._value){ct.splice(t,1);return}}function On(e){return new I(Zt,!1,e)}function W(e,t){var n=B;return function(){var r=Xt(),i=B;try{return Ye(n,!0),e.apply(this,arguments)}catch(o){t&&t(o)}finally{Ye(i,!1),r&&Jt()}}}var oe={awaits:0,echoes:0,id:0},pu=0,jn=[],Ur=0,Ln=0,hu=0;function Ze(e,t,n,r){var i=B,o=Object.create(i);o.parent=i,o.ref=0,o.global=!1,o.id=++hu;var a=At.env;o.env=Rr?{Promise:I,PromiseProp:{value:I,configurable:!0,writable:!0},all:I.all,race:I.race,allSettled:I.allSettled,any:I.any,resolve:I.resolve,reject:I.reject,nthen:Ea(a.nthen,o),gthen:Ea(a.gthen,o)}:{},t&&ae(o,t),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=Ot(o,e,n,r);return o.ref===0&&o.finalize(),s}function Dt(){return oe.id||(oe.id=++pu),++oe.awaits,oe.echoes+=ma,oe.id}function Ve(){return oe.awaits?(--oe.awaits===0&&(oe.id=0),oe.echoes=oe.awaits*ma,!0):!1}(""+ga).indexOf("[native code]")===-1&&(Dt=Ve=K);function Mn(e){return oe.echoes&&e&&e.constructor===Pn?(Dt(),e.then(function(t){return Ve(),t},function(t){return Ve(),J(t)})):e}function vu(e){++Ln,(!oe.echoes||--oe.echoes===0)&&(oe.echoes=oe.id=0),jn.push(B),Ye(e,!0)}function mu(){var e=jn[jn.length-1];jn.pop(),Ye(e,!1)}function Ye(e,t){var n=B;if((t?oe.echoes&&(!Ur++||e!==B):Ur&&(!--Ur||e!==B))&&ka(t?vu.bind(null,e):mu),e!==B&&(B=e,n===At&&(At.env=Ca()),Rr)){var r=At.env.Promise,i=e.env;Tn.then=i.nthen,r.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(q,"Promise",i.PromiseProp),r.all=i.all,r.race=i.race,r.resolve=i.resolve,r.reject=i.reject,i.allSettled&&(r.allSettled=i.allSettled),i.any&&(r.any=i.any))}}function Ca(){var e=q.Promise;return Rr?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(q,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:Tn.then,gthen:e.prototype.then}:{}}function Ot(e,t,n,r,i){var o=B;try{return Ye(e,!0),t(n,r,i)}finally{Ye(o,!1)}}function ka(e){ga.call(Pr,e)}function Bn(e,t,n,r){return typeof e!="function"?e:function(){var i=B;n&&Dt(),Ye(t,!0);try{return e.apply(this,arguments)}finally{Ye(i,!1),r&&ka(Ve)}}}function Ea(e,t){return function(n,r){return e.call(this,Bn(n,t),Bn(r,t))}}var Sa="unhandledrejection";function Ta(e,t){var n;try{n=t.onuncatched(e)}catch{}if(n!==!1)try{var r,i={promise:t,reason:e};if(q.document&&document.createEvent?(r=document.createEvent("Event"),r.initEvent(Sa,!0,!0),ae(r,i)):q.CustomEvent&&(r=new CustomEvent(Sa,{detail:i}),ae(r,i)),r&&q.dispatchEvent&&(dispatchEvent(r),!q.PromiseRejectionEvent&&q.onunhandledrejection))try{q.onunhandledrejection(r)}catch{}Pe&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: "+(e.stack||e))}catch{}}var J=I.reject;function Vr(e,t,n,r){if(!e.idbdb||!e._state.openComplete&&!B.letThrough&&!e._vip){if(e._state.openComplete)return J(new U.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return J(new U.DatabaseClosed);e.open().catch(K)}return e._state.dbReadyPromise.then(function(){return Vr(e,t,n,r)})}else{var i=e._createTransaction(t,n,e._dbSchema);try{i.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===Er.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(function(){return Vr(e,t,n,r)})):J(o)}return i._promise(t,function(o,a){return Ze(function(){return B.trans=i,r(o,a,i)})}).then(function(o){return i._completion.then(function(){return o})})}}var Pa="3.2.4",ft=String.fromCharCode(65535),Fr=-1/0,Fe="Invalid key provided. Keys must be of type string, number, Date or Array.",Ia="String expected.",en=[],Nn=typeof navigator<"u"&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),gu=Nn,yu=Nn,Ra=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)},Un="__dbnames",Hr="readonly",$r="readwrite";function pt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var Aa={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Vn(e){return typeof e=="string"&&!/\./.test(e)?function(t){return t[e]===void 0&&e in t&&(t=qt(t),delete t[e]),t}:function(t){return t}}var _u=function(){function e(){}return e.prototype._trans=function(t,n,r){var i=this._tx||B.trans,o=this.name;function a(l,c,u){if(!u.schema[o])throw new U.NotFound("Table "+o+" not part of transaction");return n(u.idbtrans,u)}var s=Xt();try{return i&&i.db===this.db?i===B.trans?i._promise(t,a,r):Ze(function(){return i._promise(t,a,r)},{trans:i,transless:B.transless||B}):Vr(this.db,t,[this.name],a)}finally{s&&Jt()}},e.prototype.get=function(t,n){var r=this;return t&&t.constructor===Object?this.where(t).first(n):this._trans("readonly",function(i){return r.core.get({trans:i,key:t}).then(function(o){return r.hook.reading.fire(o)})}).then(n)},e.prototype.where=function(t){if(typeof t=="string")return new this.db.WhereClause(this,t);if(ie(t))return new this.db.WhereClause(this,"["+t.join("+")+"]");var n=Q(t);if(n.length===1)return this.where(n[0]).equals(t[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter(function(u){return u.compound&&n.every(function(d){return u.keyPath.indexOf(d)>=0})&&u.keyPath.every(function(d){return n.indexOf(d)>=0})})[0];if(r&&this.db._maxKey!==ft)return this.where(r.name).equals(r.keyPath.map(function(u){return t[u]}));!r&&Pe&&console.warn("The query "+JSON.stringify(t)+" on "+this.name+" would benefit of a "+("compound index ["+n.join("+")+"]"));var i=this.schema.idxByName,o=this.db._deps.indexedDB;function a(u,d){try{return o.cmp(u,d)===0}catch{return!1}}var s=n.reduce(function(u,d){var f=u[0],v=u[1],p=i[d],h=t[d];return[f||p,f||!p?pt(v,p&&p.multi?function(g){var _=Ne(g,d);return ie(_)&&_.some(function(b){return a(h,b)})}:function(g){return a(h,Ne(g,d))}):v]},[null,null]),l=s[0],c=s[1];return l?this.where(l.name).equals(t[l.keyPath]).filter(c):r?this.filter(c):this.where(n).equals("")},e.prototype.filter=function(t){return this.toCollection().and(t)},e.prototype.count=function(t){return this.toCollection().count(t)},e.prototype.offset=function(t){return this.toCollection().offset(t)},e.prototype.limit=function(t){return this.toCollection().limit(t)},e.prototype.each=function(t){return this.toCollection().each(t)},e.prototype.toArray=function(t){return this.toCollection().toArray(t)},e.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},e.prototype.orderBy=function(t){return new this.db.Collection(new this.db.WhereClause(this,ie(t)?"["+t.join("+")+"]":t))},e.prototype.reverse=function(){return this.toCollection().reverse()},e.prototype.mapToClass=function(t){this.schema.mappedClass=t;var n=function(r){if(!r)return r;var i=Object.create(t.prototype);for(var o in r)if(de(r,o))try{i[o]=r[o]}catch{}return i};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=n,this.hook("reading",n),t},e.prototype.defineClass=function(){function t(n){ae(this,n)}return this.mapToClass(t)},e.prototype.add=function(t,n){var r=this,i=this.schema.primKey,o=i.auto,a=i.keyPath,s=t;return a&&o&&(s=Vn(a)(t)),this._trans("readwrite",function(l){return r.core.mutate({trans:l,type:"add",keys:n!=null?[n]:null,values:[s]})}).then(function(l){return l.numFailures?I.reject(l.failures[0]):l.lastResult}).then(function(l){if(a)try{xe(t,a,l)}catch{}return l})},e.prototype.update=function(t,n){if(typeof t=="object"&&!ie(t)){var r=Ne(t,this.schema.primKey.keyPath);if(r===void 0)return J(new U.InvalidArgument("Given object does not contain its primary key"));try{typeof n!="function"?Q(n).forEach(function(i){xe(t,i,n[i])}):n(t,{value:t,primKey:r})}catch{}return this.where(":id").equals(r).modify(n)}else return this.where(":id").equals(t).modify(n)},e.prototype.put=function(t,n){var r=this,i=this.schema.primKey,o=i.auto,a=i.keyPath,s=t;return a&&o&&(s=Vn(a)(t)),this._trans("readwrite",function(l){return r.core.mutate({trans:l,type:"put",values:[s],keys:n!=null?[n]:null})}).then(function(l){return l.numFailures?I.reject(l.failures[0]):l.lastResult}).then(function(l){if(a)try{xe(t,a,l)}catch{}return l})},e.prototype.delete=function(t){var n=this;return this._trans("readwrite",function(r){return n.core.mutate({trans:r,type:"delete",keys:[t]})}).then(function(r){return r.numFailures?I.reject(r.failures[0]):void 0})},e.prototype.clear=function(){var t=this;return this._trans("readwrite",function(n){return t.core.mutate({trans:n,type:"deleteRange",range:Aa})}).then(function(n){return n.numFailures?I.reject(n.failures[0]):void 0})},e.prototype.bulkGet=function(t){var n=this;return this._trans("readonly",function(r){return n.core.getMany({keys:t,trans:r}).then(function(i){return i.map(function(o){return n.hook.reading.fire(o)})})})},e.prototype.bulkAdd=function(t,n,r){var i=this,o=Array.isArray(n)?n:void 0;r=r||(o?void 0:n);var a=r?r.allKeys:void 0;return this._trans("readwrite",function(s){var l=i.schema.primKey,c=l.auto,u=l.keyPath;if(u&&o)throw new U.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new U.InvalidArgument("Arguments objects and keys must have the same length");var d=t.length,f=u&&c?t.map(Vn(u)):t;return i.core.mutate({trans:s,type:"add",keys:o,values:f,wantResults:a}).then(function(v){var p=v.numFailures,h=v.results,g=v.lastResult,_=v.failures,b=a?h:g;if(p===0)return b;throw new Wt(i.name+".bulkAdd(): "+p+" of "+d+" operations failed",_)})})},e.prototype.bulkPut=function(t,n,r){var i=this,o=Array.isArray(n)?n:void 0;r=r||(o?void 0:n);var a=r?r.allKeys:void 0;return this._trans("readwrite",function(s){var l=i.schema.primKey,c=l.auto,u=l.keyPath;if(u&&o)throw new U.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new U.InvalidArgument("Arguments objects and keys must have the same length");var d=t.length,f=u&&c?t.map(Vn(u)):t;return i.core.mutate({trans:s,type:"put",keys:o,values:f,wantResults:a}).then(function(v){var p=v.numFailures,h=v.results,g=v.lastResult,_=v.failures,b=a?h:g;if(p===0)return b;throw new Wt(i.name+".bulkPut(): "+p+" of "+d+" operations failed",_)})})},e.prototype.bulkDelete=function(t){var n=this,r=t.length;return this._trans("readwrite",function(i){return n.core.mutate({trans:i,type:"delete",keys:t})}).then(function(i){var o=i.numFailures,a=i.lastResult,s=i.failures;if(o===0)return a;throw new Wt(n.name+".bulkDelete(): "+o+" of "+r+" operations failed",s)})},e}();function tn(e){var t={},n=function(s,l){if(l){for(var c=arguments.length,u=new Array(c-1);--c;)u[c-1]=arguments[c];return t[s].subscribe.apply(null,u),e}else if(typeof s=="string")return t[s]};n.addEventType=o;for(var r=1,i=arguments.length;rt?1:ef?s:0}return this.toArray(function(c){return c.sort(l)}).then(n)},e.prototype.toArray=function(t){var n=this;return this._read(function(r){var i=n._ctx;if(i.dir==="next"&&jt(i,!0)&&i.limit>0){var o=i.valueMapper,a=Fn(i,i.table.core.schema);return i.table.core.query({trans:r,limit:i.limit,values:!0,query:{index:a,range:i.range}}).then(function(l){var c=l.result;return o?c.map(o):c})}else{var s=[];return Hn(i,function(l){return s.push(l)},r,i.table.core).then(function(){return s})}},t)},e.prototype.offset=function(t){var n=this._ctx;return t<=0?this:(n.offset+=t,jt(n)?zr(n,function(){var r=t;return function(i,o){return r===0?!0:r===1?(--r,!1):(o(function(){i.advance(r),r=0}),!1)}}):zr(n,function(){var r=t;return function(){return--r<0}}),this)},e.prototype.limit=function(t){return this._ctx.limit=Math.min(this._ctx.limit,t),zr(this._ctx,function(){var n=t;return function(r,i,o){return--n<=0&&i(o),n>=0}},!0),this},e.prototype.until=function(t,n){return Kr(this._ctx,function(r,i,o){return t(r.value)?(i(o),n):!0}),this},e.prototype.first=function(t){return this.limit(1).toArray(function(n){return n[0]}).then(t)},e.prototype.last=function(t){return this.reverse().first(t)},e.prototype.filter=function(t){return Kr(this._ctx,function(n){return t(n.value)}),xu(this._ctx,t),this},e.prototype.and=function(t){return this.filter(t)},e.prototype.or=function(t){return new this.db.WhereClause(this._ctx.table,t,this)},e.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},e.prototype.desc=function(){return this.reverse()},e.prototype.eachKey=function(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,i){t(i.key,i)})},e.prototype.eachUniqueKey=function(t){return this._ctx.unique="unique",this.eachKey(t)},e.prototype.eachPrimaryKey=function(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,i){t(i.primaryKey,i)})},e.prototype.keys=function(t){var n=this._ctx;n.keysOnly=!n.isMatch;var r=[];return this.each(function(i,o){r.push(o.key)}).then(function(){return r}).then(t)},e.prototype.primaryKeys=function(t){var n=this._ctx;if(n.dir==="next"&&jt(n,!0)&&n.limit>0)return this._read(function(i){var o=Fn(n,n.table.core.schema);return n.table.core.query({trans:i,values:!1,limit:n.limit,query:{index:o,range:n.range}})}).then(function(i){var o=i.result;return o}).then(t);n.keysOnly=!n.isMatch;var r=[];return this.each(function(i,o){r.push(o.primaryKey)}).then(function(){return r}).then(t)},e.prototype.uniqueKeys=function(t){return this._ctx.unique="unique",this.keys(t)},e.prototype.firstKey=function(t){return this.limit(1).keys(function(n){return n[0]}).then(t)},e.prototype.lastKey=function(t){return this.reverse().firstKey(t)},e.prototype.distinct=function(){var t=this._ctx,n=t.index&&t.table.schema.idxByName[t.index];if(!n||!n.multi)return this;var r={};return Kr(this._ctx,function(i){var o=i.primaryKey.toString(),a=de(r,o);return r[o]=!0,!a}),this},e.prototype.modify=function(t){var n=this,r=this._ctx;return this._write(function(i){var o;if(typeof t=="function")o=t;else{var a=Q(t),s=a.length;o=function(_){for(var b=!1,x=0;x0&&l.mutate({trans:i,type:"add",values:C}).then(function(A){for(var j in A.failures)E.splice(parseInt(j),1);g(C.length,A)})).then(function(){return(S.length>0||M&&typeof t=="object")&&l.mutate({trans:i,type:"put",keys:k,values:S,criteria:M,changeSpec:typeof t!="function"&&t}).then(function(A){return g(S.length,A)})}).then(function(){return(E.length>0||M&&t===qr)&&l.mutate({trans:i,type:"delete",keys:E,criteria:M}).then(function(A){return g(E.length,A)})}).then(function(){return _.length>x+w&&b(x+f)})})};return b(0).then(function(){if(v.length>0)throw new En("Error modifying one or more objects",v,p,h);return _.length})})})},e.prototype.delete=function(){var t=this._ctx,n=t.range;return jt(t)&&(t.isPrimKey&&!yu||n.type===3)?this._write(function(r){var i=t.table.core.schema.primaryKey,o=n;return t.table.core.count({trans:r,query:{index:i,range:o}}).then(function(a){return t.table.core.mutate({trans:r,type:"deleteRange",range:o}).then(function(s){var l=s.failures;s.lastResult,s.results;var c=s.numFailures;if(c)throw new En("Could not delete some values",Object.keys(l).map(function(u){return l[u]}),a-c);return a-c})})}):this.modify(qr)},e}(),qr=function(e,t){return t.value=null};function Eu(e){return nn(ku.prototype,function(n,r){this.db=e;var i=Aa,o=null;if(r)try{i=r()}catch(c){o=c}var a=n._ctx,s=a.table,l=s.hook.reading.fire;this._ctx={table:s,index:a.index,isPrimKey:!a.index||s.schema.primKey.keyPath&&a.index===s.schema.primKey.name,range:i,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:a.or,valueMapper:l!==Gt?l:null}})}function Su(e,t){return et?-1:e===t?0:1}function fe(e,t,n){var r=e instanceof Ba?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function Lt(e){return new e.Collection(e,function(){return Ma("")}).limit(0)}function Pu(e){return e==="next"?function(t){return t.toUpperCase()}:function(t){return t.toLowerCase()}}function Iu(e){return e==="next"?function(t){return t.toLowerCase()}:function(t){return t.toUpperCase()}}function Ru(e,t,n,r,i,o){for(var a=Math.min(e.length,r.length),s=-1,l=0;l=0?e.substr(0,s)+t[s]+n.substr(s+1):null;i(e[l],c)<0&&(s=l)}return a0)&&(w=C)}return g(w!==null?function(){h.continue(w+u)}:_),!1}),v}function Qe(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Ma(e){return{type:1,lower:e,upper:e}}var Ba=function(){function e(){}return Object.defineProperty(e.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),e.prototype.between=function(t,n,r,i){r=r!==!1,i=i===!0;try{return this._cmp(t,n)>0||this._cmp(t,n)===0&&(r||i)&&!(r&&i)?Lt(this):new this.Collection(this,function(){return Qe(t,n,!r,!i)})}catch{return fe(this,Fe)}},e.prototype.equals=function(t){return t==null?fe(this,Fe):new this.Collection(this,function(){return Ma(t)})},e.prototype.above=function(t){return t==null?fe(this,Fe):new this.Collection(this,function(){return Qe(t,void 0,!0)})},e.prototype.aboveOrEqual=function(t){return t==null?fe(this,Fe):new this.Collection(this,function(){return Qe(t,void 0,!1)})},e.prototype.below=function(t){return t==null?fe(this,Fe):new this.Collection(this,function(){return Qe(void 0,t,!1,!0)})},e.prototype.belowOrEqual=function(t){return t==null?fe(this,Fe):new this.Collection(this,function(){return Qe(void 0,t)})},e.prototype.startsWith=function(t){return typeof t!="string"?fe(this,Ia):this.between(t,t+ft,!0,!0)},e.prototype.startsWithIgnoreCase=function(t){return t===""?this.startsWith(t):$n(this,function(n,r){return n.indexOf(r[0])===0},[t],ft)},e.prototype.equalsIgnoreCase=function(t){return $n(this,function(n,r){return n===r[0]},[t],"")},e.prototype.anyOfIgnoreCase=function(){var t=Ue.apply(It,arguments);return t.length===0?Lt(this):$n(this,function(n,r){return r.indexOf(n)!==-1},t,"")},e.prototype.startsWithAnyOfIgnoreCase=function(){var t=Ue.apply(It,arguments);return t.length===0?Lt(this):$n(this,function(n,r){return r.some(function(i){return n.indexOf(i)===0})},t,ft)},e.prototype.anyOf=function(){var t=this,n=Ue.apply(It,arguments),r=this._cmp;try{n.sort(r)}catch{return fe(this,Fe)}if(n.length===0)return Lt(this);var i=new this.Collection(this,function(){return Qe(n[0],n[n.length-1])});i._ondirectionchange=function(a){r=a==="next"?t._ascending:t._descending,n.sort(r)};var o=0;return i._addAlgorithm(function(a,s,l){for(var c=a.key;r(c,n[o])>0;)if(++o,o===n.length)return s(l),!1;return r(c,n[o])===0?!0:(s(function(){a.continue(n[o])}),!1)}),i},e.prototype.notEqual=function(t){return this.inAnyRange([[Fr,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},e.prototype.noneOf=function(){var t=Ue.apply(It,arguments);if(t.length===0)return new this.Collection(this);try{t.sort(this._ascending)}catch{return fe(this,Fe)}var n=t.reduce(function(r,i){return r?r.concat([[r[r.length-1][1],i]]):[[Fr,i]]},null);return n.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(n,{includeLowers:!1,includeUppers:!1})},e.prototype.inAnyRange=function(t,n){var r=this,i=this._cmp,o=this._ascending,a=this._descending,s=this._min,l=this._max;if(t.length===0)return Lt(this);if(!t.every(function(m){return m[0]!==void 0&&m[1]!==void 0&&o(m[0],m[1])<=0}))return fe(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",U.InvalidArgument);var c=!n||n.includeLowers!==!1,u=n&&n.includeUppers===!0;function d(m,C){for(var S=0,k=m.length;S0){E[0]=s(E[0],C[0]),E[1]=l(E[1],C[1]);break}}return S===k&&m.push(C),m}var f=o;function v(m,C){return f(m[0],C[0])}var p;try{p=t.reduce(d,[]),p.sort(v)}catch{return fe(this,Fe)}var h=0,g=u?function(m){return o(m,p[h][1])>0}:function(m){return o(m,p[h][1])>=0},_=c?function(m){return a(m,p[h][0])>0}:function(m){return a(m,p[h][0])>=0};function b(m){return!g(m)&&!_(m)}var x=g,w=new this.Collection(this,function(){return Qe(p[0][0],p[p.length-1][1],!c,!u)});return w._ondirectionchange=function(m){m==="next"?(x=g,f=o):(x=_,f=a),p.sort(v)},w._addAlgorithm(function(m,C,S){for(var k=m.key;x(k);)if(++h,h===p.length)return C(S),!1;return b(k)?!0:(r._cmp(k,p[h][1])===0||r._cmp(k,p[h][0])===0||C(function(){f===o?m.continue(p[h][0]):m.continue(p[h][1])}),!1)}),w},e.prototype.startsWithAnyOf=function(){var t=Ue.apply(It,arguments);return t.every(function(n){return typeof n=="string"})?t.length===0?Lt(this):this.inAnyRange(t.map(function(n){return[n,n+ft]})):fe(this,"startsWithAnyOf() only works with strings")},e}();function Au(e){return nn(Ba.prototype,function(n,r,i){this.db=e,this._ctx={table:n,index:r===":id"?null:r,or:i};var o=e._deps.indexedDB;if(!o)throw new U.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=function(a,s){return o.cmp(s,a)},this._max=function(a,s){return o.cmp(a,s)>0?a:s},this._min=function(a,s){return o.cmp(a,s)<0?a:s},this._IDBKeyRange=e._deps.IDBKeyRange})}function Ie(e){return W(function(t){return rn(t),e(t.target.error),!1})}function rn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var on="storagemutated",Xe="x-storagemutated-1",Je=tn(null,on),Du=function(){function e(){}return e.prototype._lock=function(){return zt(!B.global),++this._reculock,this._reculock===1&&!B.global&&(B.lockOwnerFor=this),this},e.prototype._unlock=function(){if(zt(!B.global),--this._reculock===0)for(B.global||(B.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{Ot(t[1],t[0])}catch{}}return this},e.prototype._locked=function(){return this._reculock&&B.lockOwnerFor!==this},e.prototype.create=function(t){var n=this;if(!this.mode)return this;var r=this.db.idbdb,i=this.db._state.dbOpenError;if(zt(!this.idbtrans),!t&&!r)switch(i&&i.name){case"DatabaseClosedError":throw new U.DatabaseClosed(i);case"MissingAPIError":throw new U.MissingAPI(i.message,i);default:throw new U.OpenFailed(i)}if(!this.active)throw new U.TransactionInactive;return zt(this._completion._state===null),t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):r.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})),t.onerror=W(function(o){rn(o),n._reject(t.error)}),t.onabort=W(function(o){rn(o),n.active&&n._reject(new U.Abort(t.error)),n.active=!1,n.on("abort").fire(o)}),t.oncomplete=W(function(){n.active=!1,n._resolve(),"mutatedParts"in t&&Je.storagemutated.fire(t.mutatedParts)}),this},e.prototype._promise=function(t,n,r){var i=this;if(t==="readwrite"&&this.mode!=="readwrite")return J(new U.ReadOnly("Transaction is readonly"));if(!this.active)return J(new U.TransactionInactive);if(this._locked())return new I(function(a,s){i._blockedFuncs.push([function(){i._promise(t,n,r).then(a,s)},B])});if(r)return Ze(function(){var a=new I(function(s,l){i._lock();var c=n(s,l,i);c&&c.then&&c.then(s,l)});return a.finally(function(){return i._unlock()}),a._lib=!0,a});var o=new I(function(a,s){var l=n(a,s,i);l&&l.then&&l.then(a,s)});return o._lib=!0,o},e.prototype._root=function(){return this.parent?this.parent._root():this},e.prototype.waitFor=function(t){var n=this._root(),r=I.resolve(t);if(n._waitingFor)n._waitingFor=n._waitingFor.then(function(){return r});else{n._waitingFor=r,n._waitingQueue=[];var i=n.idbtrans.objectStore(n.storeNames[0]);(function a(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(i.get(-1/0).onsuccess=a)})()}var o=n._waitingFor;return new I(function(a,s){r.then(function(l){return n._waitingQueue.push(W(a.bind(null,l)))},function(l){return n._waitingQueue.push(W(s.bind(null,l)))}).finally(function(){n._waitingFor===o&&(n._waitingFor=null)})})},e.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new U.Abort))},e.prototype.table=function(t){var n=this._memoizedTables||(this._memoizedTables={});if(de(n,t))return n[t];var r=this.schema[t];if(!r)throw new U.NotFound("Table "+t+" not part of transaction");var i=new this.db.Table(t,r,this);return i.core=this.db.core.table(t),n[t]=i,i},e}();function Ou(e){return nn(Du.prototype,function(n,r,i,o,a){var s=this;this.db=e,this.mode=n,this.storeNames=r,this.schema=i,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=tn(this,"complete","error","abort"),this.parent=a||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new I(function(l,c){s._resolve=l,s._reject=c}),this._completion.then(function(){s.active=!1,s.on.complete.fire()},function(l){var c=s.active;return s.active=!1,s.on.error.fire(l),s.parent?s.parent._reject(l):c&&s.idbtrans&&s.idbtrans.abort(),J(l)})})}function Wr(e,t,n,r,i,o,a){return{name:e,keyPath:t,unique:n,multi:r,auto:i,compound:o,src:(n&&!a?"&":"")+(r?"*":"")+(i?"++":"")+Na(t)}}function Na(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function Ua(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:sa(n,function(r){return[r.name,r]})}}function ju(e){return e.length===1?e[0]:e}var an=function(e){try{return e.only([[]]),an=function(){return[[]]},[[]]}catch{return an=function(){return ft},ft}};function Gr(e){return e==null?function(){}:typeof e=="string"?Lu(e):function(t){return Ne(t,e)}}function Lu(e){var t=e.split(".");return t.length===1?function(n){return n[e]}:function(n){return Ne(n,e)}}function Va(e){return[].slice.call(e)}var Mu=0;function sn(e){return e==null?":id":typeof e=="string"?e:"["+e.join("+")+"]"}function Bu(e,t,n){function r(d,f){var v=Va(d.objectStoreNames);return{schema:{name:d.name,tables:v.map(function(p){return f.objectStore(p)}).map(function(p){var h=p.keyPath,g=p.autoIncrement,_=ie(h),b=h==null,x={},w={name:p.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:b,compound:_,keyPath:h,autoIncrement:g,unique:!0,extractKey:Gr(h)},indexes:Va(p.indexNames).map(function(m){return p.index(m)}).map(function(m){var C=m.name,S=m.unique,k=m.multiEntry,E=m.keyPath,R=ie(E),L={name:C,compound:R,keyPath:E,unique:S,multiEntry:k,extractKey:Gr(E)};return x[sn(E)]=L,L}),getIndexByKeyPath:function(m){return x[sn(m)]}};return x[":id"]=w.primaryKey,h!=null&&(x[sn(h)]=w.primaryKey),w})},hasGetAll:v.length>0&&"getAll"in f.objectStore(v[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}function i(d){if(d.type===3)return null;if(d.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var f=d.lower,v=d.upper,p=d.lowerOpen,h=d.upperOpen,g=f===void 0?v===void 0?null:t.upperBound(v,!!h):v===void 0?t.lowerBound(f,!!p):t.bound(f,v,!!p,!!h);return g}function o(d){var f=d.name;function v(g){var _=g.trans,b=g.type,x=g.keys,w=g.values,m=g.range;return new Promise(function(C,S){C=W(C);var k=_.objectStore(f),E=k.keyPath==null,R=b==="put"||b==="add";if(!R&&b!=="delete"&&b!=="deleteRange")throw new Error("Invalid operation type: "+b);var L=(x||w||{length:1}).length;if(x&&w&&x.length!==w.length)throw new Error("Given keys array must have same length as given values array.");if(L===0)return C({numFailures:0,failures:{},results:[],lastResult:void 0});var P,M=[],A=[],j=0,Z=function(Oe){++j,rn(Oe)};if(b==="deleteRange"){if(m.type===4)return C({numFailures:j,failures:A,results:[],lastResult:void 0});m.type===3?M.push(P=k.clear()):M.push(P=k.delete(i(m)))}else{var le=R?E?[w,x]:[w,null]:[x,null],Ce=le[0],ue=le[1];if(R)for(var ye=0;ye=t});c.forEach(function(d){o.push(function(){var f=s,v=d._cfg.dbschema;ei(i,f,r),ei(i,v,r),s=i._dbSchema=v;var p=Fa(f,v);p.add.forEach(function(w){Qr(r,w[0],w[1].primKey,w[1].indexes)}),p.change.forEach(function(w){if(w.recreate)throw new U.Upgrade("Not yet support for changing primary key");var m=r.objectStore(w.name);w.add.forEach(function(C){return Xr(m,C)}),w.change.forEach(function(C){m.deleteIndex(C.name),Xr(m,C)}),w.del.forEach(function(C){return m.deleteIndex(C)})});var h=d._cfg.contentUpgrade;if(h&&d._cfg.version>t){Zr(i,r),n._memoizedTables={},l=!0;var g=la(v);p.del.forEach(function(w){g[w]=f[w]}),Yr(i,[i.Transaction.prototype]),Kn(i,[i.Transaction.prototype],Q(g),g),n.schema=g;var _=wr(h);_&&Dt();var b,x=I.follow(function(){if(b=h(n),b&&_){var w=Ve.bind(null,null);b.then(w,w)}});return b&&typeof b.then=="function"?I.resolve(b):x.then(function(){return b})}}),o.push(function(f){if(!l||!gu){var v=d._cfg.dbschema;Ku(v,f)}Yr(i,[i.Transaction.prototype]),Kn(i,[i.Transaction.prototype],i._storeNames,i._dbSchema),n.schema=i._dbSchema})});function u(){return o.length?I.resolve(o.shift()(n.idbtrans)).then(u):I.resolve()}return u().then(function(){$u(s,r)})}function Fa(e,t){var n={del:[],add:[],change:[]},r;for(r in e)t[r]||n.del.push(r);for(r in t){var i=e[r],o=t[r];if(!i)n.add.push([r,o]);else{var a={name:r,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||i.primKey.auto!==o.primKey.auto&&!Nn)a.recreate=!0,n.change.push(a);else{var s=i.idxByName,l=o.idxByName,c=void 0;for(c in s)l[c]||a.del.push(c);for(c in l){var u=s[c],d=l[c];u?u.src!==d.src&&a.change.push(d):a.add.push(d)}(a.del.length>0||a.add.length>0||a.change.length>0)&&n.change.push(a)}}}return n}function Qr(e,t,n,r){var i=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach(function(o){return Xr(i,o)}),i}function $u(e,t){Q(e).forEach(function(n){t.db.objectStoreNames.contains(n)||Qr(t,n,e[n].primKey,e[n].indexes)})}function Ku(e,t){[].slice.call(t.db.objectStoreNames).forEach(function(n){return e[n]==null&&t.db.deleteObjectStore(n)})}function Xr(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Jr(e,t,n){var r={},i=kn(t.objectStoreNames,0);return i.forEach(function(o){for(var a=n.objectStore(o),s=a.keyPath,l=Wr(Na(s),s||"",!1,!1,!!a.autoIncrement,s&&typeof s!="string",!0),c=[],u=0;u"u"?I.resolve():Ju()).then(function(){return new I(function(l,c){if(i(),!n)throw new U.MissingAPI;var u=e.name,d=t.autoSchema?n.open(u):n.open(u,Math.round(e.verno*10));if(!d)throw new U.MissingAPI;d.onerror=Ie(c),d.onblocked=W(e._fireOnBlocked),d.onupgradeneeded=W(function(f){if(a=d.transaction,t.autoSchema&&!e._options.allowEmptyDB){d.onerror=rn,a.abort(),d.result.close();var v=n.deleteDatabase(u);v.onsuccess=v.onerror=W(function(){c(new U.NoSuchDatabase("Database "+u+" doesnt exist"))})}else{a.onerror=Ie(c);var p=f.oldVersion>Math.pow(2,62)?0:f.oldVersion;s=p<1,e._novip.idbdb=d.result,Fu(e,p/10,a,c)}},c),d.onsuccess=W(function(){a=null;var f=e._novip.idbdb=d.result,v=kn(f.objectStoreNames);if(v.length>0)try{var p=f.transaction(ju(v),"readonly");t.autoSchema?zu(e,f,p):(ei(e,e._dbSchema,p),qu(e,p)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Zr(e,p)}catch{}en.push(e),f.onversionchange=W(function(h){t.vcFired=!0,e.on("versionchange").fire(h)}),f.onclose=W(function(h){e.on("close").fire(h)}),s&&Qu(e._deps,u),l()},c)})})]).then(function(){return i(),t.onReadyBeingFired=[],I.resolve(ri(function(){return e.on.ready.fire(e.vip)})).then(function l(){if(t.onReadyBeingFired.length>0){var c=t.onReadyBeingFired.reduce(Sr,K);return t.onReadyBeingFired=[],I.resolve(ri(function(){return c(e.vip)})).then(l)}})}).finally(function(){t.onReadyBeingFired=null,t.isBeingOpened=!1}).then(function(){return e}).catch(function(l){t.dbOpenError=l;try{a&&a.abort()}catch{}return r===t.openCanceller&&e._close(),J(l)}).finally(function(){t.openComplete=!0,o()})}function ii(e){var t=function(a){return e.next(a)},n=function(a){return e.throw(a)},r=o(t),i=o(n);function o(a){return function(s){var l=a(s),c=l.value;return l.done?c:!c||typeof c.then!="function"?ie(c)?Promise.all(c).then(r,i):r(c):c.then(r,i)}}return o(t)()}function tc(e,t,n){var r=arguments.length;if(r<2)throw new U.InvalidArgument("Too few arguments");for(var i=new Array(r-1);--r;)i[r-1]=arguments[r];n=i.pop();var o=ua(i);return[e,o,n]}function Ha(e,t,n,r,i){return I.resolve().then(function(){var o=B.transless||B,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:o};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(d){return d.name===Er.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(function(){return Ha(e,t,n,null,i)})):J(d)}var l=wr(i);l&&Dt();var c,u=I.follow(function(){if(c=i.call(a,a),c)if(l){var d=Ve.bind(null,null);c.then(d,d)}else typeof c.next=="function"&&typeof c.throw=="function"&&(c=ii(c))},s);return(c&&typeof c.then=="function"?I.resolve(c).then(function(d){return a.active?d:J(new U.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):u.then(function(){return c})).then(function(d){return r&&a._resolve(),a._completion.then(function(){return d})}).catch(function(d){return a._reject(d),J(d)})})}function zn(e,t,n){for(var r=ie(e)?e.slice():[e],i=0;i0,C=H(H({},_),{isVirtual:m,keyTail:g,keyLength:w,extractKey:Gr(h),unique:!m&&_.unique});if(x.push(C),C.isPrimaryKey||o.push(C),w>1){var S=w===2?h[0]:h.slice(0,w-1);a(S,g+1,_)}return x.sort(function(k,E){return k.keyTail-E.keyTail}),C}var s=a(r.primaryKey.keyPath,0,r.primaryKey);i[":id"]=[s];for(var l=0,c=r.indexes;l0?Promise.reject(x.failures[0]):b.length1?t:e}:{d:0});else{var n=new He;return e&&"d"in e&&ae(n,e),n}};Tt(He.prototype,(ai={add:function(e){return qn(this,e),this},addKey:function(e){return ln(this,e,e),this},addKeys:function(e){var t=this;return e.forEach(function(n){return ln(t,n,n)}),this}},ai[xr]=function(){return li(this)},ai));function ln(e,t,n){var r=se(t,n);if(!isNaN(r)){if(r>0)throw RangeError();if(si(e))return ae(e,{from:t,to:n,d:1});var i=e.l,o=e.r;if(se(n,e.from)<0)return i?ln(i,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Ka(e);if(se(t,e.to)>0)return o?ln(o,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Ka(e);se(t,e.from)<0&&(e.from=t,e.l=null,e.d=o?o.d+1:1),se(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;i&&!e.l&&qn(e,i),o&&a&&qn(e,o)}}function qn(e,t){function n(r,i){var o=i.from,a=i.to,s=i.l,l=i.r;ln(r,o,a),s&&n(r,s),l&&n(r,l)}si(t)||n(e,t)}function lc(e,t){var n=li(t),r=n.next();if(r.done)return!1;for(var i=r.value,o=li(e),a=o.next(i.from),s=a.value;!r.done&&!a.done;){if(se(s.from,i.to)<=0&&se(s.to,i.from)>=0)return!0;se(i.from,s.from)<0?i=(r=n.next(s.from)).value:s=(a=o.next(i.from)).value}return!1}function li(e){var t=si(e)?null:{s:0,n:e};return{next:function(n){for(var r=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&se(n,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||se(n,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Ka(e){var t,n,r=(((t=e.r)===null||t===void 0?void 0:t.d)||0)-(((n=e.l)===null||n===void 0?void 0:n.d)||0),i=r>1?"r":r<-1?"l":"";if(i){var o=i==="r"?"l":"r",a=H({},e),s=e[i];e.from=s.from,e.to=s.to,e[i]=s[i],a[i]=s[o],e[o]=a,a.d=za(a)}e.d=za(e)}function za(e){var t=e.r,n=e.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1}var uc={stack:"dbcore",level:0,create:function(e){var t=e.schema.name,n=new He(e.MIN_KEY,e.MAX_KEY);return H(H({},e),{table:function(r){var i=e.table(r),o=i.schema,a=o.primaryKey,s=a.extractKey,l=a.outbound,c=H(H({},i),{mutate:function(f){var v=f.trans,p=v.mutatedParts||(v.mutatedParts={}),h=function(S){var k="idb://"+t+"/"+r+"/"+S;return p[k]||(p[k]=new He)},g=h(""),_=h(":dels"),b=f.type,x=f.type==="deleteRange"?[f.range]:f.type==="delete"?[f.keys]:f.values.length<50?[[],f.values]:[],w=x[0],m=x[1],C=f.trans._cache;return i.mutate(f).then(function(S){if(ie(w)){b!=="delete"&&(w=S.results),g.addKeys(w);var k=$a(w,C);!k&&b!=="add"&&_.addKeys(w),(k||m)&&cc(h,o,k,m)}else if(w){var E={from:w.lower,to:w.upper};_.add(E),g.add(E)}else g.add(n),_.add(n),o.indexes.forEach(function(R){return h(R.name).add(n)});return S})}}),u=function(f){var v,p,h=f.query,g=h.index,_=h.range;return[g,new He((v=_.lower)!==null&&v!==void 0?v:e.MIN_KEY,(p=_.upper)!==null&&p!==void 0?p:e.MAX_KEY)]},d={get:function(f){return[a,new He(f.key)]},getMany:function(f){return[a,new He().addKeys(f.keys)]},count:u,query:u,openCursor:u};return Q(d).forEach(function(f){c[f]=function(v){var p=B.subscr;if(p){var h=function(C){var S="idb://"+t+"/"+r+"/"+C;return p[S]||(p[S]=new He)},g=h(""),_=h(":dels"),b=d[f](v),x=b[0],w=b[1];if(h(x.name||"").add(w),!x.isPrimaryKey)if(f==="count")_.add(n);else{var m=f==="query"&&l&&v.values&&i.query(H(H({},v),{values:!1}));return i[f].apply(this,arguments).then(function(C){if(f==="query"){if(l&&v.values)return m.then(function(R){var L=R.result;return g.addKeys(L),C});var S=v.values?C.result.map(s):C.result;v.values?g.addKeys(S):_.addKeys(S)}else if(f==="openCursor"){var k=C,E=v.values;return k&&Object.create(k,{key:{get:function(){return _.addKey(k.primaryKey),k.key}},primaryKey:{get:function(){var R=k.primaryKey;return _.addKey(R),R}},value:{get:function(){return E&&g.addKey(k.primaryKey),k.value}}})}return C})}}return i[f].apply(this,arguments)}}),c}})}};function cc(e,t,n,r){function i(o){var a=e(o.name||"");function s(c){return c!=null?o.extractKey(c):null}var l=function(c){return o.multiEntry&&ie(c)?c.forEach(function(u){return a.addKey(u)}):a.addKey(c)};(n||r).forEach(function(c,u){var d=n&&s(n[u]),f=r&&s(r[u]);se(d,f)!==0&&(d!=null&&l(d),f!=null&&l(f))})}t.indexes.forEach(i)}var ui=function(){function e(t,n){var r=this;this._middlewares={},this.verno=0;var i=e.dependencies;this._options=n=H({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var o=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:K,dbReadyPromise:null,cancelOpen:K,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};a.dbReadyPromise=new I(function(s){a.dbReadyResolve=s}),a.openCanceller=new I(function(s,l){a.cancelOpen=l}),this._state=a,this.name=t,this.on=tn(this,"populate","blocked","versionchange","close",{ready:[Sr,K]}),this.on.ready.subscribe=oa(this.on.ready.subscribe,function(s){return function(l,c){e.vip(function(){var u=r._state;if(u.openComplete)u.dbOpenError||I.resolve().then(l),c&&s(l);else if(u.onReadyBeingFired)u.onReadyBeingFired.push(l),c&&s(l);else{s(l);var d=r;c||s(function f(){d.on.ready.unsubscribe(l),d.on.ready.unsubscribe(f)})}})}}),this.Collection=Eu(this),this.Table=bu(this),this.Transaction=Ou(this),this.Version=Zu(this),this.WhereClause=Au(this),this.on("versionchange",function(s){s.newVersion>0?console.warn("Another connection wants to upgrade database '"+r.name+"'. Closing db now to resume the upgrade."):console.warn("Another connection wants to delete database '"+r.name+"'. Closing db now to resume the delete request."),r.close()}),this.on("blocked",function(s){!s.newVersion||s.newVersion=0&&en.splice(n,1),this.idbdb){try{this.idbdb.close()}catch{}this._novip.idbdb=null}t.dbReadyPromise=new I(function(r){t.dbReadyResolve=r}),t.openCanceller=new I(function(r,i){t.cancelOpen=i})},e.prototype.close=function(){this._close();var t=this._state;this._options.autoOpen=!1,t.dbOpenError=new U.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)},e.prototype.delete=function(){var t=this,n=arguments.length>0,r=this._state;return new I(function(i,o){var a=function(){t.close();var s=t._deps.indexedDB.deleteDatabase(t.name);s.onsuccess=W(function(){Xu(t._deps,t.name),i()}),s.onerror=Ie(o),s.onblocked=t._fireOnBlocked};if(n)throw new U.InvalidArgument("Arguments not allowed in db.delete()");r.isBeingOpened?r.dbReadyPromise.then(a):a()})},e.prototype.backendDB=function(){return this.idbdb},e.prototype.isOpen=function(){return this.idbdb!==null},e.prototype.hasBeenClosed=function(){var t=this._state.dbOpenError;return t&&t.name==="DatabaseClosed"},e.prototype.hasFailed=function(){return this._state.dbOpenError!==null},e.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(e.prototype,"tables",{get:function(){var t=this;return Q(this._allTables).map(function(n){return t._allTables[n]})},enumerable:!1,configurable:!0}),e.prototype.transaction=function(){var t=tc.apply(this,arguments);return this._transaction.apply(this,t)},e.prototype._transaction=function(t,n,r){var i=this,o=B.trans;(!o||o.db!==this||t.indexOf("!")!==-1)&&(o=null);var a=t.indexOf("?")!==-1;t=t.replace("!","").replace("?","");var s,l;try{if(l=n.map(function(u){var d=u instanceof i.Table?u.name:u;if(typeof d!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return d}),t=="r"||t===Hr)s=Hr;else if(t=="rw"||t==$r)s=$r;else throw new U.InvalidArgument("Invalid transaction mode: "+t);if(o){if(o.mode===Hr&&s===$r)if(a)o=null;else throw new U.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o&&l.forEach(function(u){if(o&&o.storeNames.indexOf(u)===-1)if(a)o=null;else throw new U.SubTransaction("Table "+u+" not included in parent transaction.")}),a&&o&&!o.active&&(o=null)}}catch(u){return o?o._promise(null,function(d,f){f(u)}):J(u)}var c=Ha.bind(null,this,s,l,o,r);return o?o._promise(s,c,"lock"):B.trans?Ot(B.transless,function(){return i._whenReady(c)}):this._whenReady(c)},e.prototype.table=function(t){if(!de(this._allTables,t))throw new U.InvalidTable("Table "+t+" does not exist");return this._allTables[t]},e}(),dc=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",fc=function(){function e(t){this._subscribe=t}return e.prototype.subscribe=function(t,n,r){return this._subscribe(!t||typeof t=="function"?{next:t,error:n,complete:r}:t)},e.prototype[dc]=function(){return this},e}();function qa(e,t){return Q(t).forEach(function(n){var r=e[n]||(e[n]=new He);qn(r,t[n])}),e}function pc(e){var t=!1,n=void 0,r=new fc(function(i){var o=wr(e);function a(g){o&&Dt();var _=function(){return Ze(e,{subscr:g,trans:null})},b=B.trans?Ot(B.transless,_):_();return o&&b.then(Ve,Ve),b}var s=!1,l={},c={},u={get closed(){return s},unsubscribe:function(){s=!0,Je.storagemutated.unsubscribe(p)}};i.start&&i.start(u);var d=!1,f=!1;function v(){return Q(c).some(function(g){return l[g]&&lc(l[g],c[g])})}var p=function(g){qa(l,g),v()&&h()},h=function(){if(!(d||s)){l={};var g={},_=a(g);f||(Je(on,p),f=!0),d=!0,Promise.resolve(_).then(function(b){t=!0,n=b,d=!1,!s&&(v()?h():(l={},c=g,i.next&&i.next(b)))},function(b){d=!1,t=!1,i.error&&i.error(b),u.unsubscribe()})}};return h(),u});return r.hasValue=function(){return t},r.getValue=function(){return n},r}var ci;try{ci={indexedDB:q.indexedDB||q.mozIndexedDB||q.webkitIndexedDB||q.msIndexedDB,IDBKeyRange:q.IDBKeyRange||q.webkitIDBKeyRange}}catch{ci={indexedDB:null,IDBKeyRange:null}}var ht=ui;Tt(ht,H(H({},Sn),{delete:function(e){var t=new ht(e,{addons:[]});return t.delete()},exists:function(e){return new ht(e,{addons:[]}).open().then(function(t){return t.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(e){try{return Yu(ht.dependencies).then(e)}catch{return J(new U.MissingAPI)}},defineClass:function(){function e(t){ae(this,t)}return e},ignoreTransaction:function(e){return B.trans?Ot(B.transless,e):e()},vip:ri,async:function(e){return function(){try{var t=ii(e.apply(this,arguments));return!t||typeof t.then!="function"?I.resolve(t):t}catch(n){return J(n)}}},spawn:function(e,t,n){try{var r=ii(e.apply(n,t||[]));return!r||typeof r.then!="function"?I.resolve(r):r}catch(i){return J(i)}},currentTransaction:{get:function(){return B.trans||null}},waitFor:function(e,t){var n=I.resolve(typeof e=="function"?ht.ignoreTransaction(e):e).timeout(t||6e4);return B.trans?B.trans.waitFor(n):n},Promise:I,debug:{get:function(){return Pe},set:function(e){da(e,e==="dexie"?function(){return!0}:Ra)}},derive:Pt,extend:ae,props:Tt,override:oa,Events:tn,on:Je,liveQuery:pc,extendObservabilitySet:qa,getByKeyPath:Ne,setByKeyPath:xe,delByKeyPath:zl,shallowClone:la,deepClone:qt,getObjectDiff:oi,cmp:se,asap:aa,minKey:Fr,addons:[],connections:en,errnames:Er,dependencies:ci,semVer:Pa,version:Pa.split(".").map(function(e){return parseInt(e)}).reduce(function(e,t,n){return e+t/Math.pow(10,n*2)})})),ht.maxKey=an(ht.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Je(on,function(e){if(!$e){var t;Nn?(t=document.createEvent("CustomEvent"),t.initCustomEvent(Xe,!0,!0,e)):t=new CustomEvent(Xe,{detail:e}),$e=!0,dispatchEvent(t),$e=!1}}),addEventListener(Xe,function(e){var t=e.detail;$e||Wn(t)}));function Wn(e){var t=$e;try{$e=!0,Je.storagemutated.fire(e)}finally{$e=t}}var $e=!1;if(typeof BroadcastChannel<"u"){var Gn=new BroadcastChannel(Xe);typeof Gn.unref=="function"&&Gn.unref(),Je(on,function(e){$e||Gn.postMessage(e)}),Gn.onmessage=function(e){e.data&&Wn(e.data)}}else if(typeof self<"u"&&typeof navigator<"u"){Je(on,function(e){try{$e||(typeof localStorage<"u"&&localStorage.setItem(Xe,JSON.stringify({trig:Math.random(),changedParts:e})),typeof self.clients=="object"&&gr([],self.clients.matchAll({includeUncontrolled:!0}),!0).forEach(function(t){return t.postMessage({type:Xe,changedParts:e})}))}catch{}}),typeof addEventListener<"u"&&addEventListener("storage",function(e){if(e.key===Xe){var t=JSON.parse(e.newValue);t&&Wn(t.changedParts)}});var Wa=self.document&&navigator.serviceWorker;Wa&&Wa.addEventListener("message",hc)}function hc(e){var t=e.data;t&&t.type===Xe&&Wn(t.changedParts)}I.rejectionMapper=eu,da(Pe,Ra);const di="sprig.sessionId",vc="sprig.disableReplayRecording",mc=()=>{Ft.setItem(vc,"disabled")},gc=(()=>{const e=Ft.getItem(di);return e?(Ft.removeItem(di),e):mn()})();window.addEventListener("beforeunload",()=>{Ft.setItem(di,gc)});class yc extends ui{constructor(){super("replayStorage",{autoOpen:!1});Ee(this,"events");Ee(this,"chunkUploads");Ee(this,"pendingCaptures")}}const Ga=new yc;Ga.version(1).stores({events:"uuid, timestamp, [sessionId+timestamp]",chunkUploads:"uuid, timestamp, [sessionId+status], [uploadId+status], [sessionId+status+uploadId]",pendingCaptures:"uuid, timestamp, [sessionId+targetTimestamp]"}),Ga.open().catch(()=>{mc()});const _c="sprig.pendingCount";Ft.getItem(_c);const bc=e=>{};var fi=(e=>(e[e.And=1]="And",e[e.Or=2]="Or",e))(fi||{});const Za=1,pi={eq(e,t){return e==t},neq(e,t){return!this.eq(e,t)},gt(e,t){return e>t},gte(e,t){return e>=t},lt(e,t){return ee.indexOf(n)===-1)},list_alo(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.some(i=>r.has(i))},list_dni(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.every(i=>!r.has(i))},contains(e,t){const n=e.toLowerCase(),r=t.toLowerCase();return n.includes(r)},notcontains(e,t){return!this.contains(e,t)}},xc=(e,t,n)=>{switch(t){case T.VideoVoice:return Boolean(e&&e.value);case T.Open:return!!n;case T.MultipleSelect:return Boolean(n&&!!Object.keys(n).length);case T.RecordedTask:return(n==null?void 0:n.taskStatus)===me.Completed;case T.TextUrlPrompt:return!e.value;case T.ConsentLegal:return n!==null;case T.MultipleChoice:return n!==void 0;case T.NPS:return n!==null;case T.Likert:return n!==null;default:return!0}},Ya=({cards:e,index:t,hasEndCard:n,allResponses:r,uploadProgress:i={}})=>{if(t>=e.length||t<0)return null;const o=e[t];let a=t+1;const s=o.props.routingOptions||[];for(let u=0;ur.length)continue;let p=Qa({comparator:v.comparator,response:r[v.questionIndex],type:o.type,value:v.value});for(let h=1;hu.type===T.Uploading);let c;return l>0?c=n?e.length-3:e.length-2:c=e.length-1,t>=c||a===-1||a!==null&&a>c?l>0&&Object.values(i).some(d=>d.isSubmitted&&!d.isComplete)?l:n?e.length-1:null:a===-1?null:a},Qa=({comparator:e,response:t,type:n,value:r})=>{if(e===Me.Answered)switch(n){case T.TextUrlPrompt:return t===void 0;case T.ConsentLegal:return t&&t.submitted===!0;case T.RecordedTask:return"taskStatus"in t&&t.taskStatus===me.Completed;case T.Likert:return Number.isInteger(t);case T.Open:return t&&t.length>0;case T.MultipleChoice:case T.MultipleSelect:return Object.keys(t).length>0;case T.NPS:return Number.isInteger(t);case T.VideoVoice:return!!(t!=null&&t.mediaRecordingUid);default:return!1}if(e===Me.Skipped)switch(n){case T.TextUrlPrompt:return t==null?void 0:t.skipped;case T.ConsentLegal:return t===null;case T.RecordedTask:return"taskStatus"in t&&t.taskStatus===me.Abandoned;case T.Likert:return t===null;case T.Open:return(t==null?void 0:t.length)===0;case T.MultipleChoice:return t===void 0;case T.MultipleSelect:return(t==null?void 0:t.length)===0;case T.NPS:return t===null;case T.VideoVoice:return t===null;default:return!1}return e===Me.GivenUp?n===T.RecordedTask?"taskStatus"in t&&t.taskStatus===me.GivenUp:!0:pi[e](t,r)},wc=13,Cc=(e,t)=>e.reduce((n,r)=>n.concat(n.map(i=>[...i,r])),[[]]).filter(n=>t||n.length>0),kc=e=>{var t,n;switch(e.type){case T.MultipleSelect:return!e||!e.props||!e.props.options?null:e.props.options.length>wc?e.props.options.map(r=>[r.value]):Cc(e.props.options.map(r=>r.value),!e.props.properties.required);case T.MultipleChoice:{if(!e||!e.props||!e.props.options)return null;const r=e.props.options.map(i=>i.value);return e.props.properties.required||r.push(void 0),r}case T.Likert:{const r=Number((n=(t=e.props)==null?void 0:t.properties)==null?void 0:n.range)||5;return[...Array.from(Array(r).keys()).map(o=>o+1),...e.props.properties.required?[]:[null]]}case T.NPS:return[0,1,2,3,4,5,6,7,8,9,10,...e.props.properties.required?[]:[null]];case T.VideoVoice:case T.Open:return["1",...e.props.properties.required?[]:[""]];case T.RecordedTask:return[{taskStatus:me.Completed},{taskStatus:me.GivenUp},...e.props.properties.required?[]:[{taskStatus:me.Abandoned}]];case T.TextUrlPrompt:return[void 0,...e.props.properties.required?[]:[{skipped:!0}]];case T.ConsentLegal:return[Za,...e.props.properties.required?[]:[null]];default:return[Za]}},Ec=e=>e in pi,Sc=e=>typeof e=="object"&&e!==null&&"taskStatus"in e,Tc=(e,t=[])=>t.reduce((n,r)=>{const{group:i,target:o}=r;if(!(i!=null&&i.length))return[...n];const a=i.filter(s=>Number(s)?!0:typeof s=="object"?s.questionIndex===e:!1).map(s=>{const{comparator:l,value:c}=s;return{comparator:l,target:o,value:c}});return[...n,...a]},[]),Pc=(e,t)=>{const n=new Set([T.Thanks,T.Uploading]);if(t>=e.length||t<0||n.has(e[t].type))return 0;const r=e.filter(o=>!n.has(o.type));if(t===r.length-1)return 1;const i={[r.length-1]:1,[-1]:0};for(let o=r.length-2;o>=t;o--){const a=r[o],s=Tc(o,a.props.routingOptions);if(s.length===0){i[o]=i[o+1]+1;continue}let l=0,c=kc(a);if(c===null)return r.length-1-t;for(let u=0;u{const g=xc({value:h},a.type,h);return!(g&&d===Me.Answered||!g&&d===Me.Skipped||d===Me.GivenUp&&Sc(h)&&h.taskStatus===me.GivenUp||g&&a.type===T.Open&&(d===Me.Contains||d===Me.DoesNotContain)||g&&Ec(d)&&pi[d](h,v))});if(p.length=r.length)return r.length-1-t;l=Math.max(i[h]+1,l)}c=p}c.length>0&&(l=Math.max(i[o+1]+1,l)),i[o]=l}return i[t]},Ic=e=>!(e.type===T.Thanks||e.type===T.Uploading),G=Yo()((e,t)=>({allResponses:[],answers:void 0,apiURL:"",border:"#000000",cards:[],close:async(n=_t)=>{const r=t(),{fadeout:i,remove:o,trackHistory:a}=r;await i(n),hi(r)||a({event:"closed"}),Jo.enable(),o({initiator:or.Closed})},configureExitOnOverlayClick:()=>{},customMetadata:{},destroy:async n=>{const{eventEmitFn:r,fadeout:i,remove:o}=t();r(Te.SurveyComplete),await i(n),Jo.enable(),o({initiator:or.Complete})},endCard:{headline:""},envId:"",eventEmitFn:hn.emit.bind(hn),fadeout:async n=>{const{eventEmitFn:r,headers:i,viewDocument:o}=t();return Vt(i)?Promise.resolve():(r(Se.SurveyFadingOut),new Promise(a=>{const s=o.getElementById(n);s?(s.addEventListener("transitionend",()=>{a()}),s.classList.remove("ul-app--visible")):a()}))},forceBrandedLogo:!1,frame:document.createElement("iframe"),handleClickEmbedButton:n=>{const{cards:r,eventEmitFn:i,index:o}=t();i(n,{[yt.QuestionId]:r[o].name,[yt.Props]:r[o].props}),e(()=>({hasViewedEmbed:!0}))},handleUploadUpdate:({mediaRecordingUid:n,isComplete:r,progressPct:i,isSubmitted:o})=>{var f,v,p;const{cards:a,destroy:s,index:l,uploadProgress:c}=t(),u={...c,[n]:{progressPct:i||i===0?i:(f=c[n])==null?void 0:f.progressPct,isComplete:r||((v=c[n])==null?void 0:v.isComplete),isSubmitted:o||((p=c[n])==null?void 0:p.isSubmitted)}};if(a[l].type!==T.Uploading){e({uploadProgress:u});return}const d=Object.entries(c).every(([h,g])=>!g.isSubmitted||g.isComplete||n==h&&r);if(d&&l>=a.length-1){s(_t);return}e({index:d?l+1:l,uploadingCardViewed:!0,uploadProgress:u})},hasViewedEmbed:!1,headers:{Authorization:"","Content-Type":"","userleap-platform":bt.Web,"x-ul-environment-id":"","x-ul-installation-method":xt.Snippet,"x-ul-sdk-version":"","x-ul-visitor-id":""},index:0,isPreview:!1,marketingUrl:"https://sprig.com",meta:{ch:0,cw:0,l:"",mode:null,p:"",sh:0,sw:0},mode:void 0,next:n=>{const{allResponses:r,cards:i,eventEmitFn:o,index:a,responseGroupUid:s,submit:l,trackHistory:c,uploadProgress:u,viewedCardCount:d}=t(),f=Date.now(),v=[...i],p=v[a],{type:h}=n.data,g={...n.data},_=g.value;Ic(p)&&(p.value=_),g.answeredAt=f,delete g.type;const b={response:g,responseGroupUid:s,questionIndex:a};let x=h===T.MultipleChoice?Object.values(_).find(k=>k!==!1):_;h===T.MultipleSelect&&(x=v[a].props.options.reduce((k,E)=>(_[E.id]&&k.push(E.value),k),[]));const w=r.slice(0);w[a]=x,e({allResponses:w});const m=Ya({cards:v,index:a,hasEndCard:!!n.endCard,uploadProgress:u,allResponses:w});if(m===null){b.completedAt=f,l(b),n.completeSurvey();return}else[T.Thanks,T.Uploading].includes(v[m].type)&&(b.completedAt=f);const C=l(b);[T.Thanks,T.Uploading].includes(v[m].type)||C.finally(()=>{c({event:"seen",index:m})});const S=v[m];v[m]&&o&&o(Te.CurrentQuestion,{[yt.QuestionId]:S.name,[yt.Props]:S.props}),e({cards:v,hasViewedEmbed:!1,index:m,viewedCardCount:d+1})},previewKey:null,recorder:()=>{},recorderEventEmitter:hn,responseGroupUid:"",remove:({initiator:n})=>{const{frame:r,headers:i,eventEmitFn:o}=t();["ios","android"].includes(i["userleap-platform"])&&o(Se.SurveyWillClose,{name:Se.SurveyWillClose,initiator:n}),!Vt(i)&&(o(Se.SurveyWillClose,{name:Se.SurveyWillClose,initiator:n}),r.remove())},seen:async()=>{const{trackHistory:n}=t();return n({event:"seen",isNew:!0})},slugName:null,showStripes:!1,showSurveyBrand:!1,styleNonce:"",submit:async({completedAt:n,questionIndex:r,response:i,responseGroupUid:o})=>{const a=t();if(!o||hi(a))return;const s={responseGroupUid:o,meta:a.meta,customMetadata:a.customMetadata,responses:[i],completedAt:n,previewKey:a.previewKey};n&&bc({id:a.surveyId});const l=await St(`${a.apiURL}/sdk/1/environments/${a.envId}/visitors/${a.userId}/responses/submit`,{body:JSON.stringify(s),headers:a.headers,method:"POST"});if(!l.ok){l.reportError&&(console.warn("[Sprig] (ERR-427) Failed to submit response",l.error),await Xa(a,"submitResponse",l.error));return}a.eventEmitFn(Se.QuestionAnswered,{...i,questionIndex:r})},surveyId:0,tabTitle:"",trackHistory:async({event:n,index:r,isNew:i=!1})=>{const o=t();if(hi(o))return;const{cards:a,index:s}=o,l=r!==void 0?a[r]:a[s],c={sid:o.surveyId,qid:l.name,action:n,vid:o.userId,eid:o.envId,isNew:i,responseGroupUid:o.responseGroupUid,previewKey:o.previewKey},u=await St(`${o.apiURL}/sdk/1/visitors/${o.userId}/surveys/${o.surveyId}/history`,{body:JSON.stringify(c),headers:o.headers,method:"POST"});!u.ok&&u.reportError&&(console.warn("[Sprig] (ERR-428) Failed to track survey event",u.error),await Xa(o,"trackHistory",u.error))},update:()=>{const{headers:n,eventEmitFn:r,frame:i,viewDocument:o}=t();setTimeout(()=>{var s;const a=Fs(o);Vt(n)?r(Se.SurveyHeight,{name:Se.SurveyHeight,contentFrameHeight:a}):(s=i.setHeight)==null||s.call(i,a)},100)},uploadingCardViewed:!1,uploadProgress:{},useDesktopPrototype:void 0,useMobileStyling:!1,userId:"",viewDocument:window.document,viewedCardCount:0})),hi=e=>!e.userId||e.meta&&e.meta.mode==="test"||e.isPreview,Xa=async(e,t,n)=>{const{mode:r,userId:i,envId:o,apiURL:a,headers:s,viewDocument:l}=e,c=l.documentElement,u={mode:r,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:c.clientWidth,clientHeight:c.clientHeight,location:window.location.href,language:window.navigator.language},d={action:t,err:{message:n==null?void 0:n.message,stack:n==null?void 0:n.stack},meta:u,vid:i,envId:o};(await St(`${a}/sdk/1/errors`,{method:"POST",headers:Object.assign({"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},s),body:JSON.stringify(d)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",n)},Rc=async(e,t)=>{var r;const n=await fetch(t,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(n.ok){const i=await n.json();return(r=i==null?void 0:i.upload)==null?void 0:r.url}else return null},Ja=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",es=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:Ja()};return new MediaRecorder(e,t)},ts=(e,t,n)=>{n[t]=[],e.ondataavailable=function(r){n[t].push(r.data)},e.currentMediaRecordingUid=t,e.start()};function ns(e,t,n,r,i,o){if(e&&e.state!=="inactive"){const{[F.BeginCallback]:a}=r,s=e.currentMediaRecordingUid;if(!s)return;a&&a(s),e.onstop=()=>Ac(t,e,n,r,s,i,o),e.stop()}}async function Ac(e,t,n,r,i,o,a){const s=G.getState().viewDocument,{[F.UploadCallback]:l,[F.ProgressCallback]:c}=r,u={mediaType:n,updatedAt:new Date().toISOString(),mediaRecordingUid:i,...r[F.PassthroughData]},d=await Rc(u,e);if(!d){l&&l(null,{message:"failed to get upload url"});return}const f=new Blob(a,{type:Ja()});if(!s.defaultView)return;const v=new s.defaultView.File([f],`recording video ${Date.now()}`),p=o.createUpload({endpoint:d,file:v,chunkSize:5120});p.on("error",h=>{l&&l(null,h)}),p.on("progress",h=>{c&&c(i,h)}),p.on("success",()=>{l&&l(i,!0)})}const Dc={state:{...{chunks:{}}},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:n,screenRecorder:r,UpChunk:i}=this.state,o=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?be.Video:be.Audio;this.state.chunks&&t&&i&&(n!=null&&n.currentMediaRecordingUid&&ns(n,t,o,e,i,this.state.chunks[n==null?void 0:n.currentMediaRecordingUid]),r!=null&&r.currentMediaRecordingUid&&ns(r,t,be.Screen,e,i,this.state.chunks[r==null?void 0:r.currentMediaRecordingUid]))},handleCancelledStream(e){const t=e.getVideoTracks(),n=e.getAudioTracks();let r=t.length&&t[0];r=r||n.length&&n[0],r&&r.addEventListener("ended",()=>{[this.state.avRecorder,this.state.screenRecorder].map(i=>{i&&(i.state==="recording"&&i.stop(),i.stream.getTracks().map(o=>{o.readyState==="live"&&o.stop()}))}),Object.assign(this.state,{avStream:null,captureStream:null,avRecorder:null,screenRecorder:null})})},taskDurationMillisecond(){return this.state.startTime?new Date().getTime()-this.state.startTime.getTime():0},setUpChunk(e){this.state.UpChunk=e},configure(e,t){Object.assign(this.state,t),this.state.uploadApiEndpoint=`${t.apiURL}/2/environments/integrations/upload`,this.state.chunks={},e.on(re.PermissionStatus,this.permissionStatusCallback.bind(this)),e.on(re.AvPermission,async n=>{this.avPermissionCallback(n)}),e.on(re.BeginRecording,this.beginRecordingCallback.bind(this)),e.on(re.StartTask,this.startTaskCallback.bind(this)),e.on(re.ScreenPermission,async n=>{this.screenPermissionCallback(n)}),e.on(re.FinishTask,async n=>{this.finishTaskCallback(n)})},async avPermissionCallback(e){var r,i,o;const{[F.StreamReadyCallback]:t,[F.PermissionDescriptors]:n}=e;try{(r=this.state.avStream)!=null&&r.active&&(this.state.avStream.getTracks().map(a=>a.readyState==="live"&&a.stop()),((i=this.state.captureStream)==null?void 0:i.getAudioTracks().length)===1&&this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])),this.state.avStream=await navigator.mediaDevices.getUserMedia({video:n.includes(wt.Camera),audio:!0}),((o=this.state.captureStream)==null?void 0:o.getAudioTracks().length)===0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.avStream)}catch(a){console.warn("Error: failed to get permissions: "+a),t&&t(null,null);return}t&&t(this.state.avStream,this.state.captureStream)},async screenPermissionCallback(e){const{[F.ScreenPermissionRequested]:t,[F.StreamReadyCallback]:n}=e;t==null||t(!0);try{this.state.captureStream=await navigator.mediaDevices.getDisplayMedia({video:!0,cursor:"always",displaySurface:"browser",preferCurrentTab:!0})}catch(r){t==null||t(!1),console.warn("Error: failed to get permissions: "+r),n&&n(null,null);return}t==null||t(!1),this.state.avStream&&this.state.avStream.getAudioTracks().length>0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.captureStream),n&&n(this.state.avStream||null,this.state.captureStream)},beginRecordingCallback(e){const{[F.RecordingMediaTypes]:t,[F.StartRecordingCallback]:n}=e;if(!t)return;const r=[];if(t.includes(be.Video)&&this.state.avStream){this.state.avRecorder=es(this.state.avStream);const i=mn();ts(this.state.avRecorder,i,this.state.chunks),r.push(i)}if(t.includes(be.Screen)&&this.state.captureStream){this.state.screenRecorder=es(this.state.captureStream);const i=mn();ts(this.state.screenRecorder,i,this.state.chunks),r.push(i)}r&&n&&n(r)},async finishTaskCallback(e){const{[F.CurrentIndex]:t,[F.TaskResponse]:n,[F.TaskCompleteCallback]:r}=e;await this.stopRecording(e),r&&r(this.taskDurationMillisecond()),this.state.cards&&this.state.hasEndCard!==void 0&&this.lookAheadAndStopStream(t,n,this.state.cards,this.state.hasEndCard)},startTaskCallback(){this.state.startTime=new Date},permissionStatusCallback(e){var r;const{[F.PermissionStatusCallback]:t}=e,n=this.state.avStream;t&&t(n,n?(n==null?void 0:n.getVideoTracks().length)>0:!1,!!((r=this.state.captureStream)!=null&&r.active),this.state.captureStream)},lookAheadAndStopStream(e,t,n,r){const{avRecorder:i,screenRecorder:o}=this.state,{allResponses:a}=G.getState(),s=Ya({cards:n,index:e,hasEndCard:r,allResponses:a});s!==null&&n[s].type===T.RecordedTask||[i,o].map(l=>{l&&(l.state==="recording"&&l.stop(),l.stream.getTracks().map(c=>{c.readyState==="live"&&c.stop()}))})}},Zn=Object.create(Dc);Object.freeze(Zn);function rs(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ty("button",{...e,className:$("ul-card-text__button",e.className),id:"ul-card-text__button"}),Re=({message:e,properties:t})=>{const n=t==null?void 0:t.captionText;return y(he,{children:[e&&y("h1",{className:O.QuestionHeader,id:O.QuestionHeader,...n?{}:{style:{marginBottom:"15px"}},children:e}),n&&y("p",{className:O.Caption,id:O.Caption,children:n})]})},is=({buttonText:e="View Prototype",handleClick:t})=>y("button",{className:"prototype-button",onClick:t,children:e},"prototype-btn"),et=({defaultBody:e,embeddedType:t="prototype",properties:n})=>{var d;const{handleClickEmbedButton:r,hasViewedEmbed:i,headers:o,useDesktopPrototype:a}=G(f=>({handleClickEmbedButton:f.handleClickEmbedButton,hasViewedEmbed:f.hasViewedEmbed,headers:f.headers,useDesktopPrototype:f.useDesktopPrototype})),s=(n==null?void 0:n.conceptUrl)||((d=n==null?void 0:n.consentDocument)==null?void 0:d.url),l=window.innerWidth{f.preventDefault(),r(v)};if(!a&&l&&!i&&s&&["email","link"].includes(c)){if(t==="prototype")return y(is,{handleClick:f=>{u(f,Te.ViewPrototypeClick)}});if(t==="pdf")return y(is,{buttonText:(n==null?void 0:n.viewDocumentText)||"View Document",handleClick:f=>{u(f,Te.ViewAgreementClick)}})}return e()},os=(e,t)=>{const n=We(0),r=()=>{if(e.current){const i=e.current;i.style.height="1px";const o=i.scrollHeight,a=i.offsetHeight-i.clientHeight,s=o+a,l=parseInt(window.getComputedStyle(i).getPropertyValue("max-height")),c=s<=l?s:l;n.current!==c&&t(),n.current=c,i.style.height=`${c}px`}};return ge(r,[]),r},as=({border:e,label:t,isSelected:n,value:r,text:i,id:o,isRadio:a,useMobileStyling:s,error:l,allowTextEntry:c,promptText:u,onUserInputChanged:d})=>{const{styleNonce:f,viewDocument:v}=G(E=>({styleNonce:E.styleNonce,viewDocument:E.viewDocument})),[p,h]=ne(!1);Mc(v,e,f);const g=({isSelected:E,userText:R})=>{d&&d({id:o||"",selected:E,value:r,userText:R})},_=E=>{E.stopPropagation(),g({isSelected:a||!n,userText:i}),h(!1)},b=()=>{p||h(!0)},x=()=>{p&&h(!1)},w=E=>{(E.key==="Enter"||E.key===" ")&&_(E)},m={onClick:E=>_(E),onKeyPress:E=>w(E)};"ontouchstart"in v.documentElement?(m.onTouchStart=x,m.onTouchCancel=x,m.onTouchEnd=x):(m.onMouseDown=b,m.onMouseLeave=x);const C=a?`radio-${o}`:`checkbox-${o}`,S=n||p?[Yn]:[],k=[...l?[ls]:[],...S];return y("div",{className:$([...X(O.Choice,s),...k]),id:`choice-div-${o}`,style:l?{borderColor:Ut}:{},...m,children:[y("div",{className:$([O.ChoiceLabelContainer]),children:[a?y("div",{"aria-labelledby":`label-${o}`,className:$([O.ChoiceRadio,...S]),id:C,role:"radio",tabIndex:0}):y("div",{"aria-checked":n,"aria-labelledby":`label-${o}`,className:O.ChoiceCheckbox,id:C,role:"checkbox",style:n?{backgroundColor:e,borderColor:e,boxShadow:"none"}:{},tabIndex:0,children:n&&y("svg",{fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg",children:y("path",{d:"M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",stroke:"white",strokeLinecap:"round",strokeWidth:"2"})})}),y("label",{className:$(X(O.ChoiceLabel,s)),htmlFor:C,id:`label-${o}`,children:t})]}),c&&n&&y("div",{className:$([O.ChoiceTextEntryContainer,...S]),children:y(jc,{onTextChange:E=>g({isSelected:n,userText:E}),promptText:u||"Please specify",textValue:i,useMobileStyling:s})})]})},jc=({promptText:e,textValue:t,onTextChange:n,useMobileStyling:r})=>{const i=We(null),{update:o}=G(s=>({update:s.update})),a=os(i,()=>o());return ge(()=>{i.current&&i.current.focus()},[]),y("textarea",{"aria-label":e,"aria-multiline":"true","aria-placeholder":e,className:$(X(O.ChoiceTextInput,r)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:s=>{a(),s.stopPropagation(),n(s.currentTarget.value)},onClick:s=>{s.stopPropagation()},onKeyPress:s=>{s.stopPropagation()},placeholder:e,ref:i,role:"textbox",rows:1,value:t})},ss="ul-select-style-element",Yn="ul-select-active-dynamic-style",ls="ul-select-error-dynamic-style",Lc=e=>e.tagName.toLowerCase()==="style",Mc=(e,t,n)=>{let r=e.getElementById(ss),i=!1;r||(r=e.createElement("style"),i=!0),Lc(r)&&(r.id=ss,n&&(r.nonce=n),r.textContent=Bc(t),i&&e.head.appendChild(r))},Bc=e=>` - .${Yn} { +`).slice(t).filter(ps).map(r=>` +`+r).join("")):""}var fs=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Cr=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(fs),cc={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Tt(e,t){this._e=rt(),this.name=e,this.message=t}function ms(e,t){return e+". Errors: "+Object.keys(t).map(n=>t[n].toString()).filter((n,r,o)=>o.indexOf(n)===r).join(` +`)}function Cn(e,t,n,r){this._e=rt(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=ms(e,t)}function Kt(e,t){this._e=rt(),this.name="BulkError",this.failures=Object.keys(t).map(n=>t[n]),this.failuresByPos=t,this.message=ms(e,t)}Et(Tt).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+kr(this._e,2))}},toString:function(){return this.name+": "+this.message}}),Et(Cn).from(Tt),Et(Kt).from(Tt);var Sr=Cr.reduce((e,t)=>(e[t]=t+"Error",e),{});const uc=Tt;var $=Cr.reduce((e,t)=>{var n=t+"Error";function r(o,i){this._e=rt(),this.name=n,o?typeof o=="string"?(this.message=`${o}${i?` + `+i:""}`,this.inner=i||null):typeof o=="object"&&(this.message=`${o.name} ${o.message}`,this.inner=o):(this.message=cc[t]||n,this.inner=null)}return Et(r).from(uc),e[t]=r,e},{});$.Syntax=SyntaxError,$.Type=TypeError,$.Range=RangeError;var gs=fs.reduce((e,t)=>(e[t+"Error"]=$[t],e),{}),Sn=Cr.reduce((e,t)=>(["Syntax","Type","Range"].indexOf(t)===-1&&(e[t+"Error"]=$[t]),e),{});function q(){}function zt(e){return e}function dc(e,t){return e==null||e===zt?t:function(n){return t(e(n))}}function ot(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function hc(e,t){return e===q?t:function(){var n=e.apply(this,arguments);n!==void 0&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?ot(r,this.onsuccess):r),o&&(this.onerror=this.onerror?ot(o,this.onerror):o),i!==void 0?i:n}}function pc(e,t){return e===q?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?ot(n,this.onsuccess):n),r&&(this.onerror=this.onerror?ot(r,this.onerror):r)}}function fc(e,t){return e===q?t:function(n){var r=e.apply(this,arguments);se(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var s=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?ot(o,this.onsuccess):o),i&&(this.onerror=this.onerror?ot(i,this.onerror):i),r===void 0?s===void 0?void 0:s:se(r,s)}}function mc(e,t){return e===q?t:function(){return t.apply(this,arguments)!==!1&&e.apply(this,arguments)}}function Er(e,t){return e===q?t:function(){var n=e.apply(this,arguments);if(n&&typeof n.then=="function"){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then(function(){return t.apply(r,i)})}return t.apply(this,arguments)}}Sn.ModifyError=Cn,Sn.DexieError=Tt,Sn.BulkError=Kt;var Wt={};const vs=100,[Pr,En,Tr]=typeof Promise>"u"?[]:(()=>{let e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,Ft(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,Ft(t),e]})(),ys=En&&En.then,Pn=Pr&&Pr.constructor,Ir=!!Tr;var jr=!1,gc=Tr?()=>{Tr.then(On)}:K.setImmediate?setImmediate.bind(null,On):K.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{On(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(On,0)},Gt=function(e,t){Zt.push([e,t]),Tn&&(gc(),Tn=!1)},Or=!0,Tn=!0,it=[],In=[],Rr=null,Dr=zt,It={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ts,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{Ts(e[0],e[1])}catch{}})}},N=It,Zt=[],st=0,jn=[];function I(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=q,this._lib=!1;var t=this._PSD=N;if(Ee&&(this._stackHolder=rt(),this._prev=null,this._numPrev=0),typeof e!="function"){if(e!==Wt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Lr(this,this._value))}this._state=null,this._value=null,++t.ref,bs(this,e)}const Ar={get:function(){var e=N,t=An;function n(r,o){var i=!e.global&&(e!==N||t!==An);const s=i&&!Ne();var a=new I((l,u)=>{Nr(this,new _s(Nn(r,e,i,s),Nn(o,e,i,s),l,u,e))});return Ee&&ks(a,this),a}return n.prototype=Wt,n},set:function(e){De(this,"then",e&&e.prototype===Wt?Ar:{get:function(){return e},set:Ar.set})}};function _s(e,t,n,r,o){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=n,this.reject=r,this.psd=o}function bs(e,t){try{t(n=>{if(e._state===null){if(n===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&Yt();n&&typeof n.then=="function"?bs(e,(o,i)=>{n instanceof I?n._then(o,i):n.then(o,i)}):(e._state=!0,e._value=n,xs(e)),r&&Qt()}},Lr.bind(null,e))}catch(n){Lr(e,n)}}function Lr(e,t){if(In.push(t),e._state===null){var n=e._lib&&Yt();t=Dr(t),e._state=!1,e._value=t,Ee&&t!==null&&typeof t=="object"&&!t._promise&&function(r,o,i){try{r.apply(null,i)}catch(s){o&&o(s)}}(()=>{var r=yr(t,"stack");t._promise=e,De(t,"stack",{get:()=>jr?r&&(r.get?r.get.apply(t):r.value):e.stack})}),function(r){it.some(o=>o._value===r._value)||it.push(r)}(e),xs(e),n&&Qt()}}function xs(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n{--st==0&&Mr()},[]))}function Nr(e,t){if(e._state!==null){var n=e._state?t.onFulfilled:t.onRejected;if(n===null)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++st,Gt(vc,[n,e,t])}else e._listeners.push(t)}function vc(e,t,n){try{Rr=t;var r,o=t._value;t._state?r=e(o):(In.length&&(In=[]),r=e(o),In.indexOf(o)===-1&&function(i){for(var s=it.length;s;)if(it[--s]._value===i._value)return void it.splice(s,1)}(t)),n.resolve(r)}catch(i){n.reject(i)}finally{Rr=null,--st==0&&Mr(),--n.psd.ref||n.psd.finalize()}}function ws(e,t,n){if(t.length===n)return t;var r="";if(e._state===!1){var o,i,s=e._value;s!=null?(o=s.name||"Error",i=s.message||s,r=kr(s,0)):(o=s,i=""),t.push(o+(i?": "+i:"")+r)}return Ee&&((r=kr(e._stackHolder,2))&&t.indexOf(r)===-1&&t.push(r),e._prev&&ws(e._prev,t,n)),t}function ks(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function On(){Yt()&&Qt()}function Yt(){var e=Or;return Or=!1,Tn=!1,e}function Qt(){var e,t,n;do for(;Zt.length>0;)for(e=Zt,Zt=[],n=e.length,t=0;t0);Or=!0,Tn=!0}function Mr(){var e=it;it=[],e.forEach(r=>{r._PSD.onunhandled.call(null,r._value,r)});for(var t=jn.slice(0),n=t.length;n;)t[--n]()}function Rn(e){return new I(Wt,!1,e)}function W(e,t){var n=N;return function(){var r=Yt(),o=N;try{return ze(n,!0),e.apply(this,arguments)}catch(i){t&&t(i)}finally{ze(o,!1),r&&Qt()}}}St(I.prototype,{then:Ar,_then:function(e,t){Nr(this,new _s(null,null,e,t,N))},catch:function(e){if(arguments.length===1)return this.then(null,e);var t=arguments[0],n=arguments[1];return typeof t=="function"?this.then(null,r=>r instanceof t?n(r):Rn(r)):this.then(null,r=>r&&r.name===t?n(r):Rn(r))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),Rn(t)))},stack:{get:function(){if(this._stack)return this._stack;try{jr=!0;var e=ws(this,[],20).join(` +From previous: `);return this._state!==null&&(this._stack=e),e}finally{jr=!1}}},timeout:function(e,t){return e<1/0?new I((n,r)=>{var o=setTimeout(()=>r(new $.Timeout(t)),e);this.then(n,r).finally(clearTimeout.bind(null,o))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&De(I.prototype,Symbol.toStringTag,"Dexie.Promise"),It.env=Cs(),St(I,{all:function(){var e=Le.apply(null,arguments).map(Ln);return new I(function(t,n){e.length===0&&t([]);var r=e.length;e.forEach((o,i)=>I.resolve(o).then(s=>{e[i]=s,--r||t(e)},n))})},resolve:e=>{if(e instanceof I)return e;if(e&&typeof e.then=="function")return new I((n,r)=>{e.then(n,r)});var t=new I(Wt,!0,e);return ks(t,Rr),t},reject:Rn,race:function(){var e=Le.apply(null,arguments).map(Ln);return new I((t,n)=>{e.map(r=>I.resolve(r).then(t,n))})},PSD:{get:()=>N,set:e=>N=e},totalEchoes:{get:()=>An},newPSD:Ke,usePSD:Ot,scheduler:{get:()=>Gt,set:e=>{Gt=e}},rejectionMapper:{get:()=>Dr,set:e=>{Dr=e}},follow:(e,t)=>new I((n,r)=>Ke((o,i)=>{var s=N;s.unhandleds=[],s.onunhandled=i,s.finalize=ot(function(){(function(a){function l(){a(),jn.splice(jn.indexOf(l),1)}jn.push(l),++st,Gt(()=>{--st==0&&Mr()},[])})(()=>{this.unhandleds.length===0?o():i(this.unhandleds[0])})},s.finalize),e()},t,n,r))}),Pn&&(Pn.allSettled&&De(I,"allSettled",function(){const e=Le.apply(null,arguments).map(Ln);return new I(t=>{e.length===0&&t([]);let n=e.length;const r=new Array(n);e.forEach((o,i)=>I.resolve(o).then(s=>r[i]={status:"fulfilled",value:s},s=>r[i]={status:"rejected",reason:s}).then(()=>--n||t(r)))})}),Pn.any&&typeof AggregateError<"u"&&De(I,"any",function(){const e=Le.apply(null,arguments).map(Ln);return new I((t,n)=>{e.length===0&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach((i,s)=>I.resolve(i).then(a=>t(a),a=>{o[s]=a,--r||n(new AggregateError(o))}))})}));const ie={awaits:0,echoes:0,id:0};var yc=0,Dn=[],$r=0,An=0,_c=0;function Ke(e,t,n,r){var o=N,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++_c;var s=It.env;i.env=Ir?{Promise:I,PromiseProp:{value:I,configurable:!0,writable:!0},all:I.all,race:I.race,allSettled:I.allSettled,any:I.any,resolve:I.resolve,reject:I.reject,nthen:Es(s.nthen,i),gthen:Es(s.gthen,i)}:{},t&&se(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=Ot(i,e,n,r);return i.ref===0&&i.finalize(),a}function jt(){return ie.id||(ie.id=++yc),++ie.awaits,ie.echoes+=vs,ie.id}function Ne(){return!!ie.awaits&&(--ie.awaits==0&&(ie.id=0),ie.echoes=ie.awaits*vs,!0)}function Ln(e){return ie.echoes&&e&&e.constructor===Pn?(jt(),e.then(t=>(Ne(),t),t=>(Ne(),J(t)))):e}function bc(e){++An,ie.echoes&&--ie.echoes!=0||(ie.echoes=ie.id=0),Dn.push(N),ze(e,!0)}function xc(){var e=Dn[Dn.length-1];Dn.pop(),ze(e,!1)}function ze(e,t){var n=N;if((t?!ie.echoes||$r++&&e===N:!$r||--$r&&e===N)||Ss(t?bc.bind(null,e):xc),e!==N&&(N=e,n===It&&(It.env=Cs()),Ir)){var r=It.env.Promise,o=e.env;En.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(K,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function Cs(){var e=K.Promise;return Ir?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(K,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:En.then,gthen:e.prototype.then}:{}}function Ot(e,t,n,r,o){var i=N;try{return ze(e,!0),t(n,r,o)}finally{ze(i,!1)}}function Ss(e){ys.call(Pr,e)}function Nn(e,t,n,r){return typeof e!="function"?e:function(){var o=N;n&&jt(),ze(t,!0);try{return e.apply(this,arguments)}finally{ze(o,!1),r&&Ss(Ne)}}}function Es(e,t){return function(n,r){return e.call(this,Nn(n,t),Nn(r,t))}}(""+ys).indexOf("[native code]")===-1&&(jt=Ne=q);const Ps="unhandledrejection";function Ts(e,t){var n;try{n=t.onuncatched(e)}catch{}if(n!==!1)try{var r,o={promise:t,reason:e};if(K.document&&document.createEvent?((r=document.createEvent("Event")).initEvent(Ps,!0,!0),se(r,o)):K.CustomEvent&&se(r=new CustomEvent(Ps,{detail:o}),o),r&&K.dispatchEvent&&(dispatchEvent(r),!K.PromiseRejectionEvent&&K.onunhandledrejection))try{K.onunhandledrejection(r)}catch{}Ee&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch{}}var J=I.reject;function Br(e,t,n,r){if(e.idbdb&&(e._state.openComplete||N.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(i){return i.name===Sr.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(()=>Br(e,t,n,r))):J(i)}return o._promise(t,(i,s)=>Ke(()=>(N.trans=o,r(i,s,o)))).then(i=>o._completion.then(()=>i))}if(e._state.openComplete)return J(new $.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return J(new $.DatabaseClosed);e.open().catch(q)}return e._state.dbReadyPromise.then(()=>Br(e,t,n,r))}const Is="3.2.4",at="ï¿¿",Ur=-1/0,Me="Invalid key provided. Keys must be of type string, number, Date or Array.",js="String expected.",Jt=[],Mn=typeof navigator<"u"&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),wc=Mn,kc=Mn,Os=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),$n="__dbnames",Vr="readonly",Fr="readwrite";function lt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const Rs={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Bn(e){return typeof e!="string"||/\./.test(e)?t=>t:t=>(t[e]===void 0&&e in t&&delete(t=qt(t))[e],t)}class Cc{_trans(t,n,r){const o=this._tx||N.trans,i=this.name;function s(l,u,d){if(!d.schema[i])throw new $.NotFound("Table "+i+" not part of transaction");return n(d.idbtrans,d)}const a=Yt();try{return o&&o.db===this.db?o===N.trans?o._promise(t,s,r):Ke(()=>o._promise(t,s,r),{trans:o,transless:N.transless||N}):Br(this.db,t,[this.name],s)}finally{a&&Qt()}}get(t,n){return t&&t.constructor===Object?this.where(t).first(n):this._trans("readonly",r=>this.core.get({trans:r,key:t}).then(o=>this.hook.reading.fire(o))).then(n)}where(t){if(typeof t=="string")return new this.db.WhereClause(this,t);if(oe(t))return new this.db.WhereClause(this,`[${t.join("+")}]`);const n=Y(t);if(n.length===1)return this.where(n[0]).equals(t[n[0]]);const r=this.schema.indexes.concat(this.schema.primKey).filter(u=>u.compound&&n.every(d=>u.keyPath.indexOf(d)>=0)&&u.keyPath.every(d=>n.indexOf(d)>=0))[0];if(r&&this.db._maxKey!==at)return this.where(r.name).equals(r.keyPath.map(u=>t[u]));!r&&Ee&&console.warn(`The query ${JSON.stringify(t)} on ${this.name} would benefit of a compound index [${n.join("+")}]`);const{idxByName:o}=this.schema,i=this.db._deps.indexedDB;function s(u,d){try{return i.cmp(u,d)===0}catch{return!1}}const[a,l]=n.reduce(([u,d],c)=>{const h=o[c],p=t[c];return[u||h,u||!h?lt(d,h&&h.multi?y=>{const f=Ae(y,c);return oe(f)&&f.some(_=>s(p,_))}:y=>s(p,Ae(y,c))):d]},[null,null]);return a?this.where(a.name).equals(t[a.keyPath]).filter(l):r?this.filter(l):this.where(n).equals("")}filter(t){return this.toCollection().and(t)}count(t){return this.toCollection().count(t)}offset(t){return this.toCollection().offset(t)}limit(t){return this.toCollection().limit(t)}each(t){return this.toCollection().each(t)}toArray(t){return this.toCollection().toArray(t)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(t){return new this.db.Collection(new this.db.WhereClause(this,oe(t)?`[${t.join("+")}]`:t))}reverse(){return this.toCollection().reverse()}mapToClass(t){this.schema.mappedClass=t;const n=r=>{if(!r)return r;const o=Object.create(t.prototype);for(var i in r)if(ue(r,i))try{o[i]=r[i]}catch{}return o};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=n,this.hook("reading",n),t}defineClass(){return this.mapToClass(function(t){se(this,t)})}add(t,n){const{auto:r,keyPath:o}=this.schema.primKey;let i=t;return o&&r&&(i=Bn(o)(t)),this._trans("readwrite",s=>this.core.mutate({trans:s,type:"add",keys:n!=null?[n]:null,values:[i]})).then(s=>s.numFailures?I.reject(s.failures[0]):s.lastResult).then(s=>{if(o)try{_e(t,o,s)}catch{}return s})}update(t,n){if(typeof t!="object"||oe(t))return this.where(":id").equals(t).modify(n);{const r=Ae(t,this.schema.primKey.keyPath);if(r===void 0)return J(new $.InvalidArgument("Given object does not contain its primary key"));try{typeof n!="function"?Y(n).forEach(o=>{_e(t,o,n[o])}):n(t,{value:t,primKey:r})}catch{}return this.where(":id").equals(r).modify(n)}}put(t,n){const{auto:r,keyPath:o}=this.schema.primKey;let i=t;return o&&r&&(i=Bn(o)(t)),this._trans("readwrite",s=>this.core.mutate({trans:s,type:"put",values:[i],keys:n!=null?[n]:null})).then(s=>s.numFailures?I.reject(s.failures[0]):s.lastResult).then(s=>{if(o)try{_e(t,o,s)}catch{}return s})}delete(t){return this._trans("readwrite",n=>this.core.mutate({trans:n,type:"delete",keys:[t]})).then(n=>n.numFailures?I.reject(n.failures[0]):void 0)}clear(){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"deleteRange",range:Rs})).then(t=>t.numFailures?I.reject(t.failures[0]):void 0)}bulkGet(t){return this._trans("readonly",n=>this.core.getMany({keys:t,trans:n}).then(r=>r.map(o=>this.hook.reading.fire(o))))}bulkAdd(t,n,r){const o=Array.isArray(n)?n:void 0,i=(r=r||(o?void 0:n))?r.allKeys:void 0;return this._trans("readwrite",s=>{const{auto:a,keyPath:l}=this.schema.primKey;if(l&&o)throw new $.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new $.InvalidArgument("Arguments objects and keys must have the same length");const u=t.length;let d=l&&a?t.map(Bn(l)):t;return this.core.mutate({trans:s,type:"add",keys:o,values:d,wantResults:i}).then(({numFailures:c,results:h,lastResult:p,failures:y})=>{if(c===0)return i?h:p;throw new Kt(`${this.name}.bulkAdd(): ${c} of ${u} operations failed`,y)})})}bulkPut(t,n,r){const o=Array.isArray(n)?n:void 0,i=(r=r||(o?void 0:n))?r.allKeys:void 0;return this._trans("readwrite",s=>{const{auto:a,keyPath:l}=this.schema.primKey;if(l&&o)throw new $.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new $.InvalidArgument("Arguments objects and keys must have the same length");const u=t.length;let d=l&&a?t.map(Bn(l)):t;return this.core.mutate({trans:s,type:"put",keys:o,values:d,wantResults:i}).then(({numFailures:c,results:h,lastResult:p,failures:y})=>{if(c===0)return i?h:p;throw new Kt(`${this.name}.bulkPut(): ${c} of ${u} operations failed`,y)})})}bulkDelete(t){const n=t.length;return this._trans("readwrite",r=>this.core.mutate({trans:r,type:"delete",keys:t})).then(({numFailures:r,lastResult:o,failures:i})=>{if(r===0)return o;throw new Kt(`${this.name}.bulkDelete(): ${r} of ${n} operations failed`,i)})}}function Xt(e){var t={},n=function(s,a){if(a){for(var l=arguments.length,u=new Array(l-1);--l;)u[l-1]=arguments[l];return t[s].subscribe.apply(null,u),e}if(typeof s=="string")return t[s]};n.addEventType=i;for(var r=1,o=arguments.length;rlt(r(),t()):t,e.justLimit=n&&!r}function Un(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new $.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Ds(e,t,n){const r=Un(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:e.dir==="prev",unique:!!e.unique,query:{index:r,range:e.range}})}function Vn(e,t,n,r){const o=e.replayFilter?lt(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},s=(a,l,u)=>{if(!o||o(l,u,h=>l.stop(h),h=>l.fail(h))){var d=l.primaryKey,c=""+d;c==="[object ArrayBuffer]"&&(c=""+new Uint8Array(d)),ue(i,c)||(i[c]=!0,t(a,l,u))}};return Promise.all([e.or._iterate(s,n),As(Ds(e,r,n),e.algorithm,s,!e.keysOnly&&e.valueMapper)])}return As(Ds(e,r,n),lt(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function As(e,t,n,r){var o=W(r?(i,s,a)=>n(r(i),s,a):n);return e.then(i=>{if(i)return i.start(()=>{var s=()=>i.continue();t&&!t(i,a=>s=a,a=>{i.stop(a),s=q},a=>{i.fail(a),s=q})||o(i.value,i,a=>s=a),s()})})}function ae(e,t){try{const n=Ls(e),r=Ls(t);if(n!==r)return n==="Array"?1:r==="Array"?-1:n==="binary"?1:r==="binary"?-1:n==="string"?1:r==="string"?-1:n==="Date"?1:r!=="Date"?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:eVn(n,t,r,n.table.core))}count(t){return this._read(n=>{const r=this._ctx,o=r.table.core;if(Rt(r,!0))return o.count({trans:n,query:{index:Un(r,o.schema),range:r.range}}).then(s=>Math.min(s,r.limit));var i=0;return Vn(r,()=>(++i,!1),n,o).then(()=>i)}).then(t)}sortBy(t,n){const r=t.split(".").reverse(),o=r[0],i=r.length-1;function s(u,d){return d?s(u[r[d]],d-1):u[o]}var a=this._ctx.dir==="next"?1:-1;function l(u,d){var c=s(u,i),h=s(d,i);return ch?a:0}return this.toArray(function(u){return u.sort(l)}).then(n)}toArray(t){return this._read(n=>{var r=this._ctx;if(r.dir==="next"&&Rt(r,!0)&&r.limit>0){const{valueMapper:o}=r,i=Un(r,r.table.core.schema);return r.table.core.query({trans:n,limit:r.limit,values:!0,query:{index:i,range:r.range}}).then(({result:s})=>o?s.map(o):s)}{const o=[];return Vn(r,i=>o.push(i),n,r.table.core).then(()=>o)}},t)}offset(t){var n=this._ctx;return t<=0||(n.offset+=t,Rt(n)?qr(n,()=>{var r=t;return(o,i)=>r===0||(r===1?(--r,!1):(i(()=>{o.advance(r),r=0}),!1))}):qr(n,()=>{var r=t;return()=>--r<0})),this}limit(t){return this._ctx.limit=Math.min(this._ctx.limit,t),qr(this._ctx,()=>{var n=t;return function(r,o,i){return--n<=0&&o(i),n>=0}},!0),this}until(t,n){return Hr(this._ctx,function(r,o,i){return!t(r.value)||(o(i),n)}),this}first(t){return this.limit(1).toArray(function(n){return n[0]}).then(t)}last(t){return this.reverse().first(t)}filter(t){var n,r;return Hr(this._ctx,function(o){return t(o.value)}),n=this._ctx,r=t,n.isMatch=lt(n.isMatch,r),this}and(t){return this.filter(t)}or(t){return new this.db.WhereClause(this._ctx.table,t,this)}reverse(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,o){t(o.key,o)})}eachUniqueKey(t){return this._ctx.unique="unique",this.eachKey(t)}eachPrimaryKey(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,o){t(o.primaryKey,o)})}keys(t){var n=this._ctx;n.keysOnly=!n.isMatch;var r=[];return this.each(function(o,i){r.push(i.key)}).then(function(){return r}).then(t)}primaryKeys(t){var n=this._ctx;if(n.dir==="next"&&Rt(n,!0)&&n.limit>0)return this._read(o=>{var i=Un(n,n.table.core.schema);return n.table.core.query({trans:o,values:!1,limit:n.limit,query:{index:i,range:n.range}})}).then(({result:o})=>o).then(t);n.keysOnly=!n.isMatch;var r=[];return this.each(function(o,i){r.push(i.primaryKey)}).then(function(){return r}).then(t)}uniqueKeys(t){return this._ctx.unique="unique",this.keys(t)}firstKey(t){return this.limit(1).keys(function(n){return n[0]}).then(t)}lastKey(t){return this.reverse().firstKey(t)}distinct(){var t=this._ctx,n=t.index&&t.table.schema.idxByName[t.index];if(!n||!n.multi)return this;var r={};return Hr(this._ctx,function(o){var i=o.primaryKey.toString(),s=ue(r,i);return r[i]=!0,!s}),this}modify(t){var n=this._ctx;return this._write(r=>{var o;if(typeof t=="function")o=t;else{var i=Y(t),s=i.length;o=function(f){for(var _=!1,m=0;m{const{failures:m,numFailures:v}=_;h+=f-v;for(let w of Y(m))c.push(m[w])};return this.clone().primaryKeys().then(f=>{const _=m=>{const v=Math.min(d,f.length-m);return a.getMany({trans:r,keys:f.slice(m,m+v),cache:"immutable"}).then(w=>{const k=[],b=[],x=l?[]:null,S=[];for(let C=0;C0&&a.mutate({trans:r,type:"add",values:k}).then(C=>{for(let A in C.failures)S.splice(parseInt(A),1);y(k.length,C)})).then(()=>(b.length>0||E&&typeof t=="object")&&a.mutate({trans:r,type:"put",keys:x,values:b,criteria:E,changeSpec:typeof t!="function"&&t}).then(C=>y(b.length,C))).then(()=>(S.length>0||E&&t===Kr)&&a.mutate({trans:r,type:"delete",keys:S,criteria:E}).then(C=>y(S.length,C))).then(()=>f.length>m+v&&_(m+d))})};return _(0).then(()=>{if(c.length>0)throw new Cn("Error modifying one or more objects",c,h,p);return f.length})})})}delete(){var t=this._ctx,n=t.range;return Rt(t)&&(t.isPrimKey&&!kc||n.type===3)?this._write(r=>{const{primaryKey:o}=t.table.core.schema,i=n;return t.table.core.count({trans:r,query:{index:o,range:i}}).then(s=>t.table.core.mutate({trans:r,type:"deleteRange",range:i}).then(({failures:a,lastResult:l,results:u,numFailures:d})=>{if(d)throw new Cn("Could not delete some values",Object.keys(a).map(c=>a[c]),s-d);return s-d}))}):this.modify(Kr)}}const Kr=(e,t)=>t.value=null;function Ec(e,t){return et?-1:e===t?0:1}function de(e,t,n){var r=e instanceof $s?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function Dt(e){return new e.Collection(e,()=>Ms("")).limit(0)}function Tc(e,t,n,r,o,i){for(var s=Math.min(e.length,r.length),a=-1,l=0;l=0?e.substr(0,a)+t[a]+n.substr(a+1):null;o(e[l],u)<0&&(a=l)}return stypeof f=="string"))return de(e,js);function h(f){o=function(m){return m==="next"?v=>v.toUpperCase():v=>v.toLowerCase()}(f),i=function(m){return m==="next"?v=>v.toLowerCase():v=>v.toUpperCase()}(f),s=f==="next"?Ec:Pc;var _=n.map(function(m){return{lower:i(m),upper:o(m)}}).sort(function(m,v){return s(m.lower,v.lower)});a=_.map(function(m){return m.upper}),l=_.map(function(m){return m.lower}),u=f,d=f==="next"?"":r}h("next");var p=new e.Collection(e,()=>We(a[0],l[c-1]+r));p._ondirectionchange=function(f){h(f)};var y=0;return p._addAlgorithm(function(f,_,m){var v=f.key;if(typeof v!="string")return!1;var w=i(v);if(t(w,l,y))return!0;for(var k=null,b=y;b0)&&(k=x)}return _(k!==null?function(){f.continue(k+d)}:m),!1}),p}function We(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Ms(e){return{type:1,lower:e,upper:e}}class $s{get Collection(){return this._ctx.table.db.Collection}between(t,n,r,o){r=r!==!1,o=o===!0;try{return this._cmp(t,n)>0||this._cmp(t,n)===0&&(r||o)&&(!r||!o)?Dt(this):new this.Collection(this,()=>We(t,n,!r,!o))}catch{return de(this,Me)}}equals(t){return t==null?de(this,Me):new this.Collection(this,()=>Ms(t))}above(t){return t==null?de(this,Me):new this.Collection(this,()=>We(t,void 0,!0))}aboveOrEqual(t){return t==null?de(this,Me):new this.Collection(this,()=>We(t,void 0,!1))}below(t){return t==null?de(this,Me):new this.Collection(this,()=>We(void 0,t,!1,!0))}belowOrEqual(t){return t==null?de(this,Me):new this.Collection(this,()=>We(void 0,t))}startsWith(t){return typeof t!="string"?de(this,js):this.between(t,t+at,!0,!0)}startsWithIgnoreCase(t){return t===""?this.startsWith(t):Fn(this,(n,r)=>n.indexOf(r[0])===0,[t],at)}equalsIgnoreCase(t){return Fn(this,(n,r)=>n===r[0],[t],"")}anyOfIgnoreCase(){var t=Le.apply(Pt,arguments);return t.length===0?Dt(this):Fn(this,(n,r)=>r.indexOf(n)!==-1,t,"")}startsWithAnyOfIgnoreCase(){var t=Le.apply(Pt,arguments);return t.length===0?Dt(this):Fn(this,(n,r)=>r.some(o=>n.indexOf(o)===0),t,at)}anyOf(){const t=Le.apply(Pt,arguments);let n=this._cmp;try{t.sort(n)}catch{return de(this,Me)}if(t.length===0)return Dt(this);const r=new this.Collection(this,()=>We(t[0],t[t.length-1]));r._ondirectionchange=i=>{n=i==="next"?this._ascending:this._descending,t.sort(n)};let o=0;return r._addAlgorithm((i,s,a)=>{const l=i.key;for(;n(l,t[o])>0;)if(++o,o===t.length)return s(a),!1;return n(l,t[o])===0||(s(()=>{i.continue(t[o])}),!1)}),r}notEqual(t){return this.inAnyRange([[Ur,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const t=Le.apply(Pt,arguments);if(t.length===0)return new this.Collection(this);try{t.sort(this._ascending)}catch{return de(this,Me)}const n=t.reduce((r,o)=>r?r.concat([[r[r.length-1][1],o]]):[[Ur,o]],null);return n.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(n,{includeLowers:!1,includeUppers:!1})}inAnyRange(t,n){const r=this._cmp,o=this._ascending,i=this._descending,s=this._min,a=this._max;if(t.length===0)return Dt(this);if(!t.every(v=>v[0]!==void 0&&v[1]!==void 0&&o(v[0],v[1])<=0))return de(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",$.InvalidArgument);const l=!n||n.includeLowers!==!1,u=n&&n.includeUppers===!0;let d,c=o;function h(v,w){return c(v[0],w[0])}try{d=t.reduce(function(v,w){let k=0,b=v.length;for(;k0){x[0]=s(x[0],w[0]),x[1]=a(x[1],w[1]);break}}return k===b&&v.push(w),v},[]),d.sort(h)}catch{return de(this,Me)}let p=0;const y=u?v=>o(v,d[p][1])>0:v=>o(v,d[p][1])>=0,f=l?v=>i(v,d[p][0])>0:v=>i(v,d[p][0])>=0;let _=y;const m=new this.Collection(this,()=>We(d[0][0],d[d.length-1][1],!l,!u));return m._ondirectionchange=v=>{v==="next"?(_=y,c=o):(_=f,c=i),d.sort(h)},m._addAlgorithm((v,w,k)=>{for(var b=v.key;_(b);)if(++p,p===d.length)return w(k),!1;return!!function(x){return!y(x)&&!f(x)}(b)||(this._cmp(b,d[p][1])===0||this._cmp(b,d[p][0])===0||w(()=>{c===o?v.continue(d[p][0]):v.continue(d[p][1])}),!1)}),m}startsWithAnyOf(){const t=Le.apply(Pt,arguments);return t.every(n=>typeof n=="string")?t.length===0?Dt(this):this.inAnyRange(t.map(n=>[n,n+at])):de(this,"startsWithAnyOf() only works with strings")}}function Pe(e){return W(function(t){return tn(t),e(t.target.error),!1})}function tn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const nn="storagemutated",Ge="x-storagemutated-1",Ze=Xt(null,nn);class Ic{_lock(){return Ht(!N.global),++this._reculock,this._reculock!==1||N.global||(N.lockOwnerFor=this),this}_unlock(){if(Ht(!N.global),--this._reculock==0)for(N.global||(N.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{Ot(t[1],t[0])}catch{}}return this}_locked(){return this._reculock&&N.lockOwnerFor!==this}create(t){if(!this.mode)return this;const n=this.db.idbdb,r=this.db._state.dbOpenError;if(Ht(!this.idbtrans),!t&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new $.DatabaseClosed(r);case"MissingAPIError":throw new $.MissingAPI(r.message,r);default:throw new $.OpenFailed(r)}if(!this.active)throw new $.TransactionInactive;return Ht(this._completion._state===null),(t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=W(o=>{tn(o),this._reject(t.error)}),t.onabort=W(o=>{tn(o),this.active&&this._reject(new $.Abort(t.error)),this.active=!1,this.on("abort").fire(o)}),t.oncomplete=W(()=>{this.active=!1,this._resolve(),"mutatedParts"in t&&Ze.storagemutated.fire(t.mutatedParts)}),this}_promise(t,n,r){if(t==="readwrite"&&this.mode!=="readwrite")return J(new $.ReadOnly("Transaction is readonly"));if(!this.active)return J(new $.TransactionInactive);if(this._locked())return new I((i,s)=>{this._blockedFuncs.push([()=>{this._promise(t,n,r).then(i,s)},N])});if(r)return Ke(()=>{var i=new I((s,a)=>{this._lock();const l=n(s,a,this);l&&l.then&&l.then(s,a)});return i.finally(()=>this._unlock()),i._lib=!0,i});var o=new I((i,s)=>{var a=n(i,s,this);a&&a.then&&a.then(i,s)});return o._lib=!0,o}_root(){return this.parent?this.parent._root():this}waitFor(t){var n=this._root();const r=I.resolve(t);if(n._waitingFor)n._waitingFor=n._waitingFor.then(()=>r);else{n._waitingFor=r,n._waitingQueue=[];var o=n.idbtrans.objectStore(n.storeNames[0]);(function s(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(o.get(-1/0).onsuccess=s)})()}var i=n._waitingFor;return new I((s,a)=>{r.then(l=>n._waitingQueue.push(W(s.bind(null,l))),l=>n._waitingQueue.push(W(a.bind(null,l)))).finally(()=>{n._waitingFor===i&&(n._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new $.Abort))}table(t){const n=this._memoizedTables||(this._memoizedTables={});if(ue(n,t))return n[t];const r=this.schema[t];if(!r)throw new $.NotFound("Table "+t+" not part of transaction");const o=new this.db.Table(t,r,this);return o.core=this.db.core.table(t),n[t]=o,o}}function zr(e,t,n,r,o,i,s){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!s?"&":"")+(r?"*":"")+(o?"++":"")+Bs(t)}}function Bs(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function Us(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:ls(n,r=>[r.name,r])}}let rn=e=>{try{return e.only([[]]),rn=()=>[[]],[[]]}catch{return rn=()=>at,at}};function Wr(e){return e==null?()=>{}:typeof e=="string"?function(t){return t.split(".").length===1?r=>r[t]:r=>Ae(r,t)}(e):t=>Ae(t,e)}function Vs(e){return[].slice.call(e)}let jc=0;function on(e){return e==null?":id":typeof e=="string"?e:`[${e.join("+")}]`}function Oc(e,t,n){function r(l){if(l.type===3)return null;if(l.type===4)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:u,upper:d,lowerOpen:c,upperOpen:h}=l;return u===void 0?d===void 0?null:t.upperBound(d,!!h):d===void 0?t.lowerBound(u,!!c):t.bound(u,d,!!c,!!h)}const{schema:o,hasGetAll:i}=function(l,u){const d=Vs(l.objectStoreNames);return{schema:{name:l.name,tables:d.map(c=>u.objectStore(c)).map(c=>{const{keyPath:h,autoIncrement:p}=c,y=oe(h),f=h==null,_={},m={name:c.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:f,compound:y,keyPath:h,autoIncrement:p,unique:!0,extractKey:Wr(h)},indexes:Vs(c.indexNames).map(v=>c.index(v)).map(v=>{const{name:w,unique:k,multiEntry:b,keyPath:x}=v,S={name:w,compound:oe(x),keyPath:x,unique:k,multiEntry:b,extractKey:Wr(x)};return _[on(x)]=S,S}),getIndexByKeyPath:v=>_[on(v)]};return _[":id"]=m.primaryKey,h!=null&&(_[on(h)]=m.primaryKey),m})},hasGetAll:d.length>0&&"getAll"in u.objectStore(d[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),s=o.tables.map(l=>function(u){const d=u.name;return{name:d,schema:u,mutate:function({trans:c,type:h,keys:p,values:y,range:f}){return new Promise((_,m)=>{_=W(_);const v=c.objectStore(d),w=v.keyPath==null,k=h==="put"||h==="add";if(!k&&h!=="delete"&&h!=="deleteRange")throw new Error("Invalid operation type: "+h);const{length:b}=p||y||{length:1};if(p&&y&&p.length!==y.length)throw new Error("Given keys array must have same length as given values array.");if(b===0)return _({numFailures:0,failures:{},results:[],lastResult:void 0});let x;const S=[],E=[];let C=0;const A=R=>{++C,tn(R)};if(h==="deleteRange"){if(f.type===4)return _({numFailures:C,failures:E,results:[],lastResult:void 0});f.type===3?S.push(x=v.clear()):S.push(x=v.delete(r(f)))}else{const[R,L]=k?w?[y,p]:[y,null]:[p,null];if(k)for(let F=0;F{const L=R.target.result;S.forEach((F,D)=>F.error!=null&&(E[D]=F.error)),_({numFailures:C,failures:E,results:h==="delete"?p:S.map(F=>F.result),lastResult:L})};x.onerror=R=>{A(R),O(R)},x.onsuccess=O})},getMany:({trans:c,keys:h})=>new Promise((p,y)=>{p=W(p);const f=c.objectStore(d),_=h.length,m=new Array(_);let v,w=0,k=0;const b=S=>{const E=S.target;m[E._pos]=E.result,++k===w&&p(m)},x=Pe(y);for(let S=0;S<_;++S)h[S]!=null&&(v=f.get(h[S]),v._pos=S,v.onsuccess=b,v.onerror=x,++w);w===0&&p(m)}),get:({trans:c,key:h})=>new Promise((p,y)=>{p=W(p);const f=c.objectStore(d).get(h);f.onsuccess=_=>p(_.target.result),f.onerror=Pe(y)}),query:function(c){return h=>new Promise((p,y)=>{p=W(p);const{trans:f,values:_,limit:m,query:v}=h,w=m===1/0?void 0:m,{index:k,range:b}=v,x=f.objectStore(d),S=k.isPrimaryKey?x:x.index(k.name),E=r(b);if(m===0)return p({result:[]});if(c){const C=_?S.getAll(E,w):S.getAllKeys(E,w);C.onsuccess=A=>p({result:A.target.result}),C.onerror=Pe(y)}else{let C=0;const A=_||!("openKeyCursor"in S)?S.openCursor(E):S.openKeyCursor(E),O=[];A.onsuccess=R=>{const L=A.result;return L?(O.push(_?L.value:L.primaryKey),++C===m?p({result:O}):void L.continue()):p({result:O})},A.onerror=Pe(y)}})}(i),openCursor:function({trans:c,values:h,query:p,reverse:y,unique:f}){return new Promise((_,m)=>{_=W(_);const{index:v,range:w}=p,k=c.objectStore(d),b=v.isPrimaryKey?k:k.index(v.name),x=y?f?"prevunique":"prev":f?"nextunique":"next",S=h||!("openKeyCursor"in b)?b.openCursor(r(w),x):b.openKeyCursor(r(w),x);S.onerror=Pe(m),S.onsuccess=W(E=>{const C=S.result;if(!C)return void _(null);C.___id=++jc,C.done=!1;const A=C.continue.bind(C);let O=C.continuePrimaryKey;O&&(O=O.bind(C));const R=C.advance.bind(C),L=()=>{throw new Error("Cursor not stopped")};C.trans=c,C.stop=C.continue=C.continuePrimaryKey=C.advance=()=>{throw new Error("Cursor not started")},C.fail=W(m),C.next=function(){let F=1;return this.start(()=>F--?this.continue():this.stop()).then(()=>this)},C.start=F=>{const D=new Promise((Z,ke)=>{Z=W(Z),S.onerror=Pe(ke),C.fail=ke,C.stop=Je=>{C.stop=C.continue=C.continuePrimaryKey=C.advance=L,Z(Je)}}),ne=()=>{if(S.result)try{F()}catch(Z){C.fail(Z)}else C.done=!0,C.start=()=>{throw new Error("Cursor behind last entry")},C.stop()};return S.onsuccess=W(Z=>{S.onsuccess=ne,ne()}),C.continue=A,C.continuePrimaryKey=O,C.advance=R,ne(),D},_(C)},m)})},count({query:c,trans:h}){const{index:p,range:y}=c;return new Promise((f,_)=>{const m=h.objectStore(d),v=p.isPrimaryKey?m:m.index(p.name),w=r(y),k=w?v.count(w):v.count();k.onsuccess=W(b=>f(b.target.result)),k.onerror=Pe(_)})}}}(l)),a={};return s.forEach(l=>a[l.name]=l),{stack:"dbcore",transaction:e.transaction.bind(e),table(l){if(!a[l])throw new Error(`Table '${l}' not found`);return a[l]},MIN_KEY:-1/0,MAX_KEY:rn(t),schema:o}}function Gr({_novip:e},t){const n=t.db,r=function(o,i,{IDBKeyRange:s,indexedDB:a},l){return{dbcore:function(d,c){return c.reduce((h,{create:p})=>({...h,...p(h)}),d)}(Oc(i,s,l),o.dbcore)}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach(o=>{const i=o.name;e.core.schema.tables.some(s=>s.name===i)&&(o.core=e.core.table(i),e[i]instanceof e.Table&&(e[i].core=o.core))})}function Hn({_novip:e},t,n,r){n.forEach(o=>{const i=r[o];t.forEach(s=>{const a=yr(s,o);(!a||"value"in a&&a.value===void 0)&&(s===e.Transaction.prototype||s instanceof e.Transaction?De(s,o,{get(){return this.table(o)},set(l){is(this,o,{value:l,writable:!0,configurable:!0,enumerable:!0})}}):s[o]=new e.Table(o,i))})})}function Zr({_novip:e},t){t.forEach(n=>{for(let r in n)n[r]instanceof e.Table&&delete n[r]})}function Rc(e,t){return e._cfg.version-t._cfg.version}function Dc(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const s=i._reject.bind(i),a=N.transless||N;Ke(()=>{N.trans=i,N.transless=a,t===0?(Y(o).forEach(l=>{Yr(n,l,o[l].primKey,o[l].indexes)}),Gr(e,n),I.follow(()=>e.on.populate.fire(i)).catch(s)):function({_novip:l},u,d,c){const h=[],p=l._versions;let y=l._dbSchema=Jr(l,l.idbdb,c),f=!1;const _=p.filter(v=>v._cfg.version>=u);function m(){return h.length?I.resolve(h.shift()(d.idbtrans)).then(m):I.resolve()}return _.forEach(v=>{h.push(()=>{const w=y,k=v._cfg.dbschema;Xr(l,w,c),Xr(l,k,c),y=l._dbSchema=k;const b=Fs(w,k);b.add.forEach(S=>{Yr(c,S[0],S[1].primKey,S[1].indexes)}),b.change.forEach(S=>{if(S.recreate)throw new $.Upgrade("Not yet support for changing primary key");{const E=c.objectStore(S.name);S.add.forEach(C=>Qr(E,C)),S.change.forEach(C=>{E.deleteIndex(C.name),Qr(E,C)}),S.del.forEach(C=>E.deleteIndex(C))}});const x=v._cfg.contentUpgrade;if(x&&v._cfg.version>u){Gr(l,c),d._memoizedTables={},f=!0;let S=cs(k);b.del.forEach(O=>{S[O]=w[O]}),Zr(l,[l.Transaction.prototype]),Hn(l,[l.Transaction.prototype],Y(S),S),d.schema=S;const E=wr(x);let C;E&&jt();const A=I.follow(()=>{if(C=x(d),C&&E){var O=Ne.bind(null,null);C.then(O,O)}});return C&&typeof C.then=="function"?I.resolve(C):A.then(()=>C)}}),h.push(w=>{(!f||!wc)&&function(k,b){[].slice.call(b.db.objectStoreNames).forEach(x=>k[x]==null&&b.db.deleteObjectStore(x))}(v._cfg.dbschema,w),Zr(l,[l.Transaction.prototype]),Hn(l,[l.Transaction.prototype],l._storeNames,l._dbSchema),d.schema=l._dbSchema})}),m().then(()=>{var v,w;w=c,Y(v=y).forEach(k=>{w.db.objectStoreNames.contains(k)||Yr(w,k,v[k].primKey,v[k].indexes)})})}(e,t,i,n).catch(s)})}function Fs(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const s={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!Mn)s.recreate=!0,n.change.push(s);else{const a=o.idxByName,l=i.idxByName;let u;for(u in a)l[u]||s.del.push(u);for(u in l){const d=a[u],c=l[u];d?d.src!==c.src&&s.change.push(c):s.add.push(c)}(s.del.length>0||s.add.length>0||s.change.length>0)&&n.change.push(s)}}else n.add.push([r,i])}return n}function Yr(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach(i=>Qr(o,i)),o}function Qr(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Jr(e,t,n){const r={};return kn(t.objectStoreNames,0).forEach(o=>{const i=n.objectStore(o);let s=i.keyPath;const a=zr(Bs(s),s||"",!1,!1,!!i.autoIncrement,s&&typeof s!="string",!0),l=[];for(let d=0;d{if(t[r]!==null){var o=t[r].split(",").map((s,a)=>{const l=(s=s.trim()).replace(/([&*]|\+\+)/g,""),u=/^\[/.test(l)?l.match(/^\[(.*)\]$/)[1].split("+"):l;return zr(l,u||null,/\&/.test(s),/\*/.test(s),/\+\+/.test(s),oe(u),a===0)}),i=o.shift();if(i.multi)throw new $.Schema("Primary key cannot be multi-valued");o.forEach(s=>{if(s.auto)throw new $.Schema("Only primary key can be marked as autoIncrement (++)");if(!s.keyPath)throw new $.Schema("Index must have a name and cannot be an empty string")}),n[r]=Us(r,i,o)}})}stores(t){const n=this.db;this._cfg.storesSource=this._cfg.storesSource?se(this._cfg.storesSource,t):t;const r=n._versions,o={};let i={};return r.forEach(s=>{se(o,s._cfg.storesSource),i=s._cfg.dbschema={},s._parseStoresSpec(o,i)}),n._dbSchema=i,Zr(n,[n._allTables,n,n.Transaction.prototype]),Hn(n,[n._allTables,n,n.Transaction.prototype,this._cfg.tables],Y(i),i),n._storeNames=Y(i),this}upgrade(t){return this._cfg.contentUpgrade=Er(this._cfg.contentUpgrade||q,t),this}}function eo(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new ct($n,{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function to(e){return e&&typeof e.databases=="function"}function no(e){return Ke(function(){return N.letThrough=!0,e()})}function Lc(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()}).finally(function(){return clearInterval(e)}):Promise.resolve()}function Nc(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(()=>t.dbOpenError?J(t.dbOpenError):e);Ee&&(t.openCanceller._stackHolder=rt()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new $.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,s=null,a=!1;return I.race([r,(typeof navigator>"u"?I.resolve():Lc()).then(()=>new I((l,u)=>{if(o(),!n)throw new $.MissingAPI;const d=e.name,c=t.autoSchema?n.open(d):n.open(d,Math.round(10*e.verno));if(!c)throw new $.MissingAPI;c.onerror=Pe(u),c.onblocked=W(e._fireOnBlocked),c.onupgradeneeded=W(h=>{if(s=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=tn,s.abort(),c.result.close();const y=n.deleteDatabase(d);y.onsuccess=y.onerror=W(()=>{u(new $.NoSuchDatabase(`Database ${d} doesnt exist`))})}else{s.onerror=Pe(u);var p=h.oldVersion>Math.pow(2,62)?0:h.oldVersion;a=p<1,e._novip.idbdb=c.result,Dc(e,p/10,s,u)}},u),c.onsuccess=W(()=>{s=null;const h=e._novip.idbdb=c.result,p=kn(h.objectStoreNames);if(p.length>0)try{const f=h.transaction((y=p).length===1?y[0]:y,"readonly");t.autoSchema?function({_novip:_},m,v){_.verno=m.version/10;const w=_._dbSchema=Jr(0,m,v);_._storeNames=kn(m.objectStoreNames,0),Hn(_,[_._allTables],Y(w),w)}(e,h,f):(Xr(e,e._dbSchema,f),function(_,m){const v=Fs(Jr(0,_.idbdb,m),_._dbSchema);return!(v.add.length||v.change.some(w=>w.add.length||w.change.length))}(e,f)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Gr(e,f)}catch{}var y;Jt.push(e),h.onversionchange=W(f=>{t.vcFired=!0,e.on("versionchange").fire(f)}),h.onclose=W(f=>{e.on("close").fire(f)}),a&&function({indexedDB:f,IDBKeyRange:_},m){!to(f)&&m!==$n&&eo(f,_).put({name:m}).catch(q)}(e._deps,d),l()},u)}))]).then(()=>(o(),t.onReadyBeingFired=[],I.resolve(no(()=>e.on.ready.fire(e.vip))).then(function l(){if(t.onReadyBeingFired.length>0){let u=t.onReadyBeingFired.reduce(Er,q);return t.onReadyBeingFired=[],I.resolve(no(()=>u(e.vip))).then(l)}}))).finally(()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1}).then(()=>e).catch(l=>{t.dbOpenError=l;try{s&&s.abort()}catch{}return r===t.openCanceller&&e._close(),J(l)}).finally(()=>{t.openComplete=!0,i()})}function ro(e){var t=i=>e.next(i),n=o(t),r=o(i=>e.throw(i));function o(i){return s=>{var a=i(s),l=a.value;return a.done?l:l&&typeof l.then=="function"?l.then(n,r):oe(l)?Promise.all(l).then(n,r):n(l)}}return o(t)()}function Mc(e,t,n){var r=arguments.length;if(r<2)throw new $.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,us(o),n]}function Hs(e,t,n,r,o){return I.resolve().then(()=>{const i=N.transless||N,s=e._createTransaction(t,n,e._dbSchema,r),a={trans:s,transless:i};if(r)s.idbtrans=r.idbtrans;else try{s.create(),e._state.PR1398_maxLoop=3}catch(c){return c.name===Sr.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(()=>Hs(e,t,n,null,o))):J(c)}const l=wr(o);let u;l&&jt();const d=I.follow(()=>{if(u=o.call(s,s),u)if(l){var c=Ne.bind(null,null);u.then(c,c)}else typeof u.next=="function"&&typeof u.throw=="function"&&(u=ro(u))},a);return(u&&typeof u.then=="function"?I.resolve(u).then(c=>s.active?c:J(new $.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):d.then(()=>u)).then(c=>(r&&s._resolve(),s._completion.then(()=>c))).catch(c=>(s._reject(c),J(c)))})}function qn(e,t,n){const r=oe(e)?e.slice():[e];for(let o=0;o0,m={...h,isVirtual:_,keyTail:c,keyLength:f,extractKey:Wr(d),unique:!_&&h.unique};return y.push(m),m.isPrimaryKey||i.push(m),f>1&&s(f===2?d[0]:d.slice(0,f-1),c+1,h),y.sort((v,w)=>v.keyTail-w.keyTail),m}const a=s(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[a];for(const d of r.indexes)s(d.keyPath,0,d);function l(d){const c=d.query.index;return c.isVirtual?{...d,query:{index:c,range:(h=d.query.range,p=c.keyTail,{type:h.type===1?2:h.type,lower:qn(h.lower,h.lowerOpen?e.MAX_KEY:e.MIN_KEY,p),lowerOpen:!0,upper:qn(h.upper,h.upperOpen?e.MIN_KEY:e.MAX_KEY,p),upperOpen:!0})}}:d;var h,p}return{...n,schema:{...r,primaryKey:a,indexes:i,getIndexByKeyPath:function(d){const c=o[on(d)];return c&&c[0]}},count:d=>n.count(l(d)),query:d=>n.query(l(d)),openCursor(d){const{keyTail:c,isVirtual:h,keyLength:p}=d.query.index;return h?n.openCursor(l(d)).then(y=>y&&function(f){return Object.create(f,{continue:{value:function(m){m!=null?f.continue(qn(m,d.reverse?e.MAX_KEY:e.MIN_KEY,c)):d.unique?f.continue(f.key.slice(0,p).concat(d.reverse?e.MIN_KEY:e.MAX_KEY,c)):f.continue()}},continuePrimaryKey:{value(m,v){f.continuePrimaryKey(qn(m,e.MAX_KEY,c),v)}},primaryKey:{get:()=>f.primaryKey},key:{get(){const m=f.key;return p===1?m[0]:m.slice(0,p)}},value:{get:()=>f.value}})}(y)):n.openCursor(d)}}}}}};function oo(e,t,n,r){return n=n||{},r=r||"",Y(e).forEach(o=>{if(ue(t,o)){var i=e[o],s=t[o];if(typeof i=="object"&&typeof s=="object"&&i&&s){const a=br(i);a!==br(s)?n[r+o]=t[o]:a==="Object"?oo(i,s,n,r+o+"."):i!==s&&(n[r+o]=t[o])}else i!==s&&(n[r+o]=t[o])}else n[r+o]=void 0}),Y(t).forEach(o=>{ue(e,o)||(n[r+o]=t[o])}),n}const Bc={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema;return{...n,mutate(i){const s=N.trans,{deleting:a,creating:l,updating:u}=s.table(t).hook;switch(i.type){case"add":if(l.fire===q)break;return s._promise("readwrite",()=>d(i),!0);case"put":if(l.fire===q&&u.fire===q)break;return s._promise("readwrite",()=>d(i),!0);case"delete":if(a.fire===q)break;return s._promise("readwrite",()=>d(i),!0);case"deleteRange":if(a.fire===q)break;return s._promise("readwrite",()=>function(h){return c(h.trans,h.range,1e4)}(i),!0)}return n.mutate(i);function d(h){const p=N.trans,y=h.keys||function(f,_){return _.type==="delete"?_.keys:_.keys||_.values.map(f.extractKey)}(r,h);if(!y)throw new Error("Keys missing");return(h=h.type==="add"||h.type==="put"?{...h,keys:y}:{...h}).type!=="delete"&&(h.values=[...h.values]),h.keys&&(h.keys=[...h.keys]),function(f,_,m){return _.type==="add"?Promise.resolve([]):f.getMany({trans:_.trans,keys:m,cache:"immutable"})}(n,h,y).then(f=>{const _=y.map((m,v)=>{const w=f[v],k={onerror:null,onsuccess:null};if(h.type==="delete")a.fire.call(k,m,w,p);else if(h.type==="add"||w===void 0){const b=l.fire.call(k,m,h.values[v],p);m==null&&b!=null&&(m=b,h.keys[v]=m,r.outbound||_e(h.values[v],r.keyPath,m))}else{const b=oo(w,h.values[v]),x=u.fire.call(k,b,m,w,p);if(x){const S=h.values[v];Object.keys(x).forEach(E=>{ue(S,E)?S[E]=x[E]:_e(S,E,x[E])})}}return k});return n.mutate(h).then(({failures:m,results:v,numFailures:w,lastResult:k})=>{for(let b=0;b(_.forEach(v=>v.onerror&&v.onerror(m)),Promise.reject(m)))})}function c(h,p,y){return n.query({trans:h,values:!1,query:{index:r,range:p},limit:y}).then(({result:f})=>d({type:"delete",keys:f,trans:h}).then(_=>_.numFailures>0?Promise.reject(_.failures[0]):f.length({table:t=>{const n=e.table(t);return{...n,getMany:r=>{if(!r.cache)return n.getMany(r);const o=qs(r.keys,r.trans._cache,r.cache==="clone");return o?I.resolve(o):n.getMany(r).then(i=>(r.trans._cache={keys:r.keys,values:r.cache==="clone"?qt(i):i},i))},mutate:r=>(r.type!=="add"&&(r.trans._cache=null),n.mutate(r))}}})};function io(e){return!("from"in e)}const $e=function(e,t){if(!this){const n=new $e;return e&&"d"in e&&se(n,e),n}se(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function sn(e,t,n){const r=ae(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(io(e))return se(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(ae(n,e.from)<0)return o?sn(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Ks(e);if(ae(t,e.to)>0)return i?sn(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Ks(e);ae(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),ae(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const s=!e.r;o&&!e.l&&Kn(e,o),i&&s&&Kn(e,i)}function Kn(e,t){io(t)||function n(r,{from:o,to:i,l:s,r:a}){sn(r,o,i),s&&n(r,s),a&&n(r,a)}(e,t)}function Vc(e,t){const n=so(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=so(e);let s=i.next(o.from),a=s.value;for(;!r.done&&!s.done;){if(ae(a.from,o.to)<=0&&ae(a.to,o.from)>=0)return!0;ae(o.from,a.from)<0?o=(r=n.next(a.from)).value:a=(s=i.next(o.from)).value}return!1}function so(e){let t=io(e)?null:{s:0,n:e};return{next(n){const r=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&ae(n,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||ae(n,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Ks(e){var t,n;const r=(((t=e.r)===null||t===void 0?void 0:t.d)||0)-(((n=e.l)===null||n===void 0?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const i=o==="r"?"l":"r",s={...e},a=e[o];e.from=a.from,e.to=a.to,e[o]=a[o],s[o]=a[i],e[i]=s,s.d=zs(s)}e.d=zs(e)}function zs({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}St($e.prototype,{add(e){return Kn(this,e),this},addKey(e){return sn(this,e,e),this},addKeys(e){return e.forEach(t=>sn(this,t,t)),this},[xr](){return so(this)}});const Fc={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new $e(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:s}=i,{extractKey:a,outbound:l}=s,u={...o,mutate:h=>{const p=h.trans,y=p.mutatedParts||(p.mutatedParts={}),f=x=>{const S=`idb://${t}/${r}/${x}`;return y[S]||(y[S]=new $e)},_=f(""),m=f(":dels"),{type:v}=h;let[w,k]=h.type==="deleteRange"?[h.range]:h.type==="delete"?[h.keys]:h.values.length<50?[[],h.values]:[];const b=h.trans._cache;return o.mutate(h).then(x=>{if(oe(w)){v!=="delete"&&(w=x.results),_.addKeys(w);const S=qs(w,b);S||v==="add"||m.addKeys(w),(S||k)&&function(E,C,A,O){function R(L){const F=E(L.name||"");function D(Z){return Z!=null?L.extractKey(Z):null}const ne=Z=>L.multiEntry&&oe(Z)?Z.forEach(ke=>F.addKey(ke)):F.addKey(Z);(A||O).forEach((Z,ke)=>{const Je=A&&D(A[ke]),Xe=O&&D(O[ke]);ae(Je,Xe)!==0&&(Je!=null&&ne(Je),Xe!=null&&ne(Xe))})}C.indexes.forEach(R)}(f,i,S,k)}else if(w){const S={from:w.lower,to:w.upper};m.add(S),_.add(S)}else _.add(n),m.add(n),i.indexes.forEach(S=>f(S.name).add(n));return x})}},d=({query:{index:h,range:p}})=>{var y,f;return[h,new $e((y=p.lower)!==null&&y!==void 0?y:e.MIN_KEY,(f=p.upper)!==null&&f!==void 0?f:e.MAX_KEY)]},c={get:h=>[s,new $e(h.key)],getMany:h=>[s,new $e().addKeys(h.keys)],count:d,query:d,openCursor:d};return Y(c).forEach(h=>{u[h]=function(p){const{subscr:y}=N;if(y){const f=k=>{const b=`idb://${t}/${r}/${k}`;return y[b]||(y[b]=new $e)},_=f(""),m=f(":dels"),[v,w]=c[h](p);if(f(v.name||"").add(w),!v.isPrimaryKey){if(h!=="count"){const k=h==="query"&&l&&p.values&&o.query({...p,values:!1});return o[h].apply(this,arguments).then(b=>{if(h==="query"){if(l&&p.values)return k.then(({result:S})=>(_.addKeys(S),b));const x=p.values?b.result.map(a):b.result;p.values?_.addKeys(x):m.addKeys(x)}else if(h==="openCursor"){const x=b,S=p.values;return x&&Object.create(x,{key:{get:()=>(m.addKey(x.primaryKey),x.key)},primaryKey:{get(){const E=x.primaryKey;return m.addKey(E),E}},value:{get:()=>(S&&_.addKey(x.primaryKey),x.value)}})}return b})}m.add(n)}}return o[h].apply(this,arguments)}}),u}}}};class ct{constructor(t,n){this._middlewares={},this.verno=0;const r=ct.dependencies;this._options=n={addons:ct.addons,autoOpen:!0,indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange,...n},this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};const{addons:o}=n;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const i={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:q,dbReadyPromise:null,cancelOpen:q,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var s;i.dbReadyPromise=new I(a=>{i.dbReadyResolve=a}),i.openCanceller=new I((a,l)=>{i.cancelOpen=l}),this._state=i,this.name=t,this.on=Xt(this,"populate","blocked","versionchange","close",{ready:[Er,q]}),this.on.ready.subscribe=ss(this.on.ready.subscribe,a=>(l,u)=>{ct.vip(()=>{const d=this._state;if(d.openComplete)d.dbOpenError||I.resolve().then(l),u&&a(l);else if(d.onReadyBeingFired)d.onReadyBeingFired.push(l),u&&a(l);else{a(l);const c=this;u||a(function h(){c.on.ready.unsubscribe(l),c.on.ready.unsubscribe(h)})}})}),this.Collection=(s=this,en(Sc.prototype,function(a,l){this.db=s;let u=Rs,d=null;if(l)try{u=l()}catch(y){d=y}const c=a._ctx,h=c.table,p=h.hook.reading.fire;this._ctx={table:h,index:c.index,isPrimKey:!c.index||h.schema.primKey.keyPath&&c.index===h.schema.primKey.name,range:u,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:d,or:c.or,valueMapper:p!==zt?p:null}})),this.Table=function(a){return en(Cc.prototype,function(l,u,d){this.db=a,this._tx=d,this.name=l,this.schema=u,this.hook=a._allTables[l]?a._allTables[l].hook:Xt(null,{creating:[hc,q],reading:[dc,zt],updating:[fc,q],deleting:[pc,q]})})}(this),this.Transaction=function(a){return en(Ic.prototype,function(l,u,d,c,h){this.db=a,this.mode=l,this.storeNames=u,this.schema=d,this.chromeTransactionDurability=c,this.idbtrans=null,this.on=Xt(this,"complete","error","abort"),this.parent=h||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new I((p,y)=>{this._resolve=p,this._reject=y}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},p=>{var y=this.active;return this.active=!1,this.on.error.fire(p),this.parent?this.parent._reject(p):y&&this.idbtrans&&this.idbtrans.abort(),J(p)})})}(this),this.Version=function(a){return en(Ac.prototype,function(l){this.db=a,this._cfg={version:l,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(a){return en($s.prototype,function(l,u,d){this.db=a,this._ctx={table:l,index:u===":id"?null:u,or:d};const c=a._deps.indexedDB;if(!c)throw new $.MissingAPI;this._cmp=this._ascending=c.cmp.bind(c),this._descending=(h,p)=>c.cmp(p,h),this._max=(h,p)=>c.cmp(h,p)>0?h:p,this._min=(h,p)=>c.cmp(h,p)<0?h:p,this._IDBKeyRange=a._deps.IDBKeyRange})}(this),this.on("versionchange",a=>{a.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",a=>{!a.newVersion||a.newVersionnew this.Transaction(a,l,u,this._options.chromeTransactionDurability,d),this._fireOnBlocked=a=>{this.on("blocked").fire(a),Jt.filter(l=>l.name===this.name&&l!==this&&!l._state.vcFired).map(l=>l.on("versionchange").fire(a))},this.use($c),this.use(Bc),this.use(Fc),this.use(Uc),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(a=>a(this))}version(t){if(isNaN(t)||t<.1)throw new $.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new $.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);const n=this._versions;var r=n.filter(o=>o._cfg.version===t)[0];return r||(r=new this.Version(t),n.push(r),n.sort(Rc),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(t){return this.idbdb&&(this._state.openComplete||N.letThrough||this._vip)?t():new I((n,r)=>{if(this._state.openComplete)return r(new $.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void r(new $.DatabaseClosed);this.open().catch(q)}this._state.dbReadyPromise.then(n,r)}).then(t)}use({stack:t,create:n,level:r,name:o}){o&&this.unuse({stack:t,name:o});const i=this._middlewares[t]||(this._middlewares[t]=[]);return i.push({stack:t,create:n,level:r??10,name:o}),i.sort((s,a)=>s.level-a.level),this}unuse({stack:t,name:n,create:r}){return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter(o=>r?o.create!==r:!!n&&o.name!==n)),this}open(){return Nc(this)}_close(){const t=this._state,n=Jt.indexOf(this);if(n>=0&&Jt.splice(n,1),this.idbdb){try{this.idbdb.close()}catch{}this._novip.idbdb=null}t.dbReadyPromise=new I(r=>{t.dbReadyResolve=r}),t.openCanceller=new I((r,o)=>{t.cancelOpen=o})}close(){this._close();const t=this._state;this._options.autoOpen=!1,t.dbOpenError=new $.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)}delete(){const t=arguments.length>0,n=this._state;return new I((r,o)=>{const i=()=>{this.close();var s=this._deps.indexedDB.deleteDatabase(this.name);s.onsuccess=W(()=>{(function({indexedDB:a,IDBKeyRange:l},u){!to(a)&&u!==$n&&eo(a,l).delete(u).catch(q)})(this._deps,this.name),r()}),s.onerror=Pe(o),s.onblocked=this._fireOnBlocked};if(t)throw new $.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(i):i()})}backendDB(){return this.idbdb}isOpen(){return this.idbdb!==null}hasBeenClosed(){const t=this._state.dbOpenError;return t&&t.name==="DatabaseClosed"}hasFailed(){return this._state.dbOpenError!==null}dynamicallyOpened(){return this._state.autoSchema}get tables(){return Y(this._allTables).map(t=>this._allTables[t])}transaction(){const t=Mc.apply(this,arguments);return this._transaction.apply(this,t)}_transaction(t,n,r){let o=N.trans;o&&o.db===this&&t.indexOf("!")===-1||(o=null);const i=t.indexOf("?")!==-1;let s,a;t=t.replace("!","").replace("?","");try{if(a=n.map(u=>{var d=u instanceof this.Table?u.name:u;if(typeof d!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return d}),t=="r"||t===Vr)s=Vr;else{if(t!="rw"&&t!=Fr)throw new $.InvalidArgument("Invalid transaction mode: "+t);s=Fr}if(o){if(o.mode===Vr&&s===Fr){if(!i)throw new $.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&a.forEach(u=>{if(o&&o.storeNames.indexOf(u)===-1){if(!i)throw new $.SubTransaction("Table "+u+" not included in parent transaction.");o=null}}),i&&o&&!o.active&&(o=null)}}catch(u){return o?o._promise(null,(d,c)=>{c(u)}):J(u)}const l=Hs.bind(null,this,s,a,o,r);return o?o._promise(s,l,"lock"):N.trans?Ot(N.transless,()=>this._whenReady(l)):this._whenReady(l)}table(t){if(!ue(this._allTables,t))throw new $.InvalidTable(`Table ${t} does not exist`);return this._allTables[t]}}const Hc=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable";class qc{constructor(t){this._subscribe=t}subscribe(t,n,r){return this._subscribe(t&&typeof t!="function"?t:{next:t,error:n,complete:r})}[Hc](){return this}}function Ws(e,t){return Y(t).forEach(n=>{Kn(e[n]||(e[n]=new $e),t[n])}),e}function Kc(e){let t,n=!1;const r=new qc(o=>{const i=wr(e);let s=!1,a={},l={};const u={get closed(){return s},unsubscribe:()=>{s=!0,Ze.storagemutated.unsubscribe(p)}};o.start&&o.start(u);let d=!1,c=!1;function h(){return Y(l).some(f=>a[f]&&Vc(a[f],l[f]))}const p=f=>{Ws(a,f),h()&&y()},y=()=>{if(d||s)return;a={};const f={},_=function(m){i&&jt();const v=()=>Ke(e,{subscr:m,trans:null}),w=N.trans?Ot(N.transless,v):v();return i&&w.then(Ne,Ne),w}(f);c||(Ze(nn,p),c=!0),d=!0,Promise.resolve(_).then(m=>{n=!0,t=m,d=!1,s||(h()?y():(a={},l=f,o.next&&o.next(m)))},m=>{d=!1,n=!1,o.error&&o.error(m),u.unsubscribe()})};return y(),u});return r.hasValue=()=>n,r.getValue=()=>t,r}let ao;try{ao={indexedDB:K.indexedDB||K.mozIndexedDB||K.webkitIndexedDB||K.msIndexedDB,IDBKeyRange:K.IDBKeyRange||K.webkitIDBKeyRange}}catch{ao={indexedDB:null,IDBKeyRange:null}}const ut=ct;function zn(e){let t=Be;try{Be=!0,Ze.storagemutated.fire(e)}finally{Be=t}}St(ut,{...Sn,delete:e=>new ut(e,{addons:[]}).delete(),exists:e=>new ut(e,{addons:[]}).open().then(t=>(t.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return function({indexedDB:t,IDBKeyRange:n}){return to(t)?Promise.resolve(t.databases()).then(r=>r.map(o=>o.name).filter(o=>o!==$n)):eo(t,n).toCollection().primaryKeys()}(ut.dependencies).then(e)}catch{return J(new $.MissingAPI)}},defineClass:()=>function(e){se(this,e)},ignoreTransaction:e=>N.trans?Ot(N.transless,e):e(),vip:no,async:function(e){return function(){try{var t=ro(e.apply(this,arguments));return t&&typeof t.then=="function"?t:I.resolve(t)}catch(n){return J(n)}}},spawn:function(e,t,n){try{var r=ro(e.apply(n,t||[]));return r&&typeof r.then=="function"?r:I.resolve(r)}catch(o){return J(o)}},currentTransaction:{get:()=>N.trans||null},waitFor:function(e,t){const n=I.resolve(typeof e=="function"?ut.ignoreTransaction(e):e).timeout(t||6e4);return N.trans?N.trans.waitFor(n):n},Promise:I,debug:{get:()=>Ee,set:e=>{hs(e,e==="dexie"?()=>!0:Os)}},derive:Et,extend:se,props:St,override:ss,Events:Xt,on:Ze,liveQuery:Kc,extendObservabilitySet:Ws,getByKeyPath:Ae,setByKeyPath:_e,delByKeyPath:function(e,t){typeof t=="string"?_e(e,t,void 0):"length"in t&&[].map.call(t,function(n){_e(e,n,void 0)})},shallowClone:cs,deepClone:qt,getObjectDiff:oo,cmp:ae,asap:as,minKey:Ur,addons:[],connections:Jt,errnames:Sr,dependencies:ao,semVer:Is,version:Is.split(".").map(e=>parseInt(e)).reduce((e,t,n)=>e+t/Math.pow(10,2*n))}),ut.maxKey=rn(ut.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Ze(nn,e=>{if(!Be){let t;Mn?(t=document.createEvent("CustomEvent"),t.initCustomEvent(Ge,!0,!0,e)):t=new CustomEvent(Ge,{detail:e}),Be=!0,dispatchEvent(t),Be=!1}}),addEventListener(Ge,({detail:e})=>{Be||zn(e)}));let Be=!1;if(typeof BroadcastChannel<"u"){const e=new BroadcastChannel(Ge);typeof e.unref=="function"&&e.unref(),Ze(nn,t=>{Be||e.postMessage(t)}),e.onmessage=t=>{t.data&&zn(t.data)}}else if(typeof self<"u"&&typeof navigator<"u"){Ze(nn,t=>{try{Be||(typeof localStorage<"u"&&localStorage.setItem(Ge,JSON.stringify({trig:Math.random(),changedParts:t})),typeof self.clients=="object"&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(n=>n.postMessage({type:Ge,changedParts:t})))}catch{}}),typeof addEventListener<"u"&&addEventListener("storage",t=>{if(t.key===Ge){const n=JSON.parse(t.newValue);n&&zn(n.changedParts)}});const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:t}){t&&t.type===Ge&&zn(t.changedParts)})}I.rejectionMapper=function(e,t){if(!e||e instanceof Tt||e instanceof TypeError||e instanceof SyntaxError||!e.name||!gs[e.name])return e;var n=new gs[e.name](t||e.message,e);return"stack"in e&&De(n,"stack",{get:function(){return this.inner.stack}}),n},hs(Ee,Os);const lo="sprig.sessionId",zc="sprig.disableReplayRecording",Wc=()=>{Vt.setItem(zc,"disabled")},Gs=(()=>{const e=Vt.getItem(lo);if(e)return kt(`Found saved session id: ${e}`),Vt.removeItem(lo),e;const t=_n();return kt(`Generating new uuid: ${t}`),t})();window.addEventListener("beforeunload",()=>{kt(`Before page unload saving session id: ${Gs}`),Vt.setItem(lo,Gs)});class Gc extends ct{constructor(){super("replayStorage",{autoOpen:!1});he(this,"events");he(this,"chunkUploads");he(this,"pendingCaptures")}}const Zs=new Gc;Zs.version(1).stores({events:"uuid, timestamp, [sessionId+timestamp]",chunkUploads:"uuid, timestamp, [sessionId+status], [uploadId+status], [sessionId+status+uploadId]",pendingCaptures:"uuid, timestamp, [sessionId+targetTimestamp]"}),Zs.open().catch(e=>{Kl(`Error opening replay storage: ${JSON.stringify(e)}`),Wc()}),Vt.getItem("sprig.pendingCount");const Zc=e=>{};var P=(e=>(e.ConsentLegal="consentlegal",e.Likert="likert",e.Matrix="matrix",e.MultipleChoice="multiplechoice",e.MultipleSelect="multipleselect",e.NPS="nps",e.Open="open",e.RecordedTask="recordedtask",e.TextUrlPrompt="texturlprompt",e.Thanks="thanks",e.Uploading="uploading",e.VideoVoice="videovoice",e))(P||{}),be=(e=>(e.Answered="answered",e.Contains="contains",e.DoesNotContain="notcontains",e.DoesNotInclude="list_dni",e.Equal="eq",e.GivenUp="given_up",e.GreaterThan="gt",e.GreaterThanOrEqual="gte",e.LessThan="lt",e.LessThanOrEqual="lte",e.ListAll="list_all",e.ListAtLeastOne="list_alo",e.ListExact="list_exact",e.NotEqual="neq",e.Partial="partial",e.Skipped="skipped",e))(be||{}),At=(e=>(e.Camera="camera",e.Microphone="microphone",e.Screen="screen",e))(At||{}),me=(e=>(e.AvPermission="av_permission",e.ScreenPermission="screen_permission",e.StartTask="start_task",e.CompleteTask="complete_task",e))(me||{}),dt=(e=>(e.Number="number",e.Smiley="smiley",e.Star="star",e))(dt||{});const Yc="!launch_darkly_";class Qc{constructor(){he(this,"_ldData",{})}getAllLaunchDarklyVariations(){return this._ldData}setLDFlagsVariations(t){try{return!t||typeof t!="object"||Array.isArray(t)?!1:(Object.keys(this._ldData).forEach(n=>{delete this._ldData[n]}),Object.keys(t).forEach(n=>this._ldData[`${Yc}${n}`]=(t[n]??0)+1),!0)}catch(n){return n instanceof Error&&window.UserLeap.reportError("setAllLDFlagsVariations",n),console.warn("[Sprig] An issue had occured when setting LaunchDarkly flags and variations."),!1}}}const Jc=new Qc;Object.freeze(Jc);const Xc="!optimizely_experiments_";class eu{constructor(){he(this,"_optimizelyData",{})}setOptimizelyExperiment(t,n=!0){if(!t||typeof t!="object")return!1;const{experiments:r}=t;try{return n&&Object.keys(this._optimizelyData).map(o=>{delete this._optimizelyData[o]}),r&&r.map(o=>{const{id:i,variation:s}=o,a=this.transformExperimentId(i);s&&typeof s=="string"&&(this._optimizelyData[a]=s)}),!0}catch(o){return o instanceof Error&&window.UserLeap.reportError("setOptimizelyExperiment",o),!1}}getAllOptimizelyExperiments(){return this._optimizelyData}getOptimizelyVariationName(t){return this._optimizelyData[this.transformExperimentId(t)]}transformExperimentId(t){return Xc+t}getAndSetWebOptimizelyExperiments(){var t;try{if(window&&window.optimizely&&typeof window.optimizely.get=="function"){const n=(t=window.optimizely.get("state"))==null?void 0:t.getExperimentStates({isActive:!0});if(n){const r=Object.keys(n).map(o=>{var i,s;return(i=n[o].variation)!=null&&i.name?{id:o,variation:(s=n[o].variation)==null?void 0:s.name}:{id:o,variation:"Original"}});return this.setOptimizelyExperiment({experiments:r},!1),!0}return!1}return!1}catch(n){return n instanceof Error&&window.UserLeap.reportError("getAndSetWebOptimizely",n),!1}}}const tu=new eu;Object.freeze(tu),window.UserLeap&&window.Sprig&&(window.Sprig._gtm?window.Sprig=window.UserLeap:window.UserLeap=window.Sprig),window.UserLeap||(window.UserLeap=window.Sprig),window.Sprig||(window.Sprig=window.UserLeap);const nu="360px";Ce.SurveyFadingOut+"";var co=(e=>(e[e.And=1]="And",e[e.Or=2]="Or",e))(co||{});const Ys=1,uo={eq(e,t){return e==t},neq(e,t){return!this.eq(e,t)},gt(e,t){return e>t},gte(e,t){return e>=t},lt(e,t){return ee.indexOf(n)===-1)},list_alo(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.some(o=>r.has(o))},list_dni(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.every(o=>!r.has(o))},contains(e,t){const n=e.toLowerCase(),r=t.toLowerCase();return n.includes(r)},notcontains(e,t){return!this.contains(e,t)}},ru=(e,t,n)=>{switch(t){case P.VideoVoice:return!!(e&&e.value);case P.Open:return!!n;case P.MultipleSelect:return!!(n&&Object.keys(n).length);case P.RecordedTask:return(n==null?void 0:n.taskStatus)===fe.Completed;case P.TextUrlPrompt:return!e.value;case P.ConsentLegal:return n!==null;case P.MultipleChoice:return n!==void 0;case P.Matrix:return!!(n&&Object.values(n).every(r=>r!==null));case P.NPS:return n!==null;case P.Likert:return n!==null;default:return!0}},Qs=(e,t)=>{if(t===P.Matrix){const n=Object.keys(e).length,r=Object.values(e).filter(o=>o!==null).length;return r>0&&r{if(t>=e.length||t<0)return null;const i=e[t];let s=t+1;const a=i.props.routingOptions||[];for(let d=0;dr.length)continue;let y=Xs({comparator:p.comparator,response:r[p.questionIndex],type:i.type,value:p.value});for(let f=1;fd.type===P.Uploading);let u;return l>0?u=n?e.length-3:e.length-2:u=e.length-1,t>=u||s===-1||s!==null&&s>u?l>0&&Object.values(o).some(c=>c.isSubmitted&&!c.isComplete)?l:n?e.length-1:null:s===-1?null:s},Xs=({comparator:e,response:t,type:n,value:r})=>{if(e===be.Answered)switch(n){case P.TextUrlPrompt:return t===void 0;case P.ConsentLegal:return t&&t.submitted===!0;case P.RecordedTask:return"taskStatus"in t&&t.taskStatus===fe.Completed;case P.Likert:return Number.isInteger(t);case P.Open:return t&&t.length>0;case P.MultipleChoice:case P.MultipleSelect:return Object.keys(t).length>0;case P.Matrix:return Object.values(t).every(o=>o!==null);case P.NPS:return Number.isInteger(t);case P.VideoVoice:return!!(t!=null&&t.mediaRecordingUid);default:return!1}if(e===be.GivenUp)return n===P.RecordedTask?"taskStatus"in t&&t.taskStatus===fe.GivenUp:!0;if(e===be.Partial)return n===P.Matrix?Qs(t,n):!1;if(e===be.Skipped)switch(n){case P.TextUrlPrompt:return t==null?void 0:t.skipped;case P.ConsentLegal:return t===null;case P.RecordedTask:return"taskStatus"in t&&t.taskStatus===fe.Abandoned;case P.Likert:return t===null;case P.Open:return(t==null?void 0:t.length)===0;case P.MultipleChoice:return t===void 0;case P.MultipleSelect:return(t==null?void 0:t.length)===0;case P.Matrix:return Object.values(t).every(o=>o===null);case P.NPS:return t===null;case P.VideoVoice:return t===null;default:return!1}return uo[e](t,r)},ou=13,iu=(e,t)=>e.reduce((n,r)=>n.concat(n.map(o=>[...o,r])),[[]]).filter(n=>t||n.length>0),su=e=>{var t,n,r;switch(e.type){case P.MultipleSelect:return!e||!e.props||!e.props.options?null:e.props.options.length>ou?e.props.options.map(o=>[o.value]):iu(e.props.options.map(o=>o.value),!e.props.properties.required);case P.MultipleChoice:{if(!e||!e.props||!e.props.options)return null;const o=e.props.options.map(i=>i.value);return e.props.properties.required||o.push(void 0),o}case P.Matrix:{if(!((t=e==null?void 0:e.props)!=null&&t.options))return null;const o=e.props.properties.matrixColumn,i=e.props.options,s=i.reduce((d,c)=>(d[c.id]=null,d),{}),a={...s,[i[0].id]:o[0].value},l=i.reduce((d,c)=>(d[c.id]=o[0].value,d),{}),u=[a,l];return e.props.properties.required||u.push(s),u}case P.Likert:{const o=Number((r=(n=e.props)==null?void 0:n.properties)==null?void 0:r.range)||5;return[...Array.from(Array(o).keys()).map(s=>s+1),...e.props.properties.required?[]:[null]]}case P.NPS:return[0,1,2,3,4,5,6,7,8,9,10,...e.props.properties.required?[]:[null]];case P.VideoVoice:case P.Open:return["1",...e.props.properties.required?[]:[""]];case P.RecordedTask:return[{taskStatus:fe.Completed},{taskStatus:fe.GivenUp},...e.props.properties.required?[]:[{taskStatus:fe.Abandoned}]];case P.TextUrlPrompt:return[void 0,...e.props.properties.required?[]:[{skipped:!0}]];case P.ConsentLegal:return[Ys,...e.props.properties.required?[]:[null]];default:return[Ys]}},au=e=>e in uo,lu=e=>typeof e=="object"&&e!==null&&"taskStatus"in e,cu=(e,t=[])=>t.reduce((n,r)=>{const{group:o,target:i}=r;if(!(o!=null&&o.length))return[...n];const s=o.filter(a=>Number(a)?!0:typeof a=="object"?a.questionIndex===e:!1).map(a=>{const{comparator:l,value:u}=a;return{comparator:l,target:i,value:u}});return[...n,...s]},[]),uu=(e,t)=>{const n=new Set([P.Thanks,P.Uploading]);if(t>=e.length||t<0||n.has(e[t].type))return 0;const r=e.filter(i=>!n.has(i.type));if(t===r.length-1)return 1;const o={[r.length-1]:1,[-1]:0};for(let i=r.length-2;i>=t;i--){const s=r[i],a=cu(i,s.props.routingOptions);if(a.length===0){o[i]=o[i+1]+1;continue}let l=0,u=su(s);if(u===null)return r.length-1-t;for(let d=0;d{const _=ru({value:f},s.type,f),m=Qs(f,s.type);return!(_&&c===be.Answered||m&&c===be.Partial||!_&&!m&&c===be.Skipped||c===be.GivenUp&&lu(f)&&f.taskStatus===fe.GivenUp||_&&s.type===P.Open&&(c===be.Contains||c===be.DoesNotContain)||_&&au(c)&&uo[c](f,p))});if(y.length=r.length)return r.length-1-t;l=Math.max(o[f]+1,l)}u=y}u.length>0&&(l=Math.max(o[i+1]+1,l)),o[i]=l}return o[t]},du=e=>!(e.type===P.Thanks||e.type===P.Uploading),z=qi()((e,t)=>({allResponses:[],answers:void 0,apiURL:"",border:"#000000",cards:[],close:async(n=yt)=>{const r=t(),{fadeout:o,remove:i,trackHistory:s}=r;await o(n),ho(r)||s({event:"closed"}),kt(`Closing survey: ${r.surveyId}`),Qi.enable(),i({initiator:gr.Closed})},configureExitOnOverlayClick:()=>{},customMetadata:{},destroy:async n=>{const{eventEmitFn:r,fadeout:o,remove:i}=t();r(Se.SurveyComplete),await o(n),Qi.enable(),i({initiator:gr.Complete})},endCard:{headline:""},envId:"",eventEmitFn:vn.emit.bind(vn),fadeout:async n=>{const{eventEmitFn:r,headers:o,viewDocument:i}=t();return mn(o)?Promise.resolve():(r(Ce.SurveyFadingOut),new Promise(s=>{const a=i.getElementById(n);a?(a.addEventListener("transitionend",()=>{s()}),a.classList.remove("ul-app--visible")):s()}))},forceBrandedLogo:!1,frame:document.createElement("iframe"),handleClickEmbedButton:n=>{const{cards:r,eventEmitFn:o,index:i}=t();o(n,{[wt.QuestionId]:r[i].name,[wt.Props]:r[i].props}),e(()=>({hasViewedEmbed:!0}))},handleUploadUpdate:({mediaRecordingUid:n,isComplete:r,progressPct:o,isSubmitted:i})=>{var p,y,f;const{cards:s,destroy:a,index:l,uploadProgress:u}=t(),d=r||((p=u[n])==null?void 0:p.isComplete),c={...u,[n]:{progressPct:d?100:o||((y=u[n])==null?void 0:y.progressPct),isComplete:d,isSubmitted:i||((f=u[n])==null?void 0:f.isSubmitted)}};if(e({uploadProgress:c}),s[l].type!==P.Uploading)return;const h=Object.entries(u).every(([_,m])=>!m.isSubmitted||m.isComplete||n==_&&r);if(h&&l>=s.length-1)return a(yt);e({index:h?l+1:l,uploadingCardViewed:!0})},hasViewedEmbed:!1,headers:{Authorization:"","Content-Type":"","userleap-platform":_t.Web,"x-ul-environment-id":"","x-ul-installation-method":bt.Snippet,"x-ul-sdk-version":"","x-ul-visitor-id":""},index:0,isPreview:!1,marketingUrl:"https://sprig.com",meta:{ch:0,cw:0,l:"",mode:null,p:"",sh:0,sw:0},mode:void 0,next:n=>{const{allResponses:r,cards:o,eventEmitFn:i,index:s,responseGroupUid:a,submit:l,trackHistory:u,uploadProgress:d,viewedCardCount:c}=t(),h=Date.now(),p=[...o],y=p[s],{type:f}=n.data,_={...n.data},m=_.value;du(y)&&(y.value=m),_.answeredAt=h,delete _.type;const v={response:_,responseGroupUid:a,questionIndex:s};let w=f===P.MultipleChoice?Object.values(m).find(E=>E!==!1):m;f===P.MultipleSelect&&(w=p[s].props.options.reduce((E,C)=>(m[C.id]&&E.push(C.value),E),[]));const k=r.slice(0);k[s]=w,e({allResponses:k});const b=Js({cards:p,index:s,hasEndCard:!!n.endCard,uploadProgress:d,allResponses:k});if(b===null){v.completedAt=h,l(v),n.completeSurvey();return}else[P.Thanks,P.Uploading].includes(p[b].type)&&(v.completedAt=h);const x=l(v);[P.Thanks,P.Uploading].includes(p[b].type)||x.finally(()=>{u({event:"seen",index:b})});const S=p[b];p[b]&&i&&i(Se.CurrentQuestion,{[wt.QuestionId]:S.name,[wt.Props]:S.props}),e({cards:p,hasViewedEmbed:!1,index:b,viewedCardCount:c+1})},pendingRemoveIframeReason:null,previewKey:null,recorder:()=>{},recorderEventEmitter:vn,resolveTrackedPromise:()=>{const{removeIframeIfReady:n}=t();e(r=>({unresolvedRequestCount:r.unresolvedRequestCount-1})),n()},responseGroupUid:"",remove:({initiator:n})=>{const{removeIframeIfReady:r}=t();e({pendingRemoveIframeReason:n}),r()},removeIframeIfReady:()=>{const{eventEmitFn:n,pendingRemoveIframeReason:r,unresolvedRequestCount:o}=t();r&&o===0&&(n(Ce.SurveyWillClose,{name:Ce.SurveyWillClose,initiator:r}),e({pendingRemoveIframeReason:null}))},seen:async()=>{const{trackHistory:n}=t();return n({event:"seen",isNew:!0})},slugName:null,showStripes:!1,showSurveyBrand:!1,styleNonce:"",submit:async({completedAt:n,questionIndex:r,response:o,responseGroupUid:i})=>{const s=t();if(!i||ho(s))return;const a={responseGroupUid:i,meta:s.meta,customMetadata:s.customMetadata,responses:[o],completedAt:n,previewKey:s.previewKey};kt(`Submitting response: ${JSON.stringify(o.value,null,2)} for survey: ${s.surveyId}`),n&&(kt("Survey complete"),Zc({id:s.surveyId}));const l=await s.trackPromise(Ct(`${s.apiURL}/sdk/1/environments/${s.envId}/visitors/${s.userId}/responses/submit`,{body:JSON.stringify(a),headers:s.headers,method:"POST"}));if(!l.ok){l.reportError&&(console.warn("[Sprig] (ERR-427) Failed to submit response",l.error),await s.trackPromise(ea(s,"submitResponse",l.error)));return}s.eventEmitFn(Ce.QuestionAnswered,{...o,questionIndex:r})},surveyId:0,tabTitle:"",trackHistory:async({event:n,index:r,isNew:o=!1})=>{const i=t();if(ho(i))return;const{cards:s,index:a}=i,l=r!==void 0?s[r]:s[a],u={sid:i.surveyId,qid:l.name,action:n,vid:i.userId,eid:i.envId,isNew:o,responseGroupUid:i.responseGroupUid,previewKey:i.previewKey},d=await i.trackPromise(Ct(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`,{body:JSON.stringify(u),headers:i.headers,method:"POST"}));!d.ok&&d.reportError&&(console.warn("[Sprig] (ERR-428) Failed to track survey event",d.error),await i.trackPromise(ea(i,"trackHistory",d.error)))},trackPromise:async n=>{let{resolveTrackedPromise:r}=t();return e(o=>({unresolvedRequestCount:o.unresolvedRequestCount+1})),n.then(o=>(r(),o)).catch(o=>{throw r(),o})},unresolvedRequestCount:0,update:()=>{const{cards:n,index:r,headers:o,eventEmitFn:i,frame:s,useMobileStyling:a,viewDocument:l}=t(),d=n[r].type===P.Matrix;setTimeout(()=>{var p,y;const[c,h]=Nl(l);mn(o)?i(Ce.SurveyHeight,{name:Ce.SurveyHeight,contentFrameHeight:c}):((p=s.setHeight)==null||p.call(s,c),a||(y=s.setWidth)==null||y.call(s,d?h:parseInt(nu)))},100)},uploadingCardViewed:!1,uploadProgress:{},useDesktopPrototype:void 0,useMobileStyling:!1,userId:"",viewDocument:window.document,viewedCardCount:0})),ho=e=>!e.userId||e.meta&&e.meta.mode==="test"||e.isPreview,ea=async(e,t,n)=>{const{mode:r,userId:o,envId:i,apiURL:s,headers:a,viewDocument:l}=e,u=l.documentElement,d={mode:r,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:u.clientWidth,clientHeight:u.clientHeight,location:window.location.href,language:window.navigator.language},c={action:t,err:{message:n==null?void 0:n.message,stack:n==null?void 0:n.stack},meta:d,vid:o,envId:i},h=await Ct(`${s}/sdk/1/errors`,{method:"POST",headers:Object.assign({"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},a),body:JSON.stringify(c)});if(!h.ok)console.warn("[Sprig] (ERR-444) Failed to report error to API",n);else{const{presignedUrl:p}=h.json;Gl(p)}};var hu=0;function g(e,t,n,r,o,i){var s,a,l={};for(a in t)a=="ref"?s=t[a]:l[a]=t[a];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--hu,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return T.vnode&&T.vnode(u),u}const ce=e=>g("button",{...e,className:B("ul-card-text__button",e.className),id:"ul-card-text__button"}),xe=({message:e,properties:t})=>{const n=t==null?void 0:t.captionText;return g(le,{children:[e&&g("h1",{className:j.QuestionHeader,id:j.QuestionHeader,...n?{}:{style:{marginBottom:"15px"}},children:e}),n&&g("p",{className:j.Caption,id:j.Caption,children:n})]})},ta=({buttonText:e="View Prototype",handleClick:t})=>g("button",{className:"prototype-button",onClick:t,children:e},"prototype-btn"),Ue=({defaultBody:e,embeddedType:t="prototype",properties:n})=>{var c;const{handleClickEmbedButton:r,hasViewedEmbed:o,headers:i,useDesktopPrototype:s}=z(h=>({handleClickEmbedButton:h.handleClickEmbedButton,hasViewedEmbed:h.hasViewedEmbed,headers:h.headers,useDesktopPrototype:h.useDesktopPrototype})),a=(n==null?void 0:n.conceptUrl)||((c=n==null?void 0:n.consentDocument)==null?void 0:c.url),l=window.innerWidth{h.preventDefault(),r(p)};if(!s&&l&&!o&&a&&["email","link"].includes(u)){if(t==="prototype")return g(ta,{handleClick:h=>{d(h,Se.ViewPrototypeClick)}});if(t==="pdf")return g(ta,{buttonText:(n==null?void 0:n.viewDocumentText)||"View Document",handleClick:h=>{d(h,Se.ViewAgreementClick)}})}return e()},na=(e,t)=>{const n=He(0),r=()=>{if(e.current){const o=e.current;o.style.height="1px";const i=o.scrollHeight,s=o.offsetHeight-o.clientHeight,a=i+s,l=parseInt(window.getComputedStyle(o).getPropertyValue("max-height")),u=a<=l?a:l;n.current!==u&&t(),n.current=u,o.style.height=`${u}px`}};return pe(r,[]),r},po=({ariaLabel:e,border:t,choiceStyle:n={},label:r,isSelected:o,value:i,text:s,id:a,isRadio:l,useMobileStyling:u,error:d,allowTextEntry:c,noneOfTheAbove:h,promptText:p,onUserInputChanged:y})=>{const{styleNonce:f,viewDocument:_}=z(L=>({styleNonce:L.styleNonce,viewDocument:L.viewDocument})),[m,v]=X(!1);mu(_,t,f);const w=({isSelected:L,userText:F})=>{y&&y({id:a||"",selected:L,value:i,userText:F,noneOfTheAbove:h})},k=L=>{L.stopPropagation(),w({isSelected:l||!o,userText:s}),v(!1)},b=()=>{m||v(!0)},x=()=>{m&&v(!1)},S=L=>{(L.key==="Enter"||L.key===" ")&&k(L)},E={onClick:L=>k(L),onKeyPress:L=>S(L)};"ontouchstart"in _.documentElement?(E.onTouchStart=x,E.onTouchCancel=x,E.onTouchEnd=x):(E.onMouseDown=b,E.onMouseLeave=x);const C=l?`radio-${a}`:`checkbox-${a}`,A=o||m?[Wn]:[],O=[...d?[oa]:[],...A],R=r?{"aria-labelledby":`label-${a}`}:{"aria-label":e};return g("div",{className:B([...Q(j.Choice,u),...O]),id:`choice-div-${a}`,style:{...n,...d?{borderColor:Ut}:{}},...E,children:[g("div",{className:B([j.ChoiceLabelContainer]),children:[l?g("div",{...R,className:B([j.ChoiceRadio,...A]),id:C,role:"radio",tabIndex:0}):g("div",{"aria-checked":o,"aria-labelledby":`label-${a}`,className:j.ChoiceCheckbox,id:C,role:"checkbox",style:o?{backgroundColor:t,borderColor:t,boxShadow:"none"}:{},tabIndex:0,children:o&&g("svg",{fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg",children:g("path",{d:"M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",stroke:"white",strokeLinecap:"round",strokeWidth:"2"})})}),r&&g("label",{className:B(Q(j.ChoiceLabel,u)),htmlFor:C,id:`label-${a}`,children:r})]}),c&&o&&g("div",{className:B([j.ChoiceTextEntryContainer,...A]),children:g(pu,{onTextChange:L=>w({isSelected:o,userText:L}),promptText:p||"Please specify",textValue:s,useMobileStyling:u})})]})},pu=({promptText:e,textValue:t,onTextChange:n,useMobileStyling:r})=>{const o=He(null),{update:i}=z(a=>({update:a.update})),s=na(o,()=>i());return pe(()=>{o.current&&o.current.focus()},[]),g("textarea",{"aria-label":e,"aria-multiline":"true","aria-placeholder":e,className:B(Q(j.ChoiceTextInput,r)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:a=>{s(),a.stopPropagation(),n(a.currentTarget.value)},onClick:a=>{a.stopPropagation()},onKeyPress:a=>{a.stopPropagation()},placeholder:e,ref:o,role:"textbox",rows:1,value:t})},ra="ul-select-style-element",Wn="ul-select-active-dynamic-style",oa="ul-select-error-dynamic-style",fu=e=>e.tagName.toLowerCase()==="style",mu=(e,t,n)=>{let r=e.getElementById(ra),o=!1;r||(r=e.createElement("style"),o=!0),fu(r)&&(r.id=ra,n&&(r.nonce=n),r.textContent=gu(t),o&&e.head.appendChild(r))},gu=e=>` + .${Wn} { border-color: ${e}; } - .${Yn} .${O.ChoiceRadio}, .${Yn}.${O.ChoiceRadio} { + .${Wn} .${j.ChoiceRadio}, .${Wn}.${j.ChoiceRadio} { border: 6px solid ${e}; box-shadow: none; } - .${ls} { + .${oa} { border-color: ${Ut}; } - `,Mt=e=>(e==null?void 0:e.buttonText)||"Next",vi=e=>(e==null?void 0:e.skipButtonText)||"Skip",Nc=({className:e,message:t,next:n,properties:r,questionId:i,type:o})=>{const{useMobileStyling:a,border:s}=G(E=>({useMobileStyling:E.useMobileStyling,border:E.border})),[l,c]=ne(!1),[u,d]=ne(""),[f,v]=ne(!1),p=r==null?void 0:r.collectName,h=(r==null?void 0:r.nameLabelText)||"Full Name",g=(r==null?void 0:r.consentText)||"I agree to the stated conditions",_=(r==null?void 0:r.submitButtonText)||"Submit",b=!!u.trim(),x=l&&(!p||b),w=(E,R=!1)=>{E.preventDefault(),E.stopPropagation();let L=null;if(!R){if(!x){v(!0);return}L={submitted:!0},p&&(L.name=u)}n({value:L,questionId:i,type:o})},m=E=>{E.preventDefault(),E.stopPropagation(),d(E.currentTarget.value)},C=E=>{E.currentTarget.style.borderColor=f&&!b?Ut:s},S=E=>{E.currentTarget.style.borderColor=f&&!b?Ut:ar},k=()=>y("div",{children:[y(as,{allowTextEntry:!1,border:s,error:f&&!l,index:0,isRadio:!1,isSelected:l,label:g,onUserInputChanged:({selected:E})=>{E!==l&&c(!l)},useMobileStyling:a}),p&&y("input",{"aria-label":h,"aria-placeholder":h,className:$(X(O.ConsentLegalNameInput,a)),"data-gramm":"false",maxLength:250,name:"name",onBlur:S,onFocus:C,onInput:m,placeholder:h,style:f&&!b?{borderColor:Ut}:{},tabIndex:0,value:u}),y("div",{className:"ul-card__button-wrapper ul-card-vertical__button-wrapper",children:[y(pe,{className:x?"":O.ButtonDisabled,onClick:w,children:_}),r.required===!1&&y("button",{className:O.SkipButton,onClick:E=>w(E,!0),children:vi(r)})]})]});return y("div",{className:$([e,"ul-card__consent-legal",O.FadeInTransition]),children:[y(Re,{message:t}),y("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:r&&r.richTextBody?{__html:r&&r.richTextBody}:void 0,id:"ul-card__consent-legal-body-container"}),y(et,{properties:r,defaultBody:k,embeddedType:"pdf"})]},i)},Uc=({activeValue:e,border:t,icon:n,isPressed:r,onSubmit:i,range:o,scaleLabelType:a,setActiveValue:s,setIsPressed:l,useMobileStyling:c,value:u})=>{const d=`option-${u}`,f=a===at.Number,v=a===at.Star,p=f&&u===e,[h,g]=(()=>u<=e&&v||u===e?r?[t,1]:[t,.3]:["",1])(),_=()=>{switch(a){case at.Star:return $([...X(O.LikertStar,c),...X(`${O.LikertStar}-${u}`,c)]);case at.Smiley:return $([...X(O.LikertSmiley,c),...X(`${O.LikertSmiley}-${u}`,c)]);default:return $(u===o?[...X(O.LikertNumber,c),...X(`${O.LikertNumber}-${u}`,c),...X("likert-last-option",c)]:[...X(O.LikertNumber,c),...X(`${O.LikertNumber}-${u}`,c)])}},b=()=>{s(-1),l(!1)};return y("div",{"aria-label":f?void 0:String(u),className:_(),dangerouslySetInnerHTML:{__html:n},id:d,onClick:()=>i(),onPointerDown:()=>l(!0),onPointerEnter:()=>s(u),onPointerLeave:b,role:"radio",style:{color:f?"":h,borderColor:p?h:"",fillOpacity:p?"":g,zIndex:p?3:"auto"},tabIndex:0})},Vc=({className:e,labels:t,message:n,next:r,properties:i,questionId:o,type:a})=>{const{border:s,useMobileStyling:l}=G(k=>({border:k.border,useMobileStyling:k.useMobileStyling})),[c,u]=ne(-1),[d,f]=ne(!1),v=t&&t.left,p=t&&t.right;let h;const{range:g,scaleLabelType:_,ratingIcons:b}=i;g&&(h=Number(g));const x=h||5,w=k=>{var E,R;switch(_){case at.Star:return(E=b[0])==null?void 0:E.svg;case at.Smiley:return(R=b[k])==null?void 0:R.svg;default:return String(k+1)}},m=[...Array(x)].map((k,E)=>{const R=E+1;return y(Uc,{activeValue:c,border:s,icon:w(E),isPressed:d,onSubmit:()=>r({value:R,questionId:o,type:a}),range:x,scaleLabelType:_,setActiveValue:u,setIsPressed:f,useMobileStyling:l,value:R},E)}),C=k=>{k.preventDefault(),k.stopPropagation(),r({value:null,questionId:o,type:a})},S=()=>y(he,{children:[y("div",{"aria-label":`Rating (1 - ${x})`,className:"ul-card--likert__numbers",role:"radiogroup",children:m}),y("div",{className:"ul-card--likert__labels",children:[y("span",{children:v}),y("span",{children:p})]}),!i.required&&y("div",{className:"ul-vertical-centered-container",children:y(pe,{onClick:C,children:Mt(i)})})]});return y("form",{className:$([e,"ul-card--likert",O.FadeInTransition]),children:[y(Re,{message:n,properties:i}),y(et,{properties:i,defaultBody:S})]},o)},us=({className:e,message:t,onSubmit:n,options:r=[],properties:i,questionId:o,type:a})=>{const{border:s,useMobileStyling:l}=G(m=>({border:m.border,useMobileStyling:m.useMobileStyling})),c=r.reduce((m,C)=>(m[C.id]={isSelected:!1},m),{}),[u,d]=ne(c),f=a===T.MultipleChoice,v=i.required,p=Object.entries(u).some(([m,C])=>{var E;const S=r.find(R=>`${R.id}`===m),k=C.userText===void 0||C.userText.trim()==="";return((E=S==null?void 0:S.optionProperties)==null?void 0:E.allowsTextEntry)&&k&&C.isSelected}),h=Object.values(u).some(m=>m.isSelected),g=p||v&&!h,_=r.map(({id:m,label:C,value:S,optionProperties:k},E)=>{var P,M;const R=`${m}`,{allowsTextEntry:L}=k||{allowsTextEntry:!1};return y(as,{allowTextEntry:L,border:s,error:!1,id:R,index:E,isRadio:f,isSelected:!!((P=u[R])!=null&&P.isSelected),label:C,onUserInputChanged:A=>x(A.id,A.selected,A.userText),promptText:"Please specify",text:(M=u[m])==null?void 0:M.userText,useMobileStyling:l,value:S},R)}),b=m=>{m.preventDefault(),m.stopPropagation(),n(u)},x=(m,C,S)=>{const k=Object.assign({},u);if(f&&C)for(const E of Object.values(k))E.isSelected=!1,delete E.userText;k[m]={isSelected:C,userText:S},d(k)},w=()=>y("div",{children:[y("div",{className:$(X(O.ChoiceGroup,l)),role:f?"radiogroup":"group",children:_}),y("div",{className:"ul-card__button-wrapper",children:y(pe,{disabled:g,onClick:b,children:Mt(i)})})]});return y("form",{className:$([e,"ul-card--multiple",O.FadeInTransition]),id:"text-form",onSubmit:b,children:[y(Re,{message:t,properties:i}),y(et,{properties:i,defaultBody:w})]},o)},Fc=e=>{const{questionId:t,type:n,next:r,options:i}=e;return y(us,{...e,onSubmit:a=>{const s=Object.entries(a).find(([,f])=>f.isSelected)||[void 0,void 0],[l,c]=s,u=i.find(f=>`${f.id}`===l),d=c!=null&&c.userText?{[l]:{userText:c.userText}}:null;r({value:u&&l?{[l]:u.value}:{},secondaryValue:d,questionId:t,type:n})}})},Hc=e=>{const{questionId:t,type:n,next:r}=e;return y(us,{...e,onSubmit:o=>{const a={},s=Object.entries(o).reduce((c,[u,d])=>(c[u]=d.isSelected,c),a),l=Object.entries(o).reduce((c,[u,d])=>{if(!d.userText)return c;const f=c||{};return f[u]={userText:d.userText},f},null);r({value:s,secondaryValue:l,questionId:t,type:n})}})},$c=({className:e,props:{labels:t,message:n,properties:r},next:i,questionId:o,type:a})=>{const{border:s,useMobileStyling:l}=G(p=>({border:p.border,useMobileStyling:p.useMobileStyling})),c=t&&t.left,u=t&&t.right,d=[...Array(11)].map((p,h)=>y("div",{className:$([...X(O.NPSNumber,l),...X(`${O.NPSNumber}-${h}`,l)]),id:`option-${h}`,onClick:()=>i({value:h,questionId:o,type:a}),onKeyPress:g=>{g.preventDefault(),(g.key==="Enter"||g.key===" ")&&i({value:h,questionId:o,type:a})},onPointerDown:g=>{g.currentTarget.style.zIndex="2",g.currentTarget.style.borderColor=s},onPointerLeave:g=>{g.currentTarget.style.zIndex="auto",g.currentTarget.style.borderColor=ar},role:"radio",tabIndex:0,children:h},h)),f=p=>{p.preventDefault(),p.stopPropagation(),i({value:null,questionId:o,type:a})},v=()=>y("div",{children:[y("div",{className:"ul-card--nps__numbers",children:d}),y("div",{className:"ul-card--nps__labels",children:[y("span",{children:c}),y("span",{children:u})]}),!r.required&&y("div",{className:"ul-vertical-centered-container",children:y(pe,{onClick:f,children:Mt(r)})})]});return y("form",{className:$([e,"ul-card--nps",O.FadeInTransition]),children:[y(Re,{message:n,properties:r}),y(et,{properties:r,defaultBody:v})]},o)},Kc=({className:e,message:t,next:n,properties:r,questionId:i,type:o})=>{const{border:a,useMobileStyling:s,update:l}=G(m=>({border:m.border,useMobileStyling:m.useMobileStyling,update:m.update})),[c,u]=ne(""),d=We(null),f=c.trim(),v=r.required===!0&&!f,p=os(d,()=>l()),h=m=>{p(),m.preventDefault(),m.stopPropagation(),u(m.currentTarget.value)},g=m=>{m.preventDefault(),m.stopPropagation(),n({value:c,questionId:i,type:o})},_=r&&r.openTextPlaceholder?r.openTextPlaceholder:"",b=m=>{m.currentTarget.style.borderColor=a},x=m=>{m.currentTarget.style.borderColor=ar},w=()=>y("div",{className:"ul-card-text",children:[y("div",{className:"ul-card-text__container",children:y("textarea",{"aria-label":_,"aria-labelledby":O.QuestionHeader,"aria-multiline":"true","aria-placeholder":_,className:$(X(O.OpenTextInput,s)),"data-gramm":"false",maxLength:5e3,name:"text",onBlur:x,onChange:h,onFocus:b,placeholder:_,ref:d,role:"textbox",tabIndex:0})}),y(pe,{disabled:v,onClick:g,style:{backgroundColor:v?"":a},children:Mt(r)})]});return y("form",{className:$([e,"ul-card--text",O.FadeInTransition]),id:"text-form",children:[y(Re,{message:t,properties:r}),y(et,{defaultBody:w,properties:r})]},i)};var tt=(e=>(e[e.RequestNeeded=1]="RequestNeeded",e[e.TryAgain=2]="TryAgain",e[e.Ready=3]="Ready",e))(tt||{});const Qn=e=>e.type===ve.AvPermission,cs=e=>e.type===ve.ScreenPermission,zc=(e,t)=>!(Qn(t)?t.permissionDescriptors:[]).includes(wt.Camera)||e.getVideoTracks().length>0,ds=(e,t)=>{if(e===void 0)return tt.RequestNeeded;if(e){if(!zc(e,t))return tt.RequestNeeded}else return tt.TryAgain;return tt.Ready},fs={avStream:null,currentPage:null,mediaRecordingUids:null,nextQuestion:()=>{},passthroughData:void 0,recordingMediaTypes:void 0,screenPermissionRequested:!1,type:void 0},Ae=Yo(e=>({...fs,reset:()=>{e(fs)},updatePage:t=>{e(t)}}));function mi({currentPage:e,pages:t}){const{avStream:n,recordingMediaTypes:r,updatePage:i}=Ae.getState(),{recorderEventEmitter:o}=G.getState();o.emit(re.AvPermission,{[F.PermissionDescriptors]:e.permissionDescriptors,[F.StreamReadyCallback]:(a,s)=>{if(n===a)return;let l=e;if(a&&!e.permissionDescriptors.includes(wt.Camera)){const c=t.indexOf(e),u=s!=null&&s.active?c+2:c+1;(s==null?void 0:s.active)&&r&&o.emit(re.BeginRecording,{[F.RecordingMediaTypes]:r,[F.StartRecordingCallback]:d=>i({mediaRecordingUids:d})}),l=t[u]}i({currentPage:l,avStream:a})}})}function qc({pages:e,userId:t,responseGroupUid:n,surveyId:r,questionId:i,next:o}){const{updatePage:a}=Ae.getState(),{eventEmitFn:s,recorderEventEmitter:l}=G.getState(),c={questionId:i,surveyId:r,visitorId:t,responseGroupUid:n};let u=0;l.emit(Te.RecordedTaskPermissionScreen),s(Te.RecordedTaskPermissionScreen),l.emit(re.PermissionStatus,{[F.PermissionStatusCallback]:(f,v,p,h)=>{const g=e[u],{type:_}=g,b=[be.Screen];if(Qn(g)){const{permissionDescriptors:x}=g,w=x==null?void 0:x.includes(wt.Microphone),m=x==null?void 0:x.includes(wt.Camera);w&&b.push(be.Audio),m&&b.push(be.Video);const C=(f==null?void 0:f.active)&&!m,S=(f==null?void 0:f.active)&&v;(C||S)&&u++}cs(e[u])&&p&&(u++,l.emit(re.BeginRecording,{[F.RecordingMediaTypes]:b,[F.StartRecordingCallback]:x=>a({mediaRecordingUids:x})})),a({currentPage:e[u],avStream:f,screenPermissionRequested:p,nextQuestion:o,type:_,passthroughData:c,recordingMediaTypes:b,captureStream:h})}});const d=e[u];return d.type===ve.AvPermission&&mi({currentPage:d,pages:e}),d}function gi({status:e}){const{nextQuestion:t,passthroughData:n,mediaRecordingUids:r,reset:i}=Ae.getState(),{recorderEventEmitter:o,handleUploadUpdate:a,index:s}=G.getState(),l={value:{taskStatus:e},type:T.RecordedTask,questionId:(n==null?void 0:n.questionId)||1};!n||o.emit(re.FinishTask,{[F.BeginCallback]:c=>{a({mediaRecordingUid:c,isSubmitted:!0,progressPct:0,isComplete:!1})},[F.ProgressCallback]:(c,u)=>{a({mediaRecordingUid:c,progressPct:u.detail,isSubmitted:!1,isComplete:!1})},[F.UploadCallback]:c=>{c&&a({mediaRecordingUid:c,isComplete:!0,isSubmitted:!0,progressPct:100})},[F.PassthroughData]:n,[F.CurrentIndex]:s,[F.TaskResponse]:l,[F.TaskCompleteCallback]:c=>{l.value.taskDurationMillisecond=c,r&&(l.value.mediaRecordingUids=r),i(),t(l)}})}function yi({pages:e,setIsRequestingPermission:t}){const{recorderEventEmitter:n,eventEmitFn:r}=G.getState(),{updatePage:i,currentPage:o,recordingMediaTypes:a,screenPermissionRequested:s}=Ae.getState();if(!o)return;const l=e.indexOf(o);switch(o.type){case ve.AvPermission:{const c=s?l+2:l+1;s&&a&&n.emit(re.BeginRecording,{[F.RecordingMediaTypes]:a,[F.StartRecordingCallback]:u=>{i({mediaRecordingUids:u})}}),i({currentPage:e[c]});return}case ve.ScreenPermission:n.emit(re.ScreenPermission,{[F.ScreenPermissionRequested]:t,[F.StreamReadyCallback]:(c,u)=>{const d=u?e[l+1]:o;u&&a&&n.emit(re.BeginRecording,{[F.RecordingMediaTypes]:a,[F.StartRecordingCallback]:f=>{i({captureStream:u,mediaRecordingUids:f})}}),i({currentPage:d,screenPermissionRequested:!0,captureStream:u})}});return;case ve.StartTask:r(Te.RecordedTaskStart),n.emit(Te.RecordedTaskStart),n.emit(re.StartTask),i({currentPage:e[l+1],screenPermissionRequested:!0});return;case ve.CompleteTask:return}}const ps="ul-permission-graphics-container",hs="ul-permission-body",vs=$([ps,"ul_recorded-task-inset-spacing"]),Xn=$(["ul-horizontal-button-container","ul-horizontal-button-container-left"]),ms=({richTextBody:e})=>y("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:e},id:"ul-task-detail-container"}),Jn=({required:e,skipButtonText:t,bottom:n=!1})=>e?null:y(pe,{className:$([n&&"ul-skip-button-below",O.InactiveButton]),onClick:gi.bind(null,{status:me.Abandoned}),children:t||"Skip"}),_i=e=>{const{avStream:t,captureStream:n,recordingMediaTypes:r,updatePage:i}=Ae.getState(),o=(r==null?void 0:r.includes(be.Audio))||(r==null?void 0:r.includes(be.Video));ge(()=>{const a=setInterval(()=>{o&&t&&!t.active?i({avStream:null,currentPage:e[0]}):(!n||!n.active)&&i({captureStream:void 0,currentPage:e[o?1:0]})},1e3);return()=>clearInterval(a)},[t,n,o,e,r,i])},Wc=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:i,taskDetail:o}=e;return _i(t),y("div",{className:"ul-task-page",children:[y(ms,{richTextBody:o}),y("div",{className:Xn,children:[y(pe,{onClick:yi.bind(null,{pages:t}),children:r}),y(Jn,{required:n,skipButtonText:i})]})]},"start-task")},Gc=({content:e,pages:t,properties:n})=>{const{buttonText:r,skipButtonText:i}=e;_i(t);const a=y(et,{properties:n,defaultBody:()=>y("div",{className:Xn,children:[y(pe,{className:"ul-complete-task-button",onClick:gi.bind(null,{status:me.Completed}),children:r}),y(pe,{className:$([O.InactiveButton]),onClick:gi.bind(null,{status:me.GivenUp}),children:i})]})});return y("div",{className:"ul-task-page",children:[y(ms,{richTextBody:e.taskDetail}),a]},"complete-task")},Zc=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:i}=e,[o]=G(l=>[l.tabTitle]),[a,s]=ne(!1);return y("div",{children:[y("div",{className:vs,children:[y("p",{style:{marginTop:"auto"},children:e.selectTabText}),y("div",{className:"ul-select-tab-container",children:y("p",{className:hs,children:o})})]}),y("div",{className:n?"":Xn,children:[y(pe,{disabled:a,onClick:yi.bind(null,{pages:t,setIsRequestingPermission:s}),children:r}),y(Jn,{required:n,skipButtonText:i})]})]})},Yc=({content:e})=>y("div",{className:$([ps,"ul_permission_svg_container","ul_recorded-task-inset-spacing","ul-center-horizontally"]),dangerouslySetInnerHTML:{__html:e.svg}},"ul-permission-request-graphic"),Qc=({content:e,pages:t,required:n})=>{const{permissionDeniedHeadline:r,permissionDeniedBody:i,skipButtonText:o,tryAgainButtonText:a}=e,s=Qn(t[0])?t[0]:null;return ge(()=>{const l=setInterval(()=>{s!==null&&mi({currentPage:s,pages:t})},1e3);return()=>clearInterval(l)},[s,t]),s?y("div",{children:[y("div",{className:vs,children:y("p",{className:"ul-av-permission-denied-paragraph",children:[y("span",{className:"ul-av-permission-denied-headline",children:r}),y("span",{className:hs,children:i})]})}),y("div",{className:Xn,children:[y(pe,{onClick:mi.bind(null,{currentPage:s,pages:t}),children:a}),y(Jn,{required:n,skipButtonText:o})]})]}):null},Xc=({stream:e})=>y("video",{autoPlay:!0,className:$(["ul_recorded-task-inset-spacing"]),id:"ul-record-task-video-preview",muted:!0,ref:t=>{t&&(t.srcObject=e||null)}}),Jc=({content:e,pages:t,required:n})=>{const{skipButtonText:r}=e,{avStream:i}=Ae.getState();return _i(t),y("div",{children:[y(Xc,{stream:i}),y("div",{className:"ul-vertical-button-container-center",children:[y(pe,{onClick:yi.bind(null,{pages:t}),children:e.buttonText}),y(Jn,{bottom:!0,required:n,skipButtonText:r})]})]})},ed=({properties:e})=>{const{pages:t,required:n}=e,{avStream:r,currentPage:i}=Ae.getState();if(i===void 0)return null;switch(i==null?void 0:i.type){case ve.AvPermission:{const o=ds(r,i);return o===tt.RequestNeeded?y(Yc,{content:i}):o===tt.TryAgain?y(Qc,{content:i,pages:t,required:n}):y(Jc,{content:i,pages:t,required:n})}case ve.ScreenPermission:return y(Zc,{content:i,pages:t,required:n});case ve.StartTask:return y(Wc,{content:i,pages:t,required:n});case ve.CompleteTask:return y(Gc,{content:i,pages:t,properties:e});default:return null}},td=({className:e,properties:t,next:n,questionId:r})=>{const i=G(),{surveyId:o,responseGroupUid:a,userId:s}=i,l=Ae(),{screenPermissionRequested:c}=l,u=Ae(h=>h.avStream);let d=Ae(h=>h.currentPage);d||(d=qc({questionId:r,surveyId:o,next:h=>{n(h)},pages:t.pages,responseGroupUid:a,userId:s}));let f=d.headline,v=d.captionText;const p=ds(u,d);return cs(d)&&c&&(f=d.permissionDeniedHeadline,v=d.permissionDeniedCaptionText),Qn(d)&&p===tt.Ready&&(f=d.permissionGrantedHeadline,v=d.permissionGrantedCaptionText),y("div",{className:$([e,"ul-center-horizontally",O.FadeInTransition]),children:[y(Re,{message:f,properties:{captionText:v}}),y(ed,{properties:t})]})},nd={"{{user_id}}":"externalUserId","{{email}}":"email"},rd=(e=void 0,t={})=>{if(!e)return e;let n=e;const r=[];for(const[l,c]of Object.entries(nd))if(n.toLowerCase().includes(l))if(t[c]){const u=new RegExp(l,"gi");n=n.replace(u,t[c])}else r.push(l);if(r.length===0||!n.includes("?"))return n;const i=n.slice(0,n.indexOf("?")),a=n.slice(n.indexOf("?")+1).split("&").map(l=>l.split("=")).filter(l=>!r.includes(l[1]));if(a.length===0)return i;const s=a.map(l=>l.join("=")).join("&");return`${i}?${s}`},id=({className:e,message:t,next:n,properties:r,questionId:i,type:o})=>{const{visitorAttributes:a}=G(d=>({visitorAttributes:d.visitorAttributes})),s=(d,f=!1)=>{n({value:f?{skipped:!0}:void 0,questionId:i,type:o})},l=d=>{(d.key==="Enter"||d.key===" ")&&n({value:void 0,questionId:i,type:o})},c=()=>{const d=rd(r&&r.buttonUrl,a);return y("div",{className:"ul-card-button-group",children:[y("a",{className:"ul-card-text__button ul-card__text-url-prompt-button",href:d,id:"ul-card-text__button",onClick:s,onKeyPress:l,rel:"noreferrer",role:d?"link":"button",tabIndex:0,target:"_blank",children:Mt(r)}),r.required===!1&&y("button",{className:O.SkipButton,onClick:f=>s(f,!0),children:vi(r)})]})},u=(d,f)=>d?y("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:d},id:"ul-card__text-url-body-container"}):y("div",{className:"ul-rich-text-body",id:"ul-card__text-url-body-container",children:(f?f.split(/\n\s*\n/g):[]).map((v,p)=>y("p",{children:v},p))});return y("div",{className:$([e,"ul-card__text-url-prompt",O.FadeInTransition]),children:[y(Re,{message:t}),u(r&&r.richTextBody,r&&r.body),y(et,{defaultBody:c,properties:r})]},i)},od=({className:e,questionId:t})=>{const{border:n,destroy:r,endCard:i,forceBrandedLogo:o}=G(l=>({border:l.border,destroy:l.destroy,endCard:l.endCard,forceBrandedLogo:l.forceBrandedLogo}));ge(()=>{setTimeout(()=>{r(_t)},o?4e3:2e3)},[r,o]);const a=i&&i.subheader?y("p",{className:O.Caption,children:i.subheader}):null,s=i&&i.headline?i.headline:"";return y("div",{className:$([e,"ul-card--thanks",O.FadeInTransition]),children:y("div",{children:y("div",{className:"ul-card--thanks-content",children:[y("div",{className:"ul-thanks-check",children:y("svg",{"aria-labelledby":"title",fill:"none",height:"99",viewBox:"0 0 81 99",width:"81",xmlns:"http://www.w3.org/2000/svg",children:[y("path",{clipRule:"evenodd",d:"M40.5 77C60.9345 77 77.5 60.4345 77.5 40C77.5 19.5655 60.9345 3 40.5 3C20.0655 3 3.5 19.5655 3.5 40C3.5 60.4345 20.0655 77 40.5 77ZM80.5 40C80.5 62.0914 62.5914 80 40.5 80C18.4086 80 0.5 62.0914 0.5 40C0.5 17.9086 18.4086 0 40.5 0C62.5914 0 80.5 17.9086 80.5 40Z",fill:n,fillRule:"evenodd"}),y("path",{clipRule:"evenodd",d:"M55.025 22.9046C55.6299 23.4705 55.6616 24.4198 55.0956 25.0247C54.8724 25.2634 54.6109 25.5285 54.3157 25.8277C52.2547 27.9168 48.5549 31.667 44.8135 39.6658C43.2818 42.9406 42.0864 45.8386 41.0823 48.2729C40.6539 49.3116 40.2603 50.2659 39.8902 51.129C39.287 52.5359 38.7248 53.7508 38.1744 54.625C37.8997 55.0613 37.5806 55.4905 37.2017 55.8245C36.8201 56.1607 36.2613 56.5 35.5457 56.5C34.6742 56.5 34.0892 55.9692 33.7774 55.6083C33.4502 55.2296 33.1752 54.7511 32.9396 54.301C32.7305 53.9013 32.5088 53.4367 32.2797 52.9565C32.2429 52.8794 32.2059 52.8019 32.1688 52.7243C31.8942 52.1499 31.5959 51.534 31.2537 50.8868C29.8886 48.305 27.8539 45.2878 24.2343 43.1382C23.522 42.7152 23.2875 41.7949 23.7105 41.0826C24.1335 40.3703 25.0539 40.1358 25.7662 40.5588C30.0556 43.1062 32.4149 46.6647 33.9058 49.4845C34.2776 50.1876 34.5973 50.8487 34.8753 51.4302C34.9147 51.5124 34.9529 51.5926 34.9902 51.6707C35.2222 52.1567 35.4164 52.5637 35.5978 52.9102C35.6151 52.9434 35.6321 52.9754 35.6485 53.0061C36.0565 52.3531 36.5341 51.3434 37.133 49.9468C37.4781 49.1418 37.8572 48.2229 38.2761 47.2074C39.2886 44.7532 40.5339 41.7347 42.0961 38.3948C46.0591 29.9221 50.0641 25.8648 52.1535 23.7482C52.4423 23.4556 52.6944 23.2002 52.9048 22.9753C53.4708 22.3703 54.42 22.3387 55.025 22.9046ZM35.1994 53.5892C35.1994 53.5892 35.2 53.5888 35.2012 53.5879C35.2 53.5889 35.1994 53.5893 35.1994 53.5892ZM36.0666 53.6682C36.0732 53.674 36.0765 53.6775 36.0765 53.6777C36.0765 53.678 36.0732 53.6751 36.0666 53.6682Z",fill:n,fillRule:"evenodd"}),y("path",{d:"M69.5 97C69.5 98.1046 56.2924 99 40 99C23.7076 99 10.5 98.1046 10.5 97C10.5 95.8954 23.7076 95 40 95C56.2924 95 69.5 95.8954 69.5 97Z",fill:"black",fillOpacity:"0.2"})]})}),y(Re,{message:s}),a]})})},t)},vt="https://cdn.sprig.com",N={document:void 0,videojs:void 0},ad=`/* progress control styles */ + `,ht=e=>(e==null?void 0:e.buttonText)||"Next",fo=e=>(e==null?void 0:e.skipButtonText)||"Skip",vu=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{useMobileStyling:s,border:a}=z(C=>({useMobileStyling:C.useMobileStyling,border:C.border})),[l,u]=X(!1),[d,c]=X(""),[h,p]=X(!1),y=r==null?void 0:r.collectName,f=(r==null?void 0:r.nameLabelText)||"Full Name",_=(r==null?void 0:r.consentText)||"I agree to the stated conditions",m=(r==null?void 0:r.submitButtonText)||"Submit",v=!!d.trim(),w=l&&(!y||v),k=(C,A=!1)=>{C.preventDefault(),C.stopPropagation();let O=null;if(!A){if(!w){p(!0);return}O={submitted:!0},y&&(O.name=d)}n({value:O,questionId:o,type:i})},b=C=>{C.preventDefault(),C.stopPropagation(),c(C.currentTarget.value)},x=C=>{C.currentTarget.style.borderColor=h&&!v?Ut:a},S=C=>{C.currentTarget.style.borderColor=h&&!v?Ut:fr},E=()=>g("div",{children:[g(po,{allowTextEntry:!1,border:a,error:h&&!l,isRadio:!1,isSelected:l,label:_,onUserInputChanged:({selected:C})=>{C!==l&&u(!l)},useMobileStyling:s}),y&&g("input",{"aria-label":f,"aria-placeholder":f,className:B(Q(j.ConsentLegalNameInput,s)),"data-gramm":"false",maxLength:250,name:"name",onBlur:S,onFocus:x,onInput:b,placeholder:f,style:h&&!v?{borderColor:Ut}:{},tabIndex:0,value:d}),g("div",{className:"ul-card__button-wrapper ul-card-vertical__button-wrapper",children:[g(ce,{className:w?"":j.ButtonDisabled,onClick:k,children:m}),r.required===!1&&g("button",{className:j.SkipButton,onClick:C=>k(C,!0),children:fo(r)})]})]});return g("div",{className:B([e,"ul-card__consent-legal",j.FadeInTransition]),children:[g(xe,{message:t}),g("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:r!=null&&r.richTextBody?{__html:r.richTextBody}:void 0,id:"ul-card__consent-legal-body-container"}),g(Ue,{properties:r,defaultBody:E,embeddedType:"pdf"})]},o)},yu=({activeValue:e,border:t,icon:n,isPressed:r,onSubmit:o,range:i,scaleLabelType:s,setActiveValue:a,setIsPressed:l,useMobileStyling:u,value:d})=>{const c=`option-${d}`,h=s===dt.Number,p=s===dt.Star,y=h&&d===e,[f,_]=d<=e&&p||d===e?r?[t,1]:[t,.3]:["",1],m=()=>{switch(s){case dt.Star:return B([...Q(j.LikertStar,u),...Q(`${j.LikertStar}-${d}`,u)]);case dt.Smiley:return B([...Q(j.LikertSmiley,u),...Q(`${j.LikertSmiley}-${d}`,u)]);default:return B(d===i?[...Q(j.LikertNumber,u),...Q(`${j.LikertNumber}-${d}`,u),...Q("likert-last-option",u)]:[...Q(j.LikertNumber,u),...Q(`${j.LikertNumber}-${d}`,u)])}},v=()=>{a(-1),l(!1)};return g("div",{"aria-label":h?void 0:String(d),className:m(),dangerouslySetInnerHTML:{__html:n},id:c,onClick:()=>o(),onPointerDown:()=>l(!0),onPointerEnter:()=>a(d),onPointerLeave:v,role:"radio",style:{color:h?"":f,borderColor:y?f:"",fillOpacity:y?"":_,zIndex:y?3:"auto"},tabIndex:0})},_u=({className:e,labels:t,message:n,next:r,properties:o,questionId:i,type:s})=>{const{border:a,useMobileStyling:l}=z(E=>({border:E.border,useMobileStyling:E.useMobileStyling})),[u,d]=X(-1),[c,h]=X(!1),p=t&&t.left,y=t&&t.right;let f;const{range:_,scaleLabelType:m,ratingIcons:v}=o;_&&(f=Number(_));const w=f||5,k=E=>{var C,A;switch(m){case dt.Star:return(C=v[0])==null?void 0:C.svg;case dt.Smiley:return(A=v[E])==null?void 0:A.svg;default:return String(E+1)}},b=[...Array(w)].map((E,C)=>{const A=C+1;return g(yu,{activeValue:u,border:a,icon:k(C),isPressed:c,onSubmit:()=>r({value:A,questionId:i,type:s}),range:w,scaleLabelType:m,setActiveValue:d,setIsPressed:h,useMobileStyling:l,value:A},C)}),x=E=>{E.preventDefault(),E.stopPropagation(),r({value:null,questionId:i,type:s})},S=()=>g(le,{children:[g("div",{"aria-label":`Rating (1 - ${w})`,className:"ul-card--likert__numbers",role:"radiogroup",children:b}),g("div",{className:"ul-card--likert__labels",children:[g("span",{children:p}),g("span",{children:y})]}),!o.required&&g("div",{className:"ul-vertical-centered-container",children:g(ce,{onClick:x,children:ht(o)})})]});return g("form",{className:B([e,"ul-card--likert",j.FadeInTransition]),children:[g(xe,{message:n,properties:o}),g(Ue,{properties:o,defaultBody:S})]},i)},bu=({className:e,message:t,next:n,options:r,properties:o,questionId:i,type:s})=>{const{border:a,useMobileStyling:l}=z(b=>({border:b.border,useMobileStyling:b.useMobileStyling})),u=o.matrixColumn,d=r.length,c=u.length,h=o.required,p=b=>{b.preventDefault(),b.stopPropagation(),n({value:f,questionId:i,type:s})},y=r.reduce((b,x)=>(b[x.id]=null,b),{}),[f,_]=X(y),m=(b,x)=>{_(S=>({...S,[b]:x}))},v=h&&Object.values(f).every(b=>b==null),w=r.map(b=>g(le,{children:[g("div",{"aria-label":b.label,className:"ul-matrix-row-label",children:b.label},b.label),g("div",{className:"ul-matrix-row-options",role:"radiogroup",children:u.map((x,S)=>{const E=S===c-1;return g("div",{className:B("ul-matrix-option-wrapper",E&&"ul-matrix-last-option"),children:g(po,{allowTextEntry:!1,ariaLabel:`${b.label}-${x.label}`,border:a,choiceStyle:{background:"transparent",border:"none",marginBottom:"0",padding:"0"},error:!1,id:`${b.id}-${x.value}`,isRadio:!0,isSelected:f[b.id]===x.value,onUserInputChanged:()=>m(b.id,x.value),useMobileStyling:l})},x.value)})})]})),k=()=>g("div",{children:[g("div",{className:"ul-card--matrix_container",style:`--maxWidth: ${Ji()-74}px`,children:g("div",{className:"ul-card--matrix_grid",style:`--numColumns: ${c}; --numRows: ${d+1}`,children:[g("div",{})," ",u.map(b=>g("div",{className:"ul-matrix-column-label",children:b.label},b.label)),w]})}),g("div",{className:"ul-card__button-wrapper",children:g(ce,{disabled:v,children:ht(o)})})]});return g("form",{className:B([e,j.FadeInTransition,"ul-card__matrix"]),id:"text-form",onSubmit:p,children:[g(xe,{message:t,properties:o}),g(Ue,{properties:o,defaultBody:k})]},i)},ia=({className:e,message:t,onSubmit:n,options:r=[],properties:o,questionId:i,type:s})=>{const{border:a,useMobileStyling:l}=z(x=>({border:x.border,useMobileStyling:x.useMobileStyling})),u=r.reduce((x,S)=>(x[S.id]={isSelected:!1},x),{}),[d,c]=X(u),h=s===P.MultipleChoice,p=o.required,y=r.find(x=>{var S;return(S=x.optionProperties)==null?void 0:S.noneOfTheAbove}),f=Object.entries(d).some(([x,S])=>{var A;const E=r.find(O=>`${O.id}`===x),C=S.userText===void 0||S.userText.trim()==="";return((A=E==null?void 0:E.optionProperties)==null?void 0:A.allowsTextEntry)&&C&&S.isSelected}),_=Object.values(d).some(x=>x.isSelected),m=f||p&&!_,v=r.map(({id:x,label:S,value:E,optionProperties:C})=>{var L,F;const A=`${x}`,{allowsTextEntry:O,noneOfTheAbove:R}={allowsTextEntry:!1,noneOfTheAbove:!1,...C};return g(po,{allowTextEntry:O,border:a,error:!1,id:A,isRadio:h,noneOfTheAbove:R,isSelected:!!((L=d[A])!=null&&L.isSelected),label:S,onUserInputChanged:D=>k(D.id,D.selected,D.userText,D.noneOfTheAbove),promptText:"Please specify",text:(F=d[x])==null?void 0:F.userText,useMobileStyling:l,value:E},A)}),w=x=>{x.preventDefault(),x.stopPropagation(),n(d)},k=(x,S,E,C)=>{const A=Object.assign({},d);if((h||C)&&S)for(const O of Object.values(A))O.isSelected=!1,delete O.userText;else y&&!C&&d[y.id].isSelected&&(A[y.id].isSelected=!1);A[x]={isSelected:S,userText:E},c(A)},b=()=>g("div",{children:[g("div",{className:B(Q(j.ChoiceGroup,l)),role:h?"radiogroup":"group",children:v}),g("div",{className:"ul-card__button-wrapper",children:g(ce,{disabled:m,onClick:w,children:ht(o)})})]});return g("form",{className:B([e,"ul-card--multiple",j.FadeInTransition]),id:"text-form",onSubmit:w,children:[g(xe,{message:t,properties:o}),g(Ue,{properties:o,defaultBody:b})]},i)},xu=e=>{const{questionId:t,type:n,next:r,options:o}=e;return g(ia,{...e,onSubmit:s=>{const a=Object.entries(s).find(([,h])=>h.isSelected)||[void 0,void 0],[l,u]=a,d=o.find(h=>`${h.id}`===l),c=u!=null&&u.userText?{[l]:{userText:u.userText}}:null;r({value:d&&l?{[l]:d.value}:{},secondaryValue:c,questionId:t,type:n})}})},wu=e=>{const{questionId:t,type:n,next:r}=e;return g(ia,{...e,onSubmit:i=>{const s={},a=Object.entries(i).reduce((u,[d,c])=>(u[d]=c.isSelected,u),s),l=Object.entries(i).reduce((u,[d,c])=>{if(!c.userText)return u;const h=u||{};return h[d]={userText:c.userText},h},null);r({value:a,secondaryValue:l,questionId:t,type:n})}})},ku=({className:e,props:{labels:t,message:n,properties:r},next:o,questionId:i,type:s})=>{const{border:a,useMobileStyling:l}=z(y=>({border:y.border,useMobileStyling:y.useMobileStyling})),u=t&&t.left,d=t&&t.right,c=[...Array(11)].map((y,f)=>g("div",{className:B([...Q(j.NPSNumber,l),...Q(`${j.NPSNumber}-${f}`,l)]),id:`option-${f}`,onClick:()=>o({value:f,questionId:i,type:s}),onKeyPress:_=>{_.preventDefault(),(_.key==="Enter"||_.key===" ")&&o({value:f,questionId:i,type:s})},onPointerDown:_=>{_.currentTarget.style.zIndex="2",_.currentTarget.style.borderColor=a},onPointerLeave:_=>{_.currentTarget.style.zIndex="auto",_.currentTarget.style.borderColor=fr},role:"radio",tabIndex:0,children:f},f)),h=y=>{y.preventDefault(),y.stopPropagation(),o({value:null,questionId:i,type:s})},p=()=>g("div",{children:[g("div",{className:"ul-card--nps__numbers",children:c}),g("div",{className:"ul-card--nps__labels",children:[g("span",{children:u}),g("span",{children:d})]}),!r.required&&g("div",{className:"ul-vertical-centered-container",children:g(ce,{onClick:h,children:ht(r)})})]});return g("form",{className:B([e,"ul-card--nps",j.FadeInTransition]),children:[g(xe,{message:n,properties:r}),g(Ue,{properties:r,defaultBody:p})]},i)},Cu=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{border:s,useMobileStyling:a,update:l}=z(b=>({border:b.border,useMobileStyling:b.useMobileStyling,update:b.update})),[u,d]=X(""),c=He(null),h=u.trim(),p=r.required===!0&&!h,y=na(c,()=>l()),f=b=>{y(),b.preventDefault(),b.stopPropagation(),d(b.currentTarget.value)},_=b=>{b.preventDefault(),b.stopPropagation(),n({value:u,questionId:o,type:i})},m=r&&r.openTextPlaceholder?r.openTextPlaceholder:"",v=b=>{b.currentTarget.style.borderColor=s},w=b=>{b.currentTarget.style.borderColor=fr},k=()=>g("div",{className:"ul-card-text",children:[g("div",{className:"ul-card-text__container",children:g("textarea",{"aria-label":m,"aria-labelledby":j.QuestionHeader,"aria-multiline":"true","aria-placeholder":m,className:B(Q(j.OpenTextInput,a)),"data-gramm":"false",maxLength:5e3,name:"text",onBlur:w,onChange:f,onFocus:v,placeholder:m,ref:c,role:"textbox",tabIndex:0})}),g(ce,{disabled:p,onClick:_,style:{backgroundColor:p?"":s},children:ht(r)})]});return g("form",{className:B([e,"ul-card--text",j.FadeInTransition]),id:"text-form",children:[g(xe,{message:t,properties:r}),g(Ue,{defaultBody:k,properties:r})]},o)};var Ye=(e=>(e[e.RequestNeeded=1]="RequestNeeded",e[e.TryAgain=2]="TryAgain",e[e.Ready=3]="Ready",e))(Ye||{});const Gn=e=>e.type===me.AvPermission,sa=e=>e.type===me.ScreenPermission,Su=(e,t)=>!(Gn(t)?t.permissionDescriptors:[]).includes(At.Camera)||e.getVideoTracks().length>0,aa=(e,t)=>{if(e===void 0)return Ye.RequestNeeded;if(e){if(!Su(e,t))return Ye.RequestNeeded}else return Ye.TryAgain;return Ye.Ready},la={avStream:null,currentPage:null,mediaRecordingUids:null,nextQuestion:()=>{},passthroughData:void 0,recordingMediaTypes:void 0,screenPermissionRequested:!1,type:void 0},Te=qi(e=>({...la,reset:()=>{e(la)},updatePage:t=>{e(t)}}));function mo({currentPage:e,pages:t}){const{avStream:n,recordingMediaTypes:r,updatePage:o}=Te.getState(),{recorderEventEmitter:i}=z.getState();i.emit(re.AvPermission,{[V.PermissionDescriptors]:e.permissionDescriptors,[V.StreamReadyCallback]:(s,a)=>{if(n===s)return;let l=e;if(s&&!e.permissionDescriptors.includes(At.Camera)){const u=t.indexOf(e),d=a!=null&&a.active?u+2:u+1;a!=null&&a.active&&r&&i.emit(re.BeginRecording,{[V.RecordingMediaTypes]:r,[V.StartRecordingCallback]:c=>o({mediaRecordingUids:c})}),l=t[d]}o({currentPage:l,avStream:s})}})}function Eu({pages:e,userId:t,responseGroupUid:n,surveyId:r,questionId:o,next:i}){const{updatePage:s}=Te.getState(),{eventEmitFn:a,recorderEventEmitter:l}=z.getState(),u={questionId:o,surveyId:r,visitorId:t,responseGroupUid:n};let d=0;l.emit(Se.RecordedTaskPermissionScreen),a(Se.RecordedTaskPermissionScreen),l.emit(re.PermissionStatus,{[V.PermissionStatusCallback]:(h,p,y,f)=>{const _=e[d],{type:m}=_,v=[ye.Screen];if(Gn(_)){const{permissionDescriptors:w}=_,k=w==null?void 0:w.includes(At.Microphone),b=w==null?void 0:w.includes(At.Camera);k&&v.push(ye.Audio),b&&v.push(ye.Video);const x=(h==null?void 0:h.active)&&!b,S=(h==null?void 0:h.active)&&p;(x||S)&&d++}sa(e[d])&&y&&(d++,l.emit(re.BeginRecording,{[V.RecordingMediaTypes]:v,[V.StartRecordingCallback]:w=>s({mediaRecordingUids:w})})),s({currentPage:e[d],avStream:h,screenPermissionRequested:y,nextQuestion:i,type:m,passthroughData:u,recordingMediaTypes:v,captureStream:f})}});const c=e[d];return c.type===me.AvPermission&&mo({currentPage:c,pages:e}),c}function go({status:e}){const{nextQuestion:t,passthroughData:n,mediaRecordingUids:r,reset:o}=Te.getState(),{recorderEventEmitter:i,handleUploadUpdate:s,index:a}=z.getState(),l={value:{taskStatus:e},type:P.RecordedTask,questionId:(n==null?void 0:n.questionId)||1};n&&i.emit(re.FinishTask,{[V.BeginCallback]:u=>{s({mediaRecordingUid:u,isSubmitted:!0,progressPct:0,isComplete:!1})},[V.ProgressCallback]:(u,d)=>{s({mediaRecordingUid:u,progressPct:d.detail,isSubmitted:!1,isComplete:!1})},[V.UploadCallback]:u=>{u&&s({mediaRecordingUid:u,isComplete:!0,isSubmitted:!0,progressPct:100})},[V.PassthroughData]:n,[V.CurrentIndex]:a,[V.TaskResponse]:l,[V.TaskCompleteCallback]:u=>{l.value.taskDurationMillisecond=u,r&&(l.value.mediaRecordingUids=r),o(),t(l)}})}function vo({pages:e,setIsRequestingPermission:t}){const{recorderEventEmitter:n,eventEmitFn:r}=z.getState(),{updatePage:o,currentPage:i,recordingMediaTypes:s,screenPermissionRequested:a}=Te.getState();if(!i)return;const l=e.indexOf(i);switch(i.type){case me.AvPermission:{const u=a?l+2:l+1;a&&s&&n.emit(re.BeginRecording,{[V.RecordingMediaTypes]:s,[V.StartRecordingCallback]:d=>{o({mediaRecordingUids:d})}}),o({currentPage:e[u]});return}case me.ScreenPermission:n.emit(re.ScreenPermission,{[V.ScreenPermissionRequested]:t,[V.StreamReadyCallback]:(u,d)=>{const c=d?e[l+1]:i;d&&s&&n.emit(re.BeginRecording,{[V.RecordingMediaTypes]:s,[V.StartRecordingCallback]:h=>{o({captureStream:d,mediaRecordingUids:h})}}),o({currentPage:c,screenPermissionRequested:!0,captureStream:d})}});return;case me.StartTask:r(Se.RecordedTaskStart),n.emit(Se.RecordedTaskStart),n.emit(re.StartTask),o({currentPage:e[l+1],screenPermissionRequested:!0});return;case me.CompleteTask:return}}const ca="ul-permission-graphics-container",ua="ul-permission-body",da=B([ca,"ul_recorded-task-inset-spacing"]),Zn=B(["ul-horizontal-button-container","ul-horizontal-button-container-left"]),ha=({richTextBody:e})=>g("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:e},id:"ul-task-detail-container"}),Yn=({required:e,skipButtonText:t,bottom:n=!1})=>e?null:g(ce,{className:B([n&&"ul-skip-button-below",j.InactiveButton]),onClick:go.bind(null,{status:fe.Abandoned}),children:t||"Skip"}),yo=e=>{const{avStream:t,captureStream:n,recordingMediaTypes:r,updatePage:o}=Te.getState(),i=(r==null?void 0:r.includes(ye.Audio))||(r==null?void 0:r.includes(ye.Video));pe(()=>{const s=setInterval(()=>{i&&t&&!t.active?o({avStream:null,currentPage:e[0]}):(!n||!n.active)&&o({captureStream:void 0,currentPage:e[i?1:0]})},1e3);return()=>clearInterval(s)},[t,n,i,e,r,o])},Pu=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:o,taskDetail:i}=e;return yo(t),g("div",{className:"ul-task-page",children:[g(ha,{richTextBody:i}),g("div",{className:Zn,children:[g(ce,{onClick:vo.bind(null,{pages:t}),children:r}),g(Yn,{required:n,skipButtonText:o})]})]},"start-task")},Tu=({content:e,pages:t,properties:n})=>{const{buttonText:r,skipButtonText:o}=e;yo(t);const s=g(Ue,{properties:n,defaultBody:()=>g("div",{className:Zn,children:[g(ce,{className:"ul-complete-task-button",onClick:go.bind(null,{status:fe.Completed}),children:r}),g(ce,{className:B([j.InactiveButton]),onClick:go.bind(null,{status:fe.GivenUp}),children:o})]})});return g("div",{className:"ul-task-page",children:[g(ha,{richTextBody:e.taskDetail}),s]},"complete-task")},Iu=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:o}=e,[i]=z(l=>[l.tabTitle]),[s,a]=X(!1);return g("div",{children:[g("div",{className:da,children:[g("p",{style:{marginTop:"auto"},children:e.selectTabText}),g("div",{className:"ul-select-tab-container",children:g("p",{className:ua,children:i})})]}),g("div",{className:n?"":Zn,children:[g(ce,{disabled:s,onClick:vo.bind(null,{pages:t,setIsRequestingPermission:a}),children:r}),g(Yn,{required:n,skipButtonText:o})]})]})},ju=({content:e})=>g("div",{className:B([ca,"ul_permission_svg_container","ul_recorded-task-inset-spacing","ul-center-horizontally"]),dangerouslySetInnerHTML:{__html:e.svg}},"ul-permission-request-graphic"),Ou=({content:e,pages:t,required:n})=>{const{permissionDeniedHeadline:r,permissionDeniedBody:o,skipButtonText:i,tryAgainButtonText:s}=e,a=Gn(t[0])?t[0]:null;return pe(()=>{const l=setInterval(()=>{a!==null&&mo({currentPage:a,pages:t})},1e3);return()=>clearInterval(l)},[a,t]),a?g("div",{children:[g("div",{className:da,children:g("p",{className:"ul-av-permission-denied-paragraph",children:[g("span",{className:"ul-av-permission-denied-headline",children:r}),g("span",{className:ua,children:o})]})}),g("div",{className:Zn,children:[g(ce,{onClick:mo.bind(null,{currentPage:a,pages:t}),children:s}),g(Yn,{required:n,skipButtonText:i})]})]}):null},Ru=({stream:e})=>g("video",{autoPlay:!0,className:B(["ul_recorded-task-inset-spacing"]),id:"ul-record-task-video-preview",muted:!0,ref:t=>{t&&(t.srcObject=e||null)}}),Du=({content:e,pages:t,required:n})=>{const{skipButtonText:r}=e,{avStream:o}=Te.getState();return yo(t),g("div",{children:[g(Ru,{stream:o}),g("div",{className:"ul-vertical-button-container-center",children:[g(ce,{onClick:vo.bind(null,{pages:t}),children:e.buttonText}),g(Yn,{bottom:!0,required:n,skipButtonText:r})]})]})},Au=({properties:e})=>{const{pages:t,required:n}=e,{avStream:r,currentPage:o}=Te.getState();if(o===void 0)return null;switch(o==null?void 0:o.type){case me.AvPermission:{const i=aa(r,o);return i===Ye.RequestNeeded?g(ju,{content:o}):i===Ye.TryAgain?g(Ou,{content:o,pages:t,required:n}):g(Du,{content:o,pages:t,required:n})}case me.ScreenPermission:return g(Iu,{content:o,pages:t,required:n});case me.StartTask:return g(Pu,{content:o,pages:t,required:n});case me.CompleteTask:return g(Tu,{content:o,pages:t,properties:e});default:return null}},Lu=({className:e,properties:t,next:n,questionId:r})=>{const o=z(),{surveyId:i,responseGroupUid:s,userId:a}=o,l=Te(),{screenPermissionRequested:u}=l,d=Te(f=>f.avStream);let c=Te(f=>f.currentPage);c||(c=Eu({questionId:r,surveyId:i,next:f=>{n(f)},pages:t.pages,responseGroupUid:s,userId:a}));let h=c.headline,p=c.captionText;const y=aa(d,c);return sa(c)&&u&&(h=c.permissionDeniedHeadline,p=c.permissionDeniedCaptionText),Gn(c)&&y===Ye.Ready&&(h=c.permissionGrantedHeadline,p=c.permissionGrantedCaptionText),g("div",{className:B([e,"ul-center-horizontally",j.FadeInTransition]),children:[g(xe,{message:h,properties:{captionText:p}}),g(Au,{properties:t})]})},Nu={"{{user_id}}":"externalUserId","{{email}}":"email"},Mu=(e=void 0,t={})=>{if(!e)return e;let n=e;const r=[];for(const[l,u]of Object.entries(Nu))if(n.toLowerCase().includes(l))if(t[u]){const d=new RegExp(l,"gi");n=n.replace(d,t[u])}else r.push(l);if(r.length===0||!n.includes("?"))return n;const o=n.slice(0,n.indexOf("?")),s=n.slice(n.indexOf("?")+1).split("&").map(l=>l.split("=")).filter(l=>!r.includes(l[1]));if(s.length===0)return o;const a=s.map(l=>l.join("=")).join("&");return`${o}?${a}`},$u=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{visitorAttributes:s}=z(c=>({visitorAttributes:c.visitorAttributes})),a=(c,h=!1)=>{n({value:h?{skipped:!0}:void 0,questionId:o,type:i})},l=c=>{(c.key==="Enter"||c.key===" ")&&n({value:void 0,questionId:o,type:i})},u=()=>{const c=Mu(r&&r.buttonUrl,s);return g("div",{className:"ul-card-button-group",children:[g("a",{className:"ul-card-text__button ul-card__text-url-prompt-button",href:c,id:"ul-card-text__button",onClick:a,onKeyPress:l,rel:"noreferrer",role:c?"link":"button",tabIndex:0,target:"_blank",children:ht(r)}),r.required===!1&&g("button",{className:j.SkipButton,onClick:h=>a(h,!0),children:fo(r)})]})},d=(c,h)=>c?g("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:c},id:"ul-card__text-url-body-container"}):g("div",{className:"ul-rich-text-body",id:"ul-card__text-url-body-container",children:(h?h.split(/\n\s*\n/g):[]).map((p,y)=>g("p",{children:p},y))});return g("div",{className:B([e,"ul-card__text-url-prompt",j.FadeInTransition]),children:[g(xe,{message:t}),d(r==null?void 0:r.richTextBody,r==null?void 0:r.body),g(Ue,{defaultBody:u,properties:r})]},o)},Bu=({className:e,questionId:t})=>{const{border:n,destroy:r,endCard:o,forceBrandedLogo:i}=z(l=>({border:l.border,destroy:l.destroy,endCard:l.endCard,forceBrandedLogo:l.forceBrandedLogo}));pe(()=>{setTimeout(()=>{r(yt)},i?4e3:2e3)},[r,i]);const s=o&&o.subheader?g("p",{className:j.Caption,children:o.subheader}):null,a=o&&o.headline?o.headline:"";return g("div",{className:B([e,"ul-card--thanks",j.FadeInTransition]),children:g("div",{children:g("div",{className:"ul-card--thanks-content",children:[g("div",{className:"ul-thanks-check",children:g("svg",{"aria-labelledby":"title",fill:"none",height:"99",viewBox:"0 0 81 99",width:"81",xmlns:"http://www.w3.org/2000/svg",children:[g("path",{clipRule:"evenodd",d:"M40.5 77C60.9345 77 77.5 60.4345 77.5 40C77.5 19.5655 60.9345 3 40.5 3C20.0655 3 3.5 19.5655 3.5 40C3.5 60.4345 20.0655 77 40.5 77ZM80.5 40C80.5 62.0914 62.5914 80 40.5 80C18.4086 80 0.5 62.0914 0.5 40C0.5 17.9086 18.4086 0 40.5 0C62.5914 0 80.5 17.9086 80.5 40Z",fill:n,fillRule:"evenodd"}),g("path",{clipRule:"evenodd",d:"M55.025 22.9046C55.6299 23.4705 55.6616 24.4198 55.0956 25.0247C54.8724 25.2634 54.6109 25.5285 54.3157 25.8277C52.2547 27.9168 48.5549 31.667 44.8135 39.6658C43.2818 42.9406 42.0864 45.8386 41.0823 48.2729C40.6539 49.3116 40.2603 50.2659 39.8902 51.129C39.287 52.5359 38.7248 53.7508 38.1744 54.625C37.8997 55.0613 37.5806 55.4905 37.2017 55.8245C36.8201 56.1607 36.2613 56.5 35.5457 56.5C34.6742 56.5 34.0892 55.9692 33.7774 55.6083C33.4502 55.2296 33.1752 54.7511 32.9396 54.301C32.7305 53.9013 32.5088 53.4367 32.2797 52.9565C32.2429 52.8794 32.2059 52.8019 32.1688 52.7243C31.8942 52.1499 31.5959 51.534 31.2537 50.8868C29.8886 48.305 27.8539 45.2878 24.2343 43.1382C23.522 42.7152 23.2875 41.7949 23.7105 41.0826C24.1335 40.3703 25.0539 40.1358 25.7662 40.5588C30.0556 43.1062 32.4149 46.6647 33.9058 49.4845C34.2776 50.1876 34.5973 50.8487 34.8753 51.4302C34.9147 51.5124 34.9529 51.5926 34.9902 51.6707C35.2222 52.1567 35.4164 52.5637 35.5978 52.9102C35.6151 52.9434 35.6321 52.9754 35.6485 53.0061C36.0565 52.3531 36.5341 51.3434 37.133 49.9468C37.4781 49.1418 37.8572 48.2229 38.2761 47.2074C39.2886 44.7532 40.5339 41.7347 42.0961 38.3948C46.0591 29.9221 50.0641 25.8648 52.1535 23.7482C52.4423 23.4556 52.6944 23.2002 52.9048 22.9753C53.4708 22.3703 54.42 22.3387 55.025 22.9046ZM35.1994 53.5892C35.1994 53.5892 35.2 53.5888 35.2012 53.5879C35.2 53.5889 35.1994 53.5893 35.1994 53.5892ZM36.0666 53.6682C36.0732 53.674 36.0765 53.6775 36.0765 53.6777C36.0765 53.678 36.0732 53.6751 36.0666 53.6682Z",fill:n,fillRule:"evenodd"}),g("path",{d:"M69.5 97C69.5 98.1046 56.2924 99 40 99C23.7076 99 10.5 98.1046 10.5 97C10.5 95.8954 23.7076 95 40 95C56.2924 95 69.5 95.8954 69.5 97Z",fill:"black",fillOpacity:"0.2"})]})}),g(xe,{message:a}),s]})})},t)},pt="https://cdn.sprig.com",M={document:void 0,videojs:void 0},Uu=`/* progress control styles */ .video-js .vjs-control { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; } @@ -699,6 +689,5 @@ span.ul-button-text { .vjs-poster { background-size: cover; } -`,sd=e=>{const t=N.document.createElement("div");return t.className="ul-video-player-loading",t.id=bi(e),["first","second","third","fourth"].map(n=>{const r=N.document.createElement("div");r.className=n,t.appendChild(r)}),t},bi=e=>e+"-loading-spiner",ee="hidden",gs=".m3u8",xi="questionId",wi="ul-video-recorder-camera-off-button",Ci="ul-recording-in-session",ld=[{type:"link",content:`${vt}/dependencies/videojs-record-4.5.0.min.css`},{type:"script",content:`${vt}/dependencies/RecordRTC-5.6.2.js`},{type:"script",content:`${vt}/dependencies/adapter.8.0.0.min.js`},{type:"script",content:`${vt}/dependencies/videojs-record-4.5.0.min.js`},{type:"script",content:`${vt}/userleap-web-upchunk-v2.2.2.js`}],ys=[{type:"link",content:`${vt}/dependencies/video-js-7.18.0.min.css`},{type:"script",content:`${vt}/dependencies/video-js-7.18.0.min.js`},{type:"style",content:ad}],_s="-video-player",bs="-secondary-video-player",xs="-video-recorder";let De,ws;const nt=async({event:e,apiBase:t,headers:n,visitorId:r,envId:i,metadata:o})=>{const a=N.document.documentElement;if(!r||!i)return;const s={event:`SDK - ${e}`,visitorId:r,environmentId:i,metadata:{...o||{},screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:a.clientWidth,clientHeight:a.clientHeight,location:window.location.href,language:navigator.language}};(await fetch(`${t}/sdk/1/visitors/${r}/analytics`,{method:"POST",cache:"no-cache",headers:n,body:JSON.stringify(s)})).ok||console.warn("[Sprig] (ERR-444) Failed to track analytics",e)},Ke=async(e,t,n,r,i,o)=>{nt({event:`Video Error ${t}`,apiBase:n,headers:r,visitorId:i,envId:o,metadata:{errorMessage:e.message}});const a=N.document.documentElement,s={screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:a.clientWidth,clientHeight:a.clientHeight,location:window.location.href,language:navigator.language},l={action:t,err:{message:e.message,stack:e.stack},meta:s,vid:i,envId:o};(await fetch(`${n}/sdk/1/errors`,{method:"POST",cache:"no-cache",headers:{...r,"userleap-platform":"video_recorder","x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(l)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",e)},ud=(e,{type:t,content:n})=>new Promise(function(r,i){let o;t==="script"?(o=N.document.createElement("script"),o.src=n):t==="link"?(o=N.document.createElement("link"),o.rel="stylesheet",o.href=n,o.type="text/css"):(o=N.document.createElement("style"),o.innerHTML=n),o.onload=function(){r(n)},o.onerror=function(){i(n)},o.async=!1,o.id=btoa(n),e.appendChild(o)}),Cs=(e,t)=>{if(e.length===0)return t&&t();Promise.all(e.reduce((n,r)=>(n.push(ud(N.document.head,r)),n),[])).then(()=>{N.videojs=N.document.defaultView.videojs,t&&t()}).catch(function(n){console.log(n+" failed to load")})},ks=(e,t,n)=>{if(t==="start"&&(e.style.visibility="visible"),t==="none")e.style.visibility=ee;else if(t==="success")e.style.visibility=ee,e.innerHTML="Upload succeeded!";else{const r=Math.round(parseFloat(n));e.innerHTML=`Uploading ${r}%`,e.style.background=`linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${r}%, #FCFCFD ${r}%, #FCFCFD 100%)`}},ki=(e,t)=>{const n=N.videojs(e.id());return n==null?void 0:n.payload[t]},cd=(e,t,n,r,i)=>{const{surveyId:o,responseGroupUid:a,visitorId:s,envId:l}=e.payload;e.on("deviceError",function(){console.warn("device error: ",e.deviceErrorCode),e.deviceErrorCode.message==="Permission denied"?(e.deviceButton.addClass("permission-denied"),n&&n(V.ERROR,{type:V.PERMISSION_DENIED}),nt({event:"Video Permission Denied",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{questionId:ki(e,xi),responseGroupUid:a,surveyId:o}})):(n&&n(V.ERROR,{type:V.OTHER}),Ke(new Error(e.deviceErrorCode.message),"recorderDeviceError",t,i,s,l))}),e.on("error",function(c,u){Ke(u||e.error(),"recorderError",t,i,s,l)}),e.on("startRecord",function(c,u){r(e.uploadProgressLabel,"none"),nt({event:"Video Record Start",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{questionId:ki(e,xi),responseGroupUid:a,surveyId:o}})}),e.on("finishRecord",async function(){r(e.uploadProgressLabel,"start",0);const c=ki(e,xi);if(!o){const h="internal error: missing fields in payload";return n&&n(V.ERROR,{type:V.OTHER}),Ke(new Error(h),"finishRecord",t,i,s,l),null}e.record().stopDevice();const u=e.cameraOff?V.MEDIA_TYPE_AUDIO:V.MEDIA_TYPE_VIDEO,d=mn();nt({event:"Video Record Finish",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{mediaRecordingUid:d,questionId:c,responseGroupUid:a,surveyId:o,mediaType:u}});const f={surveyId:o,updatedAt:new Date().toISOString(),mediaType:u,mediaRecordingUid:d};c&&(f.questionId=c),a&&(f.responseGroupUid=a),s&&(f.visitorId=s);const p=await(async()=>{const h=await fetch(`${t}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});if(h.ok){const g=await h.json();return n&&n(V.UPLOAD_STARTED,{[V.UPLOAD_ID]:g.upload.id,[V.MEDIA_TYPE]:u,[V.MEDIA_RECORDING_UID]:d}),g.upload.url}else return n&&n(V.ERROR,{type:V.OTHER,response:h}),Ke(new Error("failed to get upload response with url"),"finishRecord",t,i,s,l),null})();!p||(De=N.document.defaultView.UpChunk.createUpload({endpoint:p,file:new N.document.defaultView.File([e.recordedData],`recording ${u} ${Date.now()}`),chunkSize:5120}),De.startTime=Date.now(),nt({event:"Video Upload Start",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{mediaRecordingUid:d,questionId:c,responseGroupUid:a,surveyId:o,mediaType:u,url:p}}),De.on("error",h=>{r(e.uploadProgressLabel,"none"),n&&n(V.UPLOAD_FINISHED,{[V.MEDIA_RECORDING_UID]:d}),Ke(h,"finishRecord",t,i,s,l)}),De.on("progress",h=>{n&&n(V.UPLOAD_PROGRESS,{[V.MEDIA_RECORDING_UID]:d,[V.UPLOAD_PROGRESS_PCT]:h.detail}),r(e.uploadProgressLabel,"progress",h.detail)}),De.on("success",()=>{r(e.uploadProgressLabel,"success"),n&&n(V.UPLOAD_FINISHED,{[V.MEDIA_RECORDING_UID]:d}),nt({event:"Video Upload Success",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{mediaRecordingUid:d,questionId:c,responseGroupUid:a,surveyId:o,mediaType:u,url:p,elapsedMs:De.startTime&&Date.now()-De.startTime}})}))})},Es=(e,t)=>{const n=new(N.videojs.getComponent("Component"))(e);return n.addClass("ul-buttons-panel"),t.map(r=>{n.addChild(r)}),dd(n),n},dd=e=>{e.children().forEach(t=>{if(we[t.name_]){const n=er(we[t.name_],`ul-${we[t.name_]}`);t.el_.appendChild(n)}})},er=(e,t="")=>{const n=N.document.createElement("span");return n.className="ul-button-text",n.innerHTML=e,n.id=t,n},Ss=(e,t,n,r,i=!1,o)=>{e.addClass("ul-video-player");const a=new(N.videojs.getComponent("Component"))(e);a.addClass("ul-control-panel"),e.progressBar=a.addChild("ProgressControl"),n&&e.src(n),e.audioPlayerPlaceholder=new(N.videojs.getComponent("Component"))(e),e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const s=n&&n.src?_d(n.src):null;n&&(i||!s)?(e.children()[0].classList.add("vjs-hidden"),N.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.audioPlayerPlaceholder.hide(),N.document.getElementById(`${e.id()}_html5_api`).style.height="100%",s&&e.poster(s)),e.on("play",()=>{!i&&n&&!s&&hd(e,!1),o==null||o.play()}),e.on("pause",()=>{o==null||o.pause()}),e.on("seeked",()=>{o==null||o.currentTime(e.currentTime())}),e.on("ratechange",()=>{o==null||o.playbackRate(e.playbackRate())}),e.addChild(e.audioPlayerPlaceholder,{},1),a.addChild(t),e.addChild(a),r&&r(e)},fd=(e,t,n)=>{e.addClass(`ul${bs}`);const r=new(N.videojs.getComponent("Component"))(e);t&&e.src(t),e.addChild(r),n&&n(e)},pd=(e,t,n,r,i,o,a,s=!1)=>{ws=Date.now();const c=tr(t,{controls:!1,bigPlayButton:!1,fluid:!1,width:1280,height:720,playsinline:!0,plugins:{record:{audio:!0,video:{mandatory:{minWidth:1280,minHeight:720}},frameWidth:1280,frameHeight:720,maxLength:600,autoMuteDevice:!0}}});if(!c)return;c.payload=n;const{surveyId:u,questionId:d,responseGroupUid:f,visitorId:v,envId:p}=n;let h;const g=L=>{const P=wi,M=wi+"-audio-only";ks(c.uploadProgressLabel,"none"),De&&De.startTime>=ws&&De.abort();const A=N.document.getElementById("ul-camera-button");L?(c.children()[0].classList.add("vjs-hidden"),w.removeClass(P),w.addClass(M),A.innerHTML=we.TurnOnCamera,c.audioPlayerPlaceholder.removeClass("vjs-hidden"),h==null||h.getTracks().forEach(j=>{j.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then(j=>{h=j,j.getVideoTracks().forEach(Z=>{Z.enabled=!1}),c.record().onDeviceReady(j)}).catch(c.record().onDeviceError.bind(c.record()))):(h==null||h.getVideoTracks().forEach(j=>{j.enabled=!0}),c.children()[0].classList.remove("vjs-hidden"),c.record().getDevice(),w.removeClass(M),w.addClass(P),A.innerHTML=we.TurnOffCamera,c.audioPlayerPlaceholder.addClass("vjs-hidden"))},_=new(N.videojs.getComponent("Button"))(c,{clickHandler:()=>{_.hasClass(ee)||(nt({event:"Video Delete Button Clicked",apiBase:r,headers:a,visitorId:v,envId:p,metadata:{questionId:d,responseGroupUid:f,surveyId:u}}),g(c.cameraOff),i(V.DELETE,{}),w.removeClass(ee),_.addClass(ee))}});_.addClass("ul-video-recorder-delete-button"),_.el_.appendChild(er(we.DeleteButton,"ul-delete-button"));const b=N.document.getElementById(t),x=()=>{b.classList.contains("vjs-fullscreen")&&c.cameraOff?b.style.display="table":b.style.display="flex"};x();const w=new(N.videojs.getComponent("Button"))(c,{clickHandler:()=>{c.record().isRecording()||(c.cameraOff=!c.cameraOff,nt({event:"Video Camera Button Clicked",apiBase:r,headers:a,visitorId:n.visitorId,envId:n.envId,metadata:{questionId:d,responseGroupUid:f,surveyId:u,cameraOff:c.cameraOff}}),g(c.cameraOff),!_.hasClass(ee)&&_.addClass(ee),i(V.DELETE,{}),x())}});w.addClass(wi),w.el_.appendChild(er(we.TurnOffCamera,"ul-camera-button"));const m=new(N.videojs.getComponent("Button"))(c,{clickHandler:()=>{const L=N.document.getElementById("ul-recorder-toggle");if(c.record().isRecording())c.record().stop(),L&&(L.innerHTML=we.RecordButton),m.removeClass(Ci),_.removeClass(ee);else{const P=N.document.getElementById("ul-recording-countdown-screen");if(P)P.remove(),L&&(L.innerHTML=we.RecordButton),g(c.cameraOff),i(V.DELETE,{}),w.removeClass(ee),_.addClass(ee),m.removeClass(Ci),k.show();else{m.addClass(Ci),k.hide(),w.addClass(ee),_.addClass(ee),L&&(L.innerHTML=we.StopButton);const M=N.document.createElement("div");M.id="ul-recording-countdown-screen",b.insertBefore(M,b.children[1]),M.style.height=`${b.offsetHeight}px`,Ts(c,3)}}}});m.addClass("ul-video-recorder-toggle-button"),m.el_.appendChild(er(we.RecordButton,"ul-recorder-toggle"));const C=N.document.createElement("p");C.style.visibility="hidden",C.className="ul-upload-progress-label",e.appendChild(C),c.uploadProgressLabel=C;const S=Es(c,[_,w,"PlayToggle",m,"FullscreenToggle"]),k=S.children().find(L=>L.name_==="FullscreenToggle");k.hasClass("vjs-disabled")&&k.hide();const E=S.children().find(L=>L.name_==="PlayToggle");E.hide(),o&&w.addClass(ee),!o&&_.addClass(ee),Ss(c,S,o,!1,s),c.on("stopRecord",()=>{m.hide(),E.show(),k.show(),_.removeClass(ee)}),c.on("deviceReady",()=>{m.show(),E.hide(),_.addClass(ee)}),cd(c,r,i,ks,a),o&&(c.deviceButton&&c.deviceButton.hide(),c.src(o),E.show(),m.hide(),_.removeClass(ee));const R=[{name:"microphone"}];!c.cameraOff&&R.push({name:"camera"}),Promise.all(R.map(L=>{var P;return(P=navigator==null?void 0:navigator.permissions)==null?void 0:P.query(L)})).then(L=>{L.reduce((M,A)=>M&A.state==="granted",!0)&&c&&(c.deviceButton&&c.deviceButton.hide(),!o&&c.record().getDevice())}).catch(L=>{})},Ts=(e,t=3)=>{const n=N.document.getElementById("ul-recording-countdown-screen");n&&t===0?(n.remove(),e.record().start()):n&&(n.innerHTML=`Recording in... ${t}`,setTimeout(()=>{Ts(e,t-1)},1e3))},Ps=e=>{const t=N.document.createElement("div");return t.className="ul-video-container",t.appendChild(sd(e)),t},Ei=(e,t)=>{const n=N.document.createElement("video");n.id=e,n.className="video-js vjs-default-skin ul-video-player-video";const r=N.document.createElement("p");r.className="vjs-no-js",r.innerHTML="To view this video please enable JavaScript, and consider upgrading to a web browser that";const i=N.document.createElement("a");return i.href="https://videojs.com/html5-video-support/",i.target="_blank",i.innerHTML="supports HTML5 video",r.appendChild(i),n.appendChild(r),t.appendChild(n),t},hd=(e,t)=>{t?(e.children()[0].classList.add("vjs-hidden"),e.audioPlayerPlaceholder.show(),N.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),N.document.getElementById(`${e.id()}_html5_api`).style.height="100%")},tr=(e,t)=>N.document.getElementById(e)?t?N.videojs(e,t):N.videojs(e):(console.error(`Error in finding player element with ID, ${e}`),null),vd=(e,t,n,r=!1,i="https://api.sprig.com",o=document,a=null,s=null)=>{N.document=o;const l=e+_s,c=Ps(l);return N.document.addEventListener("securitypolicyviolation",u=>{Ke(new Error(`Voice & Video feature violates ${u.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",i,{})}),Cs(ys,()=>{N.document.getElementById(bi(l)).remove(),Ei(l,c);const u={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const d=e+bs;Ei(d,c);const f=tr(l,u),v=tr(d,{muted:!0,...u});if(!f||!v)return;fd(v,a,s),a||v.addClass(ee);const p=Es(f,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),h=p.children().find(g=>g.name_==="FullscreenToggle");h.hasClass("vjs-disabled")&&h.hide(),Ss(f,p,t,n,r,v)}catch(d){Ke(new Error(`Error when creating video player object ${d}`),"playerDeviceError",i,{});return}}),c},md=(e,t={},n="https://api.userleap.com",r,i,o,a=!1,s=document)=>{N.document=s;const l=e+xs,c=Ps(l);return N.document.addEventListener("securitypolicyviolation",u=>{Ke(new Error(`Voice & Video feature violates ${u.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",n,o,t.visitorId,t.envId)}),Cs(ys.concat(ld),()=>{Ei(l,c),N.document.getElementById(bi(l)).remove();try{pd(c,l,t,n,r,i,o,a)}catch(u){Ke(new Error(`Error when creating video recorder player object ${u}`),"recorderDeviceError",n,o,t.visitorId,t.envId);return}}),c},gd=e=>{const t=e+xs;if(!!N.document.getElementById(t)&&!!N.videojs){try{if(!N.videojs(t).record().stream)return}catch{return}N.videojs(t).record().stop(),N.videojs(t).record().stopDevice()}},yd=e=>{const t=tr(e+_s);t==null||t.pause()},_d=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let n=t?t[1]:null;return n.includes(gs)&&(n=n.replace(gs,"")),n?`https://image.mux.com/${n}/thumbnail.jpg?time=0`:null},V={UPLOAD_STARTED:"upload.started",UPLOAD_PROGRESS:"upload.progress",UPLOAD_FINISHED:"upload.finished",DELETE:"delete",ERROR:"error",MEDIA_TYPE:"media.type",PERMISSION_DENIED:"permission_denied",OTHER:"other",UPLOAD_ID:"upload.id",UPLOAD_PROGRESS_PCT:"upload.progress.pct",MEDIA_RECORDING_UID:"media.recording.uid",MEDIA_TYPE_VIDEO:"video",MEDIA_TYPE_AUDIO:"audio"},we={PlaybackRateMenuButton:"Speed",PlayToggle:"Play",FullscreenToggle:"Expand",TurnOnCamera:"Turn on",TurnOffCamera:"Turn off",DeleteButton:"Delete",RecordButton:"Record",StopButton:"Stop",PauseButton:"Pause"},un="ul-card-video__player_recorder",bd="ul-card-video__skip_button",xd="ul-video-interview-form",Is="ul-video-btn",wd=({className:e,message:t,next:n,properties:r,questionId:i,type:o})=>{const{apiURL:a,envId:s,handleUploadUpdate:l,headers:c,responseGroupUid:u,surveyId:d,viewDocument:f,visitorId:v}=G(P=>({apiURL:P.apiURL,envId:P.envId,handleUploadUpdate:P.handleUploadUpdate,headers:P.headers,responseGroupUid:P.responseGroupUid,surveyId:P.surveyId,viewDocument:P.viewDocument,visitorId:P.userId})),[p,h]=ne(!1),[g,_]=ne(null),[b,x]=ne(null),[w,m]=ne(0),C=r&&r.videoUrl,S=(P,M)=>{P===V.UPLOAD_STARTED?(_(M[V.UPLOAD_ID]),x(M[V.MEDIA_RECORDING_UID]),h(!0)):P===V.DELETE?(_(null),x(null),h(!1)):P===V.UPLOAD_PROGRESS?isNaN(M[V.UPLOAD_PROGRESS_PCT])?l({mediaRecordingUid:M[V.MEDIA_RECORDING_UID],isComplete:!0}):l({mediaRecordingUid:M[V.MEDIA_RECORDING_UID],progressPct:M[V.UPLOAD_PROGRESS_PCT]}):P===V.UPLOAD_FINISHED&&l({mediaRecordingUid:M[V.MEDIA_RECORDING_UID],isComplete:!0})},k=P=>{if(P&&P.children.length===0){const M=vd(un,{src:C,type:"application/x-mpegURL"},void 0,r.mediaType===V.MEDIA_TYPE_AUDIO,a,f);P.appendChild(M)}},E=P=>{if(P&&P.children.length===0){const M=md(un,{surveyId:d,responseGroupUid:u,questionId:i,visitorId:v,envId:s},a,S,void 0,{...c,"x-ul-video-recorder-origin":"sdk"},r.mediaType===V.MEDIA_TYPE_AUDIO,f);P.appendChild(M)}},R=P=>{P.preventDefault(),P.stopPropagation(),gd(un),g&&b?(l({mediaRecordingUid:b,isSubmitted:!0}),n({value:{mediaRecordingUid:b},questionId:i,type:o})):n({value:null,questionId:i,type:o})},L=()=>y(et,{defaultBody:()=>y("button",{className:`${Is} ul-record-response-btn`,onClick:P=>{P.preventDefault(),P.stopPropagation(),yd(un),m(1)}}),properties:r});return y("form",{className:$([e,O.VideoCard,O.FadeInTransition]),id:xd,children:[y(Re,{message:t,properties:r}),y("div",{id:"ul-card-voice__video",children:[y("div",{children:[y("div",{id:"ul-question-player-container",style:{display:w===0?"":"none"},children:[y("div",{id:un,ref:k}),L()]}),y("div",{style:{display:w===1?"block":"none"},children:[y("button",{className:`${Is} ul-back-question-btn`,onClick:P=>{P.preventDefault(),P.stopPropagation(),m(0)}}),y("div",{id:"ul-recorder-player-container",ref:E})]})]}),y(pe,{disabled:!p,onClick:R,children:Mt(r)}),y("button",{className:`ul-card-text__button ${O.InactiveButton} ${O.SkipButton}`,id:bd,onClick:R,style:{display:r.required?"none":"block",...p?{display:"none"}:{}},children:vi(r)})]})]})},Cd=({className:e})=>{const{uploadProgress:t}=G(o=>({uploadProgress:o.uploadProgress}));let n,r;Object.values(t).filter(o=>o.isSubmitted).length>1?(n="Your responses are processing",r="Please keep this tab open until your responses are fully processed."):(n="Your response is processing",r="Please keep this tab open until your response is fully processed.");const i=Math.round(Math.min(99,...Object.values(t).filter(o=>o.isSubmitted).map(o=>o.progressPct)));return y("div",{className:$([e,"ul-card--uploading",O.FadeInTransition]),children:[y("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:O.LoadingSpinnerContainer,role:"progressbar",children:y("div",{className:O.LoadingSpinner,children:[y("div",{className:O.LoadingSpinnerFirst}),y("div",{className:O.LoadingSpinnerSecond}),y("div",{className:O.LoadingSpinnerThird}),y("div",{className:O.LoadingSpinnerFourth})]})}),y(Re,{message:`${n} (${i}% complete)`}),y("p",{className:O.Caption,children:r})]})},Rs=({logoOnly:e=!1,style:t={}})=>y("svg",{alt:`${e?"Powered by ":""}Sprig`,width:e?"35":"112",height:"15",viewBox:e?"79 0 31 15":"0 0 112 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",...t},children:[!e&&y("path",{d:"M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.7812 4.99121 44.9619 6.38135 44.9619 8.45068V8.93311H40.0742C40.0996 10.2534 40.8232 11.0215 41.9595 11.0215C42.8418 11.0215 43.3687 10.5835 43.5337 10.228L43.5591 10.1772L44.8857 10.1709L44.873 10.228C44.6445 11.1357 43.6924 12.1514 41.9277 12.1514ZM41.8643 6.12109C40.9248 6.12109 40.2139 6.76221 40.0933 7.94922H43.5972C43.4893 6.71777 42.7974 6.12109 41.8643 6.12109ZM49.1133 12.1323C47.3804 12.1323 46.2568 10.7422 46.2568 8.57764V8.56494C46.2568 6.38135 47.3613 5.00391 49.1133 5.00391C50.0591 5.00391 50.8652 5.47363 51.2334 6.21631H51.3413V2.42041H52.7124V12.0181H51.3413V10.9326H51.2334C50.8335 11.688 50.0781 12.1323 49.1133 12.1323ZM49.5068 10.958C50.6558 10.958 51.3604 10.0503 51.3604 8.57764V8.56494C51.3604 7.09229 50.6494 6.18457 49.5068 6.18457C48.3516 6.18457 47.6597 7.08594 47.6597 8.56494V8.57764C47.6597 10.0566 48.3516 10.958 49.5068 10.958ZM61.98 12.1323C61.0151 12.1323 60.2598 11.688 59.8599 10.9326H59.7583V12.0181H58.3809V2.42041H59.7583V6.21631H59.8599C60.228 5.47363 61.0342 5.00391 61.98 5.00391C63.7319 5.00391 64.8364 6.38135 64.8364 8.56494V8.57764C64.8364 10.7422 63.7192 12.1323 61.98 12.1323ZM61.5928 10.958C62.7417 10.958 63.4336 10.0566 63.4336 8.57764V8.56494C63.4336 7.08594 62.7417 6.18457 61.5928 6.18457C60.4438 6.18457 59.7329 7.09229 59.7329 8.56494V8.57764C59.7329 10.0503 60.4438 10.958 61.5928 10.958ZM66.8867 14.4429C66.7153 14.4429 66.5122 14.4302 66.3345 14.4111V13.3257C66.4678 13.3447 66.6392 13.3511 66.7979 13.3511C67.439 13.3511 67.8262 13.0781 68.0293 12.3799L68.1309 12.0244L65.6299 5.12451H67.1152L68.8418 10.6343H68.9624L70.6826 5.12451H72.1299L69.5654 12.2847C68.9814 13.9287 68.2832 14.4429 66.8867 14.4429Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M81.1088 6.63629C79.6878 6.32154 78.9672 5.76865 78.9672 4.99369C78.9672 4.19299 79.736 3.5886 80.7556 3.5886C81.8066 3.5886 82.5995 4.25285 82.5995 5.13336V5.20352H84.0518V5.13336C84.0518 3.52424 82.6405 2.30774 80.7693 2.30774C79.8676 2.30774 79.0414 2.58451 78.4433 3.08655C78.1463 3.33144 77.9077 3.63818 77.7448 3.98479C77.5818 4.33141 77.4984 4.70934 77.5005 5.09153C77.4946 5.44197 77.5675 5.78934 77.714 6.10857C77.8605 6.42779 78.0769 6.71092 78.3475 6.93752C78.8512 7.37584 79.5659 7.70024 80.4709 7.90299C81.9949 8.23898 82.7676 8.81054 82.7676 9.60094C82.7676 10.4576 81.9258 11.1032 80.813 11.1032C79.6571 11.1032 78.7854 10.3856 78.7854 9.43424V9.36408H77.3318V9.43424C77.3318 11.1167 78.8219 12.3847 80.7973 12.3847C81.7421 12.3847 82.6093 12.0983 83.2393 11.5769C83.5519 11.3237 83.8034 11.0048 83.9753 10.6433C84.1472 10.2818 84.2352 9.88702 84.2329 9.48766C84.2329 8.05875 83.1833 7.09907 81.1088 6.63629Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M89.2394 4.68276C88.6963 4.67605 88.1596 4.79915 87.6751 5.04156C87.1905 5.28397 86.7725 5.63851 86.4566 6.07497V4.85204H85.0747V14.8479H86.4566V11.0356C86.7725 11.472 87.1906 11.8265 87.6751 12.0688C88.1596 12.3111 88.6963 12.434 89.2394 12.4272C91.3836 12.4272 93 10.7627 93 8.55495C93 6.34723 91.3836 4.68276 89.2394 4.68276ZM91.5608 8.84202C91.5057 9.41605 91.2512 9.95356 90.8406 10.3633C90.4299 10.773 89.8883 11.0296 89.3078 11.0896C88.5363 11.1669 87.8177 10.9461 87.2841 10.4692C86.7505 9.99222 86.4566 9.3106 86.4566 8.55495C86.4566 7.10159 87.5538 6.00546 89.0087 6.00546C89.7619 6.00546 90.4421 6.29124 90.9171 6.81002C91.407 7.34232 91.6357 8.06385 91.5608 8.84202Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M109.95 4.85407V6.06349C109.298 5.18298 108.292 4.68286 107.153 4.68286C105.017 4.68286 103.406 6.31709 103.406 8.48426C103.406 10.6514 105.017 12.285 107.153 12.285C108.296 12.285 109.303 11.79 109.95 10.9185V11.1046C109.95 12.6101 108.993 13.5826 107.513 13.5826C106.513 13.5826 105.68 13.1494 105.284 12.424L105.264 12.3867H103.838L103.871 12.48C104.112 13.1892 104.583 13.8001 105.211 14.2179C105.841 14.6324 106.637 14.8512 107.513 14.8512C108.637 14.8512 109.594 14.4972 110.28 13.8285C110.967 13.1597 111.332 12.2194 111.332 11.1213V4.85407H109.95ZM109.175 10.3502C108.588 10.905 107.752 11.138 106.879 10.9887C106.361 10.8984 105.886 10.6475 105.523 10.2725C105.16 9.89751 104.927 9.41787 104.859 8.90328C104.736 8.03757 104.999 7.21756 105.581 6.655C106.069 6.19093 106.723 5.93643 107.401 5.94699C107.565 5.94713 107.729 5.96026 107.891 5.98625C108.946 6.15489 109.781 7.01609 109.921 8.0852C110.039 8.96507 109.766 9.78958 109.175 10.3502Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M101.89 2.12378C101.63 2.06766 101.358 2.11486 101.133 2.25518C100.908 2.39551 100.747 2.61769 100.687 2.87371C100.626 3.12973 100.67 3.39902 100.809 3.62339C100.947 3.84775 101.17 4.00917 101.428 4.07275C101.503 4.08936 101.58 4.09778 101.657 4.09786C101.906 4.09824 102.146 4.0083 102.331 3.84518C102.517 3.68206 102.636 3.45714 102.664 3.21327C102.693 2.9694 102.63 2.72361 102.487 2.5227C102.344 2.32179 102.132 2.17981 101.89 2.12378Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M100.967 10.934H99.7755C98.9285 10.934 98.4196 10.3644 98.4196 9.40982C98.4196 8.4791 98.8757 7.36945 99.8054 6.01778L99.8178 5.99976V5.61807L95.8571 5.06453C95.8585 4.90331 95.8162 4.74466 95.7346 4.60501C95.653 4.46536 95.5352 4.34979 95.3932 4.27027C95.0381 4.07718 94.6498 4.07717 94.3279 4.26383C94.1667 4.35799 94.035 4.4945 93.9476 4.65816C93.8602 4.82182 93.8205 5.00623 93.8328 5.19087C93.8452 5.37552 93.9092 5.55315 94.0176 5.70402C94.1261 5.85489 94.2748 5.97309 94.4472 6.04546L93.2151 12.258H94.5833L95.7196 6.35891L97.8593 6.7155C97.284 7.73439 96.9921 8.68442 96.9921 9.53919C96.9921 11.1168 97.9577 12.1498 99.5187 12.2496V12.258H102.346V4.87723H100.967V10.934Z",fill:"black",fillOpacity:"0.7"})]}),kd=()=>{const{border:e,cards:t,forceBrandedLogo:n,headers:r,index:i,marketingUrl:o,showSurveyBrand:a,slugName:s,surveyId:l,viewedCardCount:c}=G(x=>({border:x.border,cards:x.cards,forceBrandedLogo:x.forceBrandedLogo,headers:x.headers,index:x.index,marketingUrl:x.marketingUrl,showSurveyBrand:x.showSurveyBrand,slugName:x.slugName,surveyId:x.surveyId,viewedCardCount:x.viewedCardCount})),u=We(null),d=t.filter(x=>x.type!==T.Uploading&&x.type!==T.Thanks),f=Pc(t,i),v=c+1,p=v/(v+f),h=`${o}?utm_source=survey_branding&utm_medium=website&utm_campaign=${s}&utm_content=${l}${n&&"&utm_term=poweredby_pill"}`;ge(()=>{u.current&&(u.current.style.width=`${p*100}%`)},[p]);const g=()=>y(he,{children:[d.length>1&&y("div",{id:"ul-progress-bar-container",children:y("div",{id:"ul-progress-bar-current",ref:u,style:{border:`1px solid ${e||"#000"}`}})}),a?y("div",{className:n?"yellow-footer-logo":"",style:{marginTop:"4px"},children:y("a",{href:h,rel:"noreferrer",target:"_blank",children:y("div",{style:{display:"flex"},children:[y(Rs,{logoOnly:!1}),n&&y(As,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}):null]}),_=()=>y("a",{dir:"ltr",href:h,rel:"noreferrer",target:"_blank",children:y("div",{className:"thank-you-card-link",children:[y("div",{className:"sprig-box-logo",children:y(Rs,{logoOnly:!0,style:{margin:"auto"}})}),y("div",{children:y("p",{children:["Capture insights about your own product",y(As,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}),b=t[i].type===T.Thanks;return y("footer",{className:`ul-footer ${r["userleap-platform"]==="link"?"ul-footer__link":""}`,style:a?{}:{marginBottom:"10px"},children:b&&n?_():g()})},As=({style:e})=>y("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[y("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),y("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),Ed=()=>{const{answers:e,border:t,cards:n,close:r,configureExitOnOverlayClick:i,destroy:o,endCard:a,eventEmitFn:s,fontFamily:l,headers:c,index:u,next:d,showStripes:f,update:v,useMobileStyling:p,viewDocument:h}=G(A=>({answers:A.answers,border:A.border,cards:A.cards,close:A.close,configureExitOnOverlayClick:A.configureExitOnOverlayClick,destroy:A.destroy,endCard:A.endCard,eventEmitFn:A.eventEmitFn,fontFamily:A.fontFamily,headers:A.headers,index:A.index,next:A.next,showStripes:A.showStripes,update:A.update,useMobileStyling:A.useMobileStyling,viewDocument:A.viewDocument})),g=We(null),_=We(!1),b=c["userleap-platform"],{props:x,type:w,name:m}=n[u],C=n.length;ge(()=>{g.current&&(g.current.classList.contains("ul-app--visible")||g.current.classList.add("ul-app--visible"),!_.current&&s&&(_.current=!0,s(Se.SurveyAppeared)))},[s]),ge(()=>{v()},[u,v]),ge(()=>{i(()=>r())},[r,i]);const S=()=>r(_t),k=A=>{A.key==="Enter"&&S()},E=async function(A){d({data:A,completeSurvey:()=>{o(_t)},endCard:a}),Hs(h)};if(e){for(const A of e)if(A.questionId===m){let j;if(w===T.MultipleChoice){const Z=x.options.find(({value:le})=>le===A.value);if(!Z)break;j={[Z.id]:Z.value}}else j=A.value;E({value:j,type:w,questionId:A.questionId});break}}const R=()=>[bt.Email,bt.Link].includes(c["userleap-platform"])?!1:!a||u+1!==C,L=()=>p?{borderColor:t}:{borderColor:t,margin:"15px"},P=()=>{const A={className:"ul-card",next:E,questionId:m,type:w};switch(w){case T.ConsentLegal:return Y(Nc,{...A,...x,key:m});case T.Likert:return Y(Vc,{...A,...x,key:m});case T.MultipleChoice:return Y(Fc,{...A,...x,key:m});case T.MultipleSelect:return Y(Hc,{...A,...x,key:m});case T.NPS:return Y($c,{...A,key:m,props:x});case T.Open:return Y(Kc,{...A,...x,key:m});case T.RecordedTask:return Y(td,{...A,...x,key:m});case T.TextUrlPrompt:return Y(id,{...A,...x,key:m});case T.Thanks:return Y(od,{...A,...x,key:m});case T.Uploading:return Y(Cd,{...A,...x,key:m});case T.VideoVoice:return Y(wd,{...A,...x,key:m});default:return null}},M=A=>{var Ce;const j=window.sprigAPI,Z=A.target;if(!j||!Z)return;const le=[Z,Z.parentElement];for(const ue of le)if(((Ce=ue==null?void 0:ue.tagName)==null?void 0:Ce.toLowerCase())==="a"){A.preventDefault(),j==null||j.openUrl(ue.href);return}};return y("div",{className:$("ul-app",Vt(c)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:_t,onClick:M,ref:g,style:{"--theme":t,...l?{fontFamily:l.replace(";","")}:{}},children:y("div",{className:"ul-app__container",children:y("div",{className:$(X(O.CardContainer,p)),style:L(),children:[R()&&y("div",{className:$(X(O.CloseContainer,p)),children:y("div",{"aria-label":"Close button",className:O.CloseButton,onClick:S,onKeyPress:k,role:"button",tabIndex:0,children:y("svg",{fill:"none",height:"18px",viewBox:"0 0 13 13",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:y("path",{d:"M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z",fill:"#262136"})})})}),f&&y("div",{className:"ul-header__container",dir:"ltr",children:y("div",{className:"ul-header",children:"For development purposes only"})}),y("div",{className:$(Ks(O.CardMainContent,b)),children:P()}),y(kd,{})]})})})},Sd=`html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;margin:auto}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.ul-card__container{background:#ffffff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;overflow:auto;padding:20px 20px 5px;position:relative;text-align:center;word-break:break-word}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;margin-bottom:3px;display:flex;gap:16px;justify-content:center}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email{flex-grow:55;display:flex}.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{margin-bottom:5px}.ul-question{color:#343442;display:block;font-size:20px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-caption{flex:1 0 auto;margin-top:8px;margin-bottom:15px;font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.select-checkbox{height:16px;width:16px;border-radius:3px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 3px 3px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.fade-in-transition{animation:fadeIn .4s ease-in;-webkit-animation:fadeIn .4s ease-in;-moz-animation:fadeIn .4s ease-in;-o-animation:fadeIn .4s ease-in;-ms-animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-ms-keyframes fadeIn{0%{opacity:0}to{opacity:1}}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{box-shadow:unset;border-radius:unset;border:none!important;position:unset}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:rgba(0,0,0,.01);box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:white}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-text{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:rgba(0,0,0,.01);box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:white}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}#ul-card-voice__video{align-items:center;display:flex;flex-direction:column}#ul-card-voice__video>div{margin-bottom:10px;width:100%}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#ffffff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:30px;justify-content:center}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;left:0;position:absolute;top:0;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:auto;flex-grow:1;width:100%}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:rgba(0,0,0,.01);border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:rgba(0,0,0,.03)}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:rgba(249,198,0,1);border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%}.close-btn{cursor:pointer;height:18px;margin-inline-end:-10px;position:relative;top:-10px;width:18px;z-index:1}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}#ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px;max-width:250px;margin:25px 0}#ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{width:100%;background:rgba(0,0,0,.01);border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:1;margin:0;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer} -`,Td=(e,t)=>{const n=[...e],r=new Set([T.VideoVoice,T.RecordedTask]);return e.some(i=>r.has(i.type))&&n.push({name:-2,props:{routingOptions:[]},type:T.Uploading}),t&&n.push({name:-1,props:{routingOptions:[]},type:T.Thanks}),n},Pd=({mode:e=null,viewWindow:t,viewDocument:n})=>{const r=n.documentElement;return{mode:e,sw:t.screen.width,sh:t.screen.height,cw:r.clientWidth,ch:r.clientHeight,p:t.location.href,l:t.navigator.language}};function Id(e,t=!0){var m;const{answers:n,apiURL:r,customStyles:i,endCard:o,eventEmitFn:a,fontFamilyURL:s,frame:l,previewKey:c,viewDocument:u,viewWindow:d}=e,f=Vt(e.headers)?e.frame:u.body,v=e.UpChunk||window.UpChunk,p=hn,h=Td(e.cards,!!o);Zn.configure(p,{cards:h,hasEndCard:!!o,apiURL:r,UpChunk:v}),G.setState({apiURL:r,answers:n,border:e.border,index:e.startingQuestionIdx||0,cards:h,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:a,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:l,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:Pd({mode:e.mode,viewWindow:d,viewDocument:u}),mode:e.mode,previewKey:c,recorder:Zn,recorderEventEmitter:p,responseGroupUid:e.responseGroupUid,showStripes:e.showStripes,showSurveyBrand:e.showSurveyBrand,slugName:e.slugName,styleNonce:e.styleNonce,surveyId:e.surveyId,tabTitle:e.tabTitle,uploadingCardViewed:!1,uploadProgress:{},useMobileStyling:e.useMobileStyling,useDesktopPrototype:e.useDesktopPrototype,userId:e.userId,viewDocument:e.viewDocument,visitorAttributes:e.visitorAttributes,viewedCardCount:e.startingQuestionIdx||0});const{seen:g}=G.getState();g();const{head:_}=u,b=u.createElement("style");if(b.id="sprig-style",b.textContent=Sd,b.nonce=e.styleNonce,_.appendChild(b),e.fontFamily&&s&&parent){const C=u.createElement("link");C.rel="stylesheet",C.href=s,_.appendChild(C)}if(e.customStyles&&Vs(u,i,e.styleNonce),!v)if(e.installationMethod!==xt.Npm){const C=u.createElement("script");C.src="https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js",C.onload=()=>{Zn.setUpChunk(d.UpChunk)},C.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},_.appendChild(C)}else console.warn("[Sprig] - recording functionality not configured due to missing UpChunk dependency");const x="2.24.12-beta.0",w=a||((m=l.eventEmitter)==null?void 0:m.emit);w==null||w(Te.VerifyViewVersion,{[yt.ViewVersion]:x}),f&&t&>(y(Ed,{}),f)}({configure:Id}).configure(window.__cfg)}); -//# sourceMappingURL=sprig-web-view-sdk-v2.24.12-beta.0.js.map +`,Vu=e=>{const t=M.document.createElement("div");return t.className="ul-video-player-loading",t.id=_o(e),["first","second","third","fourth"].map(n=>{const r=M.document.createElement("div");r.className=n,t.appendChild(r)}),t},_o=e=>e+"-loading-spiner",ee="hidden",pa=".m3u8",bo="questionId",xo="ul-video-recorder-camera-off-button",wo="ul-recording-in-session",Fu=[{type:"link",content:`${pt}/dependencies/videojs-record-4.5.0.min.css`},{type:"script",content:`${pt}/dependencies/RecordRTC-5.6.2.js`},{type:"script",content:`${pt}/dependencies/adapter.8.0.0.min.js`},{type:"script",content:`${pt}/dependencies/videojs-record-4.5.0.min.js`},{type:"script",content:`${pt}/userleap-web-upchunk-v2.2.2.js`}],fa=[{type:"link",content:`${pt}/dependencies/video-js-7.18.0.min.css`},{type:"script",content:`${pt}/dependencies/video-js-7.18.0.min.js`},{type:"style",content:Uu}],ma="-video-player",ga="-secondary-video-player",va="-video-recorder";let Ie,ya;const Qe=async({event:e,apiBase:t,headers:n,visitorId:r,envId:o,metadata:i})=>{const s=M.document.documentElement;if(!r||!o)return;const a={event:`SDK - ${e}`,visitorId:r,environmentId:o,metadata:{...i||{},screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:s.clientWidth,clientHeight:s.clientHeight,location:window.location.href,language:navigator.language}};(await fetch(`${t}/sdk/1/visitors/${r}/analytics`,{method:"POST",cache:"no-cache",headers:n,body:JSON.stringify(a)})).ok||console.warn("[Sprig] (ERR-444) Failed to track analytics",e)},Ve=async(e,t,n,r,o,i)=>{Qe({event:`Video Error ${t}`,apiBase:n,headers:r,visitorId:o,envId:i,metadata:{errorMessage:e.message}});const s=M.document.documentElement,a={screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:s.clientWidth,clientHeight:s.clientHeight,location:window.location.href,language:navigator.language},l={action:t,err:{message:e.message,stack:e.stack},meta:a,vid:o,envId:i};(await fetch(`${n}/sdk/1/errors`,{method:"POST",cache:"no-cache",headers:{...r,"userleap-platform":"video_recorder","x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(l)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",e)},Hu=(e,{type:t,content:n})=>new Promise(function(r,o){let i;t==="script"?(i=M.document.createElement("script"),i.src=n):t==="link"?(i=M.document.createElement("link"),i.rel="stylesheet",i.href=n,i.type="text/css"):(i=M.document.createElement("style"),i.innerHTML=n),i.onload=function(){r(n)},i.onerror=function(){o(n)},i.async=!1,i.id=btoa(n),e.appendChild(i)}),_a=(e,t)=>{if(e.length===0)return t&&t();Promise.all(e.reduce((n,r)=>(n.push(Hu(M.document.head,r)),n),[])).then(()=>{M.videojs=M.document.defaultView.videojs,t&&t()}).catch(function(n){console.log(n+" failed to load")})},ba=(e,t,n)=>{if(t==="start"&&(e.style.visibility="visible"),t==="none")e.style.visibility=ee;else if(t==="success")e.style.visibility=ee,e.innerHTML="Upload succeeded!";else{const r=Math.round(parseFloat(n));e.innerHTML=`Uploading ${r}%`,e.style.background=`linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${r}%, #FCFCFD ${r}%, #FCFCFD 100%)`}},ko=(e,t)=>{const n=M.videojs(e.id());return n==null?void 0:n.payload[t]},qu=(e,t,n,r,o)=>{const{surveyId:i,responseGroupUid:s,visitorId:a,envId:l}=e.payload;e.on("deviceError",function(){console.warn("device error: ",e.deviceErrorCode),e.deviceErrorCode.message==="Permission denied"?(e.deviceButton.addClass("permission-denied"),n&&n(U.ERROR,{type:U.PERMISSION_DENIED}),Qe({event:"Video Permission Denied",apiBase:t,headers:o,visitorId:a,envId:l,metadata:{questionId:ko(e,bo),responseGroupUid:s,surveyId:i}})):(n&&n(U.ERROR,{type:U.OTHER}),Ve(new Error(e.deviceErrorCode.message),"recorderDeviceError",t,o,a,l))}),e.on("error",function(u,d){Ve(d||e.error(),"recorderError",t,o,a,l)}),e.on("startRecord",function(u,d){r(e.uploadProgressLabel,"none"),Qe({event:"Video Record Start",apiBase:t,headers:o,visitorId:a,envId:l,metadata:{questionId:ko(e,bo),responseGroupUid:s,surveyId:i}})}),e.on("finishRecord",async function(){r(e.uploadProgressLabel,"start",0);const u=ko(e,bo);if(!i){const f="internal error: missing fields in payload";return n&&n(U.ERROR,{type:U.OTHER}),Ve(new Error(f),"finishRecord",t,o,a,l),null}e.record().stopDevice();const d=e.cameraOff?U.MEDIA_TYPE_AUDIO:U.MEDIA_TYPE_VIDEO,c=_n();Qe({event:"Video Record Finish",apiBase:t,headers:o,visitorId:a,envId:l,metadata:{mediaRecordingUid:c,questionId:u,responseGroupUid:s,surveyId:i,mediaType:d}});const h={surveyId:i,updatedAt:new Date().toISOString(),mediaType:d,mediaRecordingUid:c};u&&(h.questionId=u),s&&(h.responseGroupUid=s),a&&(h.visitorId=a);const y=await(async()=>{const f=await fetch(`${t}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)});if(f.ok){const _=await f.json();return n&&n(U.UPLOAD_STARTED,{[U.UPLOAD_ID]:_.upload.id,[U.MEDIA_TYPE]:d,[U.MEDIA_RECORDING_UID]:c}),_.upload.url}else return n&&n(U.ERROR,{type:U.OTHER,response:f}),Ve(new Error("failed to get upload response with url"),"finishRecord",t,o,a,l),null})();y&&(Ie=M.document.defaultView.UpChunk.createUpload({endpoint:y,file:new M.document.defaultView.File([e.recordedData],`recording ${d} ${Date.now()}`),chunkSize:5120}),Ie.startTime=Date.now(),Qe({event:"Video Upload Start",apiBase:t,headers:o,visitorId:a,envId:l,metadata:{mediaRecordingUid:c,questionId:u,responseGroupUid:s,surveyId:i,mediaType:d,url:y}}),Ie.on("error",f=>{r(e.uploadProgressLabel,"none"),n&&n(U.UPLOAD_FINISHED,{[U.MEDIA_RECORDING_UID]:c}),Ve(f,"finishRecord",t,o,a,l)}),Ie.on("progress",f=>{n&&n(U.UPLOAD_PROGRESS,{[U.MEDIA_RECORDING_UID]:c,[U.UPLOAD_PROGRESS_PCT]:f.detail}),r(e.uploadProgressLabel,"progress",f.detail)}),Ie.on("success",()=>{r(e.uploadProgressLabel,"success"),n&&n(U.UPLOAD_FINISHED,{[U.MEDIA_RECORDING_UID]:c}),Qe({event:"Video Upload Success",apiBase:t,headers:o,visitorId:a,envId:l,metadata:{mediaRecordingUid:c,questionId:u,responseGroupUid:s,surveyId:i,mediaType:d,url:y,elapsedMs:Ie.startTime&&Date.now()-Ie.startTime}})}))})},xa=(e,t)=>{const n=new(M.videojs.getComponent("Component"))(e);return n.addClass("ul-buttons-panel"),t.map(r=>{n.addChild(r)}),Ku(n),n},Ku=e=>{e.children().forEach(t=>{if(we[t.name_]){const n=Qn(we[t.name_],`ul-${we[t.name_]}`);t.el_.appendChild(n)}})},Qn=(e,t="")=>{const n=M.document.createElement("span");return n.className="ul-button-text",n.innerHTML=e,n.id=t,n},wa=(e,t,n,r,o=!1,i)=>{e.addClass("ul-video-player");const s=new(M.videojs.getComponent("Component"))(e);s.addClass("ul-control-panel"),e.progressBar=s.addChild("ProgressControl"),n&&e.src(n),e.audioPlayerPlaceholder=new(M.videojs.getComponent("Component"))(e),e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const a=n&&n.src?Xu(n.src):null;n&&(o||!a)?(e.children()[0].classList.add("vjs-hidden"),M.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.audioPlayerPlaceholder.hide(),M.document.getElementById(`${e.id()}_html5_api`).style.height="100%",a&&e.poster(a)),e.on("play",()=>{!o&&n&&!a&&Gu(e,!1),i==null||i.play()}),e.on("pause",()=>{i==null||i.pause()}),e.on("seeked",()=>{i==null||i.currentTime(e.currentTime())}),e.on("ratechange",()=>{i==null||i.playbackRate(e.playbackRate())}),e.addChild(e.audioPlayerPlaceholder,{},1),s.addChild(t),e.addChild(s),r&&r(e)},zu=(e,t,n)=>{e.addClass(`ul${ga}`);const r=new(M.videojs.getComponent("Component"))(e);t&&e.src(t),e.addChild(r),n&&n(e)},Wu=(e,t,n,r,o,i,s,a=!1)=>{ya=Date.now();const u=Jn(t,{controls:!1,bigPlayButton:!1,fluid:!1,width:1280,height:720,playsinline:!0,plugins:{record:{audio:!0,video:{mandatory:{minWidth:1280,minHeight:720}},frameWidth:1280,frameHeight:720,maxLength:600,autoMuteDevice:!0}}});if(!u)return;u.payload=n;const{surveyId:d,questionId:c,responseGroupUid:h,visitorId:p,envId:y}=n;let f;const _=O=>{const R=xo,L=xo+"-audio-only";ba(u.uploadProgressLabel,"none"),Ie&&Ie.startTime>=ya&&Ie.abort();const F=M.document.getElementById("ul-camera-button");O?(u.children()[0].classList.add("vjs-hidden"),k.removeClass(R),k.addClass(L),F.innerHTML=we.TurnOnCamera,u.audioPlayerPlaceholder.removeClass("vjs-hidden"),f==null||f.getTracks().forEach(D=>{D.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then(D=>{f=D,D.getVideoTracks().forEach(ne=>{ne.enabled=!1}),u.record().onDeviceReady(D)}).catch(u.record().onDeviceError.bind(u.record()))):(f==null||f.getVideoTracks().forEach(D=>{D.enabled=!0}),u.children()[0].classList.remove("vjs-hidden"),u.record().getDevice(),k.removeClass(L),k.addClass(R),F.innerHTML=we.TurnOffCamera,u.audioPlayerPlaceholder.addClass("vjs-hidden"))},m=new(M.videojs.getComponent("Button"))(u,{clickHandler:()=>{m.hasClass(ee)||(Qe({event:"Video Delete Button Clicked",apiBase:r,headers:s,visitorId:p,envId:y,metadata:{questionId:c,responseGroupUid:h,surveyId:d}}),_(u.cameraOff),o(U.DELETE,{}),k.removeClass(ee),m.addClass(ee))}});m.addClass("ul-video-recorder-delete-button"),m.el_.appendChild(Qn(we.DeleteButton,"ul-delete-button"));const v=M.document.getElementById(t),w=()=>{v.classList.contains("vjs-fullscreen")&&u.cameraOff?v.style.display="table":v.style.display="flex"};w();const k=new(M.videojs.getComponent("Button"))(u,{clickHandler:()=>{u.record().isRecording()||(u.cameraOff=!u.cameraOff,Qe({event:"Video Camera Button Clicked",apiBase:r,headers:s,visitorId:n.visitorId,envId:n.envId,metadata:{questionId:c,responseGroupUid:h,surveyId:d,cameraOff:u.cameraOff}}),_(u.cameraOff),!m.hasClass(ee)&&m.addClass(ee),o(U.DELETE,{}),w())}});k.addClass(xo),k.el_.appendChild(Qn(we.TurnOffCamera,"ul-camera-button"));const b=new(M.videojs.getComponent("Button"))(u,{clickHandler:()=>{const O=M.document.getElementById("ul-recorder-toggle");if(u.record().isRecording())u.record().stop(),O&&(O.innerHTML=we.RecordButton),b.removeClass(wo),m.removeClass(ee);else{const R=M.document.getElementById("ul-recording-countdown-screen");if(R)R.remove(),O&&(O.innerHTML=we.RecordButton),_(u.cameraOff),o(U.DELETE,{}),k.removeClass(ee),m.addClass(ee),b.removeClass(wo),E.show();else{b.addClass(wo),E.hide(),k.addClass(ee),m.addClass(ee),O&&(O.innerHTML=we.StopButton);const L=M.document.createElement("div");L.id="ul-recording-countdown-screen",v.insertBefore(L,v.children[1]),L.style.height=`${v.offsetHeight}px`,ka(u,3)}}}});b.addClass("ul-video-recorder-toggle-button"),b.el_.appendChild(Qn(we.RecordButton,"ul-recorder-toggle"));const x=M.document.createElement("p");x.style.visibility="hidden",x.className="ul-upload-progress-label",e.appendChild(x),u.uploadProgressLabel=x;const S=xa(u,[m,k,"PlayToggle",b,"FullscreenToggle"]),E=S.children().find(O=>O.name_==="FullscreenToggle");E.hasClass("vjs-disabled")&&E.hide();const C=S.children().find(O=>O.name_==="PlayToggle");C.hide(),i&&k.addClass(ee),!i&&m.addClass(ee),wa(u,S,i,!1,a),u.on("stopRecord",()=>{b.hide(),C.show(),E.show(),m.removeClass(ee)}),u.on("deviceReady",()=>{b.show(),C.hide(),m.addClass(ee)}),qu(u,r,o,ba,s),i&&(u.deviceButton&&u.deviceButton.hide(),u.src(i),C.show(),b.hide(),m.removeClass(ee));const A=[{name:"microphone"}];!u.cameraOff&&A.push({name:"camera"}),Promise.all(A.map(O=>{var R;return(R=navigator==null?void 0:navigator.permissions)==null?void 0:R.query(O)})).then(O=>{O.reduce((L,F)=>L&F.state==="granted",!0)&&u&&(u.deviceButton&&u.deviceButton.hide(),!i&&u.record().getDevice())}).catch(O=>{})},ka=(e,t=3)=>{const n=M.document.getElementById("ul-recording-countdown-screen");n&&t===0?(n.remove(),e.record().start()):n&&(n.innerHTML=`Recording in... ${t}`,setTimeout(()=>{ka(e,t-1)},1e3))},Ca=e=>{const t=M.document.createElement("div");return t.className="ul-video-container",t.appendChild(Vu(e)),t},Co=(e,t)=>{const n=M.document.createElement("video");n.id=e,n.className="video-js vjs-default-skin ul-video-player-video";const r=M.document.createElement("p");r.className="vjs-no-js",r.innerHTML="To view this video please enable JavaScript, and consider upgrading to a web browser that";const o=M.document.createElement("a");return o.href="https://videojs.com/html5-video-support/",o.target="_blank",o.innerHTML="supports HTML5 video",r.appendChild(o),n.appendChild(r),t.appendChild(n),t},Gu=(e,t)=>{t?(e.children()[0].classList.add("vjs-hidden"),e.audioPlayerPlaceholder.show(),M.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),M.document.getElementById(`${e.id()}_html5_api`).style.height="100%")},Jn=(e,t)=>M.document.getElementById(e)?t?M.videojs(e,t):M.videojs(e):(console.error(`Error in finding player element with ID, ${e}`),null),Zu=(e,t,n,r=!1,o="https://api.sprig.com",i=document,s=null,a=null)=>{M.document=i;const l=e+ma,u=Ca(l);return M.document.addEventListener("securitypolicyviolation",d=>{Ve(new Error(`Voice & Video feature violates ${d.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",o,{})}),_a(fa,()=>{M.document.getElementById(_o(l)).remove(),Co(l,u);const d={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const c=e+ga;Co(c,u);const h=Jn(l,d),p=Jn(c,{muted:!0,...d});if(!h||!p)return;zu(p,s,a),s||p.addClass(ee);const y=xa(h,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),f=y.children().find(_=>_.name_==="FullscreenToggle");f.hasClass("vjs-disabled")&&f.hide(),wa(h,y,t,n,r,p)}catch(c){Ve(new Error(`Error when creating video player object ${c}`),"playerDeviceError",o,{});return}}),u},Yu=(e,t={},n="https://api.userleap.com",r,o,i,s=!1,a=document)=>{M.document=a;const l=e+va,u=Ca(l);return M.document.addEventListener("securitypolicyviolation",d=>{Ve(new Error(`Voice & Video feature violates ${d.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",n,i,t.visitorId,t.envId)}),_a(fa.concat(Fu),()=>{Co(l,u),M.document.getElementById(_o(l)).remove();try{Wu(u,l,t,n,r,o,i,s)}catch(d){Ve(new Error(`Error when creating video recorder player object ${d}`),"recorderDeviceError",n,i,t.visitorId,t.envId);return}}),u},Qu=e=>{const t=e+va;if(M.document.getElementById(t)&&M.videojs){try{if(!M.videojs(t).record().stream)return}catch{return}M.videojs(t).record().stop(),M.videojs(t).record().stopDevice()}},Ju=e=>{const t=Jn(e+ma);t==null||t.pause()},Xu=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let n=t?t[1]:null;return n.includes(pa)&&(n=n.replace(pa,"")),n?`https://image.mux.com/${n}/thumbnail.jpg?time=0`:null},U={UPLOAD_STARTED:"upload.started",UPLOAD_PROGRESS:"upload.progress",UPLOAD_FINISHED:"upload.finished",DELETE:"delete",ERROR:"error",MEDIA_TYPE:"media.type",PERMISSION_DENIED:"permission_denied",OTHER:"other",UPLOAD_ID:"upload.id",UPLOAD_PROGRESS_PCT:"upload.progress.pct",MEDIA_RECORDING_UID:"media.recording.uid",MEDIA_TYPE_VIDEO:"video",MEDIA_TYPE_AUDIO:"audio"},we={PlaybackRateMenuButton:"Speed",PlayToggle:"Play",FullscreenToggle:"Expand",TurnOnCamera:"Turn on",TurnOffCamera:"Turn off",DeleteButton:"Delete",RecordButton:"Record",StopButton:"Stop",PauseButton:"Pause"},an="ul-card-video__player_recorder",ed="ul-card-video__skip_button",td="ul-video-interview-form",Sa="ul-video-btn",nd=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{apiURL:s,envId:a,handleUploadUpdate:l,headers:u,responseGroupUid:d,surveyId:c,viewDocument:h,visitorId:p}=z(R=>({apiURL:R.apiURL,envId:R.envId,handleUploadUpdate:R.handleUploadUpdate,headers:R.headers,responseGroupUid:R.responseGroupUid,surveyId:R.surveyId,viewDocument:R.viewDocument,visitorId:R.userId})),[y,f]=X(!1),[_,m]=X(null),[v,w]=X(null),[k,b]=X(0),x=r&&r.videoUrl,S=(R,L)=>{R===U.UPLOAD_STARTED?(m(L[U.UPLOAD_ID]),w(L[U.MEDIA_RECORDING_UID]),f(!0)):R===U.DELETE?(m(null),w(null),f(!1)):R===U.UPLOAD_PROGRESS?isNaN(L[U.UPLOAD_PROGRESS_PCT])?l({mediaRecordingUid:L[U.MEDIA_RECORDING_UID],isComplete:!0}):l({mediaRecordingUid:L[U.MEDIA_RECORDING_UID],progressPct:L[U.UPLOAD_PROGRESS_PCT]}):R===U.UPLOAD_FINISHED&&l({mediaRecordingUid:L[U.MEDIA_RECORDING_UID],isComplete:!0})},E=R=>{if(R&&R.children.length===0){const L=Zu(an,{src:x,type:"application/x-mpegURL"},void 0,r.mediaType===U.MEDIA_TYPE_AUDIO,s,h);R.appendChild(L)}},C=R=>{if(R&&R.children.length===0){const L=Yu(an,{surveyId:c,responseGroupUid:d,questionId:o,visitorId:p,envId:a},s,S,void 0,{...u,"x-ul-video-recorder-origin":"sdk"},r.mediaType===U.MEDIA_TYPE_AUDIO,h);R.appendChild(L)}},A=R=>{R.preventDefault(),R.stopPropagation(),Qu(an),_&&v?(l({mediaRecordingUid:v,isSubmitted:!0}),n({value:{mediaRecordingUid:v},questionId:o,type:i})):n({value:null,questionId:o,type:i})},O=()=>g(Ue,{defaultBody:()=>g("button",{className:`${Sa} ul-record-response-btn`,onClick:R=>{R.preventDefault(),R.stopPropagation(),Ju(an),b(1)}}),properties:r});return g("form",{className:B([e,j.VideoCard,j.FadeInTransition]),id:td,children:[g(xe,{message:t,properties:r}),g("div",{id:"ul-card-voice__video",children:[g("div",{children:[g("div",{id:"ul-question-player-container",style:{display:k===0?"":"none"},children:[g("div",{id:an,ref:E}),O()]}),g("div",{style:{display:k===1?"block":"none"},children:[g("button",{className:`${Sa} ul-back-question-btn`,onClick:R=>{R.preventDefault(),R.stopPropagation(),b(0)}}),g("div",{id:"ul-recorder-player-container",ref:C})]})]}),g(ce,{disabled:!y,onClick:A,children:ht(r)}),g("button",{className:`ul-card-text__button ${j.InactiveButton} ${j.SkipButton}`,id:ed,onClick:A,style:{display:r.required?"none":"block",...y?{display:"none"}:{}},children:fo(r)})]})]})},rd=({className:e})=>{const{uploadProgress:t}=z(i=>({uploadProgress:i.uploadProgress}));let n,r;Object.values(t).filter(i=>i.isSubmitted).length>1?(n="Your responses are processing",r="Please keep this tab open until your responses are fully processed."):(n="Your response is processing",r="Please keep this tab open until your response is fully processed.");const o=Math.round(Math.min(99,...Object.values(t).filter(i=>i.isSubmitted).map(i=>i.progressPct||0)));return g("div",{className:B([e,"ul-card--uploading",j.FadeInTransition]),children:[g("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:j.LoadingSpinnerContainer,role:"progressbar",children:g("div",{className:j.LoadingSpinner,children:[g("div",{className:j.LoadingSpinnerFirst}),g("div",{className:j.LoadingSpinnerSecond}),g("div",{className:j.LoadingSpinnerThird}),g("div",{className:j.LoadingSpinnerFourth})]})}),g(xe,{message:`${n} (${o}% complete)`}),g("p",{className:j.Caption,children:r})]})},Ea=({logoOnly:e=!1,style:t={}})=>g("svg",{alt:`${e?"Powered by ":""}Sprig`,width:e?"35":"112",height:"15",viewBox:e?"79 0 31 15":"0 0 112 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",...t},children:[!e&&g("path",{d:"M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.7812 4.99121 44.9619 6.38135 44.9619 8.45068V8.93311H40.0742C40.0996 10.2534 40.8232 11.0215 41.9595 11.0215C42.8418 11.0215 43.3687 10.5835 43.5337 10.228L43.5591 10.1772L44.8857 10.1709L44.873 10.228C44.6445 11.1357 43.6924 12.1514 41.9277 12.1514ZM41.8643 6.12109C40.9248 6.12109 40.2139 6.76221 40.0933 7.94922H43.5972C43.4893 6.71777 42.7974 6.12109 41.8643 6.12109ZM49.1133 12.1323C47.3804 12.1323 46.2568 10.7422 46.2568 8.57764V8.56494C46.2568 6.38135 47.3613 5.00391 49.1133 5.00391C50.0591 5.00391 50.8652 5.47363 51.2334 6.21631H51.3413V2.42041H52.7124V12.0181H51.3413V10.9326H51.2334C50.8335 11.688 50.0781 12.1323 49.1133 12.1323ZM49.5068 10.958C50.6558 10.958 51.3604 10.0503 51.3604 8.57764V8.56494C51.3604 7.09229 50.6494 6.18457 49.5068 6.18457C48.3516 6.18457 47.6597 7.08594 47.6597 8.56494V8.57764C47.6597 10.0566 48.3516 10.958 49.5068 10.958ZM61.98 12.1323C61.0151 12.1323 60.2598 11.688 59.8599 10.9326H59.7583V12.0181H58.3809V2.42041H59.7583V6.21631H59.8599C60.228 5.47363 61.0342 5.00391 61.98 5.00391C63.7319 5.00391 64.8364 6.38135 64.8364 8.56494V8.57764C64.8364 10.7422 63.7192 12.1323 61.98 12.1323ZM61.5928 10.958C62.7417 10.958 63.4336 10.0566 63.4336 8.57764V8.56494C63.4336 7.08594 62.7417 6.18457 61.5928 6.18457C60.4438 6.18457 59.7329 7.09229 59.7329 8.56494V8.57764C59.7329 10.0503 60.4438 10.958 61.5928 10.958ZM66.8867 14.4429C66.7153 14.4429 66.5122 14.4302 66.3345 14.4111V13.3257C66.4678 13.3447 66.6392 13.3511 66.7979 13.3511C67.439 13.3511 67.8262 13.0781 68.0293 12.3799L68.1309 12.0244L65.6299 5.12451H67.1152L68.8418 10.6343H68.9624L70.6826 5.12451H72.1299L69.5654 12.2847C68.9814 13.9287 68.2832 14.4429 66.8867 14.4429Z",fill:"black",fillOpacity:"0.7"}),g("path",{d:"M81.1088 6.63629C79.6878 6.32154 78.9672 5.76865 78.9672 4.99369C78.9672 4.19299 79.736 3.5886 80.7556 3.5886C81.8066 3.5886 82.5995 4.25285 82.5995 5.13336V5.20352H84.0518V5.13336C84.0518 3.52424 82.6405 2.30774 80.7693 2.30774C79.8676 2.30774 79.0414 2.58451 78.4433 3.08655C78.1463 3.33144 77.9077 3.63818 77.7448 3.98479C77.5818 4.33141 77.4984 4.70934 77.5005 5.09153C77.4946 5.44197 77.5675 5.78934 77.714 6.10857C77.8605 6.42779 78.0769 6.71092 78.3475 6.93752C78.8512 7.37584 79.5659 7.70024 80.4709 7.90299C81.9949 8.23898 82.7676 8.81054 82.7676 9.60094C82.7676 10.4576 81.9258 11.1032 80.813 11.1032C79.6571 11.1032 78.7854 10.3856 78.7854 9.43424V9.36408H77.3318V9.43424C77.3318 11.1167 78.8219 12.3847 80.7973 12.3847C81.7421 12.3847 82.6093 12.0983 83.2393 11.5769C83.5519 11.3237 83.8034 11.0048 83.9753 10.6433C84.1472 10.2818 84.2352 9.88702 84.2329 9.48766C84.2329 8.05875 83.1833 7.09907 81.1088 6.63629Z",fill:"black",fillOpacity:"0.7"}),g("path",{d:"M89.2394 4.68276C88.6963 4.67605 88.1596 4.79915 87.6751 5.04156C87.1905 5.28397 86.7725 5.63851 86.4566 6.07497V4.85204H85.0747V14.8479H86.4566V11.0356C86.7725 11.472 87.1906 11.8265 87.6751 12.0688C88.1596 12.3111 88.6963 12.434 89.2394 12.4272C91.3836 12.4272 93 10.7627 93 8.55495C93 6.34723 91.3836 4.68276 89.2394 4.68276ZM91.5608 8.84202C91.5057 9.41605 91.2512 9.95356 90.8406 10.3633C90.4299 10.773 89.8883 11.0296 89.3078 11.0896C88.5363 11.1669 87.8177 10.9461 87.2841 10.4692C86.7505 9.99222 86.4566 9.3106 86.4566 8.55495C86.4566 7.10159 87.5538 6.00546 89.0087 6.00546C89.7619 6.00546 90.4421 6.29124 90.9171 6.81002C91.407 7.34232 91.6357 8.06385 91.5608 8.84202Z",fill:"black",fillOpacity:"0.7"}),g("path",{d:"M109.95 4.85407V6.06349C109.298 5.18298 108.292 4.68286 107.153 4.68286C105.017 4.68286 103.406 6.31709 103.406 8.48426C103.406 10.6514 105.017 12.285 107.153 12.285C108.296 12.285 109.303 11.79 109.95 10.9185V11.1046C109.95 12.6101 108.993 13.5826 107.513 13.5826C106.513 13.5826 105.68 13.1494 105.284 12.424L105.264 12.3867H103.838L103.871 12.48C104.112 13.1892 104.583 13.8001 105.211 14.2179C105.841 14.6324 106.637 14.8512 107.513 14.8512C108.637 14.8512 109.594 14.4972 110.28 13.8285C110.967 13.1597 111.332 12.2194 111.332 11.1213V4.85407H109.95ZM109.175 10.3502C108.588 10.905 107.752 11.138 106.879 10.9887C106.361 10.8984 105.886 10.6475 105.523 10.2725C105.16 9.89751 104.927 9.41787 104.859 8.90328C104.736 8.03757 104.999 7.21756 105.581 6.655C106.069 6.19093 106.723 5.93643 107.401 5.94699C107.565 5.94713 107.729 5.96026 107.891 5.98625C108.946 6.15489 109.781 7.01609 109.921 8.0852C110.039 8.96507 109.766 9.78958 109.175 10.3502Z",fill:"black",fillOpacity:"0.7"}),g("path",{d:"M101.89 2.12378C101.63 2.06766 101.358 2.11486 101.133 2.25518C100.908 2.39551 100.747 2.61769 100.687 2.87371C100.626 3.12973 100.67 3.39902 100.809 3.62339C100.947 3.84775 101.17 4.00917 101.428 4.07275C101.503 4.08936 101.58 4.09778 101.657 4.09786C101.906 4.09824 102.146 4.0083 102.331 3.84518C102.517 3.68206 102.636 3.45714 102.664 3.21327C102.693 2.9694 102.63 2.72361 102.487 2.5227C102.344 2.32179 102.132 2.17981 101.89 2.12378Z",fill:"black",fillOpacity:"0.7"}),g("path",{d:"M100.967 10.934H99.7755C98.9285 10.934 98.4196 10.3644 98.4196 9.40982C98.4196 8.4791 98.8757 7.36945 99.8054 6.01778L99.8178 5.99976V5.61807L95.8571 5.06453C95.8585 4.90331 95.8162 4.74466 95.7346 4.60501C95.653 4.46536 95.5352 4.34979 95.3932 4.27027C95.0381 4.07718 94.6498 4.07717 94.3279 4.26383C94.1667 4.35799 94.035 4.4945 93.9476 4.65816C93.8602 4.82182 93.8205 5.00623 93.8328 5.19087C93.8452 5.37552 93.9092 5.55315 94.0176 5.70402C94.1261 5.85489 94.2748 5.97309 94.4472 6.04546L93.2151 12.258H94.5833L95.7196 6.35891L97.8593 6.7155C97.284 7.73439 96.9921 8.68442 96.9921 9.53919C96.9921 11.1168 97.9577 12.1498 99.5187 12.2496V12.258H102.346V4.87723H100.967V10.934Z",fill:"black",fillOpacity:"0.7"})]}),od=()=>{const{border:e,cards:t,forceBrandedLogo:n,headers:r,index:o,marketingUrl:i,showSurveyBrand:s,slugName:a,surveyId:l,viewedCardCount:u}=z(w=>({border:w.border,cards:w.cards,forceBrandedLogo:w.forceBrandedLogo,headers:w.headers,index:w.index,marketingUrl:w.marketingUrl,showSurveyBrand:w.showSurveyBrand,slugName:w.slugName,surveyId:w.surveyId,viewedCardCount:w.viewedCardCount})),d=He(null),c=t.filter(w=>w.type!==P.Uploading&&w.type!==P.Thanks),h=uu(t,o),p=u+1,y=p/(p+h),f=`${i}?utm_source=survey_branding&utm_medium=website&utm_campaign=${a}&utm_content=${l}${n&&"&utm_term=poweredby_pill"}`;pe(()=>{d.current&&(d.current.style.width=`${y*100}%`)},[y]);const _=()=>g(le,{children:[c.length>1&&g("div",{id:"ul-progress-bar-container",children:g("div",{id:"ul-progress-bar-current",ref:d,style:{border:`1px solid ${e||"#000"}`}})}),s?g("div",{className:n?"yellow-footer-logo":"",style:{marginTop:"4px"},children:g("a",{href:f,rel:"noreferrer",target:"_blank",children:g("div",{style:{display:"flex"},children:[g(Ea,{logoOnly:!1}),n&&g(Pa,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}):null]}),m=()=>g("a",{dir:"ltr",href:f,rel:"noreferrer",target:"_blank",children:g("div",{className:"thank-you-card-link",children:[g("div",{className:"sprig-box-logo",children:g(Ea,{logoOnly:!0,style:{margin:"auto"}})}),g("div",{children:g("p",{children:["Capture insights about your own product",g(Pa,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}),v=t[o].type===P.Thanks;return g("footer",{className:`ul-footer ${r["userleap-platform"]==="link"?"ul-footer__link":""}`,style:s?{}:{marginBottom:"10px"},children:v&&n?m():_()})},Pa=({style:e})=>g("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[g("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),g("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),id=()=>{const{answers:e,border:t,cards:n,close:r,configureExitOnOverlayClick:o,destroy:i,endCard:s,eventEmitFn:a,fontFamily:l,headers:u,index:d,next:c,showStripes:h,surveyId:p,update:y,useMobileStyling:f,viewDocument:_}=z(D=>({answers:D.answers,border:D.border,cards:D.cards,close:D.close,configureExitOnOverlayClick:D.configureExitOnOverlayClick,destroy:D.destroy,endCard:D.endCard,eventEmitFn:D.eventEmitFn,fontFamily:D.fontFamily,headers:D.headers,index:D.index,next:D.next,showStripes:D.showStripes,surveyId:D.surveyId,update:D.update,useMobileStyling:D.useMobileStyling,viewDocument:D.viewDocument})),m=He(null),v=He(!1),w=u["userleap-platform"],{props:k,type:b,name:x}=n[d],S=n.length;pe(()=>{m.current&&(m.current.classList.contains("ul-app--visible")||m.current.classList.add("ul-app--visible"),!v.current&&a&&(v.current=!0,a(Ce.SurveyAppeared,{name:Ce.SurveyAppeared,[Ki.SurveyId]:p})))},[a,p]),pe(()=>{y()},[d,y]),pe(()=>{o(()=>r())},[r,o]);const E=()=>r(yt),C=D=>{D.key==="Enter"&&E()},A=async function(D){c({data:D,completeSurvey:()=>{i(yt)},endCard:s}),Ml(_)};if(e){for(const D of e)if(D.questionId===x){let ne;if(b===P.MultipleChoice){const Z=k.options.find(({value:ke})=>ke===D.value);if(!Z)break;ne={[Z.id]:Z.value}}else ne=D.value;A({value:ne,type:b,questionId:D.questionId});break}}const O=()=>[_t.Email,_t.Link].includes(u["userleap-platform"])?!1:!s||d+1!==S,R=()=>f?{borderColor:t}:{borderColor:t,margin:"15px"},L=()=>{const D={className:"ul-card",next:A,questionId:x,type:b};switch(b){case P.ConsentLegal:return G(vu,{...D,...k,key:x});case P.Likert:return G(_u,{...D,...k,key:x});case P.Matrix:return G(bu,{...D,...k,key:x});case P.MultipleChoice:return G(xu,{...D,...k,key:x});case P.MultipleSelect:return G(wu,{...D,...k,key:x});case P.NPS:return G(ku,{...D,key:x,props:k});case P.Open:return G(Cu,{...D,...k,key:x});case P.RecordedTask:return G(Lu,{...D,...k,key:x});case P.TextUrlPrompt:return G($u,{...D,...k,key:x});case P.Thanks:return G(Bu,{...D,...k,key:x});case P.Uploading:return G(rd,{...D,...k,key:x});case P.VideoVoice:return G(nd,{...D,...k,key:x});default:return null}},F=D=>{var Je;const ne=window.sprigAPI,Z=D.target;if(!ne||!Z)return;const ke=[Z,Z.parentElement];for(const Xe of ke)if(((Je=Xe==null?void 0:Xe.tagName)==null?void 0:Je.toLowerCase())==="a"){D.preventDefault(),ne==null||ne.openUrl(Xe.href);return}};return g("div",{className:B("ul-app",mn(u)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:yt,onClick:F,ref:m,style:{"--theme":t,...l?{fontFamily:l.replace(";","")}:{}},children:g("div",{className:"ul-app__container",children:g("div",{className:B(Q(j.CardContainer,f)),style:R(),children:[O()&&g("div",{className:B(Q(j.CloseContainer,f)),children:g("div",{"aria-label":"Close button",className:j.CloseButton,onClick:E,onKeyPress:C,role:"button",tabIndex:0,children:g("svg",{fill:"none",height:"18px",viewBox:"0 0 13 13",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:g("path",{d:"M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z",fill:"#262136"})})})}),h&&g("div",{className:"ul-header__container",dir:"ltr",children:g("div",{className:"ul-header",children:"For development purposes only"})}),g("div",{className:B(ol(j.CardMainContent,w)),children:L()}),g(od,{})]})})})},sd='html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;margin:auto}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.ul-card__container{background:#fff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;overflow:auto;padding:20px 20px 5px;position:relative;text-align:center;word-break:break-word}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;margin-bottom:3px;display:flex;gap:16px;justify-content:center}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email{flex-grow:55;display:flex}.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{margin-bottom:5px}.ul-question{color:#343442;display:block;font-size:20px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-caption{flex:1 0 auto;margin-top:8px;margin-bottom:15px;font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.select-checkbox{height:16px;width:16px;border-radius:3px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 3px 3px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.fade-in-transition{animation:fadeIn .4s ease-in;-webkit-animation:fadeIn .4s ease-in;-moz-animation:fadeIn .4s ease-in;-o-animation:fadeIn .4s ease-in;-ms-animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-ms-keyframes fadeIn{0%{opacity:0}to{opacity:1}}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:#fff}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(93px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;max-width:var(--maxWidth);overflow:auto}.ul-matrix-option-wrapper{align-items:center;background:#f9f9f8;display:flex;justify-content:center;padding:10px 12px}.ul-matrix-last-option{border-start-end-radius:4px;border-end-end-radius:4px}.ul-matrix-row-label{align-items:center;background:#f9f9f8;border-end-start-radius:4px;border-start-start-radius:4px;display:flex;font-size:15px;left:0;right:0;max-width:200px;min-width:100px;padding:10px 12px;position:sticky}.ul-matrix-option-selected{border:6px solid var(--border);box-shadow:none}.ul-card__matrix{min-width:min-content;padding-right:20px}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-text{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:#fff}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:-webkit-fill-available}#ul-card-voice__video{align-items:center;display:flex;flex-direction:column}#ul-card-voice__video>div{margin-bottom:10px;width:100%}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#fff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center;flex-direction:column}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;left:0;position:absolute;top:0;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:auto;flex-grow:1;width:100%}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:#00000003;border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:#00000008}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:#f9c600;border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%}.close-btn{cursor:pointer;height:18px;margin-inline-end:-10px;position:relative;top:-10px;width:18px;z-index:1}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}#ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px;max-width:250px;margin:25px 0}#ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{width:100%;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:1;margin:0;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}',ad=async(e,t)=>{var r;const n=await fetch(t,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(n.ok){const o=await n.json();return(r=o==null?void 0:o.upload)==null?void 0:r.url}else return null},Ta=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",Ia=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:Ta()};return new MediaRecorder(e,t)},ja=(e,t,n)=>{n[t]=[],e.ondataavailable=function(r){n[t].push(r.data)},e.currentMediaRecordingUid=t,e.start()};function Oa(e,t,n,r,o,i){if(e&&e.state!=="inactive"){const{[V.BeginCallback]:s}=r,a=e.currentMediaRecordingUid;if(!a)return;s&&s(a),e.onstop=()=>ld(t,e,n,r,a,o,i),e.stop()}}async function ld(e,t,n,r,o,i,s){const a=z.getState().viewDocument,{[V.UploadCallback]:l,[V.ProgressCallback]:u}=r,d={mediaType:n,updatedAt:new Date().toISOString(),mediaRecordingUid:o,...r[V.PassthroughData]},c=await ad(d,e);if(!c){l&&l(null,{message:"failed to get upload url"});return}const h=new Blob(s,{type:Ta()});if(!a.defaultView)return;const p=new a.defaultView.File([h],`recording video ${Date.now()}`),y=i.createUpload({endpoint:c,file:p,chunkSize:5120});y.on("error",f=>{l&&l(null,f)}),y.on("progress",f=>{u&&u(o,f)}),y.on("success",()=>{l&&l(o,!0)})}const cd={state:{...{chunks:{}}},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:n,screenRecorder:r,UpChunk:o}=this.state,i=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?ye.Video:ye.Audio;this.state.chunks&&t&&o&&(n!=null&&n.currentMediaRecordingUid&&Oa(n,t,i,e,o,this.state.chunks[n==null?void 0:n.currentMediaRecordingUid]),r!=null&&r.currentMediaRecordingUid&&Oa(r,t,ye.Screen,e,o,this.state.chunks[r==null?void 0:r.currentMediaRecordingUid]))},handleCancelledStream(e){const t=e.getVideoTracks(),n=e.getAudioTracks();let r=t.length&&t[0];r=r||n.length&&n[0],r&&r.addEventListener("ended",()=>{[this.state.avRecorder,this.state.screenRecorder].map(o=>{o&&(o.state==="recording"&&o.stop(),o.stream.getTracks().map(i=>{i.readyState==="live"&&i.stop()}))}),Object.assign(this.state,{avStream:null,captureStream:null,avRecorder:null,screenRecorder:null})})},taskDurationMillisecond(){return this.state.startTime?new Date().getTime()-this.state.startTime.getTime():0},setUpChunk(e){this.state.UpChunk=e},configure(e,t){Object.assign(this.state,t),this.state.uploadApiEndpoint=`${t.apiURL}/2/environments/integrations/upload`,this.state.chunks={},e.on(re.PermissionStatus,this.permissionStatusCallback.bind(this)),e.on(re.AvPermission,async n=>{this.avPermissionCallback(n)}),e.on(re.BeginRecording,this.beginRecordingCallback.bind(this)),e.on(re.StartTask,this.startTaskCallback.bind(this)),e.on(re.ScreenPermission,async n=>{this.screenPermissionCallback(n)}),e.on(re.FinishTask,async n=>{this.finishTaskCallback(n)})},async avPermissionCallback(e){var r,o,i;const{[V.StreamReadyCallback]:t,[V.PermissionDescriptors]:n}=e;try{(r=this.state.avStream)!=null&&r.active&&(this.state.avStream.getTracks().map(s=>s.readyState==="live"&&s.stop()),((o=this.state.captureStream)==null?void 0:o.getAudioTracks().length)===1&&this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])),this.state.avStream=await navigator.mediaDevices.getUserMedia({video:n.includes(At.Camera),audio:!0}),((i=this.state.captureStream)==null?void 0:i.getAudioTracks().length)===0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.avStream)}catch(s){console.warn("Error: failed to get permissions: "+s),t&&t(null,null);return}t&&t(this.state.avStream,this.state.captureStream)},async screenPermissionCallback(e){const{[V.ScreenPermissionRequested]:t,[V.StreamReadyCallback]:n}=e;t==null||t(!0);try{this.state.captureStream=await navigator.mediaDevices.getDisplayMedia({video:!0,cursor:"always",displaySurface:"browser",preferCurrentTab:!0})}catch(r){t==null||t(!1),console.warn("Error: failed to get permissions: "+r),n&&n(null,null);return}t==null||t(!1),this.state.avStream&&this.state.avStream.getAudioTracks().length>0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.captureStream),n&&n(this.state.avStream||null,this.state.captureStream)},beginRecordingCallback(e){const{[V.RecordingMediaTypes]:t,[V.StartRecordingCallback]:n}=e;if(!t)return;const r=[];if(t.includes(ye.Video)&&this.state.avStream){this.state.avRecorder=Ia(this.state.avStream);const o=_n();ja(this.state.avRecorder,o,this.state.chunks),r.push(o)}if(t.includes(ye.Screen)&&this.state.captureStream){this.state.screenRecorder=Ia(this.state.captureStream);const o=_n();ja(this.state.screenRecorder,o,this.state.chunks),r.push(o)}r&&n&&n(r)},async finishTaskCallback(e){const{[V.CurrentIndex]:t,[V.TaskResponse]:n,[V.TaskCompleteCallback]:r}=e;await this.stopRecording(e),r&&r(this.taskDurationMillisecond()),this.state.cards&&this.state.hasEndCard!==void 0&&this.lookAheadAndStopStream(t,n,this.state.cards,this.state.hasEndCard)},startTaskCallback(){this.state.startTime=new Date},permissionStatusCallback(e){var r;const{[V.PermissionStatusCallback]:t}=e,n=this.state.avStream;t&&t(n,n?(n==null?void 0:n.getVideoTracks().length)>0:!1,!!((r=this.state.captureStream)!=null&&r.active),this.state.captureStream)},lookAheadAndStopStream(e,t,n,r){const{avRecorder:o,screenRecorder:i}=this.state,{allResponses:s}=z.getState(),a=Js({cards:n,index:e,hasEndCard:r,allResponses:s});a!==null&&n[a].type===P.RecordedTask||[o,i].map(l=>{l&&(l.state==="recording"&&l.stop(),l.stream.getTracks().map(u=>{u.readyState==="live"&&u.stop()}))})}},Xn=Object.create(cd);Object.freeze(Xn);const ud=(e,t)=>{const n=[...e],r=new Set([P.VideoVoice,P.RecordedTask]);return e.some(o=>r.has(o.type))&&n.push({name:-2,props:{routingOptions:[]},type:P.Uploading}),t&&n.push({name:-1,props:{routingOptions:[]},type:P.Thanks}),n},dd=({mode:e=null,viewWindow:t,viewDocument:n})=>{const r=n.documentElement;let o;try{o=t.parent.location.href}catch{o=t.location.href}return{mode:e,sw:t.screen.width,sh:t.screen.height,cw:r.clientWidth,ch:r.clientHeight,p:o,l:t.navigator.language}};function hd(e,t=!0){var b;const{answers:n,apiURL:r,customStyles:o,endCard:i,eventEmitFn:s,fontFamilyURL:a,frame:l,previewKey:u,viewDocument:d,viewWindow:c}=e,h=mn(e.headers)?e.frame:d.body,p=e.UpChunk||window.UpChunk,y=vn,f=ud(e.cards,!!i);Xn.configure(y,{cards:f,hasEndCard:!!i,apiURL:r,UpChunk:p}),z.setState({apiURL:r,answers:n,border:e.border,index:e.startingQuestionIdx||0,cards:f,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:s,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:l,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:dd({mode:e.mode,viewWindow:c,viewDocument:d}),mode:e.mode,previewKey:u,recorder:Xn,recorderEventEmitter:y,responseGroupUid:e.responseGroupUid,showStripes:e.showStripes,showSurveyBrand:e.showSurveyBrand,slugName:e.slugName,styleNonce:e.styleNonce,surveyId:e.surveyId,tabTitle:e.tabTitle,uploadingCardViewed:!1,uploadProgress:{},useMobileStyling:e.useMobileStyling,useDesktopPrototype:e.useDesktopPrototype,userId:e.userId,viewDocument:e.viewDocument,visitorAttributes:e.visitorAttributes,viewedCardCount:e.startingQuestionIdx||0});const{seen:_}=z.getState();_();const{head:m}=d,v=d.createElement("style");if(v.id="sprig-style",v.textContent=sd,v.nonce=e.styleNonce,m.appendChild(v),e.fontFamily&&a&&parent){const x=d.createElement("link");x.rel="stylesheet",x.href=a,m.appendChild(x)}if(e.customStyles&&Ll(d,o,e.styleNonce),!p)if(e.installationMethod!==bt.Npm){const x=d.createElement("script");x.src="https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js",x.onload=()=>{Xn.setUpChunk(c.UpChunk)},x.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},m.appendChild(x)}else console.warn("[Sprig] - recording functionality not configured due to missing UpChunk dependency");const w="2.26.2",k=s||((b=l.eventEmitter)==null?void 0:b.emit);k==null||k(Se.VerifyViewVersion,{[wt.ViewVersion]:w}),h&&t&&mt(g(id,{}),h)}({configure:hd}).configure(window.__cfg)})(); +//# sourceMappingURL=sprig-web-view-sdk-v2.26.2.js.map diff --git a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Headers/UserLeapKit-Swift.h b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Headers/UserLeapKit-Swift.h index b902041..b12784a 100644 --- a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Headers/UserLeapKit-Swift.h +++ b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Headers/UserLeapKit-Swift.h @@ -1,6 +1,6 @@ #if 0 #elif defined(__arm64__) && __arm64__ -// Generated by Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) +// Generated by Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) #ifndef USERLEAPKIT_SWIFT_H #define USERLEAPKIT_SWIFT_H #pragma clang diagnostic push @@ -23,7 +23,6 @@ # include #endif -#pragma clang diagnostic ignored "-Wduplicate-method-match" #pragma clang diagnostic ignored "-Wauto-import" #if defined(__OBJC__) #include @@ -32,10 +31,24 @@ #include #include #include +#include +#include +#include +#include #else #include #include #include +#include +#endif +#if defined(__cplusplus) +#if __has_include() +# include +#else +# ifndef __ptrauth_swift_value_witness_function_pointer +# define __ptrauth_swift_value_witness_function_pointer(x) +# endif +#endif #endif #if !defined(SWIFT_TYPEDEFS) @@ -71,53 +84,66 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); # if __has_feature(objc_class_property) # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ # else -# define SWIFT_CLASS_PROPERTY(...) +# define SWIFT_CLASS_PROPERTY(...) # endif #endif - -#if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) -#else -# define SWIFT_RUNTIME_NAME(X) +#if !defined(SWIFT_RUNTIME_NAME) +# if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +# else +# define SWIFT_RUNTIME_NAME(X) +# endif #endif -#if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) -#else -# define SWIFT_COMPILE_NAME(X) +#if !defined(SWIFT_COMPILE_NAME) +# if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +# else +# define SWIFT_COMPILE_NAME(X) +# endif #endif -#if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) -#else -# define SWIFT_METHOD_FAMILY(X) +#if !defined(SWIFT_METHOD_FAMILY) +# if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +# else +# define SWIFT_METHOD_FAMILY(X) +# endif #endif -#if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) -#else -# define SWIFT_NOESCAPE +#if !defined(SWIFT_NOESCAPE) +# if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +# else +# define SWIFT_NOESCAPE +# endif #endif -#if __has_attribute(ns_consumed) -# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) -#else -# define SWIFT_RELEASES_ARGUMENT +#if !defined(SWIFT_RELEASES_ARGUMENT) +# if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +# else +# define SWIFT_RELEASES_ARGUMENT +# endif #endif -#if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) -#else -# define SWIFT_WARN_UNUSED_RESULT +#if !defined(SWIFT_WARN_UNUSED_RESULT) +# if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +# else +# define SWIFT_WARN_UNUSED_RESULT +# endif #endif -#if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) -#else -# define SWIFT_NORETURN +#if !defined(SWIFT_NORETURN) +# if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +# else +# define SWIFT_NORETURN +# endif #endif #if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA +# define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) # if __has_attribute(objc_subclassing_restricted) @@ -137,28 +163,25 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) # endif #endif - #if !defined(SWIFT_PROTOCOL) # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif - #if !defined(SWIFT_EXTENSION) # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif - #if !defined(OBJC_DESIGNATED_INITIALIZER) # if __has_attribute(objc_designated_initializer) # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) # else -# define OBJC_DESIGNATED_INITIALIZER +# define OBJC_DESIGNATED_INITIALIZER # endif #endif #if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# if __has_attribute(enum_extensibility) # define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) # else -# define SWIFT_ENUM_ATTR(_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) # endif #endif #if !defined(SWIFT_ENUM) @@ -187,14 +210,16 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #if !defined(SWIFT_DEPRECATED_MSG) # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif -#if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) -#else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#if !defined(SWIFT_DEPRECATED_OBJC) +# if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +# else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +# endif #endif #if defined(__OBJC__) #if !defined(IBSegueAction) -# define IBSegueAction +# define IBSegueAction #endif #endif #if !defined(SWIFT_EXTERN) @@ -207,26 +232,31 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #if !defined(SWIFT_CALL) # define SWIFT_CALL __attribute__((swiftcall)) #endif +#if !defined(SWIFT_INDIRECT_RESULT) +# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result)) +#endif +#if !defined(SWIFT_CONTEXT) +# define SWIFT_CONTEXT __attribute__((swift_context)) +#endif +#if !defined(SWIFT_ERROR_RESULT) +# define SWIFT_ERROR_RESULT __attribute__((swift_error_result)) +#endif #if defined(__cplusplus) -#if !defined(SWIFT_NOEXCEPT) # define SWIFT_NOEXCEPT noexcept -#endif #else -#if !defined(SWIFT_NOEXCEPT) # define SWIFT_NOEXCEPT #endif +#if defined(_WIN32) +#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) +# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport) #endif -#if defined(__cplusplus) -#if !defined(SWIFT_CXX_INT_DEFINED) -#define SWIFT_CXX_INT_DEFINED -namespace swift { -using Int = ptrdiff_t; -using UInt = size_t; -} +#else +#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) +# define SWIFT_IMPORT_STDLIB_SYMBOL #endif #endif #if defined(__OBJC__) -#if __has_feature(modules) +#if __has_feature(objc_modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" #endif @@ -455,7 +485,6 @@ SWIFT_PROTOCOL("_TtP11UserLeapKit20SprigPresentationAPI_") /// \param completion Invoked when survey questions have been fetched and it is about to present it /// - (void)presentSurveyWithId:(NSInteger)surveyId from:(UIViewController * _Nonnull)viewController fetchCompletion:(void (^ _Nullable)(void))fetchCompletion; -/// Dismisses the active survey. - (void)dismissActiveSurvey; @end @@ -475,18 +504,14 @@ typedef SWIFT_ENUM(NSInteger, SurveyState, open) { + + @interface UserLeap (SWIFT_EXTENSION(UserLeapKit)) - (NSArray * _Nonnull)integrateOptimizely:(NSObject * _Nonnull)optimizely userId:(NSString * _Nonnull)userId attributes:(NSDictionary * _Nonnull)attributes isOverride:(BOOL)isOverride; - (void)integrateOptimizelyExperiments:(NSArray * _Nonnull)experiments :(BOOL)isOverride; @end -@interface UserLeap (SWIFT_EXTENSION(UserLeapKit)) -- (void)registerEventListenerFor:(enum LifecycleEvent)eventType listener:(void (^ _Nonnull)(NSDictionary * _Nonnull))listener; -- (void)unregisterAllEventListenersFor:(enum LifecycleEvent)eventType; -@end - - @interface UserLeap (SWIFT_EXTENSION(UserLeapKit)) - (void)trackAndPresentWithEventName:(NSString * _Nonnull)eventName from:(UIViewController * _Nonnull)viewController SWIFT_DEPRECATED_MSG("Use trackAndPresent with EventPayload instead"); - (void)trackAndPresentWithEventName:(NSString * _Nonnull)eventName userId:(NSString * _Nullable)userId partnerAnonymousId:(NSString * _Nullable)partnerAnonymousId from:(UIViewController * _Nonnull)viewController SWIFT_DEPRECATED_MSG("Use trackAndPresent with EventPayload instead"); @@ -507,11 +532,16 @@ typedef SWIFT_ENUM(NSInteger, SurveyState, open) { /// \param viewController The view controller from which to present the survey. /// - (void)presentDebugSurveyFrom:(UIViewController * _Nonnull)viewController; -/// Dismisses the active survey. - (void)dismissActiveSurvey; @end +@interface UserLeap (SWIFT_EXTENSION(UserLeapKit)) +- (void)registerEventListenerFor:(enum LifecycleEvent)eventType listener:(void (^ _Nonnull)(NSDictionary * _Nonnull))listener; +- (void)unregisterAllEventListenersFor:(enum LifecycleEvent)eventType; +@end + + @interface UserLeap (SWIFT_EXTENSION(UserLeapKit)) /// The UserLeap singleton must be configured before use. Call this during app initialization. /// \param withEnvironment The environment ID for your application. You can find this in your UserLeap account. @@ -602,7 +632,7 @@ typedef SWIFT_ENUM(NSInteger, SurveyState, open) { #endif #elif defined(__x86_64__) && __x86_64__ -// Generated by Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) +// Generated by Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) #ifndef USERLEAPKIT_SWIFT_H #define USERLEAPKIT_SWIFT_H #pragma clang diagnostic push @@ -625,7 +655,6 @@ typedef SWIFT_ENUM(NSInteger, SurveyState, open) { # include #endif -#pragma clang diagnostic ignored "-Wduplicate-method-match" #pragma clang diagnostic ignored "-Wauto-import" #if defined(__OBJC__) #include @@ -634,10 +663,24 @@ typedef SWIFT_ENUM(NSInteger, SurveyState, open) { #include #include #include +#include +#include +#include +#include #else #include #include #include +#include +#endif +#if defined(__cplusplus) +#if __has_include() +# include +#else +# ifndef __ptrauth_swift_value_witness_function_pointer +# define __ptrauth_swift_value_witness_function_pointer(x) +# endif +#endif #endif #if !defined(SWIFT_TYPEDEFS) @@ -673,53 +716,66 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); # if __has_feature(objc_class_property) # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ # else -# define SWIFT_CLASS_PROPERTY(...) +# define SWIFT_CLASS_PROPERTY(...) # endif #endif - -#if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) -#else -# define SWIFT_RUNTIME_NAME(X) +#if !defined(SWIFT_RUNTIME_NAME) +# if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +# else +# define SWIFT_RUNTIME_NAME(X) +# endif #endif -#if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) -#else -# define SWIFT_COMPILE_NAME(X) +#if !defined(SWIFT_COMPILE_NAME) +# if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +# else +# define SWIFT_COMPILE_NAME(X) +# endif #endif -#if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) -#else -# define SWIFT_METHOD_FAMILY(X) +#if !defined(SWIFT_METHOD_FAMILY) +# if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +# else +# define SWIFT_METHOD_FAMILY(X) +# endif #endif -#if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) -#else -# define SWIFT_NOESCAPE +#if !defined(SWIFT_NOESCAPE) +# if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +# else +# define SWIFT_NOESCAPE +# endif #endif -#if __has_attribute(ns_consumed) -# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) -#else -# define SWIFT_RELEASES_ARGUMENT +#if !defined(SWIFT_RELEASES_ARGUMENT) +# if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +# else +# define SWIFT_RELEASES_ARGUMENT +# endif #endif -#if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) -#else -# define SWIFT_WARN_UNUSED_RESULT +#if !defined(SWIFT_WARN_UNUSED_RESULT) +# if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +# else +# define SWIFT_WARN_UNUSED_RESULT +# endif #endif -#if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) -#else -# define SWIFT_NORETURN +#if !defined(SWIFT_NORETURN) +# if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +# else +# define SWIFT_NORETURN +# endif #endif #if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA +# define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) # if __has_attribute(objc_subclassing_restricted) @@ -739,28 +795,25 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) # endif #endif - #if !defined(SWIFT_PROTOCOL) # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif - #if !defined(SWIFT_EXTENSION) # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif - #if !defined(OBJC_DESIGNATED_INITIALIZER) # if __has_attribute(objc_designated_initializer) # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) # else -# define OBJC_DESIGNATED_INITIALIZER +# define OBJC_DESIGNATED_INITIALIZER # endif #endif #if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# if __has_attribute(enum_extensibility) # define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) # else -# define SWIFT_ENUM_ATTR(_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) # endif #endif #if !defined(SWIFT_ENUM) @@ -789,14 +842,16 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #if !defined(SWIFT_DEPRECATED_MSG) # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif -#if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) -#else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#if !defined(SWIFT_DEPRECATED_OBJC) +# if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +# else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +# endif #endif #if defined(__OBJC__) #if !defined(IBSegueAction) -# define IBSegueAction +# define IBSegueAction #endif #endif #if !defined(SWIFT_EXTERN) @@ -809,26 +864,31 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #if !defined(SWIFT_CALL) # define SWIFT_CALL __attribute__((swiftcall)) #endif +#if !defined(SWIFT_INDIRECT_RESULT) +# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result)) +#endif +#if !defined(SWIFT_CONTEXT) +# define SWIFT_CONTEXT __attribute__((swift_context)) +#endif +#if !defined(SWIFT_ERROR_RESULT) +# define SWIFT_ERROR_RESULT __attribute__((swift_error_result)) +#endif #if defined(__cplusplus) -#if !defined(SWIFT_NOEXCEPT) # define SWIFT_NOEXCEPT noexcept -#endif #else -#if !defined(SWIFT_NOEXCEPT) # define SWIFT_NOEXCEPT #endif +#if defined(_WIN32) +#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) +# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport) #endif -#if defined(__cplusplus) -#if !defined(SWIFT_CXX_INT_DEFINED) -#define SWIFT_CXX_INT_DEFINED -namespace swift { -using Int = ptrdiff_t; -using UInt = size_t; -} +#else +#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) +# define SWIFT_IMPORT_STDLIB_SYMBOL #endif #endif #if defined(__OBJC__) -#if __has_feature(modules) +#if __has_feature(objc_modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" #endif @@ -1057,7 +1117,6 @@ SWIFT_PROTOCOL("_TtP11UserLeapKit20SprigPresentationAPI_") /// \param completion Invoked when survey questions have been fetched and it is about to present it /// - (void)presentSurveyWithId:(NSInteger)surveyId from:(UIViewController * _Nonnull)viewController fetchCompletion:(void (^ _Nullable)(void))fetchCompletion; -/// Dismisses the active survey. - (void)dismissActiveSurvey; @end @@ -1077,18 +1136,14 @@ typedef SWIFT_ENUM(NSInteger, SurveyState, open) { + + @interface UserLeap (SWIFT_EXTENSION(UserLeapKit)) - (NSArray * _Nonnull)integrateOptimizely:(NSObject * _Nonnull)optimizely userId:(NSString * _Nonnull)userId attributes:(NSDictionary * _Nonnull)attributes isOverride:(BOOL)isOverride; - (void)integrateOptimizelyExperiments:(NSArray * _Nonnull)experiments :(BOOL)isOverride; @end -@interface UserLeap (SWIFT_EXTENSION(UserLeapKit)) -- (void)registerEventListenerFor:(enum LifecycleEvent)eventType listener:(void (^ _Nonnull)(NSDictionary * _Nonnull))listener; -- (void)unregisterAllEventListenersFor:(enum LifecycleEvent)eventType; -@end - - @interface UserLeap (SWIFT_EXTENSION(UserLeapKit)) - (void)trackAndPresentWithEventName:(NSString * _Nonnull)eventName from:(UIViewController * _Nonnull)viewController SWIFT_DEPRECATED_MSG("Use trackAndPresent with EventPayload instead"); - (void)trackAndPresentWithEventName:(NSString * _Nonnull)eventName userId:(NSString * _Nullable)userId partnerAnonymousId:(NSString * _Nullable)partnerAnonymousId from:(UIViewController * _Nonnull)viewController SWIFT_DEPRECATED_MSG("Use trackAndPresent with EventPayload instead"); @@ -1109,11 +1164,16 @@ typedef SWIFT_ENUM(NSInteger, SurveyState, open) { /// \param viewController The view controller from which to present the survey. /// - (void)presentDebugSurveyFrom:(UIViewController * _Nonnull)viewController; -/// Dismisses the active survey. - (void)dismissActiveSurvey; @end +@interface UserLeap (SWIFT_EXTENSION(UserLeapKit)) +- (void)registerEventListenerFor:(enum LifecycleEvent)eventType listener:(void (^ _Nonnull)(NSDictionary * _Nonnull))listener; +- (void)unregisterAllEventListenersFor:(enum LifecycleEvent)eventType; +@end + + @interface UserLeap (SWIFT_EXTENSION(UserLeapKit)) /// The UserLeap singleton must be configured before use. Call this during app initialization. /// \param withEnvironment The environment ID for your application. You can find this in your UserLeap account. diff --git a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Info.plist b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Info.plist index cb8dc9b..bcf926e 100644 Binary files a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Info.plist and b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Info.plist differ diff --git a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo index 7a25afd..db2eaa1 100644 Binary files a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo and b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo differ diff --git a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo index 3eb0b2d..246b6ea 100644 Binary files a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo and b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo differ diff --git a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.abi.json b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.abi.json index 4010095..192db3c 100644 --- a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.abi.json +++ b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.abi.json @@ -14,6 +14,13 @@ "RawDocComment" ] }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "Foundation", @@ -45,6 +52,13 @@ "declKind": "Import", "moduleName": "UserLeapKit" }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "TypeDecl", "name": "SprigAPIResult", @@ -2537,6 +2551,20 @@ "declKind": "Import", "moduleName": "UserLeapKit" }, + { + "kind": "Import", + "name": "UIKit", + "printedName": "UIKit", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "Foundation", @@ -2554,6 +2582,20 @@ "RawDocComment" ] }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "Foundation", @@ -4148,10 +4190,7 @@ "name": "Foundation", "printedName": "Foundation", "declKind": "Import", - "moduleName": "UserLeapKit", - "declAttributes": [ - "RawDocComment" - ] + "moduleName": "UserLeapKit" }, { "kind": "Import", @@ -4160,6 +4199,41 @@ "declKind": "Import", "moduleName": "UserLeapKit" }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "AVKit", + "printedName": "AVKit", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "AVKit", + "printedName": "AVKit", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "UIKit", @@ -6066,7 +6140,7 @@ { "kind": "TypeFunc", "name": "Function", - "printedName": "([Swift.String : Swift.String]) -> ()", + "printedName": "([Swift.String : Any]) -> ()", "children": [ { "kind": "TypeNominal", @@ -6076,7 +6150,7 @@ { "kind": "TypeNominal", "name": "Dictionary", - "printedName": "[Swift.String : Swift.String]", + "printedName": "[Swift.String : Any]", "children": [ { "kind": "TypeNominal", @@ -6086,9 +6160,8 @@ }, { "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" + "name": "ProtocolComposition", + "printedName": "Any" } ], "usr": "s:SD" @@ -6098,7 +6171,7 @@ ], "declKind": "Func", "usr": "c:@CM@UserLeapKit@objc(cs)UserLeap(im)registerEventListenerFor:listener:", - "mangledName": "$s11UserLeapKit0aB0C21registerEventListener3for8listeneryAA09LifecycleE0O_ySDyS2SGctF", + "mangledName": "$s11UserLeapKit0aB0C21registerEventListener3for8listeneryAA09LifecycleE0O_ySDySSypGctF", "moduleName": "UserLeapKit", "objc_name": "registerEventListenerFor:listener:", "declAttributes": [ @@ -6244,6 +6317,27 @@ "declKind": "Import", "moduleName": "UserLeapKit" }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "AVKit", + "printedName": "AVKit", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "Foundation", @@ -6254,6 +6348,27 @@ "RawDocComment" ] }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "AVKit", + "printedName": "AVKit", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "Foundation", @@ -6280,6 +6395,20 @@ "declAttributes": [ "RawDocComment" ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "AVKit", + "printedName": "AVKit", + "declKind": "Import", + "moduleName": "UserLeapKit" } ], "json_format_version": 8 @@ -6313,6 +6442,153 @@ "length": 33, "value": "\"com.userleap.sdk.threadSafeBool\"" }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/ThreadSafeCollections.swift", + "kind": "BooleanLiteral", + "offset": 1358, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "BooleanLiteral", + "offset": 753, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "IntegerLiteral", + "offset": 826, + "length": 3, + "value": "100" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "IntegerLiteral", + "offset": 832, + "length": 4, + "value": "1024" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "IntegerLiteral", + "offset": 839, + "length": 4, + "value": "1024" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "FloatLiteral", + "offset": 1526, + "length": 4, + "value": "30.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "IntegerLiteral", + "offset": 1658, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "IntegerLiteral", + "offset": 1681, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "FloatLiteral", + "offset": 1994, + "length": 3, + "value": "5.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 3472, + "length": 53, + "value": "\"[Session Replay] Failure fetching available storage\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 4047, + "length": 47, + "value": "\"Could not convert systemFreeSize to NSNumber.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 4285, + "length": 54, + "value": "\"Could not retrieve the documentDirectory attributes.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 4518, + "length": 47, + "value": "\"Could not retrieve the documentDirectory URL.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "BooleanLiteral", + "offset": 4791, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "BooleanLiteral", + "offset": 5446, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "FloatLiteral", + "offset": 5896, + "length": 3, + "value": "1.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "BooleanLiteral", + "offset": 5947, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 6838, + "length": 45, + "value": "\"[Session Replay] Touch phase was not caught\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 6917, + "length": 38, + "value": "\"Touch phase \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 6938, + "length": 3, + "value": "\" was not caught.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "BooleanLiteral", + "offset": 8063, + "length": 5, + "value": "false" + }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", "kind": "IntegerLiteral", @@ -6364,521 +6640,4119 @@ }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", - "kind": "StringLiteral", - "offset": 345, - "length": 25, - "value": "\"UserLeapKit.SprigSurveyViewController\"" + "kind": "BooleanLiteral", + "offset": 2036, + "length": 5, + "value": "false" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", "kind": "IntegerLiteral", - "offset": 396, - "length": 7, - "value": "1" + "offset": 2609, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", "kind": "IntegerLiteral", - "offset": 396, - "length": 7, - "value": "1" + "offset": 3088, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", - "kind": "StringLiteral", - "offset": 285, - "length": 14, - "value": "\"UserLeapKit.SprigAPIResult\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 3374, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Constant.swift", - "kind": "IntegerLiteral", - "offset": 186, - "length": 3, - "value": "150" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 3488, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "FloatLiteral", + "offset": 3564, + "length": 3, + "value": "0.2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 3744, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "FloatLiteral", + "offset": 3819, + "length": 3, + "value": "0.4" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 3854, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "FloatLiteral", + "offset": 3904, + "length": 3, + "value": "0.7" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "FloatLiteral", + "offset": 3955, + "length": 3, + "value": "0.4" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 4441, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 4478, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 4716, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 4883, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 4977, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 5326, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 5372, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 6011, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "StringLiteral", + "offset": 345, + "length": 25, + "value": "\"UserLeapKit.SprigSurveyViewController\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 7682, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 7761, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 7806, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 7845, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 8084, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 8774, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 8783, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 8818, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 9111, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Retryable.swift", + "kind": "BooleanLiteral", + "offset": 593, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Retryable.swift", + "kind": "IntegerLiteral", + "offset": 732, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Retryable.swift", + "kind": "BooleanLiteral", + "offset": 828, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Retryable.swift", + "kind": "BooleanLiteral", + "offset": 895, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", + "kind": "IntegerLiteral", + "offset": 396, + "length": 7, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", + "kind": "IntegerLiteral", + "offset": 396, + "length": 7, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", + "kind": "StringLiteral", + "offset": 285, + "length": 14, + "value": "\"UserLeapKit.SprigAPIResult\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "IntegerLiteral", + "offset": 186, + "length": 3, + "value": "150" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "IntegerLiteral", + "offset": 304, + "length": 3, + "value": "100" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 371, + "length": 11, + "value": "\"SGReplays\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 413, + "length": 16, + "value": "\"SGUploadStates\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 454, + "length": 10, + "value": "\"SGEvents\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 514, + "length": 8, + "value": "\"before\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 540, + "length": 7, + "value": "\"after\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 574, + "length": 16, + "value": "\"beforeAndAfter\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 514, + "length": 8, + "value": "\"before\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 540, + "length": 7, + "value": "\"after\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 574, + "length": 16, + "value": "\"beforeAndAfter\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "kind": "StringLiteral", + "offset": 7544, + "length": 22, + "value": "\"UserLeapKit.SGOptimizelyExperiment\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "kind": "IntegerLiteral", + "offset": 9155, + "length": 5, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "kind": "IntegerLiteral", + "offset": 9216, + "length": 8, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "kind": "IntegerLiteral", + "offset": 9155, + "length": 5, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "kind": "IntegerLiteral", + "offset": 9216, + "length": 8, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SPTouchWindow.swift", + "kind": "FloatLiteral", + "offset": 218, + "length": 3, + "value": "0.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SPTouchWindow.swift", + "kind": "Array", + "offset": 672, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SPTouchWindow.swift", + "kind": "BooleanLiteral", + "offset": 818, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SPTouchWindow.swift", + "kind": "BooleanLiteral", + "offset": 1313, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1047, + "length": 19, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1058, + "length": 1, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1065, + "length": 1, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1296, + "length": 6, + "value": "\"POST\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1901, + "length": 36, + "value": "\"Error making postData network call\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1971, + "length": 91, + "value": "\"Error received making network call. Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2052, + "length": 8, + "value": "\"(none)\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2061, + "length": 51, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 2732, + "length": 3, + "value": "200" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 2746, + "length": 3, + "value": "300" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2781, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 2798, + "length": 3, + "value": "401" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 2803, + "length": 3, + "value": "403" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2840, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 2857, + "length": 3, + "value": "404" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2892, + "length": 14, + "value": "\"Received 404\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2955, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3232, + "length": 24, + "value": "\"x-ul-mobile-user-agent\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3295, + "length": 25, + "value": "\"x-ul-mobile-sdk-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3356, + "length": 18, + "value": "\"x-ul-app-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3410, + "length": 17, + "value": "\"x-ul-os-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3462, + "length": 18, + "value": "\"x-ul-environment\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3513, + "length": 9, + "value": "\"unknown\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3536, + "length": 17, + "value": "\"accept-language\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3728, + "length": 26, + "value": "\"x-ul-installation-method\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "FloatLiteral", + "offset": 4511, + "length": 3, + "value": "1.1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 4763, + "length": 1, + "value": "5" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "FloatLiteral", + "offset": 4793, + "length": 3, + "value": "0.1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 4826, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 4830, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 4835, + "length": 9, + "value": "\";q=\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 4843, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 4874, + "length": 4, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 429, + "length": 8, + "value": "\"action\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 463, + "length": 9, + "value": "\"message\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 496, + "length": 5, + "value": "\"err\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 524, + "length": 6, + "value": "\"meta\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 557, + "length": 5, + "value": "\"vid\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 594, + "length": 7, + "value": "\"envId\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 626, + "length": 8, + "value": "\"method\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 670, + "length": 20, + "value": "\"additional.details\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 713, + "length": 6, + "value": "\"file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 743, + "length": 7, + "value": "\"stack\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 773, + "length": 6, + "value": "\"tags\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 808, + "length": 13, + "value": "\"device.name\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 855, + "length": 18, + "value": "\"device.OSVersion\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 1280, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 1487, + "length": 10, + "value": "\"(no vid)\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 1548, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2319, + "length": 12, + "value": "\"x-ul-error\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2332, + "length": 28, + "value": "\"userleap-\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2353, + "length": 1, + "value": "\"-error\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2735, + "length": 20, + "value": "\"An error occurred:\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2794, + "length": 33, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2809, + "length": 1, + "value": "\".\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2826, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2853, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2892, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2924, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 276, + "length": 31, + "value": "\"getOptimizelyConfigWithError:\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 362, + "length": 16, + "value": "\"experimentsMap\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 421, + "length": 4, + "value": "\"id\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 498, + "length": 59, + "value": "\"getVariationKeyWithExperimentKey:userId:attributes:error:\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 626, + "length": 10, + "value": "\"allFlags\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 702, + "length": 41, + "value": "\"jsonVariationDetailForKey:defaultValue:\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 798, + "length": 16, + "value": "\"variationIndex\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "Array", + "offset": 2197, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 3389, + "length": 37, + "value": "\"Error caught in integrateOptimizely\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "Array", + "offset": 3556, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 3746, + "length": 13, + "value": "\"experiments\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "Dictionary", + "offset": 4120, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 4749, + "length": 74, + "value": "\"[Warning] Sprig: LaunchDarkly integration failed to get variation detail\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 4900, + "length": 67, + "value": "\"[Warning] Sprig: LaunchDarkly integration failed to get all flags\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 5016, + "length": 78, + "value": "\"[Warning] Sprig: LaunchDarkly integration failed to respond to allFlags call\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 693, + "length": 19, + "value": "\"UploadStates.json\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 745, + "length": 1, + "value": "3" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 1839, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 2067, + "length": 57, + "value": "\"Error adding new SGReplayUploadState model to data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 2324, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 3508, + "length": 69, + "value": "\"Could not increment retry for SGReplayUploadState item in data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 3804, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 4063, + "length": 1, + "value": "3" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 4101, + "length": 1, + "value": "5" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 5241, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 5726, + "length": 58, + "value": "\"Could not remove SGReplayUploadState item from data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 6075, + "length": 58, + "value": "\"Failed to remove finished video file: file did not exist\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 6400, + "length": 38, + "value": "\"Failed to remove finished video file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 6472, + "length": 70, + "value": "\"Failed to remove video \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 6511, + "length": 4, + "value": "\" from file system. Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 1428, + "length": 32, + "value": "\"com.sprig.DataFileServiceQueue\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "Array", + "offset": 2250, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 2957, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 4413, + "length": 40, + "value": "\"Error fetching and decoding file data.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 4487, + "length": 62, + "value": "\"Failed to fetch and decode for file \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 4535, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 5048, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 5165, + "length": 38, + "value": "\"Error encoding and saving file data.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 5237, + "length": 61, + "value": "\"Failed to encode and save for file \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 5284, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 5397, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "IntegerLiteral", + "offset": 5598, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 5626, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 5786, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 6291, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "Array", + "offset": 6485, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 6672, + "length": 40, + "value": "\"Error saving empty array for data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 6746, + "length": 63, + "value": "\"Error saving empty array for data file for the URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 6807, + "length": 1, + "value": "\".\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 7058, + "length": 40, + "value": "\"Error creating directory for data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 7132, + "length": 65, + "value": "\"Error creating the directory for the URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 7183, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/EventPayload.swift", + "kind": "StringLiteral", + "offset": 173, + "length": 12, + "value": "\"UserLeapKit.EventPayload\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 216, + "length": 16, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 242, + "length": 12, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 264, + "length": 16, + "value": "3" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 290, + "length": 17, + "value": "4" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 317, + "length": 15, + "value": "5" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 342, + "length": 14, + "value": "6" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 366, + "length": 15, + "value": "7" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 391, + "length": 12, + "value": "8" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 413, + "length": 13, + "value": "9" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 526, + "length": 10, + "value": "\"sdkReady\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 580, + "length": 18, + "value": "\"visitorIdUpdated\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 638, + "length": 11, + "value": "\"setHeight\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 693, + "length": 18, + "value": "\"surveyDimensions\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 756, + "length": 19, + "value": "\"surveyWillPresent\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 818, + "length": 17, + "value": "\"surveyPresented\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 877, + "length": 16, + "value": "\"surveyAppeared\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 936, + "length": 19, + "value": "\"surveyWillDismiss\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 995, + "length": 14, + "value": "\"surveyClosed\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1050, + "length": 15, + "value": "\"replayCapture\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1193, + "length": 10, + "value": "\"sdkReady\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1247, + "length": 18, + "value": "\"visitorIdUpdated\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1317, + "length": 11, + "value": "\"setHeight\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1376, + "length": 18, + "value": "\"surveyDimensions\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1446, + "length": 19, + "value": "\"surveyWillPresent\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1518, + "length": 17, + "value": "\"surveyPresented\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1586, + "length": 16, + "value": "\"surveyAppeared\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1652, + "length": 19, + "value": "\"surveyWillDismiss\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1722, + "length": 14, + "value": "\"surveyClosed\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1784, + "length": 15, + "value": "\"replayCapture\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 216, + "length": 16, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 242, + "length": 12, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 264, + "length": 16, + "value": "3" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 290, + "length": 17, + "value": "4" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 317, + "length": 15, + "value": "5" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 342, + "length": 14, + "value": "6" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 366, + "length": 15, + "value": "7" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 391, + "length": 12, + "value": "8" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 413, + "length": 13, + "value": "9" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Extensions\/Date+SG.swift", + "kind": "IntegerLiteral", + "offset": 283, + "length": 5, + "value": "1000" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Extensions\/Date+SG.swift", + "kind": "StringLiteral", + "offset": 424, + "length": 13, + "value": "\"en_US_POSIX\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Extensions\/Date+SG.swift", + "kind": "StringLiteral", + "offset": 468, + "length": 29, + "value": "\"yyyy-MM-dd HH:mm:ss '+'SSSS\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Extensions\/Date+SG.swift", + "kind": "StringLiteral", + "offset": 529, + "length": 4, + "value": "\"%@\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIView+AutoLayout.swift", + "kind": "BooleanLiteral", + "offset": 318, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIView+AutoLayout.swift", + "kind": "BooleanLiteral", + "offset": 423, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIView+AutoLayout.swift", + "kind": "BooleanLiteral", + "offset": 515, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIView+AutoLayout.swift", + "kind": "BooleanLiteral", + "offset": 617, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIView+AutoLayout.swift", + "kind": "BooleanLiteral", + "offset": 858, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 2664, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 2682, + "length": 23, + "value": "\"(no URL on navAction)\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 2917, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 2990, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "Dictionary", + "offset": 3119, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 3380, + "length": 72, + "value": "\"Sprig.mobileHeaderJSON = '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 3449, + "length": 4, + "value": "\"';\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 3612, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "Array", + "offset": 3696, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 3740, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4132, + "length": 24, + "value": "\"x-ul-mobile-user-agent\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4195, + "length": 25, + "value": "\"x-ul-mobile-sdk-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4256, + "length": 18, + "value": "\"x-ul-app-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4310, + "length": 17, + "value": "\"x-ul-os-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4362, + "length": 18, + "value": "\"x-ul-environment\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4397, + "length": 9, + "value": "\"unknown\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4420, + "length": 17, + "value": "\"accept-language\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "FloatLiteral", + "offset": 4995, + "length": 3, + "value": "1.1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 5247, + "length": 1, + "value": "5" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "FloatLiteral", + "offset": 5277, + "length": 3, + "value": "0.1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 5310, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 5314, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 5319, + "length": 9, + "value": "\";q=\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 5327, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 5358, + "length": 4, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8102, + "length": 26, + "value": "\"x-ul-installation-method\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8152, + "length": 26, + "value": "\"x-ul-installation-method\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8274, + "length": 22, + "value": "\"x-ul-package-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8320, + "length": 22, + "value": "\"x-ul-package-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 8568, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 8816, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8877, + "length": 20, + "value": "\"sprigWebController\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8988, + "length": 74, + "value": "\"configure('\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9014, + "length": 4, + "value": "\"', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9058, + "length": 60, + "value": "\"');\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 9113, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9430, + "length": 28, + "value": "\"Sprig.locale = '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9456, + "length": 3, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9547, + "length": 39, + "value": "\"Sprig('setEmail', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9583, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10143, + "length": 69, + "value": "\"Sprig('setAttributes', \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10210, + "length": 1, + "value": "\")\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10464, + "length": 122, + "value": "\"Sprig.mobileIdentifyAndSetAttributes(\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10518, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10539, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10584, + "length": 1, + "value": "\")\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10940, + "length": 122, + "value": "\"Sprig.mobileIdentifyAndSetAttributes(\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10994, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11015, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11060, + "length": 1, + "value": "\")\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11349, + "length": 72, + "value": "\"Sprig('removeAttributes', \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11419, + "length": 1, + "value": "\")\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11510, + "length": 37, + "value": "\"Sprig('setUserId', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11544, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11640, + "length": 49, + "value": "\"Sprig('setPartnerAnonymousId', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11686, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11774, + "length": 41, + "value": "\"Sprig('setPreviewKey', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11812, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11873, + "length": 21, + "value": "\"Sprig('logoutUser')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12087, + "length": 11, + "value": "\"undefined\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12163, + "length": 13, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12174, + "length": 2, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12228, + "length": 11, + "value": "\"undefined\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12338, + "length": 25, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12361, + "length": 2, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12407, + "length": 11, + "value": "\"undefined\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12924, + "length": 131, + "value": "\"Sprig.mobileTrackEvent('\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12961, + "length": 78, + "value": "\"', \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12982, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13013, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13036, + "length": 1, + "value": "\", '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13052, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13159, + "length": 57, + "value": "\"Sprig.mobileDisplaySurvey(\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13197, + "length": 1, + "value": "\", '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13213, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13287, + "length": 42, + "value": "\"Sprig.dismissActiveSurvey('close.click')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13432, + "length": 56, + "value": "\"Sprig('integrateOptimizely', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13470, + "length": 19, + "value": "\"', \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13486, + "length": 1, + "value": "\")\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13614, + "length": 98, + "value": "\"Sprig('importLaunchDarklyJSONMapping', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13709, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14586, + "length": 11, + "value": "\"undefined\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14661, + "length": 13, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14672, + "length": 2, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14726, + "length": 11, + "value": "\"undefined\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14836, + "length": 25, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14859, + "length": 2, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 16645, + "length": 7, + "value": "\"ready\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 16843, + "length": 166, + "value": "\"window.webkit.messageHandlers.sprigWebController.postMessage({ type: 'loadShouldDismissOnPageChange', dismissOnPageChange:`${Sprig._config.dismissOnPageChange}` });\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 17255, + "length": 244, + "value": "\" Sprig._completeSessionReplay({\n surveyId: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 17347, + "length": 1, + "value": "\",\n responseGroupUuid: \"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 17410, + "length": 1, + "value": "\"\",\n eventDigest: [\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 17463, + "length": 1, + "value": "\"]\n })\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 17831, + "length": 6, + "value": "\"type\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18013, + "length": 6, + "value": "\"type\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18047, + "length": 31, + "value": "\"loadShouldDismissOnPageChange\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18126, + "length": 21, + "value": "\"dismissOnPageChange\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18184, + "length": 6, + "value": "\"true\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 18243, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 18319, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18406, + "length": 16, + "value": "\"surveyCallback\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18464, + "length": 12, + "value": "\"callbackId\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18507, + "length": 13, + "value": "\"surveyState\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 18739, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19180, + "length": 19, + "value": "\"surveyWillDismiss\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19256, + "length": 18, + "value": "\"visitorIdUpdated\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19309, + "length": 11, + "value": "\"visitorId\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19336, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19413, + "length": 15, + "value": "\"replayCapture\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19533, + "length": 31, + "value": "\"generateVideoUploadUrlPayload\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19632, + "length": 10, + "value": "\"surveyId\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19765, + "length": 18, + "value": "\"responseGroupUid\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19845, + "length": 9, + "value": "\"seconds\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 19959, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 20012, + "length": 12, + "value": "\"replayType\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 20277, + "length": 40, + "value": "\"Problem parsing replayCapture response\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 20351, + "length": 15, + "value": "\"Body: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 20365, + "length": 51, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 21263, + "length": 10, + "value": "\"sdkReady\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 21408, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 21692, + "length": 21, + "value": "\"dismissOnPageChange\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 21924, + "length": 51, + "value": "\"Failed to fire dismissOnPageChange event \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 21974, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 22056, + "length": 24, + "value": "\"dismiss.on.page.change\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 22478, + "length": 32, + "value": "\"maxMobileReplayDurationSeconds\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 22647, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 23310, + "length": 13, + "value": "\"cardBgColor\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 23339, + "length": 9, + "value": "\"#ffffff\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 23634, + "length": 11, + "value": "\"setHeight\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 23717, + "length": 8, + "value": "\"height\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 23741, + "length": 5, + "value": "\"400\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 23964, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 24324, + "length": 6, + "value": "\"type\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 609, + "length": 19, + "value": "\"UIBackgroundModes\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 680, + "length": 7, + "value": "\"fetch\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 767, + "length": 26, + "value": "\"com.userleap.UserLeapKit\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "BooleanLiteral", + "offset": 852, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "BooleanLiteral", + "offset": 904, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 1949, + "length": 5, + "value": "\"PUT\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 2081, + "length": 61, + "value": "\"Error: queueUploadTask was passed a URL that does not exist\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 2176, + "length": 74, + "value": "\"queueUploadTask was passed the URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 2227, + "length": 5, + "value": "\" which does not exist.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 3118, + "length": 61, + "value": "\"Error: urlSession for replay upload completed with an error\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 3213, + "length": 67, + "value": "\"urlSession for replay upload completed with an error. Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadProcessManager.swift", + "kind": "Array", + "offset": 2104, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadProcessManager.swift", + "kind": "StringLiteral", + "offset": 3056, + "length": 27, + "value": "\"Error saving touch event.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "BooleanLiteral", + "offset": 400, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 735, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 886, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "BooleanLiteral", + "offset": 1106, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 1327, + "length": 13, + "value": "\"sprig_touch\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 1401, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 1476, + "length": 66, + "value": "\"{ type: \"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 1500, + "length": 1, + "value": "\"\", timestamp: \"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 1535, + "length": 1, + "value": "\"\" }, \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "IntegerLiteral", + "offset": 1889, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "IntegerLiteral", + "offset": 1938, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "IntegerLiteral", + "offset": 1987, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 317, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "Dictionary", + "offset": 713, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 763, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "Dictionary", + "offset": 857, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 1386, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "StringLiteral", + "offset": 1442, + "length": 17, + "value": "\"sprigPreviewKey\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "Dictionary", + "offset": 2086, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "StringLiteral", + "offset": 2397, + "length": 26, + "value": "\"x-ul-installation-method\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 2901, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "StringLiteral", + "offset": 3574, + "length": 29, + "value": "\"Received low memory warning\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 11366, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 11411, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 11459, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 11507, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 11548, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 12729, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 13841, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 16524, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 16590, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 16649, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "Array", + "offset": 17152, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "StringLiteral", + "offset": 338, + "length": 3, + "value": "\"#\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "StringLiteral", + "offset": 349, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 380, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 623, + "length": 1, + "value": "3" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 731, + "length": 5, + "value": "0xF00" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 741, + "length": 1, + "value": "8" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 746, + "length": 4, + "value": "15.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 790, + "length": 5, + "value": "0x0F0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 800, + "length": 1, + "value": "4" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 805, + "length": 4, + "value": "15.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 847, + "length": 5, + "value": "0x00F" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 856, + "length": 4, + "value": "15.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 905, + "length": 1, + "value": "6" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 1014, + "length": 8, + "value": "0xFF0000" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 1027, + "length": 2, + "value": "16" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 1033, + "length": 5, + "value": "255.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 1078, + "length": 8, + "value": "0x00FF00" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 1091, + "length": 1, + "value": "8" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 1096, + "length": 5, + "value": "255.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 1139, + "length": 8, + "value": "0x0000FF" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 1151, + "length": 5, + "value": "255.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 1319, + "length": 3, + "value": "1.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Timestamp.swift", + "kind": "BooleanLiteral", + "offset": 489, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Timestamp.swift", + "kind": "StringLiteral", + "offset": 781, + "length": 34, + "value": "\"Error removing items before time\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "kind": "StringLiteral", + "offset": 114, + "length": 44, + "value": "\"result.message.error.networkAccessDisabled\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "kind": "StringLiteral", + "offset": 221, + "length": 52, + "value": "\"result.message.error.vistorAttributeTypeNotAllowed\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "kind": "StringLiteral", + "offset": 405, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "kind": "StringLiteral", + "offset": 114, + "length": 44, + "value": "\"result.message.error.networkAccessDisabled\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "kind": "StringLiteral", + "offset": 221, + "length": 52, + "value": "\"result.message.error.vistorAttributeTypeNotAllowed\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGEventManager.swift", + "kind": "StringLiteral", + "offset": 570, + "length": 13, + "value": "\"Events.json\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGEventManager.swift", + "kind": "StringLiteral", + "offset": 1026, + "length": 48, + "value": "\"Error adding new SGTouchEventInfo to data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGEventManager.swift", + "kind": "StringLiteral", + "offset": 1856, + "length": 48, + "value": "\"Error adding new SGTouchEventInfo to data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 82, + "length": 10, + "value": "\"api_root\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 122, + "length": 21, + "value": "\"endpoint_post_error\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 174, + "length": 22, + "value": "\"endpoint_post_upload\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 82, + "length": 10, + "value": "\"api_root\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 122, + "length": 21, + "value": "\"endpoint_post_error\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 174, + "length": 22, + "value": "\"endpoint_post_upload\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "Dictionary", + "offset": 309, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 405, + "length": 14, + "value": "\"SGProperties\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 436, + "length": 7, + "value": "\"plist\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 832, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 483, + "length": 6, + "value": "\"FINE\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 506, + "length": 6, + "value": "\"INFO\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 530, + "length": 7, + "value": "\"DEBUG\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 555, + "length": 7, + "value": "\"ERROR\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 579, + "length": 6, + "value": "\"NONE\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 712, + "length": 20, + "value": "\"USERLEAP_LOG_LEVEL\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "IntegerLiteral", + "offset": 925, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "BooleanLiteral", + "offset": 1003, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 483, + "length": 6, + "value": "\"FINE\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 506, + "length": 6, + "value": "\"INFO\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 530, + "length": 7, + "value": "\"DEBUG\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 555, + "length": 7, + "value": "\"ERROR\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 579, + "length": 6, + "value": "\"NONE\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "BooleanLiteral", + "offset": 1295, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 1574, + "length": 4, + "value": "\"\t\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 1630, + "length": 3, + "value": "\" \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 1647, + "length": 4, + "value": "\"\n\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "Array", + "offset": 1801, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "IntegerLiteral", + "offset": 1832, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "BooleanLiteral", + "offset": 2661, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 2957, + "length": 25, + "value": "\"TRACE \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 2981, + "length": 4, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 2984, + "length": 45, + "value": "\"elapsed: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 3028, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 3217, + "length": 19, + "value": "\"Unfinished Trace:\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "FloatLiteral", + "offset": 78, + "length": 5, + "value": "120.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 131, + "length": 2, + "value": "10" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 168, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "FloatLiteral", + "offset": 206, + "length": 3, + "value": "2.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 259, + "length": 3, + "value": "600" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 1272, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 1345, + "length": 17, + "value": "\"session-replay-\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 1388, + "length": 6, + "value": "\".mp4\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 1457, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "Array", + "offset": 1729, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 1758, + "length": 1, + "value": "6" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "Array", + "offset": 1826, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 1983, + "length": 35, + "value": "\"com.userleap.frameProcessingQueue\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 2304, + "length": 45, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 2322, + "length": 1, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 2344, + "length": 1, + "value": "\".mp4\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 3996, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 4087, + "length": 45, + "value": "\"[Session Replay] Could not create directory\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 4166, + "length": 69, + "value": "\"Could not create directory for the URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 4221, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 5311, + "length": 65, + "value": "\"[Session Replay] There was a problem cleaning partial MP4 files\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 5409, + "length": 42, + "value": "\"Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 5450, + "length": 51, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 6415, + "length": 40, + "value": "\"[Session Replay] Could not remove file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 6489, + "length": 51, + "value": "\"Could not remove file URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 6526, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 7144, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 7202, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 7693, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 7735, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 8145, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 8166, + "length": 2, + "value": "60" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 8292, + "length": 2, + "value": "60" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 8773, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 9038, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 9278, + "length": 45, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 9296, + "length": 1, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 9318, + "length": 1, + "value": "\".mp4\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 10201, + "length": 46, + "value": "\"[Session Replay] Could not initialize writer\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 10281, + "length": 68, + "value": "\"Could not initialize writer for URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 10335, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 10930, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Constant.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 304, - "length": 3, - "value": "100" + "offset": 11350, + "length": 1, + "value": "8" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 11490, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 11496, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 11639, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 7643, - "length": 22, - "value": "\"UserLeapKit.SGOptimizelyExperiment\"" + "offset": 11731, + "length": 48, + "value": "\"[Session Replay] Could not create pixel buffer\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 9254, - "length": 5, + "offset": 12110, + "length": 1, "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 9315, - "length": 8, - "value": "2" + "offset": 12254, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 9254, - "length": 5, + "offset": 12353, + "length": 1, "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 9315, - "length": 8, - "value": "2" + "offset": 12666, + "length": 1, + "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 13669, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 276, - "length": 31, - "value": "\"getOptimizelyConfigWithError:\"" + "offset": 15652, + "length": 47, + "value": "\"[Session Replay] Could not create video track\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 362, - "length": 16, - "value": "\"experimentsMap\"" + "offset": 15733, + "length": 100, + "value": "\"Could not create video track with \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 421, - "length": 4, - "value": "\"id\"" + "offset": 15786, + "length": 5, + "value": "\" input URLs and an output URL of \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 498, - "length": 59, - "value": "\"getVariationKeyWithExperimentKey:userId:attributes:error:\"" + "offset": 15831, + "length": 1, + "value": "\".\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 15907, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 626, - "length": 10, - "value": "\"allFlags\"" + "offset": 17313, + "length": 65, + "value": "\"[Session Replay] Could not insertTimeRange while joining videos\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 702, - "length": 41, - "value": "\"jsonVariationDetailForKey:defaultValue:\"" + "offset": 17412, + "length": 105, + "value": "\"Could not join videos with \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 798, - "length": 16, - "value": "\"variationIndex\"" + "offset": 17458, + "length": 5, + "value": "\" input URLs and an output URL of \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/EventPayload.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 173, - "length": 12, - "value": "\"UserLeapKit.EventPayload\"" + "offset": 17503, + "length": 1, + "value": "\". Error was: \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 17624, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 216, - "length": 16, + "offset": 17901, + "length": 1, "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 242, - "length": 12, - "value": "2" + "offset": 17915, + "length": 2, + "value": "30" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 264, - "length": 16, - "value": "3" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 18123, + "length": 76, + "value": "\"[Session Replay] VideoComposition renderSize was zero while joining videos\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 290, - "length": 17, - "value": "4" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 18209, + "length": 60, + "value": "\"VideoComposition renderSize was zero while joining videos.\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 317, - "length": 15, - "value": "5" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 18367, + "length": 5, + "value": "false" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 342, - "length": 14, - "value": "6" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 18626, + "length": 77, + "value": "\"[Session Replay] Could not create AVAssetExportSession while joining videos\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 366, - "length": 15, - "value": "7" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 18713, + "length": 61, + "value": "\"Could not create AVAssetExportSession while joining videos.\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 391, - "length": 12, - "value": "8" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 18872, + "length": 5, + "value": "false" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 413, - "length": 13, - "value": "9" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 20331, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 216, - "length": 16, - "value": "1" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 21179, + "length": 25, + "value": "\"FINISHED-\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 242, - "length": 12, - "value": "2" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 21199, + "length": 1, + "value": "\".mp4\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 264, - "length": 16, - "value": "3" + "offset": 22485, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 290, - "length": 17, - "value": "4" + "offset": 22568, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 317, - "length": 15, - "value": "5" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "Array", + "offset": 22753, + "length": 2, + "value": "[]" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 342, - "length": 14, - "value": "6" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "Array", + "offset": 22790, + "length": 2, + "value": "[]" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 366, - "length": 15, - "value": "7" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 656, + "length": 59, + "value": "\"Problem converting payload to data in fetchMediaUploadUrl\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 749, + "length": 25, + "value": "\"Payload: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 773, + "length": 51, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", "kind": "IntegerLiteral", - "offset": 391, - "length": 12, - "value": "8" + "offset": 1142, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", "kind": "IntegerLiteral", - "offset": 413, - "length": 13, - "value": "9" + "offset": 1361, + "length": 1, + "value": "3" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", - "kind": "BooleanLiteral", - "offset": 2765, - "length": 5, - "value": "false" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "IntegerLiteral", + "offset": 1399, + "length": 1, + "value": "5" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", - "kind": "BooleanLiteral", - "offset": 2838, - "length": 4, - "value": "true" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "IntegerLiteral", + "offset": 1798, + "length": 1, + "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", "kind": "Dictionary", - "offset": 2967, + "offset": 2303, "length": 3, "value": "[]" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", "kind": "StringLiteral", - "offset": 3228, - "length": 63, - "value": "\"Sprig.mobileHeaderJSON = '\"" + "offset": 2702, + "length": 8, + "value": "\"upload\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 2713, + "length": 5, + "value": "\"url\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 2861, + "length": 101, + "value": "\"Error converting JSON response to dictionary while fetching media upload URL in fetchMediaUploadURL\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 2996, + "length": 121, + "value": "\"Payload: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 3047, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 3050, + "length": 4, + "value": "\" JSON Response: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 3113, + "length": 2, + "value": "\"\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", "kind": "StringLiteral", - "offset": 3288, - "length": 4, - "value": "\"';\"" + "offset": 3116, + "length": 51, + "value": "\"\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "BooleanLiteral", - "offset": 3519, + "offset": 1096, "length": 5, "value": "false" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", - "kind": "Array", - "offset": 3603, - "length": 2, - "value": "[]" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 1154, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 1190, + "length": 3, + "value": "100" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "BooleanLiteral", - "offset": 3647, + "offset": 1358, "length": 4, "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", - "kind": "Dictionary", - "offset": 666, - "length": 3, - "value": "[]" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "StringLiteral", + "offset": 1539, + "length": 15, + "value": "\"surveyWebView\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "BooleanLiteral", - "offset": 716, - "length": 5, - "value": "false" + "offset": 1785, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", - "kind": "Dictionary", - "offset": 813, - "length": 3, - "value": "[]" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 1824, + "length": 2, + "value": "14" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "BooleanLiteral", - "offset": 1172, + "offset": 1965, "length": 5, "value": "false" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 2031, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 1228, - "length": 17, - "value": "\"sprigPreviewKey\"" + "offset": 2103, + "length": 9, + "value": "\"snippet\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 114, - "length": 44, - "value": "\"result.message.error.networkAccessDisabled\"" + "offset": 2122, + "length": 6, + "value": "\"html\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 221, - "length": 52, - "value": "\"result.message.error.vistorAttributeTypeNotAllowed\"" + "offset": 2143, + "length": 25, + "value": "\"sprig_web_assets.bundle\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 114, - "length": 44, - "value": "\"result.message.error.networkAccessDisabled\"" + "offset": 2240, + "length": 32, + "value": "\"Unable to find resource bundle\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 221, - "length": 52, - "value": "\"result.message.error.vistorAttributeTypeNotAllowed\"" + "offset": 2306, + "length": 143, + "value": "\"Bundle resource path: \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 82, - "length": 10, - "value": "\"api_root\"" + "offset": 2370, + "length": 9, + "value": "\"unknown\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 122, - "length": 21, - "value": "\"endpoint_post_error\"" + "offset": 2380, + "length": 1, + "value": "\", bundle id: \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 82, - "length": 10, - "value": "\"api_root\"" + "offset": 2438, + "length": 9, + "value": "\"unknown\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 122, - "length": 21, - "value": "\"endpoint_post_error\"" + "offset": 2448, + "length": 51, + "value": "\"\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", - "kind": "Dictionary", - "offset": 256, - "length": 3, - "value": "[]" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 2959, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 483, - "length": 6, - "value": "\"FINE\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 3045, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 506, - "length": 6, - "value": "\"INFO\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 3183, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 530, - "length": 7, - "value": "\"DEBUG\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 3353, + "length": 1, + "value": "2" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 555, - "length": 7, - "value": "\"ERROR\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 3391, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 579, - "length": 6, - "value": "\"NONE\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 3550, + "length": 1, + "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 712, - "length": 20, - "value": "\"USERLEAP_LOG_LEVEL\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 3595, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 483, - "length": 6, - "value": "\"FINE\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 4696, + "length": 1, + "value": "5" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 506, - "length": 6, - "value": "\"INFO\"" + "offset": 4754, + "length": 29, + "value": "\"Error evaluating javascript\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 530, - "length": 7, - "value": "\"DEBUG\"" + "offset": 4817, + "length": 73, + "value": "\"Javascript was: \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 555, - "length": 7, - "value": "\"ERROR\"" + "offset": 4847, + "length": 1, + "value": "\". Error was: \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 579, - "length": 6, - "value": "\"NONE\"" + "offset": 4889, + "length": 51, + "value": "\"\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "BooleanLiteral", - "offset": 1295, - "length": 5, - "value": "false" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 5807, + "length": 1, + "value": "0" }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "BooleanLiteral", - "offset": 1096, - "length": 5, - "value": "false" + "offset": 5840, + "length": 4, + "value": "true" }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "IntegerLiteral", - "offset": 1154, + "offset": 6341, "length": 1, "value": "0" }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "IntegerLiteral", - "offset": 1190, - "length": 3, - "value": "100" + "offset": 6420, + "length": 1, + "value": "0" }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", @@ -6886,6 +10760,83 @@ "offset": 564, "length": 15, "value": "\"UserLeapKit.SprigSurveyView\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 392, + "length": 84, + "value": "\"UserLeap\/iOS;Version=\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 427, + "length": 1, + "value": "\";OSVersion=\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 450, + "length": 1, + "value": "\";AppVersion=\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 475, + "length": 1, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 697, + "length": 21, + "value": "\"USERLEAP_KILLSWITCH\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 747, + "length": 7, + "value": "\"0.0.1\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 797, + "length": 8, + "value": "\"4.20.2\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 1370, + "length": 28, + "value": "\"CFBundleShortVersionString\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 1488, + "length": 9, + "value": "\"Unknown\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 1711, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "IntegerLiteral", + "offset": 1803, + "length": 1, + "value": "0" } ] } \ No newline at end of file diff --git a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface index 113c9d0..43e96ce 100644 --- a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +++ b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface @@ -1,7 +1,8 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) +// swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) // swift-module-flags: -target arm64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -Osize -module-name UserLeapKit // swift-module-flags-ignorable: -enable-bare-slash-regex +import AVKit import CoreGraphics import Foundation import Swift @@ -65,8 +66,8 @@ import _StringProcessing @objc public class SGOptimizelyExperiment : ObjectiveC.NSObject, Swift.Codable { @objc public init(id: Swift.String, variation: Swift.String) @objc deinit - public func encode(to encoder: Swift.Encoder) throws - required public init(from decoder: Swift.Decoder) throws + public func encode(to encoder: any Swift.Encoder) throws + required public init(from decoder: any Swift.Decoder) throws } @objc public protocol SprigOptimizelyIntegrationAPI { @objc func integrateOptimizely(_ optimizely: ObjectiveC.NSObject, userId: Swift.String, attributes: Swift.Dictionary, isOverride: Swift.Bool) -> [UserLeapKit.SGOptimizelyExperiment] @@ -179,7 +180,7 @@ extension UserLeapKit.UserLeap : UserLeapKit.SprigPresentationAPI { @objc dynamic public func dismissActiveSurvey() } extension UserLeapKit.UserLeap { - @objc dynamic public func registerEventListener(for eventType: UserLeapKit.LifecycleEvent, listener: @escaping (Swift.Dictionary) -> Swift.Void) + @objc dynamic public func registerEventListener(for eventType: UserLeapKit.LifecycleEvent, listener: @escaping (Swift.Dictionary) -> Swift.Void) @objc dynamic public func unregisterAllEventListeners(for eventType: UserLeapKit.LifecycleEvent) } extension UserLeapKit.SprigAPIResult.SprigAPIResultStatus : Swift.Equatable {} diff --git a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc index c58c5d4..0102bf2 100644 Binary files a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc and b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc differ diff --git a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface index 113c9d0..43e96ce 100644 --- a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +++ b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface @@ -1,7 +1,8 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) +// swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) // swift-module-flags: -target arm64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -Osize -module-name UserLeapKit // swift-module-flags-ignorable: -enable-bare-slash-regex +import AVKit import CoreGraphics import Foundation import Swift @@ -65,8 +66,8 @@ import _StringProcessing @objc public class SGOptimizelyExperiment : ObjectiveC.NSObject, Swift.Codable { @objc public init(id: Swift.String, variation: Swift.String) @objc deinit - public func encode(to encoder: Swift.Encoder) throws - required public init(from decoder: Swift.Decoder) throws + public func encode(to encoder: any Swift.Encoder) throws + required public init(from decoder: any Swift.Decoder) throws } @objc public protocol SprigOptimizelyIntegrationAPI { @objc func integrateOptimizely(_ optimizely: ObjectiveC.NSObject, userId: Swift.String, attributes: Swift.Dictionary, isOverride: Swift.Bool) -> [UserLeapKit.SGOptimizelyExperiment] @@ -179,7 +180,7 @@ extension UserLeapKit.UserLeap : UserLeapKit.SprigPresentationAPI { @objc dynamic public func dismissActiveSurvey() } extension UserLeapKit.UserLeap { - @objc dynamic public func registerEventListener(for eventType: UserLeapKit.LifecycleEvent, listener: @escaping (Swift.Dictionary) -> Swift.Void) + @objc dynamic public func registerEventListener(for eventType: UserLeapKit.LifecycleEvent, listener: @escaping (Swift.Dictionary) -> Swift.Void) @objc dynamic public func unregisterAllEventListeners(for eventType: UserLeapKit.LifecycleEvent) } extension UserLeapKit.SprigAPIResult.SprigAPIResultStatus : Swift.Equatable {} diff --git a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.abi.json b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.abi.json index 4010095..192db3c 100644 --- a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +++ b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.abi.json @@ -14,6 +14,13 @@ "RawDocComment" ] }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "Foundation", @@ -45,6 +52,13 @@ "declKind": "Import", "moduleName": "UserLeapKit" }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "TypeDecl", "name": "SprigAPIResult", @@ -2537,6 +2551,20 @@ "declKind": "Import", "moduleName": "UserLeapKit" }, + { + "kind": "Import", + "name": "UIKit", + "printedName": "UIKit", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "Foundation", @@ -2554,6 +2582,20 @@ "RawDocComment" ] }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "Foundation", @@ -4148,10 +4190,7 @@ "name": "Foundation", "printedName": "Foundation", "declKind": "Import", - "moduleName": "UserLeapKit", - "declAttributes": [ - "RawDocComment" - ] + "moduleName": "UserLeapKit" }, { "kind": "Import", @@ -4160,6 +4199,41 @@ "declKind": "Import", "moduleName": "UserLeapKit" }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "AVKit", + "printedName": "AVKit", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "AVKit", + "printedName": "AVKit", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "UIKit", @@ -6066,7 +6140,7 @@ { "kind": "TypeFunc", "name": "Function", - "printedName": "([Swift.String : Swift.String]) -> ()", + "printedName": "([Swift.String : Any]) -> ()", "children": [ { "kind": "TypeNominal", @@ -6076,7 +6150,7 @@ { "kind": "TypeNominal", "name": "Dictionary", - "printedName": "[Swift.String : Swift.String]", + "printedName": "[Swift.String : Any]", "children": [ { "kind": "TypeNominal", @@ -6086,9 +6160,8 @@ }, { "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" + "name": "ProtocolComposition", + "printedName": "Any" } ], "usr": "s:SD" @@ -6098,7 +6171,7 @@ ], "declKind": "Func", "usr": "c:@CM@UserLeapKit@objc(cs)UserLeap(im)registerEventListenerFor:listener:", - "mangledName": "$s11UserLeapKit0aB0C21registerEventListener3for8listeneryAA09LifecycleE0O_ySDyS2SGctF", + "mangledName": "$s11UserLeapKit0aB0C21registerEventListener3for8listeneryAA09LifecycleE0O_ySDySSypGctF", "moduleName": "UserLeapKit", "objc_name": "registerEventListenerFor:listener:", "declAttributes": [ @@ -6244,6 +6317,27 @@ "declKind": "Import", "moduleName": "UserLeapKit" }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "AVKit", + "printedName": "AVKit", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "Foundation", @@ -6254,6 +6348,27 @@ "RawDocComment" ] }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "AVKit", + "printedName": "AVKit", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, { "kind": "Import", "name": "Foundation", @@ -6280,6 +6395,20 @@ "declAttributes": [ "RawDocComment" ] + }, + { + "kind": "Import", + "name": "Foundation", + "printedName": "Foundation", + "declKind": "Import", + "moduleName": "UserLeapKit" + }, + { + "kind": "Import", + "name": "AVKit", + "printedName": "AVKit", + "declKind": "Import", + "moduleName": "UserLeapKit" } ], "json_format_version": 8 @@ -6313,6 +6442,153 @@ "length": 33, "value": "\"com.userleap.sdk.threadSafeBool\"" }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/ThreadSafeCollections.swift", + "kind": "BooleanLiteral", + "offset": 1358, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "BooleanLiteral", + "offset": 753, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "IntegerLiteral", + "offset": 826, + "length": 3, + "value": "100" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "IntegerLiteral", + "offset": 832, + "length": 4, + "value": "1024" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "IntegerLiteral", + "offset": 839, + "length": 4, + "value": "1024" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "FloatLiteral", + "offset": 1526, + "length": 4, + "value": "30.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "IntegerLiteral", + "offset": 1658, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "IntegerLiteral", + "offset": 1681, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "FloatLiteral", + "offset": 1994, + "length": 3, + "value": "5.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 3472, + "length": 53, + "value": "\"[Session Replay] Failure fetching available storage\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 4047, + "length": 47, + "value": "\"Could not convert systemFreeSize to NSNumber.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 4285, + "length": 54, + "value": "\"Could not retrieve the documentDirectory attributes.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 4518, + "length": 47, + "value": "\"Could not retrieve the documentDirectory URL.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "BooleanLiteral", + "offset": 4791, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "BooleanLiteral", + "offset": 5446, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "FloatLiteral", + "offset": 5896, + "length": 3, + "value": "1.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "BooleanLiteral", + "offset": 5947, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 6838, + "length": 45, + "value": "\"[Session Replay] Touch phase was not caught\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 6917, + "length": 38, + "value": "\"Touch phase \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "StringLiteral", + "offset": 6938, + "length": 3, + "value": "\" was not caught.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayRecorder.swift", + "kind": "BooleanLiteral", + "offset": 8063, + "length": 5, + "value": "false" + }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", "kind": "IntegerLiteral", @@ -6364,521 +6640,4119 @@ }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", - "kind": "StringLiteral", - "offset": 345, - "length": 25, - "value": "\"UserLeapKit.SprigSurveyViewController\"" + "kind": "BooleanLiteral", + "offset": 2036, + "length": 5, + "value": "false" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", "kind": "IntegerLiteral", - "offset": 396, - "length": 7, - "value": "1" + "offset": 2609, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", "kind": "IntegerLiteral", - "offset": 396, - "length": 7, - "value": "1" + "offset": 3088, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", - "kind": "StringLiteral", - "offset": 285, - "length": 14, - "value": "\"UserLeapKit.SprigAPIResult\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 3374, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Constant.swift", - "kind": "IntegerLiteral", - "offset": 186, - "length": 3, - "value": "150" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 3488, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "FloatLiteral", + "offset": 3564, + "length": 3, + "value": "0.2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 3744, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "FloatLiteral", + "offset": 3819, + "length": 3, + "value": "0.4" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 3854, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "FloatLiteral", + "offset": 3904, + "length": 3, + "value": "0.7" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "FloatLiteral", + "offset": 3955, + "length": 3, + "value": "0.4" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 4441, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 4478, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 4716, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 4883, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 4977, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 5326, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "BooleanLiteral", + "offset": 5372, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 6011, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "StringLiteral", + "offset": 345, + "length": 25, + "value": "\"UserLeapKit.SprigSurveyViewController\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 7682, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 7761, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 7806, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 7845, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 8084, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 8774, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 8783, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 8818, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyViewController.swift", + "kind": "IntegerLiteral", + "offset": 9111, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Retryable.swift", + "kind": "BooleanLiteral", + "offset": 593, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Retryable.swift", + "kind": "IntegerLiteral", + "offset": 732, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Retryable.swift", + "kind": "BooleanLiteral", + "offset": 828, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Retryable.swift", + "kind": "BooleanLiteral", + "offset": 895, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", + "kind": "IntegerLiteral", + "offset": 396, + "length": 7, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", + "kind": "IntegerLiteral", + "offset": 396, + "length": 7, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Models\/SprigAPIResult.swift", + "kind": "StringLiteral", + "offset": 285, + "length": 14, + "value": "\"UserLeapKit.SprigAPIResult\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "IntegerLiteral", + "offset": 186, + "length": 3, + "value": "150" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "IntegerLiteral", + "offset": 304, + "length": 3, + "value": "100" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 371, + "length": 11, + "value": "\"SGReplays\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 413, + "length": 16, + "value": "\"SGUploadStates\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 454, + "length": 10, + "value": "\"SGEvents\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 514, + "length": 8, + "value": "\"before\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 540, + "length": 7, + "value": "\"after\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 574, + "length": 16, + "value": "\"beforeAndAfter\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 514, + "length": 8, + "value": "\"before\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 540, + "length": 7, + "value": "\"after\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/Constants.swift", + "kind": "StringLiteral", + "offset": 574, + "length": 16, + "value": "\"beforeAndAfter\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "kind": "StringLiteral", + "offset": 7544, + "length": 22, + "value": "\"UserLeapKit.SGOptimizelyExperiment\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "kind": "IntegerLiteral", + "offset": 9155, + "length": 5, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "kind": "IntegerLiteral", + "offset": 9216, + "length": 8, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "kind": "IntegerLiteral", + "offset": 9155, + "length": 5, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "kind": "IntegerLiteral", + "offset": 9216, + "length": 8, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SPTouchWindow.swift", + "kind": "FloatLiteral", + "offset": 218, + "length": 3, + "value": "0.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SPTouchWindow.swift", + "kind": "Array", + "offset": 672, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SPTouchWindow.swift", + "kind": "BooleanLiteral", + "offset": 818, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SPTouchWindow.swift", + "kind": "BooleanLiteral", + "offset": 1313, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1047, + "length": 19, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1058, + "length": 1, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1065, + "length": 1, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1296, + "length": 6, + "value": "\"POST\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1901, + "length": 36, + "value": "\"Error making postData network call\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 1971, + "length": 91, + "value": "\"Error received making network call. Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2052, + "length": 8, + "value": "\"(none)\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2061, + "length": 51, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 2732, + "length": 3, + "value": "200" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 2746, + "length": 3, + "value": "300" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2781, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 2798, + "length": 3, + "value": "401" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 2803, + "length": 3, + "value": "403" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2840, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 2857, + "length": 3, + "value": "404" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2892, + "length": 14, + "value": "\"Received 404\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 2955, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3232, + "length": 24, + "value": "\"x-ul-mobile-user-agent\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3295, + "length": 25, + "value": "\"x-ul-mobile-sdk-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3356, + "length": 18, + "value": "\"x-ul-app-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3410, + "length": 17, + "value": "\"x-ul-os-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3462, + "length": 18, + "value": "\"x-ul-environment\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3513, + "length": 9, + "value": "\"unknown\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3536, + "length": 17, + "value": "\"accept-language\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 3728, + "length": 26, + "value": "\"x-ul-installation-method\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "FloatLiteral", + "offset": 4511, + "length": 3, + "value": "1.1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 4763, + "length": 1, + "value": "5" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "FloatLiteral", + "offset": 4793, + "length": 3, + "value": "0.1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "IntegerLiteral", + "offset": 4826, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 4830, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 4835, + "length": 9, + "value": "\";q=\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 4843, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGNetworkService.swift", + "kind": "StringLiteral", + "offset": 4874, + "length": 4, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 429, + "length": 8, + "value": "\"action\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 463, + "length": 9, + "value": "\"message\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 496, + "length": 5, + "value": "\"err\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 524, + "length": 6, + "value": "\"meta\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 557, + "length": 5, + "value": "\"vid\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 594, + "length": 7, + "value": "\"envId\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 626, + "length": 8, + "value": "\"method\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 670, + "length": 20, + "value": "\"additional.details\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 713, + "length": 6, + "value": "\"file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 743, + "length": 7, + "value": "\"stack\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 773, + "length": 6, + "value": "\"tags\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 808, + "length": 13, + "value": "\"device.name\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 855, + "length": 18, + "value": "\"device.OSVersion\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 1280, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 1487, + "length": 10, + "value": "\"(no vid)\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 1548, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2319, + "length": 12, + "value": "\"x-ul-error\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2332, + "length": 28, + "value": "\"userleap-\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2353, + "length": 1, + "value": "\"-error\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2735, + "length": 20, + "value": "\"An error occurred:\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2794, + "length": 33, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2809, + "length": 1, + "value": "\".\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2826, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2853, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2892, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Managers\/SGLoggingMgr.swift", + "kind": "StringLiteral", + "offset": 2924, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 276, + "length": 31, + "value": "\"getOptimizelyConfigWithError:\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 362, + "length": 16, + "value": "\"experimentsMap\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 421, + "length": 4, + "value": "\"id\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 498, + "length": 59, + "value": "\"getVariationKeyWithExperimentKey:userId:attributes:error:\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 626, + "length": 10, + "value": "\"allFlags\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 702, + "length": 41, + "value": "\"jsonVariationDetailForKey:defaultValue:\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 798, + "length": 16, + "value": "\"variationIndex\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "Array", + "offset": 2197, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 3389, + "length": 37, + "value": "\"Error caught in integrateOptimizely\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "Array", + "offset": 3556, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 3746, + "length": 13, + "value": "\"experiments\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "Dictionary", + "offset": 4120, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 4749, + "length": 74, + "value": "\"[Warning] Sprig: LaunchDarkly integration failed to get variation detail\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 4900, + "length": 67, + "value": "\"[Warning] Sprig: LaunchDarkly integration failed to get all flags\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "kind": "StringLiteral", + "offset": 5016, + "length": 78, + "value": "\"[Warning] Sprig: LaunchDarkly integration failed to respond to allFlags call\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 693, + "length": 19, + "value": "\"UploadStates.json\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 745, + "length": 1, + "value": "3" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 1839, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 2067, + "length": 57, + "value": "\"Error adding new SGReplayUploadState model to data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 2324, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 3508, + "length": 69, + "value": "\"Could not increment retry for SGReplayUploadState item in data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 3804, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 4063, + "length": 1, + "value": "3" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 4101, + "length": 1, + "value": "5" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "IntegerLiteral", + "offset": 5241, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 5726, + "length": 58, + "value": "\"Could not remove SGReplayUploadState item from data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 6075, + "length": 58, + "value": "\"Failed to remove finished video file: file did not exist\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 6400, + "length": 38, + "value": "\"Failed to remove finished video file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 6472, + "length": 70, + "value": "\"Failed to remove video \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadStateManager.swift", + "kind": "StringLiteral", + "offset": 6511, + "length": 4, + "value": "\" from file system. Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 1428, + "length": 32, + "value": "\"com.sprig.DataFileServiceQueue\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "Array", + "offset": 2250, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 2957, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 4413, + "length": 40, + "value": "\"Error fetching and decoding file data.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 4487, + "length": 62, + "value": "\"Failed to fetch and decode for file \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 4535, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 5048, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 5165, + "length": 38, + "value": "\"Error encoding and saving file data.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 5237, + "length": 61, + "value": "\"Failed to encode and save for file \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 5284, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 5397, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "IntegerLiteral", + "offset": 5598, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 5626, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 5786, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "BooleanLiteral", + "offset": 6291, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "Array", + "offset": 6485, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 6672, + "length": 40, + "value": "\"Error saving empty array for data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 6746, + "length": 63, + "value": "\"Error saving empty array for data file for the URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 6807, + "length": 1, + "value": "\".\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 7058, + "length": 40, + "value": "\"Error creating directory for data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 7132, + "length": 65, + "value": "\"Error creating the directory for the URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService.swift", + "kind": "StringLiteral", + "offset": 7183, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/EventPayload.swift", + "kind": "StringLiteral", + "offset": 173, + "length": 12, + "value": "\"UserLeapKit.EventPayload\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 216, + "length": 16, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 242, + "length": 12, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 264, + "length": 16, + "value": "3" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 290, + "length": 17, + "value": "4" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 317, + "length": 15, + "value": "5" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 342, + "length": 14, + "value": "6" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 366, + "length": 15, + "value": "7" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 391, + "length": 12, + "value": "8" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 413, + "length": 13, + "value": "9" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 526, + "length": 10, + "value": "\"sdkReady\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 580, + "length": 18, + "value": "\"visitorIdUpdated\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 638, + "length": 11, + "value": "\"setHeight\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 693, + "length": 18, + "value": "\"surveyDimensions\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 756, + "length": 19, + "value": "\"surveyWillPresent\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 818, + "length": 17, + "value": "\"surveyPresented\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 877, + "length": 16, + "value": "\"surveyAppeared\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 936, + "length": 19, + "value": "\"surveyWillDismiss\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 995, + "length": 14, + "value": "\"surveyClosed\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1050, + "length": 15, + "value": "\"replayCapture\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1193, + "length": 10, + "value": "\"sdkReady\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1247, + "length": 18, + "value": "\"visitorIdUpdated\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1317, + "length": 11, + "value": "\"setHeight\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1376, + "length": 18, + "value": "\"surveyDimensions\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1446, + "length": 19, + "value": "\"surveyWillPresent\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1518, + "length": 17, + "value": "\"surveyPresented\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1586, + "length": 16, + "value": "\"surveyAppeared\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1652, + "length": 19, + "value": "\"surveyWillDismiss\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1722, + "length": 14, + "value": "\"surveyClosed\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "StringLiteral", + "offset": 1784, + "length": 15, + "value": "\"replayCapture\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 216, + "length": 16, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 242, + "length": 12, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 264, + "length": 16, + "value": "3" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 290, + "length": 17, + "value": "4" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 317, + "length": 15, + "value": "5" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 342, + "length": 14, + "value": "6" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 366, + "length": 15, + "value": "7" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 391, + "length": 12, + "value": "8" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "kind": "IntegerLiteral", + "offset": 413, + "length": 13, + "value": "9" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Extensions\/Date+SG.swift", + "kind": "IntegerLiteral", + "offset": 283, + "length": 5, + "value": "1000" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Extensions\/Date+SG.swift", + "kind": "StringLiteral", + "offset": 424, + "length": 13, + "value": "\"en_US_POSIX\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Extensions\/Date+SG.swift", + "kind": "StringLiteral", + "offset": 468, + "length": 29, + "value": "\"yyyy-MM-dd HH:mm:ss '+'SSSS\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Extensions\/Date+SG.swift", + "kind": "StringLiteral", + "offset": 529, + "length": 4, + "value": "\"%@\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIView+AutoLayout.swift", + "kind": "BooleanLiteral", + "offset": 318, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIView+AutoLayout.swift", + "kind": "BooleanLiteral", + "offset": 423, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIView+AutoLayout.swift", + "kind": "BooleanLiteral", + "offset": 515, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIView+AutoLayout.swift", + "kind": "BooleanLiteral", + "offset": 617, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIView+AutoLayout.swift", + "kind": "BooleanLiteral", + "offset": 858, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 2664, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 2682, + "length": 23, + "value": "\"(no URL on navAction)\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 2917, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 2990, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "Dictionary", + "offset": 3119, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 3380, + "length": 72, + "value": "\"Sprig.mobileHeaderJSON = '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 3449, + "length": 4, + "value": "\"';\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 3612, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "Array", + "offset": 3696, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 3740, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4132, + "length": 24, + "value": "\"x-ul-mobile-user-agent\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4195, + "length": 25, + "value": "\"x-ul-mobile-sdk-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4256, + "length": 18, + "value": "\"x-ul-app-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4310, + "length": 17, + "value": "\"x-ul-os-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4362, + "length": 18, + "value": "\"x-ul-environment\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4397, + "length": 9, + "value": "\"unknown\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 4420, + "length": 17, + "value": "\"accept-language\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "FloatLiteral", + "offset": 4995, + "length": 3, + "value": "1.1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 5247, + "length": 1, + "value": "5" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "FloatLiteral", + "offset": 5277, + "length": 3, + "value": "0.1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 5310, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 5314, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 5319, + "length": 9, + "value": "\";q=\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 5327, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 5358, + "length": 4, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8102, + "length": 26, + "value": "\"x-ul-installation-method\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8152, + "length": 26, + "value": "\"x-ul-installation-method\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8274, + "length": 22, + "value": "\"x-ul-package-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8320, + "length": 22, + "value": "\"x-ul-package-version\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 8568, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 8816, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8877, + "length": 20, + "value": "\"sprigWebController\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 8988, + "length": 74, + "value": "\"configure('\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9014, + "length": 4, + "value": "\"', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9058, + "length": 60, + "value": "\"');\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 9113, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9430, + "length": 28, + "value": "\"Sprig.locale = '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9456, + "length": 3, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9547, + "length": 39, + "value": "\"Sprig('setEmail', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 9583, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10143, + "length": 69, + "value": "\"Sprig('setAttributes', \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10210, + "length": 1, + "value": "\")\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10464, + "length": 122, + "value": "\"Sprig.mobileIdentifyAndSetAttributes(\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10518, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10539, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10584, + "length": 1, + "value": "\")\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10940, + "length": 122, + "value": "\"Sprig.mobileIdentifyAndSetAttributes(\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 10994, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11015, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11060, + "length": 1, + "value": "\")\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11349, + "length": 72, + "value": "\"Sprig('removeAttributes', \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11419, + "length": 1, + "value": "\")\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11510, + "length": 37, + "value": "\"Sprig('setUserId', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11544, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11640, + "length": 49, + "value": "\"Sprig('setPartnerAnonymousId', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11686, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11774, + "length": 41, + "value": "\"Sprig('setPreviewKey', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11812, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 11873, + "length": 21, + "value": "\"Sprig('logoutUser')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12087, + "length": 11, + "value": "\"undefined\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12163, + "length": 13, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12174, + "length": 2, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12228, + "length": 11, + "value": "\"undefined\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12338, + "length": 25, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12361, + "length": 2, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12407, + "length": 11, + "value": "\"undefined\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12924, + "length": 131, + "value": "\"Sprig.mobileTrackEvent('\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12961, + "length": 78, + "value": "\"', \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 12982, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13013, + "length": 1, + "value": "\", \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13036, + "length": 1, + "value": "\", '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13052, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13159, + "length": 57, + "value": "\"Sprig.mobileDisplaySurvey(\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13197, + "length": 1, + "value": "\", '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13213, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13287, + "length": 42, + "value": "\"Sprig.dismissActiveSurvey('close.click')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13432, + "length": 56, + "value": "\"Sprig('integrateOptimizely', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13470, + "length": 19, + "value": "\"', \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13486, + "length": 1, + "value": "\")\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13614, + "length": 98, + "value": "\"Sprig('importLaunchDarklyJSONMapping', '\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 13709, + "length": 4, + "value": "\"')\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14586, + "length": 11, + "value": "\"undefined\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14661, + "length": 13, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14672, + "length": 2, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14726, + "length": 11, + "value": "\"undefined\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14836, + "length": 25, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 14859, + "length": 2, + "value": "\"'\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 16645, + "length": 7, + "value": "\"ready\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 16843, + "length": 166, + "value": "\"window.webkit.messageHandlers.sprigWebController.postMessage({ type: 'loadShouldDismissOnPageChange', dismissOnPageChange:`${Sprig._config.dismissOnPageChange}` });\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 17255, + "length": 244, + "value": "\" Sprig._completeSessionReplay({\n surveyId: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 17347, + "length": 1, + "value": "\",\n responseGroupUuid: \"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 17410, + "length": 1, + "value": "\"\",\n eventDigest: [\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 17463, + "length": 1, + "value": "\"]\n })\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 17831, + "length": 6, + "value": "\"type\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18013, + "length": 6, + "value": "\"type\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18047, + "length": 31, + "value": "\"loadShouldDismissOnPageChange\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18126, + "length": 21, + "value": "\"dismissOnPageChange\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18184, + "length": 6, + "value": "\"true\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 18243, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 18319, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18406, + "length": 16, + "value": "\"surveyCallback\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18464, + "length": 12, + "value": "\"callbackId\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 18507, + "length": 13, + "value": "\"surveyState\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 18739, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19180, + "length": 19, + "value": "\"surveyWillDismiss\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19256, + "length": 18, + "value": "\"visitorIdUpdated\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19309, + "length": 11, + "value": "\"visitorId\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19336, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19413, + "length": 15, + "value": "\"replayCapture\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19533, + "length": 31, + "value": "\"generateVideoUploadUrlPayload\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19632, + "length": 10, + "value": "\"surveyId\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19765, + "length": 18, + "value": "\"responseGroupUid\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 19845, + "length": 9, + "value": "\"seconds\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 19959, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 20012, + "length": 12, + "value": "\"replayType\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 20277, + "length": 40, + "value": "\"Problem parsing replayCapture response\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 20351, + "length": 15, + "value": "\"Body: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 20365, + "length": 51, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 21263, + "length": 10, + "value": "\"sdkReady\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "BooleanLiteral", + "offset": 21408, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 21692, + "length": 21, + "value": "\"dismissOnPageChange\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 21924, + "length": 51, + "value": "\"Failed to fire dismissOnPageChange event \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 21974, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 22056, + "length": 24, + "value": "\"dismiss.on.page.change\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 22478, + "length": 32, + "value": "\"maxMobileReplayDurationSeconds\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 22647, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 23310, + "length": 13, + "value": "\"cardBgColor\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 23339, + "length": 9, + "value": "\"#ffffff\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 23634, + "length": 11, + "value": "\"setHeight\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 23717, + "length": 8, + "value": "\"height\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 23741, + "length": 5, + "value": "\"400\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "IntegerLiteral", + "offset": 23964, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "kind": "StringLiteral", + "offset": 24324, + "length": 6, + "value": "\"type\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 609, + "length": 19, + "value": "\"UIBackgroundModes\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 680, + "length": 7, + "value": "\"fetch\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 767, + "length": 26, + "value": "\"com.userleap.UserLeapKit\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "BooleanLiteral", + "offset": 852, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "BooleanLiteral", + "offset": 904, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 1949, + "length": 5, + "value": "\"PUT\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 2081, + "length": 61, + "value": "\"Error: queueUploadTask was passed a URL that does not exist\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 2176, + "length": 74, + "value": "\"queueUploadTask was passed the URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 2227, + "length": 5, + "value": "\" which does not exist.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 3118, + "length": 61, + "value": "\"Error: urlSession for replay upload completed with an error\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayUploader.swift", + "kind": "StringLiteral", + "offset": 3213, + "length": 67, + "value": "\"urlSession for replay upload completed with an error. Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadProcessManager.swift", + "kind": "Array", + "offset": 2104, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGReplayUploadProcessManager.swift", + "kind": "StringLiteral", + "offset": 3056, + "length": 27, + "value": "\"Error saving touch event.\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "BooleanLiteral", + "offset": 400, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 735, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 886, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "BooleanLiteral", + "offset": 1106, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 1327, + "length": 13, + "value": "\"sprig_touch\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 1401, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 1476, + "length": 66, + "value": "\"{ type: \"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 1500, + "length": 1, + "value": "\"\", timestamp: \"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "StringLiteral", + "offset": 1535, + "length": 1, + "value": "\"\" }, \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "IntegerLiteral", + "offset": 1889, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "IntegerLiteral", + "offset": 1938, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGUtil.swift", + "kind": "IntegerLiteral", + "offset": 1987, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 317, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "Dictionary", + "offset": 713, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 763, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "Dictionary", + "offset": 857, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 1386, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "StringLiteral", + "offset": 1442, + "length": 17, + "value": "\"sprigPreviewKey\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "Dictionary", + "offset": 2086, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "StringLiteral", + "offset": 2397, + "length": 26, + "value": "\"x-ul-installation-method\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 2901, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "StringLiteral", + "offset": 3574, + "length": 29, + "value": "\"Received low memory warning\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 11366, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 11411, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 11459, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 11507, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 11548, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 12729, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 13841, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 16524, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 16590, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "BooleanLiteral", + "offset": 16649, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "kind": "Array", + "offset": 17152, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "StringLiteral", + "offset": 338, + "length": 3, + "value": "\"#\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "StringLiteral", + "offset": 349, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 380, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 623, + "length": 1, + "value": "3" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 731, + "length": 5, + "value": "0xF00" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 741, + "length": 1, + "value": "8" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 746, + "length": 4, + "value": "15.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 790, + "length": 5, + "value": "0x0F0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 800, + "length": 1, + "value": "4" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 805, + "length": 4, + "value": "15.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 847, + "length": 5, + "value": "0x00F" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 856, + "length": 4, + "value": "15.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 905, + "length": 1, + "value": "6" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 1014, + "length": 8, + "value": "0xFF0000" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 1027, + "length": 2, + "value": "16" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 1033, + "length": 5, + "value": "255.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 1078, + "length": 8, + "value": "0x00FF00" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 1091, + "length": 1, + "value": "8" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 1096, + "length": 5, + "value": "255.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "IntegerLiteral", + "offset": 1139, + "length": 8, + "value": "0x0000FF" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 1151, + "length": 5, + "value": "255.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UI\/Extensions\/UIColor.swift", + "kind": "FloatLiteral", + "offset": 1319, + "length": 3, + "value": "1.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Timestamp.swift", + "kind": "BooleanLiteral", + "offset": 489, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Services\/SGDataFileService+Timestamp.swift", + "kind": "StringLiteral", + "offset": 781, + "length": 34, + "value": "\"Error removing items before time\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "kind": "StringLiteral", + "offset": 114, + "length": 44, + "value": "\"result.message.error.networkAccessDisabled\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "kind": "StringLiteral", + "offset": 221, + "length": 52, + "value": "\"result.message.error.vistorAttributeTypeNotAllowed\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "kind": "StringLiteral", + "offset": 405, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "kind": "StringLiteral", + "offset": 114, + "length": 44, + "value": "\"result.message.error.networkAccessDisabled\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "kind": "StringLiteral", + "offset": 221, + "length": 52, + "value": "\"result.message.error.vistorAttributeTypeNotAllowed\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGEventManager.swift", + "kind": "StringLiteral", + "offset": 570, + "length": 13, + "value": "\"Events.json\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGEventManager.swift", + "kind": "StringLiteral", + "offset": 1026, + "length": 48, + "value": "\"Error adding new SGTouchEventInfo to data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGEventManager.swift", + "kind": "StringLiteral", + "offset": 1856, + "length": 48, + "value": "\"Error adding new SGTouchEventInfo to data file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 82, + "length": 10, + "value": "\"api_root\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 122, + "length": 21, + "value": "\"endpoint_post_error\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 174, + "length": 22, + "value": "\"endpoint_post_upload\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 82, + "length": 10, + "value": "\"api_root\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 122, + "length": 21, + "value": "\"endpoint_post_error\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 174, + "length": 22, + "value": "\"endpoint_post_upload\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "Dictionary", + "offset": 309, + "length": 3, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 405, + "length": 14, + "value": "\"SGProperties\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 436, + "length": 7, + "value": "\"plist\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "kind": "StringLiteral", + "offset": 832, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 483, + "length": 6, + "value": "\"FINE\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 506, + "length": 6, + "value": "\"INFO\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 530, + "length": 7, + "value": "\"DEBUG\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 555, + "length": 7, + "value": "\"ERROR\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 579, + "length": 6, + "value": "\"NONE\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 712, + "length": 20, + "value": "\"USERLEAP_LOG_LEVEL\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "IntegerLiteral", + "offset": 925, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "BooleanLiteral", + "offset": 1003, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 483, + "length": 6, + "value": "\"FINE\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 506, + "length": 6, + "value": "\"INFO\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 530, + "length": 7, + "value": "\"DEBUG\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 555, + "length": 7, + "value": "\"ERROR\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 579, + "length": 6, + "value": "\"NONE\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "BooleanLiteral", + "offset": 1295, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 1574, + "length": 4, + "value": "\"\t\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 1630, + "length": 3, + "value": "\" \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 1647, + "length": 4, + "value": "\"\n\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "Array", + "offset": 1801, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "IntegerLiteral", + "offset": 1832, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "BooleanLiteral", + "offset": 2661, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 2957, + "length": 25, + "value": "\"TRACE \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 2981, + "length": 4, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 2984, + "length": 45, + "value": "\"elapsed: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 3028, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "kind": "StringLiteral", + "offset": 3217, + "length": 19, + "value": "\"Unfinished Trace:\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "FloatLiteral", + "offset": 78, + "length": 5, + "value": "120.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 131, + "length": 2, + "value": "10" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 168, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "FloatLiteral", + "offset": 206, + "length": 3, + "value": "2.0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 259, + "length": 3, + "value": "600" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 1272, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 1345, + "length": 17, + "value": "\"session-replay-\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 1388, + "length": 6, + "value": "\".mp4\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 1457, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "Array", + "offset": 1729, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 1758, + "length": 1, + "value": "6" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "Array", + "offset": 1826, + "length": 2, + "value": "[]" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 1983, + "length": 35, + "value": "\"com.userleap.frameProcessingQueue\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 2304, + "length": 45, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 2322, + "length": 1, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 2344, + "length": 1, + "value": "\".mp4\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 3996, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 4087, + "length": 45, + "value": "\"[Session Replay] Could not create directory\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 4166, + "length": 69, + "value": "\"Could not create directory for the URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 4221, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 5311, + "length": 65, + "value": "\"[Session Replay] There was a problem cleaning partial MP4 files\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 5409, + "length": 42, + "value": "\"Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 5450, + "length": 51, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 6415, + "length": 40, + "value": "\"[Session Replay] Could not remove file\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 6489, + "length": 51, + "value": "\"Could not remove file URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 6526, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 7144, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 7202, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 7693, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 7735, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 8145, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 8166, + "length": 2, + "value": "60" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 8292, + "length": 2, + "value": "60" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 8773, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 9038, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 9278, + "length": 45, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 9296, + "length": 1, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 9318, + "length": 1, + "value": "\".mp4\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 10201, + "length": 46, + "value": "\"[Session Replay] Could not initialize writer\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 10281, + "length": 68, + "value": "\"Could not initialize writer for URL \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 10335, + "length": 1, + "value": "\". Error was: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 10930, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Constant.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 304, - "length": 3, - "value": "100" + "offset": 11350, + "length": 1, + "value": "8" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 11490, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 11496, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 11639, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 7643, - "length": 22, - "value": "\"UserLeapKit.SGOptimizelyExperiment\"" + "offset": 11731, + "length": 48, + "value": "\"[Session Replay] Could not create pixel buffer\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 9254, - "length": 5, + "offset": 12110, + "length": 1, "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 9315, - "length": 8, - "value": "2" + "offset": 12254, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 9254, - "length": 5, + "offset": 12353, + "length": 1, "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SprigAPI.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 9315, - "length": 8, - "value": "2" + "offset": 12666, + "length": 1, + "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "IntegerLiteral", + "offset": 13669, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 276, - "length": 31, - "value": "\"getOptimizelyConfigWithError:\"" + "offset": 15652, + "length": 47, + "value": "\"[Session Replay] Could not create video track\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 362, - "length": 16, - "value": "\"experimentsMap\"" + "offset": 15733, + "length": 100, + "value": "\"Could not create video track with \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 421, - "length": 4, - "value": "\"id\"" + "offset": 15786, + "length": 5, + "value": "\" input URLs and an output URL of \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 498, - "length": 59, - "value": "\"getVariationKeyWithExperimentKey:userId:attributes:error:\"" + "offset": 15831, + "length": 1, + "value": "\".\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 15907, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 626, - "length": 10, - "value": "\"allFlags\"" + "offset": 17313, + "length": 65, + "value": "\"[Session Replay] Could not insertTimeRange while joining videos\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 702, - "length": 41, - "value": "\"jsonVariationDetailForKey:defaultValue:\"" + "offset": 17412, + "length": 105, + "value": "\"Could not join videos with \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Integrations\/SGIntegration.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 798, - "length": 16, - "value": "\"variationIndex\"" + "offset": 17458, + "length": 5, + "value": "\" input URLs and an output URL of \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/EventPayload.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "StringLiteral", - "offset": 173, - "length": 12, - "value": "\"UserLeapKit.EventPayload\"" + "offset": 17503, + "length": 1, + "value": "\". Error was: \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 17624, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 216, - "length": 16, + "offset": 17901, + "length": 1, "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 242, - "length": 12, - "value": "2" + "offset": 17915, + "length": 2, + "value": "30" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 264, - "length": 16, - "value": "3" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 18123, + "length": 76, + "value": "\"[Session Replay] VideoComposition renderSize was zero while joining videos\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 290, - "length": 17, - "value": "4" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 18209, + "length": 60, + "value": "\"VideoComposition renderSize was zero while joining videos.\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 317, - "length": 15, - "value": "5" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 18367, + "length": 5, + "value": "false" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 342, - "length": 14, - "value": "6" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 18626, + "length": 77, + "value": "\"[Session Replay] Could not create AVAssetExportSession while joining videos\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 366, - "length": 15, - "value": "7" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 18713, + "length": 61, + "value": "\"Could not create AVAssetExportSession while joining videos.\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 391, - "length": 12, - "value": "8" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 18872, + "length": 5, + "value": "false" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 413, - "length": 13, - "value": "9" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "BooleanLiteral", + "offset": 20331, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 216, - "length": 16, - "value": "1" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 21179, + "length": 25, + "value": "\"FINISHED-\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 242, - "length": 12, - "value": "2" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "StringLiteral", + "offset": 21199, + "length": 1, + "value": "\".mp4\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 264, - "length": 16, - "value": "3" + "offset": 22485, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", "kind": "IntegerLiteral", - "offset": 290, - "length": 17, - "value": "4" + "offset": 22568, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 317, - "length": 15, - "value": "5" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "Array", + "offset": 22753, + "length": 2, + "value": "[]" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 342, - "length": 14, - "value": "6" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGSessionReplayAssetManager.swift", + "kind": "Array", + "offset": 22790, + "length": 2, + "value": "[]" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", - "kind": "IntegerLiteral", - "offset": 366, - "length": 15, - "value": "7" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 656, + "length": 59, + "value": "\"Problem converting payload to data in fetchMediaUploadUrl\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 749, + "length": 25, + "value": "\"Payload: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 773, + "length": 51, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", "kind": "IntegerLiteral", - "offset": 391, - "length": 12, - "value": "8" + "offset": 1142, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/LifecycleEvent.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", "kind": "IntegerLiteral", - "offset": 413, - "length": 13, - "value": "9" + "offset": 1361, + "length": 1, + "value": "3" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", - "kind": "BooleanLiteral", - "offset": 2765, - "length": 5, - "value": "false" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "IntegerLiteral", + "offset": 1399, + "length": 1, + "value": "5" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", - "kind": "BooleanLiteral", - "offset": 2838, - "length": 4, - "value": "true" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "IntegerLiteral", + "offset": 1798, + "length": 1, + "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", "kind": "Dictionary", - "offset": 2967, + "offset": 2303, "length": 3, "value": "[]" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", "kind": "StringLiteral", - "offset": 3228, - "length": 63, - "value": "\"Sprig.mobileHeaderJSON = '\"" + "offset": 2702, + "length": 8, + "value": "\"upload\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 2713, + "length": 5, + "value": "\"url\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 2861, + "length": 101, + "value": "\"Error converting JSON response to dictionary while fetching media upload URL in fetchMediaUploadURL\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 2996, + "length": 121, + "value": "\"Payload: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 3047, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 3050, + "length": 4, + "value": "\" JSON Response: \"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", + "kind": "StringLiteral", + "offset": 3113, + "length": 2, + "value": "\"\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/SessionReplay\/SGUploadUrlManager.swift", "kind": "StringLiteral", - "offset": 3288, - "length": 4, - "value": "\"';\"" + "offset": 3116, + "length": 51, + "value": "\"\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "BooleanLiteral", - "offset": 3519, + "offset": 1096, "length": 5, "value": "false" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", - "kind": "Array", - "offset": 3603, - "length": 2, - "value": "[]" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 1154, + "length": 1, + "value": "0" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigWebController.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 1190, + "length": 3, + "value": "100" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "BooleanLiteral", - "offset": 3647, + "offset": 1358, "length": 4, "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", - "kind": "Dictionary", - "offset": 666, - "length": 3, - "value": "[]" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "StringLiteral", + "offset": 1539, + "length": 15, + "value": "\"surveyWebView\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "BooleanLiteral", - "offset": 716, - "length": 5, - "value": "false" + "offset": 1785, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", - "kind": "Dictionary", - "offset": 813, - "length": 3, - "value": "[]" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 1824, + "length": 2, + "value": "14" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "BooleanLiteral", - "offset": 1172, + "offset": 1965, "length": 5, "value": "false" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/UserLeap.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 2031, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 1228, - "length": 17, - "value": "\"sprigPreviewKey\"" + "offset": 2103, + "length": 9, + "value": "\"snippet\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 114, - "length": 44, - "value": "\"result.message.error.networkAccessDisabled\"" + "offset": 2122, + "length": 6, + "value": "\"html\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 221, - "length": 52, - "value": "\"result.message.error.vistorAttributeTypeNotAllowed\"" + "offset": 2143, + "length": 25, + "value": "\"sprig_web_assets.bundle\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 114, - "length": 44, - "value": "\"result.message.error.networkAccessDisabled\"" + "offset": 2240, + "length": 32, + "value": "\"Unable to find resource bundle\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Resources\/TextStrings.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 221, - "length": 52, - "value": "\"result.message.error.vistorAttributeTypeNotAllowed\"" + "offset": 2306, + "length": 143, + "value": "\"Bundle resource path: \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 82, - "length": 10, - "value": "\"api_root\"" + "offset": 2370, + "length": 9, + "value": "\"unknown\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 122, - "length": 21, - "value": "\"endpoint_post_error\"" + "offset": 2380, + "length": 1, + "value": "\", bundle id: \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 82, - "length": 10, - "value": "\"api_root\"" + "offset": 2438, + "length": 9, + "value": "\"unknown\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 122, - "length": 21, - "value": "\"endpoint_post_error\"" + "offset": 2448, + "length": 51, + "value": "\"\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Utils\/SGProperties.swift", - "kind": "Dictionary", - "offset": 256, - "length": 3, - "value": "[]" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 2959, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 483, - "length": 6, - "value": "\"FINE\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 3045, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 506, - "length": 6, - "value": "\"INFO\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 3183, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 530, - "length": 7, - "value": "\"DEBUG\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 3353, + "length": 1, + "value": "2" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 555, - "length": 7, - "value": "\"ERROR\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 3391, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 579, - "length": 6, - "value": "\"NONE\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 3550, + "length": 1, + "value": "1" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 712, - "length": 20, - "value": "\"USERLEAP_LOG_LEVEL\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "BooleanLiteral", + "offset": 3595, + "length": 4, + "value": "true" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "StringLiteral", - "offset": 483, - "length": 6, - "value": "\"FINE\"" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 4696, + "length": 1, + "value": "5" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 506, - "length": 6, - "value": "\"INFO\"" + "offset": 4754, + "length": 29, + "value": "\"Error evaluating javascript\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 530, - "length": 7, - "value": "\"DEBUG\"" + "offset": 4817, + "length": 73, + "value": "\"Javascript was: \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 555, - "length": 7, - "value": "\"ERROR\"" + "offset": 4847, + "length": 1, + "value": "\". Error was: \"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "StringLiteral", - "offset": 579, - "length": 6, - "value": "\"NONE\"" + "offset": 4889, + "length": 51, + "value": "\"\"" }, { - "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Logging.swift", - "kind": "BooleanLiteral", - "offset": 1295, - "length": 5, - "value": "false" + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", + "kind": "IntegerLiteral", + "offset": 5807, + "length": 1, + "value": "0" }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "BooleanLiteral", - "offset": 1096, - "length": 5, - "value": "false" + "offset": 5840, + "length": 4, + "value": "true" }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "IntegerLiteral", - "offset": 1154, + "offset": 6341, "length": 1, "value": "0" }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", "kind": "IntegerLiteral", - "offset": 1190, - "length": 3, - "value": "100" + "offset": 6420, + "length": 1, + "value": "0" }, { "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/WebController\/SprigSurveyView.swift", @@ -6886,6 +10760,83 @@ "offset": 564, "length": 15, "value": "\"UserLeapKit.SprigSurveyView\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 392, + "length": 84, + "value": "\"UserLeap\/iOS;Version=\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 427, + "length": 1, + "value": "\";OSVersion=\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 450, + "length": 1, + "value": "\";AppVersion=\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 475, + "length": 1, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 697, + "length": 21, + "value": "\"USERLEAP_KILLSWITCH\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 747, + "length": 7, + "value": "\"0.0.1\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 797, + "length": 8, + "value": "\"4.20.2\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 1370, + "length": 28, + "value": "\"CFBundleShortVersionString\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 1488, + "length": 9, + "value": "\"Unknown\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "StringLiteral", + "offset": 1711, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/runner\/work\/sdk\/sdk\/sdk\/platform\/ios\/UserLeapKit\/Network\/UserAgent.swift", + "kind": "IntegerLiteral", + "offset": 1803, + "length": 1, + "value": "0" } ] } \ No newline at end of file diff --git a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface index c887b8f..64fddd7 100644 --- a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +++ b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface @@ -1,7 +1,8 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) +// swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) // swift-module-flags: -target x86_64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -Osize -module-name UserLeapKit // swift-module-flags-ignorable: -enable-bare-slash-regex +import AVKit import CoreGraphics import Foundation import Swift @@ -65,8 +66,8 @@ import _StringProcessing @objc public class SGOptimizelyExperiment : ObjectiveC.NSObject, Swift.Codable { @objc public init(id: Swift.String, variation: Swift.String) @objc deinit - public func encode(to encoder: Swift.Encoder) throws - required public init(from decoder: Swift.Decoder) throws + public func encode(to encoder: any Swift.Encoder) throws + required public init(from decoder: any Swift.Decoder) throws } @objc public protocol SprigOptimizelyIntegrationAPI { @objc func integrateOptimizely(_ optimizely: ObjectiveC.NSObject, userId: Swift.String, attributes: Swift.Dictionary, isOverride: Swift.Bool) -> [UserLeapKit.SGOptimizelyExperiment] @@ -179,7 +180,7 @@ extension UserLeapKit.UserLeap : UserLeapKit.SprigPresentationAPI { @objc dynamic public func dismissActiveSurvey() } extension UserLeapKit.UserLeap { - @objc dynamic public func registerEventListener(for eventType: UserLeapKit.LifecycleEvent, listener: @escaping (Swift.Dictionary) -> Swift.Void) + @objc dynamic public func registerEventListener(for eventType: UserLeapKit.LifecycleEvent, listener: @escaping (Swift.Dictionary) -> Swift.Void) @objc dynamic public func unregisterAllEventListeners(for eventType: UserLeapKit.LifecycleEvent) } extension UserLeapKit.SprigAPIResult.SprigAPIResultStatus : Swift.Equatable {} diff --git a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc index e3ab613..eb62663 100644 Binary files a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc and b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc differ diff --git a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface index c887b8f..64fddd7 100644 --- a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +++ b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface @@ -1,7 +1,8 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) +// swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) // swift-module-flags: -target x86_64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -Osize -module-name UserLeapKit // swift-module-flags-ignorable: -enable-bare-slash-regex +import AVKit import CoreGraphics import Foundation import Swift @@ -65,8 +66,8 @@ import _StringProcessing @objc public class SGOptimizelyExperiment : ObjectiveC.NSObject, Swift.Codable { @objc public init(id: Swift.String, variation: Swift.String) @objc deinit - public func encode(to encoder: Swift.Encoder) throws - required public init(from decoder: Swift.Decoder) throws + public func encode(to encoder: any Swift.Encoder) throws + required public init(from decoder: any Swift.Decoder) throws } @objc public protocol SprigOptimizelyIntegrationAPI { @objc func integrateOptimizely(_ optimizely: ObjectiveC.NSObject, userId: Swift.String, attributes: Swift.Dictionary, isOverride: Swift.Bool) -> [UserLeapKit.SGOptimizelyExperiment] @@ -179,7 +180,7 @@ extension UserLeapKit.UserLeap : UserLeapKit.SprigPresentationAPI { @objc dynamic public func dismissActiveSurvey() } extension UserLeapKit.UserLeap { - @objc dynamic public func registerEventListener(for eventType: UserLeapKit.LifecycleEvent, listener: @escaping (Swift.Dictionary) -> Swift.Void) + @objc dynamic public func registerEventListener(for eventType: UserLeapKit.LifecycleEvent, listener: @escaping (Swift.Dictionary) -> Swift.Void) @objc dynamic public func unregisterAllEventListeners(for eventType: UserLeapKit.LifecycleEvent) } extension UserLeapKit.SprigAPIResult.SprigAPIResultStatus : Swift.Equatable {} diff --git a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/UserLeapKit b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/UserLeapKit index 2195fe7..a5a0cb7 100755 Binary files a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/UserLeapKit and b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/UserLeapKit differ diff --git a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/_CodeSignature/CodeResources b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/_CodeSignature/CodeResources index 5612c26..8fd301a 100644 --- a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/_CodeSignature/CodeResources +++ b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/_CodeSignature/CodeResources @@ -6,7 +6,7 @@ Headers/UserLeapKit-Swift.h - cIW6t2hkEvwph6fRy+hb/wZnYmM= + kG+XRauewDXcUpuNkKhL0T/qJrw= Headers/UserLeapKit.h @@ -14,7 +14,7 @@ Info.plist - yumCiZCAOtLdxBrnLU3EieXOlys= + UO+tCQa1wTS8aSXtnlxoiE22FBw= Localizable.strings @@ -22,51 +22,51 @@ Modules/UserLeapKit.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo - n/smi03kDSnnri/QCFa0yplEdIo= + CD2bcLlITewomrj3AVq81nMMN4Y= Modules/UserLeapKit.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo - kUZrMwRLmCP5+gU65VgxjwaqIBw= + BBjDyVX1VnI9wcX9KK/Sm3kIzkc= Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.abi.json - a4sG94JbZxJjRqSlVvFa76nh9rQ= + baMxw/RYz3BRJLKuuMmRa7716lU= Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface - 9EH1KT5WOvDHJfW1B23hK20u8q0= + hVOq2f93Q1WDRYT8rREXgLJwk7A= Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc - VC5CJQXIsOlu0OhfAiuvccWb6YY= + iUx/kSSa/tXC1q7oPl1NGmw4puo= Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface - 9EH1KT5WOvDHJfW1B23hK20u8q0= + hVOq2f93Q1WDRYT8rREXgLJwk7A= Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule - GspWEgEVDDtyhKr916jHEZ1EmVI= + Rpv08GOq0FxhiJvgDt4l897bGBw= Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.abi.json - a4sG94JbZxJjRqSlVvFa76nh9rQ= + baMxw/RYz3BRJLKuuMmRa7716lU= Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface - wVpYNwSkkdqDqSQQFdfl2MmE+C8= + zCdQUSz5t5JQ4E34uxj6TE1eLo4= Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc - luXYGx7atx6tbeJj+pHftXUu9F8= + MxK95Rmd8LHbi6QuMrpWNi359aQ= Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface - wVpYNwSkkdqDqSQQFdfl2MmE+C8= + zCdQUSz5t5JQ4E34uxj6TE1eLo4= Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule - 0akX7sl1fZqAxhQfHG1Sqhpy3Bo= + iYjU5HkNZFUyNlmftRG6UPbjdWA= Modules/module.modulemap @@ -74,11 +74,11 @@ SGProperties.plist - zbbsxyAC3WYAyCbyqkONtqe1CsE= + l23jjoa1RA5f4KgtuP9A9t4k+Gk= sprig_web_assets.bundle/shim.js - crFBZW+l41rzEdfNklEgFLdwXl4= + GTBroGiDESEPqCBXXfURWoqWUvw= sprig_web_assets.bundle/snippet.html @@ -86,11 +86,11 @@ sprig_web_assets.bundle/snippet.js - r4GLVnzcBNgMR0RpwUZR1UOZwRI= + 1wT0nIxcHQ0Uke2CQ7ZDSMTdjGg= sprig_web_assets.bundle/view.js - zg3uahrcELbruXCdgzCZnqyIopA= + /b4CtOA3D+WjQWuwebB4K6iKPRY= files2 @@ -99,7 +99,7 @@ hash2 - t5uRv9P/UVlayYhFoJ4kl8owNxzS4rYIDsLpiJM7nDA= + leZfouyMQ6roxlSL76t2T2i4Cm6c9TNWl0DpzREJLx4= Headers/UserLeapKit.h @@ -120,84 +120,84 @@ hash2 - bHqExY1577Z+lbjePFnyXfk/6t01aShPIJgDffoLNv0= + 0XpCDwWsDiu5GoeenHY43SfYdrI3D3OWarpiKqrRbrc= Modules/UserLeapKit.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo hash2 - oEG+CLccOuB7XRq8LpKNPY9IATdHMKK5Z+GkGfZI7BE= + hzkQBPwpo2EzyXweRVGR00n9JplRd3aXt42UOBeZHTI= Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.abi.json hash2 - Ycw7JrTD346sask9N7abYCAleWabHrMqUrEc7xiVazU= + WdtwKWHulAbmnkDSrrF7J1vt6Z8OCb57PaApJlYVjQg= Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface hash2 - hPQmOcaNP8SHSSgKsxM8ZB6JdwNYXyuGv9lMV9ZsOlU= + NF6ESmBHm1yuoDLl8Lb9go1e4InSv+snYWugzIJ+K3Y= Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc hash2 - SmR+ANVUZEdgblf4jzvRxjkwMKQoXe7wQYtWTzyvY64= + euhAUlE5+PlOHKXw7q3hc4yLblZthan86Eeo4LoWXBY= Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface hash2 - hPQmOcaNP8SHSSgKsxM8ZB6JdwNYXyuGv9lMV9ZsOlU= + NF6ESmBHm1yuoDLl8Lb9go1e4InSv+snYWugzIJ+K3Y= Modules/UserLeapKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule hash2 - /dZZg+GbDQfK4ispCtYGclsQ4IkVdRMLL+jwpcGEV4Y= + MjYcWktUP0h9wojftiFBAeVtchxzZglqAk0gIPegpsY= Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.abi.json hash2 - Ycw7JrTD346sask9N7abYCAleWabHrMqUrEc7xiVazU= + WdtwKWHulAbmnkDSrrF7J1vt6Z8OCb57PaApJlYVjQg= Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface hash2 - aaufSAi6feLh/4x0uZDe+EwUc52DQ5OJXgndvH+Htdo= + WTK279otgGNGThjWkYDR191NSrZXBTUMF+qr33DE1PA= Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc hash2 - +qdZeeBFQrEc3hNUi4q2Mgb4BthZ0dXKkgQ20X9BHGM= + ZWHn7AhimtYqacdLAR4L10PWosKr8+6dFUHoKf9wNzA= Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface hash2 - aaufSAi6feLh/4x0uZDe+EwUc52DQ5OJXgndvH+Htdo= + WTK279otgGNGThjWkYDR191NSrZXBTUMF+qr33DE1PA= Modules/UserLeapKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule hash2 - 7+anDDt/vUZ4mkSA+HPClZEqcfzlBKYm15+L98+TVog= + SDf8z5LLyNogTOog5PuPefEVs4HshRNll0PFsNcf2Tw= Modules/module.modulemap @@ -211,14 +211,14 @@ hash2 - 9L3fj5jgFXGk3oEgoBo0e0bgciyJfqnALXNo29vZT1c= + OJtADwHIQrqBBT07k29wXlwu3KDtQB6Xak3LBTdudq8= sprig_web_assets.bundle/shim.js hash2 - 992kPxv3PfdF8FeUKt/pV3TnPPj5zHqkhqsBSilrncE= + lksHSdb7pXLbmzm3PncfAOWoRdBC03plIkzTHELPTFY= sprig_web_assets.bundle/snippet.html @@ -232,14 +232,14 @@ hash2 - Vl3c5LthTTRqFXpJtEKcMOrQKC4mJCd3j3P1CBddVdY= + OBFkk3OH/Wots6ADD9xPVI4TwXaOJwh4AltgZHeJ46k= sprig_web_assets.bundle/view.js hash2 - irYX6gQW7fQk4bJ8F5y+UveZYf1Di0BHQ0/sXFAAeT4= + wUKBeGS/8F/g4tDh9L6kixDjWxULLQHwGEScpMWGwUE= diff --git a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/sprig_web_assets.bundle/shim.js b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/sprig_web_assets.bundle/shim.js index 2c9bac4..213d13a 100644 --- a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/sprig_web_assets.bundle/shim.js +++ b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/sprig_web_assets.bundle/shim.js @@ -1,705 +1,9 @@ -(function(q){typeof define=="function"&&define.amd?define(q):q()})(function(){"use strict";var Ug=Object.defineProperty;var Og=(q,We,kt)=>We in q?Ug(q,We,{enumerable:!0,configurable:!0,writable:!0,value:kt}):q[We]=kt;var se=(q,We,kt)=>(Og(q,typeof We!="symbol"?We+"":We,kt),kt);var q=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function We(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function kt(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var oe={},Tt={};Object.defineProperty(Tt,"__esModule",{value:!0});var Jr=function(){function e(){}return e.prototype.handleError=function(t){},e}();Tt.NoopErrorHandler=Jr;var ei=new Jr;function Ic(e){ei=e}Tt.setErrorHandler=Ic;function kc(){return ei}Tt.getErrorHandler=kc;function Tc(){ei=new Jr}Tt.resetErrorHandler=Tc;var ti={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.NOTSET=0]="NOTSET",t[t.DEBUG=1]="DEBUG",t[t.INFO=2]="INFO",t[t.WARNING=3]="WARNING",t[t.ERROR=4]="ERROR"}(e.LogLevel||(e.LogLevel={}))})(ti);var dt={},zt={},Zn={exports:{}},sa=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(sa){var la=new Uint8Array(16);Zn.exports=function(){return sa(la),la}}else{var ua=new Array(16);Zn.exports=function(){for(var t=0,n;t<16;t++)(t&3)===0&&(n=Math.random()*4294967296),ua[t]=n>>>((t&3)<<3)&255;return ua}}for(var ca=[],Xn=0;Xn<256;++Xn)ca[Xn]=(Xn+256).toString(16).substr(1);function Lc(e,t){var n=t||0,r=ca;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")}var da=Lc,Rc=Zn.exports,Ac=da,fa,ni,ri=0,ii=0;function Uc(e,t,n){var r=t&&n||0,i=t||[];e=e||{};var o=e.node||fa,a=e.clockseq!==void 0?e.clockseq:ni;if(o==null||a==null){var s=Rc();o==null&&(o=fa=[s[0]|1,s[1],s[2],s[3],s[4],s[5]]),a==null&&(a=ni=(s[6]<<8|s[7])&16383)}var l=e.msecs!==void 0?e.msecs:new Date().getTime(),u=e.nsecs!==void 0?e.nsecs:ii+1,c=l-ri+(u-ii)/1e4;if(c<0&&e.clockseq===void 0&&(a=a+1&16383),(c<0||l>ri)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");ri=l,ii=u,ni=a,l+=122192928e5;var d=((l&268435455)*1e4+u)%4294967296;i[r++]=d>>>24&255,i[r++]=d>>>16&255,i[r++]=d>>>8&255,i[r++]=d&255;var f=l/4294967296*1e4&268435455;i[r++]=f>>>8&255,i[r++]=f&255,i[r++]=f>>>24&15|16,i[r++]=f>>>16&255,i[r++]=a>>>8|128,i[r++]=a&255;for(var p=0;p<6;++p)i[r+p]=o[p];return t||Ac(i)}var Oc=Uc,Dc=Zn.exports,Pc=da;function Nc(e,t,n){var r=t&&n||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var i=e.random||(e.rng||Dc)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t)for(var o=0;o<16;++o)t[r+o]=i[o];return t||Pc(i)}var Mc=Nc,Vc=Oc,pa=Mc,oi=pa;oi.v1=Vc,oi.v4=pa;var jc=oi;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=jc;function n(){return t.v4()}e.generateUUID=n;function r(){return new Date().getTime()}e.getTimestamp=r;function i(d,f){for(var p=!1,h=Object.keys(d),v=0;v=this.logLevel},e.prototype.getLogLevelName=function(t){switch(t){case te.LogLevel.DEBUG:return"DEBUG";case te.LogLevel.INFO:return"INFO ";case te.LogLevel.WARNING:return"WARN ";case te.LogLevel.ERROR:return"ERROR";default:return"NOTSET"}},e.prototype.consoleLog=function(t,n){switch(t){case te.LogLevel.DEBUG:console.log.apply(console,n);break;case te.LogLevel.INFO:console.info.apply(console,n);break;case te.LogLevel.WARNING:console.warn.apply(console,n);break;case te.LogLevel.ERROR:console.error.apply(console,n);break;default:console.log.apply(console,n)}},e}();dt.ConsoleLogHandler=Hc;var yn=te.LogLevel.NOTSET,si=null,ma=function(){function e(t){t===void 0&&(t={}),this.messagePrefix="",t.messagePrefix&&(this.messagePrefix=t.messagePrefix)}return e.prototype.log=function(t,n){for(var r=[],i=2;i=this.maxQueueSize&&this.flush()},e.prototype.flush=function(){this.sink(this.buffer),this.buffer=[],this.timer.stop()},e}();Wt.DefaultEventQueue=ed,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendEventNotification=e.getQueue=e.validateAndGetBatchSize=e.validateAndGetFlushInterval=e.DEFAULT_BATCH_SIZE=e.DEFAULT_FLUSH_INTERVAL=void 0;var t=Wt,n=oe,r=zt;e.DEFAULT_FLUSH_INTERVAL=3e4,e.DEFAULT_BATCH_SIZE=10;var i=n.getLogger("EventProcessor");function o(u){return u<=0&&(i.warn("Invalid flushInterval "+u+", defaulting to "+e.DEFAULT_FLUSH_INTERVAL),u=e.DEFAULT_FLUSH_INTERVAL),u}e.validateAndGetFlushInterval=o;function a(u){return u=Math.floor(u),u<1&&(i.warn("Invalid batchSize "+u+", defaulting to "+e.DEFAULT_BATCH_SIZE),u=e.DEFAULT_BATCH_SIZE),u=Math.max(1,u),u}e.validateAndGetBatchSize=a;function s(u,c,d,f){var p;return u>1?p=new t.DefaultEventQueue({flushInterval:c,maxQueueSize:u,sink:d,batchComparator:f}):p=new t.SingleEventQueue({sink:d}),p}e.getQueue=s;function l(u,c){u&&u.sendNotifications(r.NOTIFICATION_TYPES.LOG_EVENT,c)}e.sendEventNotification=l}(li);var ya={};Object.defineProperty(ya,"__esModule",{value:!0});var _a={};Object.defineProperty(_a,"__esModule",{value:!0});var Yt={},er={};Object.defineProperty(er,"__esModule",{value:!0}),er.LocalStorageStore=void 0;var td=zt,nd=oe,wa=nd.getLogger("EventProcessor"),rd=function(){function e(t){var n=t.key,r=t.maxValues,i=r===void 0?1e3:r;this.LS_KEY=n,this.maxValues=i}return e.prototype.get=function(t){return this.getMap()[t]||null},e.prototype.set=function(t,n){var r=this.getMap();r[t]=n,this.replace(r)},e.prototype.remove=function(t){var n=this.getMap();delete n[t],this.replace(n)},e.prototype.values=function(){return td.objectValues(this.getMap())},e.prototype.clear=function(){this.replace({})},e.prototype.replace=function(t){try{window.localStorage&&localStorage.setItem(this.LS_KEY,JSON.stringify(t)),this.clean()}catch(n){wa.error(n)}},e.prototype.clean=function(){var t=this.getMap(),n=Object.keys(t),r=n.length-this.maxValues;if(!(r<1)){var i=n.map(function(a){return{key:a,value:t[a]}});i.sort(function(a,s){return a.value.timestamp-s.value.timestamp});for(var o=0;o0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]>>((t&3)<<3)&255;return Ra}}for(var Aa=[],rr=0;rr<256;++rr)Aa[rr]=(rr+256).toString(16).substr(1);function xd(e,t){var n=t||0,r=Aa;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")}var Ua=xd,Cd=nr.exports,Sd=Ua,Oa,fi,pi=0,hi=0;function Id(e,t,n){var r=t&&n||0,i=t||[];e=e||{};var o=e.node||Oa,a=e.clockseq!==void 0?e.clockseq:fi;if(o==null||a==null){var s=Cd();o==null&&(o=Oa=[s[0]|1,s[1],s[2],s[3],s[4],s[5]]),a==null&&(a=fi=(s[6]<<8|s[7])&16383)}var l=e.msecs!==void 0?e.msecs:new Date().getTime(),u=e.nsecs!==void 0?e.nsecs:hi+1,c=l-pi+(u-hi)/1e4;if(c<0&&e.clockseq===void 0&&(a=a+1&16383),(c<0||l>pi)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");pi=l,hi=u,fi=a,l+=122192928e5;var d=((l&268435455)*1e4+u)%4294967296;i[r++]=d>>>24&255,i[r++]=d>>>16&255,i[r++]=d>>>8&255,i[r++]=d&255;var f=l/4294967296*1e4&268435455;i[r++]=f>>>8&255,i[r++]=f&255,i[r++]=f>>>24&15|16,i[r++]=f>>>16&255,i[r++]=a>>>8|128,i[r++]=a&255;for(var p=0;p<6;++p)i[r+p]=o[p];return t||Sd(i)}var kd=Id,Td=nr.exports,Ld=Ua;function Rd(e,t,n){var r=t&&n||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var i=e.random||(e.rng||Td)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t)for(var o=0;o<16;++o)t[r+o]=i[o];return t||Ld(i)}var Ad=Rd,Ud=kd,Da=Ad,Pa=Da;Pa.v1=Ud,Pa.v4=Da;var Od={exports:{}};(function(e){(function(){function t(i,o){for(var a=i.length,s=o^a,l=0,u;a>=4;)u=i.charCodeAt(l)&255|(i.charCodeAt(++l)&255)<<8|(i.charCodeAt(++l)&255)<<16|(i.charCodeAt(++l)&255)<<24,u=(u&65535)*1540483477+(((u>>>16)*1540483477&65535)<<16),u^=u>>>24,u=(u&65535)*1540483477+(((u>>>16)*1540483477&65535)<<16),s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)^u,a-=4,++l;switch(a){case 3:s^=(i.charCodeAt(l+2)&255)<<16;case 2:s^=(i.charCodeAt(l+1)&255)<<8;case 1:s^=i.charCodeAt(l)&255,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)}return s^=s>>>13,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16),s^=s>>>15,s>>>0}function n(i,o){var a,s,l,u,c,d,f,p;for(a=i.length&3,s=i.length-a,l=o,c=3432918353,d=461845907,p=0;p>>16)*c&65535)<<16)&4294967295,f=f<<15|f>>>17,f=(f&65535)*d+(((f>>>16)*d&65535)<<16)&4294967295,l^=f,l=l<<13|l>>>19,u=(l&65535)*5+(((l>>>16)*5&65535)<<16)&4294967295,l=(u&65535)+27492+(((u>>>16)+58964&65535)<<16);switch(f=0,a){case 3:f^=(i.charCodeAt(p+2)&255)<<16;case 2:f^=(i.charCodeAt(p+1)&255)<<8;case 1:f^=i.charCodeAt(p)&255,f=(f&65535)*c+(((f>>>16)*c&65535)<<16)&4294967295,f=f<<15|f>>>17,f=(f&65535)*d+(((f>>>16)*d&65535)<<16)&4294967295,l^=f}return l^=i.length,l^=l>>>16,l=(l&65535)*2246822507+(((l>>>16)*2246822507&65535)<<16)&4294967295,l^=l>>>13,l=(l&65535)*3266489909+(((l>>>16)*3266489909&65535)<<16)&4294967295,l^=l>>>16,l>>>0}var r=n;r.v2=t,r.v3=n,e.exports=r})()})(Od);var Na={},vi={},mi={},Be={};Object.defineProperty(Be,"__esModule",{value:!0}),Be.DEFAULT_UPDATE_INTERVAL=5*60*1e3,Be.MIN_UPDATE_INTERVAL=1e3,Be.DEFAULT_URL_TEMPLATE="https://cdn.optimizely.com/datafiles/%s.json",Be.DEFAULT_AUTHENTICATED_URL_TEMPLATE="https://config.optimizely.com/datafiles/auth/%s.json",Be.BACKOFF_BASE_WAIT_SECONDS_BY_ERROR_COUNT=[0,8,16,32,64,128,256,512],Be.REQUEST_TIMEOUT_MS=60*1e3,Object.defineProperty(mi,"__esModule",{value:!0});var Dd=Be,Pd=oe,Nd=Pd.getLogger("DatafileManager"),Md="GET",Vd=4;function jd(e){var t=e.getAllResponseHeaders();if(t===null)return{};var n=t.split(`\r -`),r={};return n.forEach(function(i){var o=i.indexOf(": ");if(o>-1){var a=i.slice(0,o),s=i.slice(o+2);s.length>0&&(r[a]=s)}}),r}function Bd(e,t){Object.keys(e).forEach(function(n){var r=e[n];t.setRequestHeader(n,r)})}function Fd(e,t){var n=new XMLHttpRequest,r=new Promise(function(i,o){n.open(Md,e,!0),Bd(t,n),n.onreadystatechange=function(){if(n.readyState===Vd){var a=n.status;if(a===0){o(new Error("Request error"));return}var s=jd(n),l={statusCode:n.status,body:n.responseText,headers:s};i(l)}},n.timeout=Dd.REQUEST_TIMEOUT_MS,n.ontimeout=function(){Nd.error("Request timed out")},n.send()});return{responsePromise:r,abort:function(){n.abort()}}}mi.makeGetRequest=Fd;var gi={},yi={};Object.defineProperty(yi,"__esModule",{value:!0});var Hd=function(){function e(){this.listeners={},this.listenerId=1}return e.prototype.on=function(t,n){var r=this;this.listeners[t]||(this.listeners[t]={});var i=String(this.listenerId);return this.listenerId++,this.listeners[t][i]=n,function(){r.listeners[t]&&delete r.listeners[t][i]}},e.prototype.emit=function(t,n){var r=this.listeners[t];r&&Object.keys(r).forEach(function(i){var o=r[i];o(n)})},e.prototype.removeAllListeners=function(){this.listeners={}},e}();yi.default=Hd;var _i={};Object.defineProperty(_i,"__esModule",{value:!0});var wi=Be;function Kd(){return Math.round(Math.random()*1e3)}var $d=function(){function e(){this.errorCount=0}return e.prototype.getDelay=function(){if(this.errorCount===0)return 0;var t=wi.BACKOFF_BASE_WAIT_SECONDS_BY_ERROR_COUNT[Math.min(wi.BACKOFF_BASE_WAIT_SECONDS_BY_ERROR_COUNT.length-1,this.errorCount)];return t*1e3+Kd()},e.prototype.countError=function(){this.errorCount=wn.MIN_UPDATE_INTERVAL}function Va(e){return e>=200&&e<400}var Zd={get:function(){return Promise.resolve("")},set:function(){return Promise.resolve()},contains:function(){return Promise.resolve(!1)},remove:function(){return Promise.resolve()}},Xd=function(){function e(t){var n=this,r=ir(ir({},this.getConfigDefaults()),t),i=r.datafile,o=r.autoUpdate,a=o===void 0?!1:o,s=r.sdkKey,l=r.updateInterval,u=l===void 0?wn.DEFAULT_UPDATE_INTERVAL:l,c=r.urlTemplate,d=c===void 0?wn.DEFAULT_URL_TEMPLATE:c,f=r.cache,p=f===void 0?Zd:f;this.cache=p,this.cacheKey="opt-datafile-"+s,this.isReadyPromiseSettled=!1,this.readyPromiseResolver=function(){},this.readyPromiseRejecter=function(){},this.readyPromise=new Promise(function(h,v){n.readyPromiseResolver=h,n.readyPromiseRejecter=v}),i?(this.currentDatafile=i,s||this.resolveReadyPromise()):this.currentDatafile="",this.isStarted=!1,this.datafileUrl=qd.sprintf(d,s),this.emitter=new zd.default,this.autoUpdate=a,Qd(u)?this.updateInterval=u:(Ce.warn("Invalid updateInterval %s, defaulting to %s",u,wn.DEFAULT_UPDATE_INTERVAL),this.updateInterval=wn.DEFAULT_UPDATE_INTERVAL),this.currentTimeout=null,this.currentRequest=null,this.backoffController=new Wd.default,this.syncOnCurrentRequestComplete=!1}return e.prototype.get=function(){return this.currentDatafile},e.prototype.start=function(){this.isStarted||(Ce.debug("Datafile manager started"),this.isStarted=!0,this.backoffController.reset(),this.setDatafileFromCacheIfAvailable(),this.syncDatafile())},e.prototype.stop=function(){return Ce.debug("Datafile manager stopped"),this.isStarted=!1,this.currentTimeout&&(clearTimeout(this.currentTimeout),this.currentTimeout=null),this.emitter.removeAllListeners(),this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=null),Promise.resolve()},e.prototype.onReady=function(){return this.readyPromise},e.prototype.on=function(t,n){return this.emitter.on(t,n)},e.prototype.onRequestRejected=function(t){!this.isStarted||(this.backoffController.countError(),t instanceof Error?Ce.error("Error fetching datafile: %s",t.message,t):typeof t=="string"?Ce.error("Error fetching datafile: %s",t):Ce.error("Error fetching datafile"))},e.prototype.onRequestResolved=function(t){if(!!this.isStarted){typeof t.statusCode<"u"&&Va(t.statusCode)?this.backoffController.reset():this.backoffController.countError(),this.trySavingLastModified(t.headers);var n=this.getNextDatafileFromResponse(t);if(n!=="")if(Ce.info("Updating datafile from response"),this.currentDatafile=n,this.cache.set(this.cacheKey,n),!this.isReadyPromiseSettled)this.resolveReadyPromise();else{var r={datafile:n};this.emitter.emit(Yd,r)}}},e.prototype.onRequestComplete=function(){!this.isStarted||(this.currentRequest=null,!this.isReadyPromiseSettled&&!this.autoUpdate&&this.rejectReadyPromise(new Error("Failed to become ready")),this.autoUpdate&&this.syncOnCurrentRequestComplete&&this.syncDatafile(),this.syncOnCurrentRequestComplete=!1)},e.prototype.syncDatafile=function(){var t=this,n={};this.lastResponseLastModified&&(n["if-modified-since"]=this.lastResponseLastModified),Ce.debug("Making datafile request to url %s with headers: %s",this.datafileUrl,function(){return JSON.stringify(n)}),this.currentRequest=this.makeGetRequest(this.datafileUrl,n);var r=function(){t.onRequestComplete()},i=function(a){t.onRequestResolved(a)},o=function(a){t.onRequestRejected(a)};this.currentRequest.responsePromise.then(i,o).then(r,r),this.autoUpdate&&this.scheduleNextUpdate()},e.prototype.resolveReadyPromise=function(){this.readyPromiseResolver(),this.isReadyPromiseSettled=!0},e.prototype.rejectReadyPromise=function(t){this.readyPromiseRejecter(t),this.isReadyPromiseSettled=!0},e.prototype.scheduleNextUpdate=function(){var t=this,n=this.backoffController.getDelay(),r=Math.max(n,this.updateInterval);Ce.debug("Scheduling sync in %s ms",r),this.currentTimeout=setTimeout(function(){t.currentRequest?t.syncOnCurrentRequestComplete=!0:t.syncDatafile()},r)},e.prototype.getNextDatafileFromResponse=function(t){return Ce.debug("Response status code: %s",t.statusCode),typeof t.statusCode>"u"||t.statusCode===304?"":Va(t.statusCode)?t.body:""},e.prototype.trySavingLastModified=function(t){var n=t["last-modified"]||t["Last-Modified"];typeof n<"u"&&(this.lastResponseLastModified=n,Ce.debug("Saved last modified header value from response: %s",this.lastResponseLastModified))},e.prototype.setDatafileFromCacheIfAvailable=function(){var t=this;this.cache.get(this.cacheKey).then(function(n){t.isStarted&&!t.isReadyPromiseSettled&&n!==""&&(Ce.debug("Using datafile from cache"),t.currentDatafile=n,t.resolveReadyPromise())})},e}();gi.default=Xd;var Jd=q&&q.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ef=q&&q.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vi,"__esModule",{value:!0});var tf=mi,nf=ef(gi),rf=function(e){Jd(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeGetRequest=function(n,r){return tf.makeGetRequest(n,r)},t.prototype.getConfigDefaults=function(){return{autoUpdate:!1}},t}(nf.default);vi.default=rf,Object.defineProperty(Na,"__esModule",{value:!0});var of=vi;Na.HttpPollingDatafileManager=of.default;var af={NOTSET:0,DEBUG:1,INFO:2,WARNING:3,ERROR:4},sf={CONDITION_EVALUATOR_ERROR:"%s: Error evaluating audience condition of type %s: %s",DATAFILE_AND_SDK_KEY_MISSING:"%s: You must provide at least one of sdkKey or datafile. Cannot start Optimizely",EXPERIMENT_KEY_NOT_IN_DATAFILE:"%s: Experiment key %s is not in datafile.",FEATURE_NOT_IN_DATAFILE:"%s: Feature key %s is not in datafile.",IMPROPERLY_FORMATTED_EXPERIMENT:"%s: Experiment key %s is improperly formatted.",INVALID_ATTRIBUTES:"%s: Provided attributes are in an invalid format.",INVALID_BUCKETING_ID:"%s: Unable to generate hash for bucketing ID %s: %s",INVALID_DATAFILE:"%s: Datafile is invalid - property %s: %s",INVALID_DATAFILE_MALFORMED:"%s: Datafile is invalid because it is malformed.",INVALID_CONFIG:"%s: Provided Optimizely config is in an invalid format.",INVALID_JSON:"%s: JSON object is not valid.",INVALID_ERROR_HANDLER:'%s: Provided "errorHandler" is in an invalid format.',INVALID_EVENT_DISPATCHER:'%s: Provided "eventDispatcher" is in an invalid format.',INVALID_EVENT_TAGS:"%s: Provided event tags are in an invalid format.",INVALID_EXPERIMENT_KEY:"%s: Experiment key %s is not in datafile. It is either invalid, paused, or archived.",INVALID_EXPERIMENT_ID:"%s: Experiment ID %s is not in datafile.",INVALID_GROUP_ID:"%s: Group ID %s is not in datafile.",INVALID_LOGGER:'%s: Provided "logger" is in an invalid format.',INVALID_ROLLOUT_ID:"%s: Invalid rollout ID %s attached to feature %s",INVALID_USER_ID:"%s: Provided user ID is in an invalid format.",INVALID_USER_PROFILE_SERVICE:"%s: Provided user profile service instance is in an invalid format: %s.",NO_DATAFILE_SPECIFIED:"%s: No datafile specified. Cannot start optimizely.",NO_JSON_PROVIDED:"%s: No JSON object to validate against schema.",NO_VARIATION_FOR_EXPERIMENT_KEY:"%s: No variation key %s defined in datafile for experiment %s.",UNDEFINED_ATTRIBUTE:"%s: Provided attribute: %s has an undefined value.",UNRECOGNIZED_ATTRIBUTE:"%s: Unrecognized attribute %s provided. Pruning before sending event to Optimizely.",UNABLE_TO_CAST_VALUE:"%s: Unable to cast value %s to type %s, returning null.",USER_NOT_IN_FORCED_VARIATION:"%s: User %s is not in the forced variation map. Cannot remove their forced variation.",USER_PROFILE_LOOKUP_ERROR:'%s: Error while looking up user profile for user ID "%s": %s.',USER_PROFILE_SAVE_ERROR:'%s: Error while saving user profile for user ID "%s": %s.',VARIABLE_KEY_NOT_IN_DATAFILE:'%s: Variable with key "%s" associated with feature with key "%s" is not in datafile.',VARIATION_ID_NOT_IN_DATAFILE:"%s: No variation ID %s defined in datafile for experiment %s.",VARIATION_ID_NOT_IN_DATAFILE_NO_EXPERIMENT:"%s: Variation ID %s is not in the datafile.",INVALID_INPUT_FORMAT:"%s: Provided %s is in an invalid format.",INVALID_DATAFILE_VERSION:"%s: This version of the JavaScript SDK does not support the given datafile version: %s",INVALID_VARIATION_KEY:"%s: Provided variation key is in an invalid format."},lf={ACTIVATE_USER:"%s: Activating user %s in experiment %s.",DISPATCH_CONVERSION_EVENT:"%s: Dispatching conversion event to URL %s with params %s.",DISPATCH_IMPRESSION_EVENT:"%s: Dispatching impression event to URL %s with params %s.",DEPRECATED_EVENT_VALUE:"%s: Event value is deprecated in %s call.",EVENT_KEY_NOT_FOUND:"%s: Event key %s is not in datafile.",EXPERIMENT_NOT_RUNNING:"%s: Experiment %s is not running.",FEATURE_ENABLED_FOR_USER:"%s: Feature %s is enabled for user %s.",FEATURE_NOT_ENABLED_FOR_USER:"%s: Feature %s is not enabled for user %s.",FEATURE_HAS_NO_EXPERIMENTS:"%s: Feature %s is not attached to any experiments.",FAILED_TO_PARSE_VALUE:'%s: Failed to parse event value "%s" from event tags.',FAILED_TO_PARSE_REVENUE:'%s: Failed to parse revenue value "%s" from event tags.',FORCED_BUCKETING_FAILED:"%s: Variation key %s is not in datafile. Not activating user %s.",INVALID_OBJECT:"%s: Optimizely object is not valid. Failing %s.",INVALID_CLIENT_ENGINE:"%s: Invalid client engine passed: %s. Defaulting to node-sdk.",INVALID_DEFAULT_DECIDE_OPTIONS:"%s: Provided default decide options is not an array.",INVALID_DECIDE_OPTIONS:"%s: Provided decide options is not an array. Using default decide options.",INVALID_VARIATION_ID:"%s: Bucketed into an invalid variation ID. Returning null.",NOTIFICATION_LISTENER_EXCEPTION:"%s: Notification listener for (%s) threw exception: %s",NO_ROLLOUT_EXISTS:"%s: There is no rollout of feature %s.",NOT_ACTIVATING_USER:"%s: Not activating user %s for experiment %s.",NOT_TRACKING_USER:"%s: Not tracking user %s.",PARSED_REVENUE_VALUE:'%s: Parsed revenue value "%s" from event tags.',PARSED_NUMERIC_VALUE:'%s: Parsed event value "%s" from event tags.',RETURNING_STORED_VARIATION:'%s: Returning previously activated variation "%s" of experiment "%s" for user "%s" from user profile.',ROLLOUT_HAS_NO_EXPERIMENTS:"%s: Rollout of feature %s has no experiments",SAVED_VARIATION:'%s: Saved variation "%s" of experiment "%s" for user "%s".',SAVED_VARIATION_NOT_FOUND:"%s: User %s was previously bucketed into variation with ID %s for experiment %s, but no matching variation was found.",SHOULD_NOT_DISPATCH_ACTIVATE:'%s: Experiment %s is not in "Running" state. Not activating user.',SKIPPING_JSON_VALIDATION:"%s: Skipping JSON schema validation.",TRACK_EVENT:"%s: Tracking event %s for user %s.",UNRECOGNIZED_DECIDE_OPTION:"%s: Unrecognized decide option %s provided.",USER_ASSIGNED_TO_EXPERIMENT_BUCKET:"%s: Assigned bucket %s to user with bucketing ID %s.",USER_BUCKETED_INTO_EXPERIMENT_IN_GROUP:"%s: User %s is in experiment %s of group %s.",USER_BUCKETED_INTO_TARGETING_RULE:"%s: User %s bucketed into targeting rule %s.",USER_IN_FEATURE_EXPERIMENT:"%s: User %s is in variation %s of experiment %s on the feature %s.",USER_IN_ROLLOUT:"%s: User %s is in rollout of feature %s.",USER_NOT_BUCKETED_INTO_EVERYONE_TARGETING_RULE:"%s: User %s not bucketed into everyone targeting rule due to traffic allocation.",USER_NOT_BUCKETED_INTO_EXPERIMENT_IN_GROUP:"%s: User %s is not in experiment %s of group %s.",USER_NOT_BUCKETED_INTO_ANY_EXPERIMENT_IN_GROUP:"%s: User %s is not in any experiment of group %s.",USER_NOT_BUCKETED_INTO_TARGETING_RULE:"%s User %s not bucketed into targeting rule %s due to traffic allocation. Trying everyone rule.",USER_NOT_IN_FEATURE_EXPERIMENT:"%s: User %s is not in any experiment on the feature %s.",USER_NOT_IN_ROLLOUT:"%s: User %s is not in rollout of feature %s.",USER_FORCED_IN_VARIATION:"%s: User %s is forced in variation %s.",USER_MAPPED_TO_FORCED_VARIATION:"%s: Set variation %s for experiment %s and user %s in the forced variation map.",USER_DOESNT_MEET_CONDITIONS_FOR_TARGETING_RULE:"%s: User %s does not meet conditions for targeting rule %s.",USER_MEETS_CONDITIONS_FOR_TARGETING_RULE:"%s: User %s meets conditions for targeting rule %s.",USER_HAS_VARIATION:"%s: User %s is in variation %s of experiment %s.",USER_HAS_FORCED_DECISION_WITH_RULE_SPECIFIED:"Variation (%s) is mapped to flag (%s), rule (%s) and user (%s) in the forced decision map.",USER_HAS_FORCED_DECISION_WITH_NO_RULE_SPECIFIED:"Variation (%s) is mapped to flag (%s) and user (%s) in the forced decision map.",USER_HAS_FORCED_DECISION_WITH_RULE_SPECIFIED_BUT_INVALID:"Invalid variation is mapped to flag (%s), rule (%s) and user (%s) in the forced decision map.",USER_HAS_FORCED_DECISION_WITH_NO_RULE_SPECIFIED_BUT_INVALID:"Invalid variation is mapped to flag (%s) and user (%s) in the forced decision map.",USER_HAS_FORCED_VARIATION:"%s: Variation %s is mapped to experiment %s and user %s in the forced variation map.",USER_HAS_NO_VARIATION:"%s: User %s is in no variation of experiment %s.",USER_HAS_NO_FORCED_VARIATION:"%s: User %s is not in the forced variation map.",USER_HAS_NO_FORCED_VARIATION_FOR_EXPERIMENT:"%s: No experiment %s mapped to user %s in the forced variation map.",USER_NOT_IN_ANY_EXPERIMENT:"%s: User %s is not in any experiment of group %s.",USER_NOT_IN_EXPERIMENT:"%s: User %s does not meet conditions to be in experiment %s.",USER_RECEIVED_DEFAULT_VARIABLE_VALUE:'%s: User "%s" is not in any variation or rollout rule. Returning default value for variable "%s" of feature flag "%s".',FEATURE_NOT_ENABLED_RETURN_DEFAULT_VARIABLE_VALUE:'%s: Feature "%s" is not enabled for user %s. Returning the default variable value "%s".',VARIABLE_NOT_USED_RETURN_DEFAULT_VARIABLE_VALUE:'%s: Variable "%s" is not used in variation "%s". Returning default value.',USER_RECEIVED_VARIABLE_VALUE:'%s: Got variable value "%s" for variable "%s" of feature flag "%s"',VALID_DATAFILE:"%s: Datafile is valid.",VALID_USER_PROFILE_SERVICE:"%s: Valid user profile service provided.",VARIATION_REMOVED_FOR_USER:"%s: Variation mapped to experiment %s has been removed for user %s.",VARIABLE_REQUESTED_WITH_WRONG_TYPE:'%s: Requested variable type "%s", but variable is of type "%s". Use correct API to retrieve value. Returning None.',VALID_BUCKETING_ID:'%s: BucketingId is valid: "%s"',BUCKETING_ID_NOT_STRING:"%s: BucketingID attribute is not a string. Defaulted to userId",EVALUATING_AUDIENCE:'%s: Starting to evaluate audience "%s" with conditions: %s.',EVALUATING_AUDIENCES_COMBINED:'%s: Evaluating audiences for %s "%s": %s.',AUDIENCE_EVALUATION_RESULT:'%s: Audience "%s" evaluated to %s.',AUDIENCE_EVALUATION_RESULT_COMBINED:"%s: Audiences for %s %s collectively evaluated to %s.",MISSING_ATTRIBUTE_VALUE:'%s: Audience condition %s evaluated to UNKNOWN because no value was passed for user attribute "%s".',UNEXPECTED_CONDITION_VALUE:"%s: Audience condition %s evaluated to UNKNOWN because the condition value is not supported.",UNEXPECTED_TYPE:'%s: Audience condition %s evaluated to UNKNOWN because a value of type "%s" was passed for user attribute "%s".',UNEXPECTED_TYPE_NULL:'%s: Audience condition %s evaluated to UNKNOWN because a null value was passed for user attribute "%s".',UNKNOWN_CONDITION_TYPE:"%s: Audience condition %s has an unknown condition type. You may need to upgrade to a newer release of the Optimizely SDK.",UNKNOWN_MATCH_TYPE:"%s: Audience condition %s uses an unknown match type. You may need to upgrade to a newer release of the Optimizely SDK.",UPDATED_OPTIMIZELY_CONFIG:"%s: Updated Optimizely config to revision %s (project id %s)",OUT_OF_BOUNDS:'%s: Audience condition %s evaluated to UNKNOWN because the number value for user attribute "%s" is not in the range [-2^53, +2^53].',UNABLE_TO_ATTACH_UNLOAD:'%s: unable to bind optimizely.close() to page unload event: "%s"'},uf={BOT_FILTERING:"$opt_bot_filtering",BUCKETING_ID:"$opt_bucketing_id",STICKY_BUCKETING_KEY:"$opt_experiment_bucket_map",USER_AGENT:"$opt_user_agent",FORCED_DECISION_NULL_RULE_KEY:"$opt_null_rule_key"},cf="javascript-sdk",df="node-sdk",ff="react-sdk",pf="react-native-sdk",hf="react-native-js-sdk",vf="4.9.4",mf="4.9.4",gf={AB_TEST:"ab-test",FEATURE:"feature",FEATURE_TEST:"feature-test",FEATURE_VARIABLE:"feature-variable",ALL_FEATURE_VARIABLES:"all-feature-variables",FLAG:"flag"},yf={FEATURE_TEST:"feature-test",ROLLOUT:"rollout",EXPERIMENT:"experiment"},_f={RULE:"rule",EXPERIMENT:"experiment"},wf={BOOLEAN:"boolean",DOUBLE:"double",INTEGER:"integer",STRING:"string",JSON:"json"},or={V2:"2",V3:"3",V4:"4"},bf={SDK_NOT_READY:"Optimizely SDK not configured properly yet.",FLAG_KEY_INVALID:'No flag was found for key "%s".',VARIABLE_VALUE_INVALID:'Variable value for key "%s" is invalid or wrong type.'},bi;(function(e){e.ACTIVATE="ACTIVATE:experiment, user_id,attributes, variation, event",e.DECISION="DECISION:type, userId, attributes, decisionInfo",e.LOG_EVENT="LOG_EVENT:logEvent",e.OPTIMIZELY_CONFIG_UPDATE="OPTIMIZELY_CONFIG_UPDATE",e.TRACK="TRACK:event_key, user_id, attributes, event_tags, event"})(bi||(bi={}));var Ef=Object.freeze({__proto__:null,LOG_LEVEL:af,ERROR_MESSAGES:sf,LOG_MESSAGES:lf,CONTROL_ATTRIBUTES:uf,JAVASCRIPT_CLIENT_ENGINE:cf,NODE_CLIENT_ENGINE:df,REACT_CLIENT_ENGINE:ff,REACT_NATIVE_CLIENT_ENGINE:pf,REACT_NATIVE_JS_CLIENT_ENGINE:hf,BROWSER_CLIENT_VERSION:vf,NODE_CLIENT_VERSION:mf,DECISION_NOTIFICATION_TYPES:gf,DECISION_SOURCES:yf,AUDIENCE_EVALUATION_TYPES:_f,FEATURE_VARIABLE_TYPES:wf,DATAFILE_VERSIONS:or,DECISION_MESSAGES:bf,get NOTIFICATION_TYPES(){return bi}});or.V2,or.V3,or.V4,function(){function e(){}return e.prototype.log=function(){},e}();function xf(e){return new oe.ConsoleLogHandler(e)}var ja;(function(e){e.BOOLEAN="boolean",e.DOUBLE="double",e.INTEGER="integer",e.STRING="string",e.JSON="json"})(ja||(ja={}));var Ba;(function(e){e.DISABLE_DECISION_EVENT="DISABLE_DECISION_EVENT",e.ENABLED_FLAGS_ONLY="ENABLED_FLAGS_ONLY",e.IGNORE_USER_PROFILE_SERVICE="IGNORE_USER_PROFILE_SERVICE",e.INCLUDE_REASONS="INCLUDE_REASONS",e.EXCLUDE_VARIABLES="EXCLUDE_VARIABLES"})(Ba||(Ba={})),oe.getLogger(),oe.getLogger(),oe.getLogger(),oe.getLogger(),oe.getLogger("EVENT_BUILDER"),oe.getLogger(),oe.setLogHandler(xf()),oe.setLogLevel(oe.LogLevel.INFO);let ar;const Cf=new Uint8Array(16);function Sf(){if(!ar&&(ar=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ar))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ar(Cf)}const le=[];for(let e=0;e<256;++e)le.push((e+256).toString(16).slice(1));function If(e,t=0){return(le[e[t+0]]+le[e[t+1]]+le[e[t+2]]+le[e[t+3]]+"-"+le[e[t+4]]+le[e[t+5]]+"-"+le[e[t+6]]+le[e[t+7]]+"-"+le[e[t+8]]+le[e[t+9]]+"-"+le[e[t+10]]+le[e[t+11]]+le[e[t+12]]+le[e[t+13]]+le[e[t+14]]+le[e[t+15]]).toLowerCase()}const Fa={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ye(e,t,n){if(Fa.randomUUID&&!t&&!e)return Fa.randomUUID();e=e||{};const r=e.random||(e.rng||Sf)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return If(r)}const Zt="ul-app";var O=(e=>(e.Caption="ul-caption",e.CardContainer="ul-card__container",e.CardMainContent="ul-card-main-content",e.Choice="choice",e.ChoiceCheckbox="select-checkbox",e.ChoiceGroup="ul-card__choices",e.ChoiceLabel="select-label",e.ChoiceLabelContainer="choice-label-container",e.ChoiceRadio="select-radio",e.ChoiceTextEntryContainer="choice-text-entry-container",e.ChoiceTextInput="choice-text-input",e.CloseButton="close-btn",e.CloseContainer="close-container",e.ConsentLegalNameInput="ul-consent-legal__name-input",e.CustomStyle="ul-custom-style",e.DesktopSuffix="--desktop",e.FadeInTransition="fade-in-transition",e.LikertNumber="likert-number",e.LikertSmiley="likert-smiley",e.LikertStar="likert-star",e.LoadingSpinner="ul-loading-spinner",e.LoadingSpinnerContainer="ul-loading-spinner-container",e.LoadingSpinnerFirst="first",e.LoadingSpinnerFourth="fourth",e.LoadingSpinnerSecond="second",e.LoadingSpinnerThird="third",e.MobileSuffix="--mobile",e.NPSNumber="nps-number",e.OpenTextInput="ul-card-text__input",e.QuestionHeader="ul-question",e.VideoCard="ul-card--video",e.CheckmarkButton="ul-button-checkmark",e.InactiveButton="ul-button-inactive",e.LeftAlignButton="ul-button-left-align",e.ButtonDisabled="sprig-button-disabled",e.SkipButton="ul-card-skip__button",e))(O||{});const Ei="#e6e6e6",bn="#bd282a",kf=500,Tf=1030;var Qe=(e=>(e.Closed="close.click",e.Complete="survey.completed",e.PageChange="page.change",e.API="api",e.Override="override",e))(Qe||{}),B=(e=>(e.ReplayCapture="replay.capture",e.SDKReady="sdk.ready",e.SurveyAppeared="survey.appeared",e.SurveyClosed="survey.closed",e.SurveyDimensions="survey.dimensions",e.SurveyFadingOut="survey.fadingOut",e.SurveyHeight="survey.height",e.SurveyPresented="survey.presented",e.SurveyLifeCycle="survey.lifeCycle",e.SurveyWillClose="survey.willClose",e.SurveyWillPresent="survey.will.present",e.CloseSurveyOnOverlayClick="close.survey.overlayClick",e.VisitorIDUpdated="visitor.id.updated",e.QuestionAnswered="question.answered",e))(B||{}),Ha=(e=>(e.SurveyId="survey.id",e))(Ha||{});const Ka={SDK_READY:"sdk.ready",SURVEY_APPEARED:"survey.appeared",SURVEY_CLOSED:"survey.closed",SURVEY_DIMENSIONS:"survey.dimensions",SURVEY_FADING_OUT:"survey.fadingOut",SURVEY_HEIGHT:"survey.height",SURVEY_PRESENTED:"survey.presented",SURVEY_LIFE_CYCLE:"survey.lifeCycle",SURVEY_WILL_CLOSE:"survey.willClose",SURVEY_WILL_PRESENT:"survey.will.present",QUESTION_ANSWERED:"question.answered",REPLAY_CAPTURE:"replay.capture",CLOSE_SURVEY_ON_OVERLAY_CLICK:"close.survey.overlayClick",VISITOR_ID_UPDATED:"visitor.id.updated",DATA:{DISMISS_REASONS:{API:"api",CLOSED:"close.click",COMPLETE:"survey.completed",PAGE_CHANGE:"page.change",OVERRIDE:"override"},SURVEY_ID:"survey.id"}};var Se=(e=>(e.VerifyViewVersion="verify.view.version",e.CurrentQuestion="survey.question",e.ViewPrototypeClick="question.prototype.click",e.ViewAgreementClick="question.agreement.click",e.RecordedTaskStart="recorded.task.start",e.RecordedTaskPermissionScreen="recorded.task.permission.screen",e.SurveyComplete="survey.complete",e))(Se||{}),Lt=(e=>(e.ViewVersion="view.version",e.QuestionId="qid",e.Props="props",e))(Lt||{}),Ie=(e=>(e.Video="video",e.Audio="audio",e.Screen="screen",e))(Ie||{}),ce=(e=>(e.PermissionStatus="permission.status",e.AvPermission="av.permission",e.ScreenPermission="screen.permission",e.BeginRecording="begin.recording",e.StartTask="start.task",e.FinishTask="finish.task",e))(ce||{}),ke=(e=>(e.Abandoned="abandoned",e.GivenUp="given.up",e.Completed="completed",e))(ke||{}),K=(e=>(e.ScreenPermissionRequested="screen.permission.requested",e.PermissionDescriptors="permission.descriptors",e.PermissionStatusCallback="permission.status.callback",e.StreamReadyCallback="stream.ready.callback",e.StreamCanceledCallback="stream.canceled.callback",e.TaskCompleteCallback="task.complete.callback",e.TaskResponse="task.response",e.TaskStatus="task.status",e.RecordingMediaTypes="recording.media.types",e.StartRecordingCallback="start.recording.callback",e.PassthroughData="passthrough.data",e.CurrentIndex="current.index",e.UploadCallback="upload.callback",e.ProgressCallback="progress.callback",e.BeginCallback="begin.callback",e))(K||{}),ye=(e=>(e.Preview="sprig.previewKey",e.Credentials="userleap.ids",e.PageViews="userleap.pageviews",e))(ye||{});const $a=()=>{try{return window.parent.Intercom}catch(e){return console.error(e),null}},Ga=[Object.freeze(Object.defineProperty({__proto__:null,enable:()=>{const e=$a();!e||(e.ul_wasVisible&&e("update",{hide_default_launcher:!1}),delete e.ul_wasVisible)},disable:()=>{const e=$a();!e||(e.ul_wasVisible=!!document.querySelector("iframe.intercom-launcher-frame"),e.ul_wasVisible&&e("update",{hide_default_launcher:!0}))}},Symbol.toStringTag,{value:"Module"}))];class xi{static disable(){Ga.forEach(t=>t.disable())}static enable(){Ga.forEach(t=>t.enable())}}const Lf=1,qa=e=>e instanceof HTMLElement,za=(e,t,n)=>{const r=e.createElement("style");n&&(r.nonce=n),r.textContent=t,r.id=O.CustomStyle,e.head.appendChild(r)},Wa=e=>{const t=e.querySelector(`.${O.CardContainer}`);let n=600,r=0;if(t){n=t.scrollHeight;const i=getComputedStyle(t),o=parseFloat(i.marginTop)+parseFloat(i.marginBottom),a=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth);r=o+a}return n+r+Lf},Rf=e=>{const t=e.querySelector(`.${O.CardContainer}`);t&&(t.scrollTop=0)};var Af=class extends Error{constructor(e,t,n){super(`Possible EventEmitter memory leak detected. ${n} ${t.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`),this.emitter=e,this.type=t,this.count=n,this.name="MaxListenersExceededWarning"}},Ya=class{static listenerCount(e,t){return e.listenerCount(t)}constructor(){this.events=new Map,this.maxListeners=Ya.defaultMaxListeners,this.hasWarnedAboutPotentialMemoryLeak=!1}_emitInternalEvent(e,t,n){this.emit(e,t,n)}_getListeners(e){return Array.prototype.concat.apply([],this.events.get(e))||[]}_removeListener(e,t){const n=e.indexOf(t);return n>-1&&e.splice(n,1),[]}_wrapOnceListener(e,t){const n=(...r)=>(this.removeListener(e,n),t.apply(this,r));return Object.defineProperty(n,"name",{value:t.name}),n}setMaxListeners(e){return this.maxListeners=e,this}getMaxListeners(){return this.maxListeners}eventNames(){return Array.from(this.events.keys())}emit(e,...t){const n=this._getListeners(e);return n.forEach(r=>{r.apply(this,t)}),n.length>0}addListener(e,t){this._emitInternalEvent("newListener",e,t);const n=this._getListeners(e).concat(t);if(this.events.set(e,n),this.maxListeners>0&&this.listenerCount(e)>this.maxListeners&&!this.hasWarnedAboutPotentialMemoryLeak){this.hasWarnedAboutPotentialMemoryLeak=!0;const r=new Af(this,e,this.listenerCount(e));console.warn(r)}return this}on(e,t){return this.addListener(e,t)}once(e,t){return this.addListener(e,this._wrapOnceListener(e,t))}prependListener(e,t){const n=this._getListeners(e);if(n.length>0){const r=[t].concat(n);this.events.set(e,r)}else this.events.set(e,n.concat(t));return this}prependOnceListener(e,t){return this.prependListener(e,this._wrapOnceListener(e,t))}removeListener(e,t){const n=this._getListeners(e);return n.length>0&&(this._removeListener(n,t),this.events.set(e,n),this._emitInternalEvent("removeListener",e,t)),this}off(e,t){return this.removeListener(e,t)}removeAllListeners(e){return e?this.events.delete(e):this.events.clear(),this}listeners(e){return Array.from(this._getListeners(e))}listenerCount(e){return this._getListeners(e).length}rawListeners(e){return this.listeners(e)}},Qa=Ya;Qa.defaultMaxListeners=10;const H=new Qa;var En=(e=>(e.BottomLeft="bottomLeft",e.BottomRight="bottomRight",e.Center="center",e.TopLeft="topLeft",e.TopRight="topRight",e))(En||{}),Fe=(e=>(e.Error="x-ul-error",e.EnvironmentID="x-ul-environment-id",e.InstallationMethod="x-ul-installation-method",e.PartnerAnonymousId="x-ul-anonymous-id",e.Platform="userleap-platform",e.PreviewMode="x-ul-preview-mode",e.UserID="x-ul-user-id",e.VisitorID="x-ul-visitor-id",e))(Fe||{}),Rt=(e=>(e.Email="email",e.Link="link",e.Web="web",e))(Rt||{}),ft=(e=>(e.Npm="web-npm",e.NpmBundled="web-npm-bundled",e.Gtm="web-gtm",e.Segment="web-segment",e.SegmentAndroid="android-segment",e.SegmentReactNative="react-native-segment",e.SegmentIOS="ios-segment",e.Snippet="web-snippet",e))(ft||{});const sr=e=>new Promise(t=>{setTimeout(()=>{t()},e)}),Xt=({"userleap-platform":e})=>e!==Rt.Web,re=(e,t)=>{const n=t?O.MobileSuffix:O.DesktopSuffix;return[e+n,e]},Uf=(e,t)=>[e,`${e}__${t}`];class Za{constructor(t){se(this,"storage");se(this,"tempStorage",{});se(this,"isStorageAvailable");this.storage=window[t],this.isStorageAvailable=this.checkIfStorageAvailable()}checkIfStorageAvailable(){try{const t="__storage_test__";return this.storage.setItem(t,t),this.storage.removeItem(t),!0}catch{return!1}}setItem(t,n){this.isStorageAvailable?this.storage.setItem(t,n):this.tempStorage[t]=n}getItem(t){return this.isStorageAvailable?this.storage.getItem(t):this.tempStorage[t]}removeItem(t){this.isStorageAvailable?this.storage.removeItem(t):delete this.tempStorage[t]}clear(){this.isStorageAvailable?this.storage.clear():this.tempStorage={}}}const pt=new Za("sessionStorage"),_e=new Za("localStorage");class Of{constructor(t){se(this,"payload");se(this,"promise");se(this,"reject",()=>{});se(this,"resolve",()=>{});this.payload=t,this.promise=new Promise((n,r)=>{this.reject=r,this.resolve=n})}resolveRequest(t){this.resolve(t)}}const Df={RATELIMIT_RESET_DEFAULT:10};let Xa=!1,Ja="",lr=!1,es=!1,ur=[];const Pf=e=>e._config&&e._config.installationMethod?e._config.installationMethod:e._gtm?ft.Gtm:e._segment?ft.Segment:ft.Snippet,Ci=e=>{var t;(t=e==null?void 0:e.blockedURI)!=null&&t.includes(window.UserLeap._API_URL)&&(es=!0,console.warn(`[Sprig] ${e.blockedURI} is blocked by Content-Security-Policy`),document.removeEventListener("securitypolicyviolation",Ci))},Si=(e="")=>{Xa=!0,Ja=e};function Jt(e={}){const t={"Content-Type":"application/json","userleap-platform":Rt.Web,"x-ul-sdk-version":"2.24.12-beta.0",[Fe.InstallationMethod]:Pf(e)};if(e.envId&&(t[Fe.EnvironmentID]=e.envId),e.token&&(t.Authorization="Bearer "+e.token),e.userId&&(t[Fe.UserID]=e.userId),e.visitorId&&(t[Fe.VisitorID]=e.visitorId),e.partnerAnonymousId&&(t[Fe.PartnerAnonymousId]=e.partnerAnonymousId),e.mobileHeadersJSON){const n=JSON.parse(e.mobileHeadersJSON);Object.assign(t,n)}return e.locale&&(t["accept-language"]=e.locale),window.previewMode&&(t[Fe.PreviewMode]="1"),t}const ts=async(e,t,n)=>{if(e)return{status:429};{const r=new Of(n);return ur.push(r),r.promise}},Ze=async(e,t,n=0,r=!1,i=!1)=>{const o={url:e,options:t,attempt:n,shouldDropOnRateLimit:r};if(lr&&!i)return ts(r,i,o);const a={ok:!1,reportError:!1};if(Xa)return console.info(`UserLeap - ${Ja}`),a;try{t.headers=Object.assign(Jt(),t.headers);const s=await fetch(e,t);if(s.status===429)if(!lr&&!r||i){lr=!0;const u=s.headers.has("ratelimit-reset")?Number(s.headers.get("ratelimit-reset")):Df.RATELIMIT_RESET_DEFAULT;return await sr(u*1e3),Ze(e,t,0,r,!0)}else return ts(r,!1,o);if(lr=!1,ur.length&&(ur.map(l=>{const{url:u,options:c,attempt:d,shouldDropOnRateLimit:f}=l.payload;Ze(u,c,d,f).then(p=>{l.resolveRequest(p)})}),ur=[]),s.ok){if(s.status===249)return Si(),a;const l=await s.text();try{return l&&l!=="OK"&&(s.json=JSON.parse(l)),s}catch{return{ok:!1,reportError:!1,error:new Error(`failed parsing response json for ${e} - ${l}`)}}}return s}catch(s){const l=n+1;return l>5||es?{ok:!1,reportError:!1,error:s}:(await sr(Math.pow(2,n)*1e3),Ze(e,t,l))}};var ns={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(q,function(){var n=function(o,a){if(a=a||{},typeof o!="function")throw new i("fetch must be a function");if(typeof a!="object")throw new i("defaults must be an object");if(a.retries!==void 0&&!r(a.retries))throw new i("retries must be a positive integer");if(a.retryDelay!==void 0&&!r(a.retryDelay)&&typeof a.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(a.retryOn!==void 0&&!Array.isArray(a.retryOn)&&typeof a.retryOn!="function")throw new i("retryOn property expects an array or function");var s={retries:3,retryDelay:1e3,retryOn:[]};return a=Object.assign(s,a),function(u,c){var d=a.retries,f=a.retryDelay,p=a.retryOn;if(c&&c.retries!==void 0)if(r(c.retries))d=c.retries;else throw new i("retries must be a positive integer");if(c&&c.retryDelay!==void 0)if(r(c.retryDelay)||typeof c.retryDelay=="function")f=c.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(c&&c.retryOn)if(Array.isArray(c.retryOn)||typeof c.retryOn=="function")p=c.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(h,v){var m=function(_){var b=typeof Request<"u"&&u instanceof Request?u.clone():u;o(b,c).then(function(E){if(Array.isArray(p)&&p.indexOf(E.status)===-1)h(E);else if(typeof p=="function")try{return Promise.resolve(p(_,null,E)).then(function(g){g?w(_,null,E):h(E)}).catch(v)}catch(g){v(g)}else _=0}function i(o){this.name="ArgumentError",this.message=o}return n})})(ns);const Nf=ns.exports;class Mf{constructor(t){se(this,"awaitingResolvers",[]);se(this,"activeCount",0);this.capacity=t}async acquire(){if(this.activeCount{this.awaitingResolvers.push(t)})}release(){const t=this.awaitingResolvers.shift();t&&this.activeCount<=this.capacity?t():this.activeCount--}async execute(t){try{return await this.acquire(),await t()}finally{this.release()}}setLimit(t){this.capacity=t}}const rs=new Mf(2),Vf=e=>rs.setLimit(e),jf=Nf(fetch),Bf=async(e,t=3)=>rs.execute(async()=>{const r=(await jf(e.uploadUrl,{body:e.data,method:"PUT",retries:t,retryDelay:i=>Math.pow(2,i)*1e3})).headers.get("ETag");if(!r)throw new Error(`Upload response did not include etag for upload ${e.uploadId}, part ${e.chunkIndex}`);return r}),is=async({apiUrl:e,surveyId:t,uploadId:n,etags:r,headers:i,responseGroupUuid:o,replayDuration:a,eventDigest:s},l=!1)=>{var u;if(!(!l&&!n&&!r))return Ze(`${e}/sdk/1/completeSessionReplay`,{method:"POST",body:JSON.stringify({etags:r,uploadId:n,responseGroupUuid:o,surveyId:t,replayDuration:a,eventDigest:s,userAgent:(u=window==null?void 0:window.navigator)==null?void 0:u.userAgent}),headers:i})};/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var $=function(){return $=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u"?ne:Reflect.ownKeys)(t).forEach(function(n){Xe(e,n,t[n])})}var os=Object.defineProperty;function Xe(e,t,n,r){os(e,t,pe(n&&we(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function tn(e){return{from:function(t){return e.prototype=Object.create(t.prototype),Xe(e.prototype,"constructor",e),{extend:en.bind(null,e.prototype)}}}}var Hf=Object.getOwnPropertyDescriptor;function ki(e,t){var n=Hf(e,t),r;return n||(r=xn(e))&&ki(r,t)}var Kf=[].slice;function cr(e,t,n){return Kf.call(e,t,n)}function as(e,t){return t(e)}function Cn(e){if(!e)throw new Error("Assertion Failed")}function ss(e){Y.setImmediate?setImmediate(e):setTimeout(e,0)}function ls(e,t){return e.reduce(function(n,r,i){var o=t(r,i);return o&&(n[o[0]]=o[1]),n},{})}function $f(e,t,n){try{e.apply(null,n)}catch(r){t&&t(r)}}function Je(e,t){if(we(e,t))return e[t];if(!t)return e;if(typeof t!="string"){for(var n=[],r=0,i=t.length;r=0)t=e;else{var i=xn(e);t=i===Object.prototype?{}:Object.create(i),ht&&ht.set(e,t);for(var o in e)we(e,o)&&(t[o]=Ti(e[o]))}return t}var Wf={}.toString;function Li(e){return Wf.call(e).slice(8,-1)}var Ri=typeof Symbol<"u"?Symbol.iterator:"@@iterator",Yf=typeof Ri=="symbol"?function(e){var t;return e!=null&&(t=e[Ri])&&t.apply(e)}:function(){return null},nn={};function et(e){var t,n,r,i;if(arguments.length===1){if(de(e))return e.slice();if(this===nn&&typeof e=="string")return[e];if(i=Yf(e)){for(n=[];r=i.next(),!r.done;)n.push(r.value);return n}if(e==null)return[e];if(t=e.length,typeof t=="number"){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}var Ai=typeof Symbol<"u"?function(e){return e[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},He=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function fs(e,t){He=e,ps=t}var ps=function(){return!0},Qf=!new Error("").stack;function At(){if(Qf)try{throw At.arguments,new Error}catch(e){return e}return new Error}function Ui(e,t){var n=e.stack;return n?(t=t||0,n.indexOf(e.name)===0&&(t+=(e.name+e.message).split(` +var al=Object.defineProperty;var ll=(se,ce,Ae)=>ce in se?al(se,ce,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):se[ce]=Ae;var V=(se,ce,Ae)=>(ll(se,typeof ce!="symbol"?ce+"":ce,Ae),Ae);(function(){"use strict";let se;const ce=new Uint8Array(16);function Ae(){if(!se&&(se=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!se))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return se(ce)}const q=[];for(let e=0;e<256;++e)q.push((e+256).toString(16).slice(1));function cs(e,t=0){return q[e[t+0]]+q[e[t+1]]+q[e[t+2]]+q[e[t+3]]+"-"+q[e[t+4]]+q[e[t+5]]+"-"+q[e[t+6]]+q[e[t+7]]+"-"+q[e[t+8]]+q[e[t+9]]+"-"+q[e[t+10]]+q[e[t+11]]+q[e[t+12]]+q[e[t+13]]+q[e[t+14]]+q[e[t+15]]}const Lr={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function We(e,t,n){if(Lr.randomUUID&&!t&&!e)return Lr.randomUUID();e=e||{};const r=e.random||(e.rng||Ae)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return cs(r)}var Dt=(e=>(e.Caption="ul-caption",e.CardContainer="ul-card__container",e.CardMainContent="ul-card-main-content",e.Choice="choice",e.ChoiceCheckbox="select-checkbox",e.ChoiceGroup="ul-card__choices",e.ChoiceLabel="select-label",e.ChoiceLabelContainer="choice-label-container",e.ChoiceRadio="select-radio",e.ChoiceTextEntryContainer="choice-text-entry-container",e.ChoiceTextInput="choice-text-input",e.CloseButton="close-btn",e.CloseContainer="close-container",e.ConsentLegalNameInput="ul-consent-legal__name-input",e.CustomStyle="ul-custom-style",e.DesktopSuffix="--desktop",e.FadeInTransition="fade-in-transition",e.LikertNumber="likert-number",e.LikertSmiley="likert-smiley",e.LikertStar="likert-star",e.LoadingSpinner="ul-loading-spinner",e.LoadingSpinnerContainer="ul-loading-spinner-container",e.LoadingSpinnerFirst="first",e.LoadingSpinnerFourth="fourth",e.LoadingSpinnerSecond="second",e.LoadingSpinnerThird="third",e.MobileSuffix="--mobile",e.NPSNumber="nps-number",e.OpenTextInput="ul-card-text__input",e.QuestionHeader="ul-question",e.VideoCard="ul-card--video",e.CheckmarkButton="ul-button-checkmark",e.InactiveButton="ul-button-inactive",e.LeftAlignButton="ul-button-left-align",e.ButtonDisabled="sprig-button-disabled",e.SkipButton="ul-card-skip__button",e))(Dt||{});const us=500;var Oe=(e=>(e.Closed="close.click",e.Complete="survey.completed",e.PageChange="page.change",e.API="api",e.Override="override",e))(Oe||{}),D=(e=>(e.ReplayCapture="replay.capture",e.SDKReady="sdk.ready",e.SurveyAppeared="survey.appeared",e.SurveyClosed="survey.closed",e.SurveyDimensions="survey.dimensions",e.SurveyFadingOut="survey.fadingOut",e.SurveyHeight="survey.height",e.SurveyPresented="survey.presented",e.SurveyLifeCycle="survey.lifeCycle",e.SurveyWidth="survey.width",e.SurveyWillClose="survey.willClose",e.SurveyWillPresent="survey.will.present",e.CloseSurveyOnOverlayClick="close.survey.overlayClick",e.VisitorIDUpdated="visitor.id.updated",e.QuestionAnswered="question.answered",e))(D||{}),Pt=(e=>(e.SurveyId="survey.id",e))(Pt||{});const kr={SDK_READY:"sdk.ready",SURVEY_APPEARED:"survey.appeared",SURVEY_CLOSED:"survey.closed",SURVEY_DIMENSIONS:"survey.dimensions",SURVEY_FADING_OUT:"survey.fadingOut",SURVEY_HEIGHT:"survey.height",SURVEY_PRESENTED:"survey.presented",SURVEY_LIFE_CYCLE:"survey.lifeCycle",SURVEY_WILL_CLOSE:"survey.willClose",SURVEY_WILL_PRESENT:"survey.will.present",QUESTION_ANSWERED:"question.answered",REPLAY_CAPTURE:"replay.capture",CLOSE_SURVEY_ON_OVERLAY_CLICK:"close.survey.overlayClick",VISITOR_ID_UPDATED:"visitor.id.updated",DATA:{DISMISS_REASONS:{API:"api",CLOSED:"close.click",COMPLETE:"survey.completed",PAGE_CHANGE:"page.change",OVERRIDE:"override"},SURVEY_ID:"survey.id"}};var pn=(e=>(e.VerifyViewVersion="verify.view.version",e.CurrentQuestion="survey.question",e.ViewPrototypeClick="question.prototype.click",e.ViewAgreementClick="question.agreement.click",e.RecordedTaskStart="recorded.task.start",e.RecordedTaskPermissionScreen="recorded.task.permission.screen",e.SurveyComplete="survey.complete",e))(pn||{}),Ir=(e=>(e.ViewVersion="view.version",e.QuestionId="qid",e.Props="props",e))(Ir||{}),Ur=(e=>(e.Video="video",e.Audio="audio",e.Screen="screen",e))(Ur||{}),Q=(e=>(e.Preview="sprig.previewKey",e.Credentials="userleap.ids",e.PageViews="userleap.pageviews",e))(Q||{});const xr=()=>{try{return window.parent.Intercom}catch(e){return console.error(e),null}},Ar=[Object.freeze(Object.defineProperty({__proto__:null,disable:()=>{const e=xr();e&&(e.ul_wasVisible=!!document.querySelector("iframe.intercom-launcher-frame"),e.ul_wasVisible&&e("update",{hide_default_launcher:!0}))},enable:()=>{const e=xr();e&&(e.ul_wasVisible&&e("update",{hide_default_launcher:!1}),delete e.ul_wasVisible)}},Symbol.toStringTag,{value:"Module"}))];class ds{static disable(){Ar.forEach(t=>t.disable())}static enable(){Ar.forEach(t=>t.enable())}}const hs=1,Or=e=>e instanceof HTMLElement||e instanceof SVGElement,ps=(e,t,n)=>{const r=e.createElement("style");n&&(r.nonce=n),r.textContent=t,r.id=Dt.CustomStyle,e.head.appendChild(r)},fs=()=>{try{return window.parent.innerWidth}catch{return window.innerWidth}},ys=e=>{const t=e.querySelector(`.${Dt.CardContainer}`);let n=600,r=360;if(t){n=t.scrollHeight;const i=getComputedStyle(t),s=parseFloat(i.marginTop)+parseFloat(i.marginBottom),o=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth);n+=s+o,r=t.scrollWidth;const a=parseFloat(i.marginLeft)+parseFloat(i.marginRight),l=parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth);r+=a+l}return[n+hs,Math.min(r,fs())]};var ms=class extends Error{constructor(e,t,n){super(`Possible EventEmitter memory leak detected. ${n} ${t.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`),this.emitter=e,this.type=t,this.count=n,this.name="MaxListenersExceededWarning"}},Dr=class{static listenerCount(e,t){return e.listenerCount(t)}constructor(){this.events=new Map,this.maxListeners=Dr.defaultMaxListeners,this.hasWarnedAboutPotentialMemoryLeak=!1}_emitInternalEvent(e,t,n){this.emit(e,t,n)}_getListeners(e){return Array.prototype.concat.apply([],this.events.get(e))||[]}_removeListener(e,t){const n=e.indexOf(t);return n>-1&&e.splice(n,1),[]}_wrapOnceListener(e,t){const n=(...r)=>(this.removeListener(e,n),t.apply(this,r));return Object.defineProperty(n,"name",{value:t.name}),n}setMaxListeners(e){return this.maxListeners=e,this}getMaxListeners(){return this.maxListeners}eventNames(){return Array.from(this.events.keys())}emit(e,...t){const n=this._getListeners(e);return n.forEach(r=>{r.apply(this,t)}),n.length>0}addListener(e,t){this._emitInternalEvent("newListener",e,t);const n=this._getListeners(e).concat(t);if(this.events.set(e,n),this.maxListeners>0&&this.listenerCount(e)>this.maxListeners&&!this.hasWarnedAboutPotentialMemoryLeak){this.hasWarnedAboutPotentialMemoryLeak=!0;const r=new ms(this,e,this.listenerCount(e));console.warn(r)}return this}on(e,t){return this.addListener(e,t)}once(e,t){return this.addListener(e,this._wrapOnceListener(e,t))}prependListener(e,t){const n=this._getListeners(e);if(n.length>0){const r=[t].concat(n);this.events.set(e,r)}else this.events.set(e,n.concat(t));return this}prependOnceListener(e,t){return this.prependListener(e,this._wrapOnceListener(e,t))}removeListener(e,t){const n=this._getListeners(e);return n.length>0&&(this._removeListener(n,t),this.events.set(e,n),this._emitInternalEvent("removeListener",e,t)),this}off(e,t){return this.removeListener(e,t)}removeAllListeners(e){return e?this.events.delete(e):this.events.clear(),this}listeners(e){return Array.from(this._getListeners(e))}listenerCount(e){return this._getListeners(e).length}rawListeners(e){return this.listeners(e)}},Pr=Dr;Pr.defaultMaxListeners=10;const P=new Pr;var lt=(e=>(e.BottomLeft="bottomLeft",e.BottomRight="bottomRight",e.Center="center",e.TopLeft="topLeft",e.TopRight="topRight",e))(lt||{}),oe=(e=>(e.Error="x-ul-error",e.EnvironmentID="x-ul-environment-id",e.InstallationMethod="x-ul-installation-method",e.PartnerAnonymousId="x-ul-anonymous-id",e.Platform="userleap-platform",e.PreviewMode="x-ul-preview-mode",e.UserID="x-ul-user-id",e.VisitorID="x-ul-visitor-id",e))(oe||{}),Rt=(e=>(e.Email="email",e.Link="link",e.Web="web",e))(Rt||{}),ze=(e=>(e.Npm="web-npm",e.NpmBundled="web-npm-bundled",e.Gtm="web-gtm",e.Segment="web-segment",e.SegmentAndroid="android-segment",e.SegmentReactNative="react-native-segment",e.SegmentIOS="ios-segment",e.Snippet="web-snippet",e))(ze||{});const Ct=e=>new Promise(t=>{setTimeout(()=>{t()},e)}),gs=({"userleap-platform":e})=>e!==Rt.Web;class Rr{constructor(t){V(this,"storage");V(this,"tempStorage",{});V(this,"isStorageAvailable");this.storage=window[t],this.isStorageAvailable=this.checkIfStorageAvailable()}checkIfStorageAvailable(){try{const t="__storage_test__";return this.storage.setItem(t,t),this.storage.removeItem(t),!0}catch{return!1}}setItem(t,n){this.isStorageAvailable?this.storage.setItem(t,n):this.tempStorage[t]=n}getItem(t){return this.isStorageAvailable?this.storage.getItem(t):this.tempStorage[t]}removeItem(t){this.isStorageAvailable?this.storage.removeItem(t):delete this.tempStorage[t]}clear(){this.isStorageAvailable?this.storage.clear():this.tempStorage={}}}const ve=new Rr("sessionStorage"),X=new Rr("localStorage");var ws=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cr={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ws,function(){var n=function(s,o){if(o=o||{},typeof s!="function")throw new i("fetch must be a function");if(typeof o!="object")throw new i("defaults must be an object");if(o.retries!==void 0&&!r(o.retries))throw new i("retries must be a positive integer");if(o.retryDelay!==void 0&&!r(o.retryDelay)&&typeof o.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(o.retryOn!==void 0&&!Array.isArray(o.retryOn)&&typeof o.retryOn!="function")throw new i("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return o=Object.assign(a,o),function(u,c){var h=o.retries,d=o.retryDelay,p=o.retryOn;if(c&&c.retries!==void 0)if(r(c.retries))h=c.retries;else throw new i("retries must be a positive integer");if(c&&c.retryDelay!==void 0)if(r(c.retryDelay)||typeof c.retryDelay=="function")d=c.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(c&&c.retryOn)if(Array.isArray(c.retryOn)||typeof c.retryOn=="function")p=c.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(g,y){var w=function(f){var v=typeof Request<"u"&&u instanceof Request?u.clone():u;s(v,c).then(function(b){if(Array.isArray(p)&&p.indexOf(b.status)===-1)g(b);else if(typeof p=="function")try{return Promise.resolve(p(f,null,b)).then(function(_){_?m(f,null,b):g(b)}).catch(y)}catch(_){y(_)}else f=0}function i(s){this.name="ArgumentError",this.message=s}return n})})(Cr);var bs=Cr.exports;const Tr=vs(bs),_s=Tr(fetch),Ge={Error:1,Warn:2,Info:3,Debug:4};let fn=1e3,Tt=Ge.Debug,He=[];const Ss=e=>{const t=Object.entries(Ge).find(n=>n[1]===e);return(t==null?void 0:t[0])??""},Es=e=>e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3}),Ls=(e,t)=>`${Es(t)}:${e}`,ks=()=>{He=He.filter(e=>e.level<=Tt)},Is=()=>{He.length>fn&&He.shift()},Bt=(e,t)=>{e>Tt||(He.push({level:e,line:Ls(t,new Date)}),Is())},ct=e=>{Bt(Ge.Debug,e)},I=e=>{Bt(Ge.Info,e)},Br=e=>{Bt(Ge.Warn,e)},jr=e=>{Bt(Ge.Error,e)},Us=()=>He.map(e=>e.line),xs=()=>new TextEncoder().encode(Us().join(` +`)),As=async e=>{if(!e)return;const t=xs();return _s(e,{body:t,method:"PUT",retries:3,retryDelay:n=>Math.pow(2,n)*1e3})},Os=(e,t)=>{e!==void 0&&(fn=e),t!==void 0&&(Tt=t),ct(`Initializing logger with limit of ${fn} lines and ${Ss(Tt)} level`),ks()};class Ds{constructor(t){V(this,"payload");V(this,"promise");V(this,"reject",()=>{});V(this,"resolve",()=>{});this.payload=t,this.promise=new Promise((n,r)=>{this.reject=r,this.resolve=n})}resolveRequest(t){this.resolve(t)}}const Ps={RATELIMIT_RESET_DEFAULT:10};let Kr=!1,Nr="",jt=!1,Fr=!1,Kt=[];const Rs=e=>e._config&&e._config.installationMethod?e._config.installationMethod:e._gtm?ze.Gtm:e._segment?ze.Segment:ze.Snippet,yn=e=>{var t;(t=e==null?void 0:e.blockedURI)!=null&&t.includes(window.UserLeap._API_URL)&&(Fr=!0,console.warn(`[Sprig] ${e.blockedURI} is blocked by Content-Security-Policy`),document.removeEventListener("securitypolicyviolation",yn))},mn=(e="")=>{Kr=!0,Nr=e};function Ye(e={}){const t={"Content-Type":"application/json","userleap-platform":Rt.Web,"x-ul-sdk-version":"2.26.2",[oe.InstallationMethod]:Rs(e)};if(e.envId&&(t[oe.EnvironmentID]=e.envId),e.token&&(t.Authorization="Bearer "+e.token),e.userId&&(t[oe.UserID]=e.userId),e.visitorId&&(t[oe.VisitorID]=e.visitorId),e.partnerAnonymousId&&(t[oe.PartnerAnonymousId]=e.partnerAnonymousId),e.mobileHeadersJSON){const n=JSON.parse(e.mobileHeadersJSON);Object.assign(t,n)}return e.locale&&(t["accept-language"]=e.locale),window.previewMode&&(t[oe.PreviewMode]="1"),t}const Mr=async(e,t,n)=>{if(e)return{status:429};{const r=new Ds(n);return Kt.push(r),r.promise}},Je=async(e,t,n=0,r=!1,i=!1)=>{const s={url:e,options:t,attempt:n,shouldDropOnRateLimit:r};if(jt&&!i)return Mr(r,i,s);const o={ok:!1,reportError:!1};if(Kr)return console.info(`UserLeap - ${Nr}`),o;try{t.headers=Object.assign(Ye(),t.headers);const a=await fetch(e,t);if(a.status===429)if(!jt&&!r||i){jt=!0;const u=a.headers.has("ratelimit-reset")?Number(a.headers.get("ratelimit-reset")):Ps.RATELIMIT_RESET_DEFAULT;return await Ct(u*1e3),Je(e,t,0,r,!0)}else return Mr(r,!1,s);if(jt=!1,Kt.length&&(Kt.map(l=>{const{url:u,options:c,attempt:h,shouldDropOnRateLimit:d}=l.payload;Je(u,c,h,d).then(p=>{l.resolveRequest(p)})}),Kt=[]),a.ok){if(a.status===249)return mn(),o;const l=await a.text();try{return l&&l!=="OK"&&(a.json=JSON.parse(l)),a}catch{return{ok:!1,reportError:!1,error:new Error(`failed parsing response json for ${e} - ${l}`)}}}return a}catch(a){const l=n+1;return l>5||Fr?{ok:!1,reportError:!1,error:a}:(await Ct(Math.pow(2,n)*1e3),Je(e,t,l))}};class Cs{constructor(t){V(this,"awaitingResolvers",[]);V(this,"activeCount",0);this.capacity=t}async acquire(){if(this.activeCount{this.awaitingResolvers.push(t)})}release(){const t=this.awaitingResolvers.shift();t&&this.activeCount<=this.capacity?t():this.activeCount--}async execute(t){try{return await this.acquire(),await t()}finally{this.release()}}setLimit(t){this.capacity=t}}const $r=new Cs(2),Ts=e=>$r.setLimit(e),Bs=Tr(fetch),js=async(e,t=3)=>$r.execute(async()=>{I(`Beginning upload of chunk ${e.chunkIndex} for survey: ${e.surveyId}`);const n=await Bs(e.uploadUrl,{body:e.data,method:"PUT",retries:t,retryDelay:i=>Math.pow(2,i)*1e3});I(`Completed upload of chunk ${e.chunkIndex} for survey: ${e.surveyId}`);const r=n.headers.get("ETag");if(!r)throw new Error(`Upload response did not include etag for upload ${e.uploadId}, part ${e.chunkIndex}`);return r}),Vr=async({apiUrl:e,surveyId:t,uploadId:n,etags:r,headers:i,responseGroupUuid:s,replayDuration:o,eventDigest:a},l=!1)=>{var u;if(!l&&!n&&!r){I(`Cannot mark upload complete: isMobile: ${l} / uploadId: ${n} / etags: ${r}`);return}I(`Marking upload complete for survey: ${t}`),await Je(`${e}/sdk/1/completeSessionReplay`,{method:"POST",body:JSON.stringify({etags:r,uploadId:n,responseGroupUuid:s,surveyId:t,replayDuration:o,eventDigest:a,userAgent:(u=window==null?void 0:window.navigator)==null?void 0:u.userAgent}),headers:i}),I(`Done marking upload complete for survey: ${t}`)},j=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,N=Object.keys,W=Array.isArray;function G(e,t){return typeof t!="object"||N(t).forEach(function(n){e[n]=t[n]}),e}typeof Promise>"u"||j.Promise||(j.Promise=Promise);const ut=Object.getPrototypeOf,Ks={}.hasOwnProperty;function Z(e,t){return Ks.call(e,t)}function Qe(e,t){typeof t=="function"&&(t=t(ut(e))),(typeof Reflect>"u"?N:Reflect.ownKeys)(t).forEach(n=>{ue(e,n,t[n])})}const qr=Object.defineProperty;function ue(e,t,n,r){qr(e,t,G(n&&Z(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function Xe(e){return{from:function(t){return e.prototype=Object.create(t.prototype),ue(e.prototype,"constructor",e),{extend:Qe.bind(null,e.prototype)}}}}const Ns=Object.getOwnPropertyDescriptor;function gn(e,t){let n;return Ns(e,t)||(n=ut(e))&&gn(n,t)}const Fs=[].slice;function Nt(e,t,n){return Fs.call(e,t,n)}function Wr(e,t){return t(e)}function dt(e){if(!e)throw new Error("Assertion Failed")}function zr(e){j.setImmediate?setImmediate(e):setTimeout(e,0)}function Gr(e,t){return e.reduce((n,r,i)=>{var s=t(r,i);return s&&(n[s[0]]=s[1]),n},{})}function de(e,t){if(Z(e,t))return e[t];if(!t)return e;if(typeof t!="string"){for(var n=[],r=0,i=t.length;r["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>j[e]),$s=Jr.map(e=>j[e]);Gr(Jr,e=>[e,!0]);let be=null;function ht(e){be=typeof WeakMap<"u"&&new WeakMap;const t=wn(e);return be=null,t}function wn(e){if(!e||typeof e!="object")return e;let t=be&&be.get(e);if(t)return t;if(W(e)){t=[],be&&be.set(e,t);for(var n=0,r=e.length;n=0)t=e;else{const s=ut(e);for(var i in t=s===Object.prototype?{}:Object.create(s),be&&be.set(e,t),e)Z(e,i)&&(t[i]=wn(e[i]))}return t}const{toString:Vs}={};function vn(e){return Vs.call(e).slice(8,-1)}const bn=typeof Symbol<"u"?Symbol.iterator:"@@iterator",qs=typeof bn=="symbol"?function(e){var t;return e!=null&&(t=e[bn])&&t.apply(e)}:function(){return null},Ze={};function he(e){var t,n,r,i;if(arguments.length===1){if(W(e))return e.slice();if(this===Ze&&typeof e=="string")return[e];if(i=qs(e)){for(n=[];!(r=i.next()).done;)n.push(r.value);return n}if(e==null)return[e];if(typeof(t=e.length)=="number"){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const _n=typeof Symbol<"u"?e=>e[Symbol.toStringTag]==="AsyncFunction":()=>!1;var ae=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Qr(e,t){ae=e,Xr=t}var Xr=()=>!0;const Ws=!new Error("").stack;function De(){if(Ws)try{throw De.arguments,new Error}catch(e){return e}return new Error}function Sn(e,t){var n=e.stack;return n?(t=t||0,n.indexOf(e.name)===0&&(t+=(e.name+e.message).split(` `).length),n.split(` -`).slice(t).filter(ps).map(function(r){return` -`+r}).join("")):""}var Zf=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"],hs=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Oi=Zf.concat(hs),Xf={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function rn(e,t){this._e=At(),this.name=e,this.message=t}tn(rn).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Ui(this._e,2))}},toString:function(){return this.name+": "+this.message}});function vs(e,t){return e+". Errors: "+Object.keys(t).map(function(n){return t[n].toString()}).filter(function(n,r,i){return i.indexOf(n)===r}).join(` -`)}function dr(e,t,n,r){this._e=At(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=vs(e,t)}tn(dr).from(rn);function In(e,t){this._e=At(),this.name="BulkError",this.failures=Object.keys(t).map(function(n){return t[n]}),this.failuresByPos=t,this.message=vs(e,t)}tn(In).from(rn);var Di=Oi.reduce(function(e,t){return e[t]=t+"Error",e},{}),Jf=rn,j=Oi.reduce(function(e,t){var n=t+"Error";function r(i,o){this._e=At(),this.name=n,i?typeof i=="string"?(this.message=""+i+(o?` - `+o:""),this.inner=o||null):typeof i=="object"&&(this.message=i.name+" "+i.message,this.inner=i):(this.message=Xf[t]||n,this.inner=null)}return tn(r).from(Jf),e[t]=r,e},{});j.Syntax=SyntaxError,j.Type=TypeError,j.Range=RangeError;var ms=hs.reduce(function(e,t){return e[t+"Error"]=j[t],e},{});function ep(e,t){if(!e||e instanceof rn||e instanceof TypeError||e instanceof SyntaxError||!e.name||!ms[e.name])return e;var n=new ms[e.name](t||e.message,e);return"stack"in e&&Xe(n,"stack",{get:function(){return this.inner.stack}}),n}var fr=Oi.reduce(function(e,t){return["Syntax","Type","Range"].indexOf(t)===-1&&(e[t+"Error"]=j[t]),e},{});fr.ModifyError=dr,fr.DexieError=rn,fr.BulkError=In;function W(){}function kn(e){return e}function tp(e,t){return e==null||e===kn?t:function(n){return t(e(n))}}function Ut(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function np(e,t){return e===W?t:function(){var n=e.apply(this,arguments);n!==void 0&&(arguments[0]=n);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?Ut(r,this.onsuccess):r),i&&(this.onerror=this.onerror?Ut(i,this.onerror):i),o!==void 0?o:n}}function rp(e,t){return e===W?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Ut(n,this.onsuccess):n),r&&(this.onerror=this.onerror?Ut(r,this.onerror):r)}}function ip(e,t){return e===W?t:function(n){var r=e.apply(this,arguments);pe(n,r);var i=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?Ut(i,this.onsuccess):i),o&&(this.onerror=this.onerror?Ut(o,this.onerror):o),r===void 0?a===void 0?void 0:a:pe(r,a)}}function op(e,t){return e===W?t:function(){return t.apply(this,arguments)===!1?!1:e.apply(this,arguments)}}function Pi(e,t){return e===W?t:function(){var n=e.apply(this,arguments);if(n&&typeof n.then=="function"){for(var r=this,i=arguments.length,o=new Array(i);i--;)o[i]=arguments[i];return n.then(function(){return t.apply(r,o)})}return t.apply(this,arguments)}}var Tn={},ap=100,sp=20,gs=100,Ni=typeof Promise>"u"?[]:function(){var e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,xn(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,xn(t),e]}(),Mi=Ni[0],pr=Ni[1],Vi=Ni[2],ys=pr&&pr.then,hr=Mi&&Mi.constructor,ji=!!Vi,Bi=!1,lp=Vi?function(){Vi.then(yr)}:Y.setImmediate?setImmediate.bind(null,yr):Y.MutationObserver?function(){var e=document.createElement("div");new MutationObserver(function(){yr(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(yr,0)},Ln=function(e,t){Rn.push([e,t]),vr&&(lp(),vr=!1)},Fi=!0,vr=!0,Ot=[],mr=[],Hi=null,Ki=kn,on={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ts,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(function(e){try{Ts(e[0],e[1])}catch{}})}},M=on,Rn=[],Dt=0,gr=[];function U(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=W,this._lib=!1;var t=this._PSD=M;if(He&&(this._stackHolder=At(),this._prev=null,this._numPrev=0),typeof e!="function"){if(e!==Tn)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Gi(this,this._value);return}this._state=null,this._value=null,++t.ref,ws(this,e)}var $i={get:function(){var e=M,t=br;function n(r,i){var o=this,a=!e.global&&(e!==M||t!==br),s=a&&!tt(),l=new U(function(u,c){qi(o,new _s(xr(r,e,a,s),xr(i,e,a,s),u,c,e))});return He&&xs(l,this),l}return n.prototype=Tn,n},set:function(e){Xe(this,"then",e&&e.prototype===Tn?$i:{get:function(){return e},set:$i.set})}};en(U.prototype,{then:$i,_then:function(e,t){qi(this,new _s(null,null,e,t,M))},catch:function(e){if(arguments.length===1)return this.then(null,e);var t=arguments[0],n=arguments[1];return typeof t=="function"?this.then(null,function(r){return r instanceof t?n(r):_r(r)}):this.then(null,function(r){return r&&r.name===t?n(r):_r(r)})},finally:function(e){return this.then(function(t){return e(),t},function(t){return e(),_r(t)})},stack:{get:function(){if(this._stack)return this._stack;try{Bi=!0;var e=Es(this,[],sp),t=e.join(` -From previous: `);return this._state!==null&&(this._stack=t),t}finally{Bi=!1}}},timeout:function(e,t){var n=this;return e<1/0?new U(function(r,i){var o=setTimeout(function(){return i(new j.Timeout(t))},e);n.then(r,i).finally(clearTimeout.bind(null,o))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&Xe(U.prototype,Symbol.toStringTag,"Dexie.Promise"),on.env=Cs();function _s(e,t,n,r,i){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=n,this.reject=r,this.psd=i}en(U,{all:function(){var e=et.apply(null,arguments).map(Er);return new U(function(t,n){e.length===0&&t([]);var r=e.length;e.forEach(function(i,o){return U.resolve(i).then(function(a){e[o]=a,--r||t(e)},n)})})},resolve:function(e){if(e instanceof U)return e;if(e&&typeof e.then=="function")return new U(function(n,r){e.then(n,r)});var t=new U(Tn,!0,e);return xs(t,Hi),t},reject:_r,race:function(){var e=et.apply(null,arguments).map(Er);return new U(function(t,n){e.map(function(r){return U.resolve(r).then(t,n)})})},PSD:{get:function(){return M},set:function(e){return M=e}},totalEchoes:{get:function(){return br}},newPSD:vt,usePSD:sn,scheduler:{get:function(){return Ln},set:function(e){Ln=e}},rejectionMapper:{get:function(){return Ki},set:function(e){Ki=e}},follow:function(e,t){return new U(function(n,r){return vt(function(i,o){var a=M;a.unhandleds=[],a.onunhandled=o,a.finalize=Ut(function(){var s=this;cp(function(){s.unhandleds.length===0?i():o(s.unhandleds[0])})},a.finalize),e()},t,n,r)})}}),hr&&(hr.allSettled&&Xe(U,"allSettled",function(){var e=et.apply(null,arguments).map(Er);return new U(function(t){e.length===0&&t([]);var n=e.length,r=new Array(n);e.forEach(function(i,o){return U.resolve(i).then(function(a){return r[o]={status:"fulfilled",value:a}},function(a){return r[o]={status:"rejected",reason:a}}).then(function(){return--n||t(r)})})})}),hr.any&&typeof AggregateError<"u"&&Xe(U,"any",function(){var e=et.apply(null,arguments).map(Er);return new U(function(t,n){e.length===0&&n(new AggregateError([]));var r=e.length,i=new Array(r);e.forEach(function(o,a){return U.resolve(o).then(function(s){return t(s)},function(s){i[a]=s,--r||n(new AggregateError(i))})})})}));function ws(e,t){try{t(function(n){if(e._state===null){if(n===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&An();n&&typeof n.then=="function"?ws(e,function(i,o){n instanceof U?n._then(i,o):n.then(i,o)}):(e._state=!0,e._value=n,bs(e)),r&&Un()}},Gi.bind(null,e))}catch(n){Gi(e,n)}}function Gi(e,t){if(mr.push(t),e._state===null){var n=e._lib&&An();t=Ki(t),e._state=!1,e._value=t,He&&t!==null&&typeof t=="object"&&!t._promise&&$f(function(){var r=ki(t,"stack");t._promise=e,Xe(t,"stack",{get:function(){return Bi?r&&(r.get?r.get.apply(t):r.value):e.stack}})}),dp(e),bs(e),n&&Un()}}function bs(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n0;)for(e=Rn,Rn=[],n=e.length,t=0;t0);Fi=!0,vr=!0}function zi(){var e=Ot;Ot=[],e.forEach(function(r){r._PSD.onunhandled.call(null,r._value,r)});for(var t=gr.slice(0),n=t.length;n;)t[--n]()}function cp(e){function t(){e(),gr.splice(gr.indexOf(t),1)}gr.push(t),++Dt,Ln(function(){--Dt===0&&zi()},[])}function dp(e){Ot.some(function(t){return t._value===e._value})||Ot.push(e)}function fp(e){for(var t=Ot.length;t;)if(Ot[--t]._value===e._value){Ot.splice(t,1);return}}function _r(e){return new U(Tn,!1,e)}function Z(e,t){var n=M;return function(){var r=An(),i=M;try{return mt(n,!0),e.apply(this,arguments)}catch(o){t&&t(o)}finally{mt(i,!1),r&&Un()}}}var fe={awaits:0,echoes:0,id:0},pp=0,wr=[],Wi=0,br=0,hp=0;function vt(e,t,n,r){var i=M,o=Object.create(i);o.parent=i,o.ref=0,o.global=!1,o.id=++hp;var a=on.env;o.env=ji?{Promise:U,PromiseProp:{value:U,configurable:!0,writable:!0},all:U.all,race:U.race,allSettled:U.allSettled,any:U.any,resolve:U.resolve,reject:U.reject,nthen:Is(a.nthen,o),gthen:Is(a.gthen,o)}:{},t&&pe(o,t),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=sn(o,e,n,r);return o.ref===0&&o.finalize(),s}function an(){return fe.id||(fe.id=++pp),++fe.awaits,fe.echoes+=gs,fe.id}function tt(){return fe.awaits?(--fe.awaits===0&&(fe.id=0),fe.echoes=fe.awaits*gs,!0):!1}(""+ys).indexOf("[native code]")===-1&&(an=tt=W);function Er(e){return fe.echoes&&e&&e.constructor===hr?(an(),e.then(function(t){return tt(),t},function(t){return tt(),ie(t)})):e}function vp(e){++br,(!fe.echoes||--fe.echoes===0)&&(fe.echoes=fe.id=0),wr.push(M),mt(e,!0)}function mp(){var e=wr[wr.length-1];wr.pop(),mt(e,!1)}function mt(e,t){var n=M;if((t?fe.echoes&&(!Wi++||e!==M):Wi&&(!--Wi||e!==M))&&Ss(t?vp.bind(null,e):mp),e!==M&&(M=e,n===on&&(on.env=Cs()),ji)){var r=on.env.Promise,i=e.env;pr.then=i.nthen,r.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(Y,"Promise",i.PromiseProp),r.all=i.all,r.race=i.race,r.resolve=i.resolve,r.reject=i.reject,i.allSettled&&(r.allSettled=i.allSettled),i.any&&(r.any=i.any))}}function Cs(){var e=Y.Promise;return ji?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(Y,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:pr.then,gthen:e.prototype.then}:{}}function sn(e,t,n,r,i){var o=M;try{return mt(e,!0),t(n,r,i)}finally{mt(o,!1)}}function Ss(e){ys.call(Mi,e)}function xr(e,t,n,r){return typeof e!="function"?e:function(){var i=M;n&&an(),mt(t,!0);try{return e.apply(this,arguments)}finally{mt(i,!1),r&&Ss(tt)}}}function Is(e,t){return function(n,r){return e.call(this,xr(n,t),xr(r,t))}}var ks="unhandledrejection";function Ts(e,t){var n;try{n=t.onuncatched(e)}catch{}if(n!==!1)try{var r,i={promise:t,reason:e};if(Y.document&&document.createEvent?(r=document.createEvent("Event"),r.initEvent(ks,!0,!0),pe(r,i)):Y.CustomEvent&&(r=new CustomEvent(ks,{detail:i}),pe(r,i)),r&&Y.dispatchEvent&&(dispatchEvent(r),!Y.PromiseRejectionEvent&&Y.onunhandledrejection))try{Y.onunhandledrejection(r)}catch{}He&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: "+(e.stack||e))}catch{}}var ie=U.reject;function Yi(e,t,n,r){if(!e.idbdb||!e._state.openComplete&&!M.letThrough&&!e._vip){if(e._state.openComplete)return ie(new j.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return ie(new j.DatabaseClosed);e.open().catch(W)}return e._state.dbReadyPromise.then(function(){return Yi(e,t,n,r)})}else{var i=e._createTransaction(t,n,e._dbSchema);try{i.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===Di.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(function(){return Yi(e,t,n,r)})):ie(o)}return i._promise(t,function(o,a){return vt(function(){return M.trans=i,r(o,a,i)})}).then(function(o){return i._completion.then(function(){return o})})}}var Ls="3.2.4",Pt=String.fromCharCode(65535),Qi=-1/0,nt="Invalid key provided. Keys must be of type string, number, Date or Array.",Rs="String expected.",On=[],Cr=typeof navigator<"u"&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),gp=Cr,yp=Cr,As=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)},Sr="__dbnames",Zi="readonly",Xi="readwrite";function Nt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var Us={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Ir(e){return typeof e=="string"&&!/\./.test(e)?function(t){return t[e]===void 0&&e in t&&(t=Sn(t),delete t[e]),t}:function(t){return t}}var _p=function(){function e(){}return e.prototype._trans=function(t,n,r){var i=this._tx||M.trans,o=this.name;function a(l,u,c){if(!c.schema[o])throw new j.NotFound("Table "+o+" not part of transaction");return n(c.idbtrans,c)}var s=An();try{return i&&i.db===this.db?i===M.trans?i._promise(t,a,r):vt(function(){return i._promise(t,a,r)},{trans:i,transless:M.transless||M}):Yi(this.db,t,[this.name],a)}finally{s&&Un()}},e.prototype.get=function(t,n){var r=this;return t&&t.constructor===Object?this.where(t).first(n):this._trans("readonly",function(i){return r.core.get({trans:i,key:t}).then(function(o){return r.hook.reading.fire(o)})}).then(n)},e.prototype.where=function(t){if(typeof t=="string")return new this.db.WhereClause(this,t);if(de(t))return new this.db.WhereClause(this,"["+t.join("+")+"]");var n=ne(t);if(n.length===1)return this.where(n[0]).equals(t[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter(function(c){return c.compound&&n.every(function(d){return c.keyPath.indexOf(d)>=0})&&c.keyPath.every(function(d){return n.indexOf(d)>=0})})[0];if(r&&this.db._maxKey!==Pt)return this.where(r.name).equals(r.keyPath.map(function(c){return t[c]}));!r&&He&&console.warn("The query "+JSON.stringify(t)+" on "+this.name+" would benefit of a "+("compound index ["+n.join("+")+"]"));var i=this.schema.idxByName,o=this.db._deps.indexedDB;function a(c,d){try{return o.cmp(c,d)===0}catch{return!1}}var s=n.reduce(function(c,d){var f=c[0],p=c[1],h=i[d],v=t[d];return[f||h,f||!h?Nt(p,h&&h.multi?function(m){var w=Je(m,d);return de(w)&&w.some(function(_){return a(v,_)})}:function(m){return a(v,Je(m,d))}):p]},[null,null]),l=s[0],u=s[1];return l?this.where(l.name).equals(t[l.keyPath]).filter(u):r?this.filter(u):this.where(n).equals("")},e.prototype.filter=function(t){return this.toCollection().and(t)},e.prototype.count=function(t){return this.toCollection().count(t)},e.prototype.offset=function(t){return this.toCollection().offset(t)},e.prototype.limit=function(t){return this.toCollection().limit(t)},e.prototype.each=function(t){return this.toCollection().each(t)},e.prototype.toArray=function(t){return this.toCollection().toArray(t)},e.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},e.prototype.orderBy=function(t){return new this.db.Collection(new this.db.WhereClause(this,de(t)?"["+t.join("+")+"]":t))},e.prototype.reverse=function(){return this.toCollection().reverse()},e.prototype.mapToClass=function(t){this.schema.mappedClass=t;var n=function(r){if(!r)return r;var i=Object.create(t.prototype);for(var o in r)if(we(r,o))try{i[o]=r[o]}catch{}return i};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=n,this.hook("reading",n),t},e.prototype.defineClass=function(){function t(n){pe(this,n)}return this.mapToClass(t)},e.prototype.add=function(t,n){var r=this,i=this.schema.primKey,o=i.auto,a=i.keyPath,s=t;return a&&o&&(s=Ir(a)(t)),this._trans("readwrite",function(l){return r.core.mutate({trans:l,type:"add",keys:n!=null?[n]:null,values:[s]})}).then(function(l){return l.numFailures?U.reject(l.failures[0]):l.lastResult}).then(function(l){if(a)try{Oe(t,a,l)}catch{}return l})},e.prototype.update=function(t,n){if(typeof t=="object"&&!de(t)){var r=Je(t,this.schema.primKey.keyPath);if(r===void 0)return ie(new j.InvalidArgument("Given object does not contain its primary key"));try{typeof n!="function"?ne(n).forEach(function(i){Oe(t,i,n[i])}):n(t,{value:t,primKey:r})}catch{}return this.where(":id").equals(r).modify(n)}else return this.where(":id").equals(t).modify(n)},e.prototype.put=function(t,n){var r=this,i=this.schema.primKey,o=i.auto,a=i.keyPath,s=t;return a&&o&&(s=Ir(a)(t)),this._trans("readwrite",function(l){return r.core.mutate({trans:l,type:"put",values:[s],keys:n!=null?[n]:null})}).then(function(l){return l.numFailures?U.reject(l.failures[0]):l.lastResult}).then(function(l){if(a)try{Oe(t,a,l)}catch{}return l})},e.prototype.delete=function(t){var n=this;return this._trans("readwrite",function(r){return n.core.mutate({trans:r,type:"delete",keys:[t]})}).then(function(r){return r.numFailures?U.reject(r.failures[0]):void 0})},e.prototype.clear=function(){var t=this;return this._trans("readwrite",function(n){return t.core.mutate({trans:n,type:"deleteRange",range:Us})}).then(function(n){return n.numFailures?U.reject(n.failures[0]):void 0})},e.prototype.bulkGet=function(t){var n=this;return this._trans("readonly",function(r){return n.core.getMany({keys:t,trans:r}).then(function(i){return i.map(function(o){return n.hook.reading.fire(o)})})})},e.prototype.bulkAdd=function(t,n,r){var i=this,o=Array.isArray(n)?n:void 0;r=r||(o?void 0:n);var a=r?r.allKeys:void 0;return this._trans("readwrite",function(s){var l=i.schema.primKey,u=l.auto,c=l.keyPath;if(c&&o)throw new j.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new j.InvalidArgument("Arguments objects and keys must have the same length");var d=t.length,f=c&&u?t.map(Ir(c)):t;return i.core.mutate({trans:s,type:"add",keys:o,values:f,wantResults:a}).then(function(p){var h=p.numFailures,v=p.results,m=p.lastResult,w=p.failures,_=a?v:m;if(h===0)return _;throw new In(i.name+".bulkAdd(): "+h+" of "+d+" operations failed",w)})})},e.prototype.bulkPut=function(t,n,r){var i=this,o=Array.isArray(n)?n:void 0;r=r||(o?void 0:n);var a=r?r.allKeys:void 0;return this._trans("readwrite",function(s){var l=i.schema.primKey,u=l.auto,c=l.keyPath;if(c&&o)throw new j.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new j.InvalidArgument("Arguments objects and keys must have the same length");var d=t.length,f=c&&u?t.map(Ir(c)):t;return i.core.mutate({trans:s,type:"put",keys:o,values:f,wantResults:a}).then(function(p){var h=p.numFailures,v=p.results,m=p.lastResult,w=p.failures,_=a?v:m;if(h===0)return _;throw new In(i.name+".bulkPut(): "+h+" of "+d+" operations failed",w)})})},e.prototype.bulkDelete=function(t){var n=this,r=t.length;return this._trans("readwrite",function(i){return n.core.mutate({trans:i,type:"delete",keys:t})}).then(function(i){var o=i.numFailures,a=i.lastResult,s=i.failures;if(o===0)return a;throw new In(n.name+".bulkDelete(): "+o+" of "+r+" operations failed",s)})},e}();function Dn(e){var t={},n=function(s,l){if(l){for(var u=arguments.length,c=new Array(u-1);--u;)c[u-1]=arguments[u];return t[s].subscribe.apply(null,c),e}else if(typeof s=="string")return t[s]};n.addEventType=o;for(var r=1,i=arguments.length;rt?1:ef?s:0}return this.toArray(function(u){return u.sort(l)}).then(n)},e.prototype.toArray=function(t){var n=this;return this._read(function(r){var i=n._ctx;if(i.dir==="next"&&ln(i,!0)&&i.limit>0){var o=i.valueMapper,a=kr(i,i.table.core.schema);return i.table.core.query({trans:r,limit:i.limit,values:!0,query:{index:a,range:i.range}}).then(function(l){var u=l.result;return o?u.map(o):u})}else{var s=[];return Tr(i,function(l){return s.push(l)},r,i.table.core).then(function(){return s})}},t)},e.prototype.offset=function(t){var n=this._ctx;return t<=0?this:(n.offset+=t,ln(n)?eo(n,function(){var r=t;return function(i,o){return r===0?!0:r===1?(--r,!1):(o(function(){i.advance(r),r=0}),!1)}}):eo(n,function(){var r=t;return function(){return--r<0}}),this)},e.prototype.limit=function(t){return this._ctx.limit=Math.min(this._ctx.limit,t),eo(this._ctx,function(){var n=t;return function(r,i,o){return--n<=0&&i(o),n>=0}},!0),this},e.prototype.until=function(t,n){return Ji(this._ctx,function(r,i,o){return t(r.value)?(i(o),n):!0}),this},e.prototype.first=function(t){return this.limit(1).toArray(function(n){return n[0]}).then(t)},e.prototype.last=function(t){return this.reverse().first(t)},e.prototype.filter=function(t){return Ji(this._ctx,function(n){return t(n.value)}),bp(this._ctx,t),this},e.prototype.and=function(t){return this.filter(t)},e.prototype.or=function(t){return new this.db.WhereClause(this._ctx.table,t,this)},e.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},e.prototype.desc=function(){return this.reverse()},e.prototype.eachKey=function(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,i){t(i.key,i)})},e.prototype.eachUniqueKey=function(t){return this._ctx.unique="unique",this.eachKey(t)},e.prototype.eachPrimaryKey=function(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,i){t(i.primaryKey,i)})},e.prototype.keys=function(t){var n=this._ctx;n.keysOnly=!n.isMatch;var r=[];return this.each(function(i,o){r.push(o.key)}).then(function(){return r}).then(t)},e.prototype.primaryKeys=function(t){var n=this._ctx;if(n.dir==="next"&&ln(n,!0)&&n.limit>0)return this._read(function(i){var o=kr(n,n.table.core.schema);return n.table.core.query({trans:i,values:!1,limit:n.limit,query:{index:o,range:n.range}})}).then(function(i){var o=i.result;return o}).then(t);n.keysOnly=!n.isMatch;var r=[];return this.each(function(i,o){r.push(o.primaryKey)}).then(function(){return r}).then(t)},e.prototype.uniqueKeys=function(t){return this._ctx.unique="unique",this.keys(t)},e.prototype.firstKey=function(t){return this.limit(1).keys(function(n){return n[0]}).then(t)},e.prototype.lastKey=function(t){return this.reverse().firstKey(t)},e.prototype.distinct=function(){var t=this._ctx,n=t.index&&t.table.schema.idxByName[t.index];if(!n||!n.multi)return this;var r={};return Ji(this._ctx,function(i){var o=i.primaryKey.toString(),a=we(r,o);return r[o]=!0,!a}),this},e.prototype.modify=function(t){var n=this,r=this._ctx;return this._write(function(i){var o;if(typeof t=="function")o=t;else{var a=ne(t),s=a.length;o=function(w){for(var _=!1,b=0;b0&&l.mutate({trans:i,type:"add",values:x}).then(function(A){for(var k in A.failures)S.splice(parseInt(k),1);m(x.length,A)})).then(function(){return(I.length>0||P&&typeof t=="object")&&l.mutate({trans:i,type:"put",keys:C,values:I,criteria:P,changeSpec:typeof t!="function"&&t}).then(function(A){return m(I.length,A)})}).then(function(){return(S.length>0||P&&t===to)&&l.mutate({trans:i,type:"delete",keys:S,criteria:P}).then(function(A){return m(S.length,A)})}).then(function(){return w.length>b+E&&_(b+f)})})};return _(0).then(function(){if(p.length>0)throw new dr("Error modifying one or more objects",p,h,v);return w.length})})})},e.prototype.delete=function(){var t=this._ctx,n=t.range;return ln(t)&&(t.isPrimKey&&!yp||n.type===3)?this._write(function(r){var i=t.table.core.schema.primaryKey,o=n;return t.table.core.count({trans:r,query:{index:i,range:o}}).then(function(a){return t.table.core.mutate({trans:r,type:"deleteRange",range:o}).then(function(s){var l=s.failures;s.lastResult,s.results;var u=s.numFailures;if(u)throw new dr("Could not delete some values",Object.keys(l).map(function(c){return l[c]}),a-u);return a-u})})}):this.modify(to)},e}(),to=function(e,t){return t.value=null};function Sp(e){return Pn(Cp.prototype,function(n,r){this.db=e;var i=Us,o=null;if(r)try{i=r()}catch(u){o=u}var a=n._ctx,s=a.table,l=s.hook.reading.fire;this._ctx={table:s,index:a.index,isPrimKey:!a.index||s.schema.primKey.keyPath&&a.index===s.schema.primKey.name,range:i,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:a.or,valueMapper:l!==kn?l:null}})}function Ip(e,t){return et?-1:e===t?0:1}function be(e,t,n){var r=e instanceof Vs?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function un(e){return new e.Collection(e,function(){return Ms("")}).limit(0)}function Tp(e){return e==="next"?function(t){return t.toUpperCase()}:function(t){return t.toLowerCase()}}function Lp(e){return e==="next"?function(t){return t.toLowerCase()}:function(t){return t.toUpperCase()}}function Rp(e,t,n,r,i,o){for(var a=Math.min(e.length,r.length),s=-1,l=0;l=0?e.substr(0,s)+t[s]+n.substr(s+1):null;i(e[l],u)<0&&(s=l)}return a0)&&(E=x)}return m(E!==null?function(){v.continue(E+c)}:w),!1}),p}function gt(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Ms(e){return{type:1,lower:e,upper:e}}var Vs=function(){function e(){}return Object.defineProperty(e.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),e.prototype.between=function(t,n,r,i){r=r!==!1,i=i===!0;try{return this._cmp(t,n)>0||this._cmp(t,n)===0&&(r||i)&&!(r&&i)?un(this):new this.Collection(this,function(){return gt(t,n,!r,!i)})}catch{return be(this,nt)}},e.prototype.equals=function(t){return t==null?be(this,nt):new this.Collection(this,function(){return Ms(t)})},e.prototype.above=function(t){return t==null?be(this,nt):new this.Collection(this,function(){return gt(t,void 0,!0)})},e.prototype.aboveOrEqual=function(t){return t==null?be(this,nt):new this.Collection(this,function(){return gt(t,void 0,!1)})},e.prototype.below=function(t){return t==null?be(this,nt):new this.Collection(this,function(){return gt(void 0,t,!1,!0)})},e.prototype.belowOrEqual=function(t){return t==null?be(this,nt):new this.Collection(this,function(){return gt(void 0,t)})},e.prototype.startsWith=function(t){return typeof t!="string"?be(this,Rs):this.between(t,t+Pt,!0,!0)},e.prototype.startsWithIgnoreCase=function(t){return t===""?this.startsWith(t):Lr(this,function(n,r){return n.indexOf(r[0])===0},[t],Pt)},e.prototype.equalsIgnoreCase=function(t){return Lr(this,function(n,r){return n===r[0]},[t],"")},e.prototype.anyOfIgnoreCase=function(){var t=et.apply(nn,arguments);return t.length===0?un(this):Lr(this,function(n,r){return r.indexOf(n)!==-1},t,"")},e.prototype.startsWithAnyOfIgnoreCase=function(){var t=et.apply(nn,arguments);return t.length===0?un(this):Lr(this,function(n,r){return r.some(function(i){return n.indexOf(i)===0})},t,Pt)},e.prototype.anyOf=function(){var t=this,n=et.apply(nn,arguments),r=this._cmp;try{n.sort(r)}catch{return be(this,nt)}if(n.length===0)return un(this);var i=new this.Collection(this,function(){return gt(n[0],n[n.length-1])});i._ondirectionchange=function(a){r=a==="next"?t._ascending:t._descending,n.sort(r)};var o=0;return i._addAlgorithm(function(a,s,l){for(var u=a.key;r(u,n[o])>0;)if(++o,o===n.length)return s(l),!1;return r(u,n[o])===0?!0:(s(function(){a.continue(n[o])}),!1)}),i},e.prototype.notEqual=function(t){return this.inAnyRange([[Qi,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},e.prototype.noneOf=function(){var t=et.apply(nn,arguments);if(t.length===0)return new this.Collection(this);try{t.sort(this._ascending)}catch{return be(this,nt)}var n=t.reduce(function(r,i){return r?r.concat([[r[r.length-1][1],i]]):[[Qi,i]]},null);return n.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(n,{includeLowers:!1,includeUppers:!1})},e.prototype.inAnyRange=function(t,n){var r=this,i=this._cmp,o=this._ascending,a=this._descending,s=this._min,l=this._max;if(t.length===0)return un(this);if(!t.every(function(g){return g[0]!==void 0&&g[1]!==void 0&&o(g[0],g[1])<=0}))return be(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",j.InvalidArgument);var u=!n||n.includeLowers!==!1,c=n&&n.includeUppers===!0;function d(g,x){for(var I=0,C=g.length;I0){S[0]=s(S[0],x[0]),S[1]=l(S[1],x[1]);break}}return I===C&&g.push(x),g}var f=o;function p(g,x){return f(g[0],x[0])}var h;try{h=t.reduce(d,[]),h.sort(p)}catch{return be(this,nt)}var v=0,m=c?function(g){return o(g,h[v][1])>0}:function(g){return o(g,h[v][1])>=0},w=u?function(g){return a(g,h[v][0])>0}:function(g){return a(g,h[v][0])>=0};function _(g){return!m(g)&&!w(g)}var b=m,E=new this.Collection(this,function(){return gt(h[0][0],h[h.length-1][1],!u,!c)});return E._ondirectionchange=function(g){g==="next"?(b=m,f=o):(b=w,f=a),h.sort(p)},E._addAlgorithm(function(g,x,I){for(var C=g.key;b(C);)if(++v,v===h.length)return x(I),!1;return _(C)?!0:(r._cmp(C,h[v][1])===0||r._cmp(C,h[v][0])===0||x(function(){f===o?g.continue(h[v][0]):g.continue(h[v][1])}),!1)}),E},e.prototype.startsWithAnyOf=function(){var t=et.apply(nn,arguments);return t.every(function(n){return typeof n=="string"})?t.length===0?un(this):this.inAnyRange(t.map(function(n){return[n,n+Pt]})):be(this,"startsWithAnyOf() only works with strings")},e}();function Ap(e){return Pn(Vs.prototype,function(n,r,i){this.db=e,this._ctx={table:n,index:r===":id"?null:r,or:i};var o=e._deps.indexedDB;if(!o)throw new j.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=function(a,s){return o.cmp(s,a)},this._max=function(a,s){return o.cmp(a,s)>0?a:s},this._min=function(a,s){return o.cmp(a,s)<0?a:s},this._IDBKeyRange=e._deps.IDBKeyRange})}function Ke(e){return Z(function(t){return Nn(t),e(t.target.error),!1})}function Nn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var Mn="storagemutated",yt="x-storagemutated-1",_t=Dn(null,Mn),Up=function(){function e(){}return e.prototype._lock=function(){return Cn(!M.global),++this._reculock,this._reculock===1&&!M.global&&(M.lockOwnerFor=this),this},e.prototype._unlock=function(){if(Cn(!M.global),--this._reculock===0)for(M.global||(M.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{sn(t[1],t[0])}catch{}}return this},e.prototype._locked=function(){return this._reculock&&M.lockOwnerFor!==this},e.prototype.create=function(t){var n=this;if(!this.mode)return this;var r=this.db.idbdb,i=this.db._state.dbOpenError;if(Cn(!this.idbtrans),!t&&!r)switch(i&&i.name){case"DatabaseClosedError":throw new j.DatabaseClosed(i);case"MissingAPIError":throw new j.MissingAPI(i.message,i);default:throw new j.OpenFailed(i)}if(!this.active)throw new j.TransactionInactive;return Cn(this._completion._state===null),t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):r.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})),t.onerror=Z(function(o){Nn(o),n._reject(t.error)}),t.onabort=Z(function(o){Nn(o),n.active&&n._reject(new j.Abort(t.error)),n.active=!1,n.on("abort").fire(o)}),t.oncomplete=Z(function(){n.active=!1,n._resolve(),"mutatedParts"in t&&_t.storagemutated.fire(t.mutatedParts)}),this},e.prototype._promise=function(t,n,r){var i=this;if(t==="readwrite"&&this.mode!=="readwrite")return ie(new j.ReadOnly("Transaction is readonly"));if(!this.active)return ie(new j.TransactionInactive);if(this._locked())return new U(function(a,s){i._blockedFuncs.push([function(){i._promise(t,n,r).then(a,s)},M])});if(r)return vt(function(){var a=new U(function(s,l){i._lock();var u=n(s,l,i);u&&u.then&&u.then(s,l)});return a.finally(function(){return i._unlock()}),a._lib=!0,a});var o=new U(function(a,s){var l=n(a,s,i);l&&l.then&&l.then(a,s)});return o._lib=!0,o},e.prototype._root=function(){return this.parent?this.parent._root():this},e.prototype.waitFor=function(t){var n=this._root(),r=U.resolve(t);if(n._waitingFor)n._waitingFor=n._waitingFor.then(function(){return r});else{n._waitingFor=r,n._waitingQueue=[];var i=n.idbtrans.objectStore(n.storeNames[0]);(function a(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(i.get(-1/0).onsuccess=a)})()}var o=n._waitingFor;return new U(function(a,s){r.then(function(l){return n._waitingQueue.push(Z(a.bind(null,l)))},function(l){return n._waitingQueue.push(Z(s.bind(null,l)))}).finally(function(){n._waitingFor===o&&(n._waitingFor=null)})})},e.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new j.Abort))},e.prototype.table=function(t){var n=this._memoizedTables||(this._memoizedTables={});if(we(n,t))return n[t];var r=this.schema[t];if(!r)throw new j.NotFound("Table "+t+" not part of transaction");var i=new this.db.Table(t,r,this);return i.core=this.db.core.table(t),n[t]=i,i},e}();function Op(e){return Pn(Up.prototype,function(n,r,i,o,a){var s=this;this.db=e,this.mode=n,this.storeNames=r,this.schema=i,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=Dn(this,"complete","error","abort"),this.parent=a||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new U(function(l,u){s._resolve=l,s._reject=u}),this._completion.then(function(){s.active=!1,s.on.complete.fire()},function(l){var u=s.active;return s.active=!1,s.on.error.fire(l),s.parent?s.parent._reject(l):u&&s.idbtrans&&s.idbtrans.abort(),ie(l)})})}function no(e,t,n,r,i,o,a){return{name:e,keyPath:t,unique:n,multi:r,auto:i,compound:o,src:(n&&!a?"&":"")+(r?"*":"")+(i?"++":"")+js(t)}}function js(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function Bs(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:ls(n,function(r){return[r.name,r]})}}function Dp(e){return e.length===1?e[0]:e}var Vn=function(e){try{return e.only([[]]),Vn=function(){return[[]]},[[]]}catch{return Vn=function(){return Pt},Pt}};function ro(e){return e==null?function(){}:typeof e=="string"?Pp(e):function(t){return Je(t,e)}}function Pp(e){var t=e.split(".");return t.length===1?function(n){return n[e]}:function(n){return Je(n,e)}}function Fs(e){return[].slice.call(e)}var Np=0;function jn(e){return e==null?":id":typeof e=="string"?e:"["+e.join("+")+"]"}function Mp(e,t,n){function r(d,f){var p=Fs(d.objectStoreNames);return{schema:{name:d.name,tables:p.map(function(h){return f.objectStore(h)}).map(function(h){var v=h.keyPath,m=h.autoIncrement,w=de(v),_=v==null,b={},E={name:h.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:_,compound:w,keyPath:v,autoIncrement:m,unique:!0,extractKey:ro(v)},indexes:Fs(h.indexNames).map(function(g){return h.index(g)}).map(function(g){var x=g.name,I=g.unique,C=g.multiEntry,S=g.keyPath,R=de(S),D={name:x,compound:R,keyPath:S,unique:I,multiEntry:C,extractKey:ro(S)};return b[jn(S)]=D,D}),getIndexByKeyPath:function(g){return b[jn(g)]}};return b[":id"]=E.primaryKey,v!=null&&(b[jn(v)]=E.primaryKey),E})},hasGetAll:p.length>0&&"getAll"in f.objectStore(p[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}function i(d){if(d.type===3)return null;if(d.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var f=d.lower,p=d.upper,h=d.lowerOpen,v=d.upperOpen,m=f===void 0?p===void 0?null:t.upperBound(p,!!v):p===void 0?t.lowerBound(f,!!h):t.bound(f,p,!!h,!!v);return m}function o(d){var f=d.name;function p(m){var w=m.trans,_=m.type,b=m.keys,E=m.values,g=m.range;return new Promise(function(x,I){x=Z(x);var C=w.objectStore(f),S=C.keyPath==null,R=_==="put"||_==="add";if(!R&&_!=="delete"&&_!=="deleteRange")throw new Error("Invalid operation type: "+_);var D=(b||E||{length:1}).length;if(b&&E&&b.length!==E.length)throw new Error("Given keys array must have same length as given values array.");if(D===0)return x({numFailures:0,failures:{},results:[],lastResult:void 0});var T,P=[],A=[],k=0,J=function(ze){++k,Nn(ze)};if(_==="deleteRange"){if(g.type===4)return x({numFailures:k,failures:A,results:[],lastResult:void 0});g.type===3?P.push(T=C.clear()):P.push(T=C.delete(i(g)))}else{var ve=R?S?[E,b]:[E,null]:[b,null],Ve=ve[0],me=ve[1];if(R)for(var Ae=0;Ae=t});u.forEach(function(d){o.push(function(){var f=s,p=d._cfg.dbschema;uo(i,f,r),uo(i,p,r),s=i._dbSchema=p;var h=Hs(f,p);h.add.forEach(function(E){ao(r,E[0],E[1].primKey,E[1].indexes)}),h.change.forEach(function(E){if(E.recreate)throw new j.Upgrade("Not yet support for changing primary key");var g=r.objectStore(E.name);E.add.forEach(function(x){return so(g,x)}),E.change.forEach(function(x){g.deleteIndex(x.name),so(g,x)}),E.del.forEach(function(x){return g.deleteIndex(x)})});var v=d._cfg.contentUpgrade;if(v&&d._cfg.version>t){io(i,r),n._memoizedTables={},l=!0;var m=us(p);h.del.forEach(function(E){m[E]=f[E]}),oo(i,[i.Transaction.prototype]),Rr(i,[i.Transaction.prototype],ne(m),m),n.schema=m;var w=Ai(v);w&&an();var _,b=U.follow(function(){if(_=v(n),_&&w){var E=tt.bind(null,null);_.then(E,E)}});return _&&typeof _.then=="function"?U.resolve(_):b.then(function(){return _})}}),o.push(function(f){if(!l||!gp){var p=d._cfg.dbschema;$p(p,f)}oo(i,[i.Transaction.prototype]),Rr(i,[i.Transaction.prototype],i._storeNames,i._dbSchema),n.schema=i._dbSchema})});function c(){return o.length?U.resolve(o.shift()(n.idbtrans)).then(c):U.resolve()}return c().then(function(){Kp(s,r)})}function Hs(e,t){var n={del:[],add:[],change:[]},r;for(r in e)t[r]||n.del.push(r);for(r in t){var i=e[r],o=t[r];if(!i)n.add.push([r,o]);else{var a={name:r,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||i.primKey.auto!==o.primKey.auto&&!Cr)a.recreate=!0,n.change.push(a);else{var s=i.idxByName,l=o.idxByName,u=void 0;for(u in s)l[u]||a.del.push(u);for(u in l){var c=s[u],d=l[u];c?c.src!==d.src&&a.change.push(d):a.add.push(d)}(a.del.length>0||a.add.length>0||a.change.length>0)&&n.change.push(a)}}}return n}function ao(e,t,n,r){var i=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach(function(o){return so(i,o)}),i}function Kp(e,t){ne(e).forEach(function(n){t.db.objectStoreNames.contains(n)||ao(t,n,e[n].primKey,e[n].indexes)})}function $p(e,t){[].slice.call(t.db.objectStoreNames).forEach(function(n){return e[n]==null&&t.db.deleteObjectStore(n)})}function so(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function lo(e,t,n){var r={},i=cr(t.objectStoreNames,0);return i.forEach(function(o){for(var a=n.objectStore(o),s=a.keyPath,l=no(js(s),s||"",!1,!1,!!a.autoIncrement,s&&typeof s!="string",!0),u=[],c=0;c"u"?U.resolve():Jp()).then(function(){return new U(function(l,u){if(i(),!n)throw new j.MissingAPI;var c=e.name,d=t.autoSchema?n.open(c):n.open(c,Math.round(e.verno*10));if(!d)throw new j.MissingAPI;d.onerror=Ke(u),d.onblocked=Z(e._fireOnBlocked),d.onupgradeneeded=Z(function(f){if(a=d.transaction,t.autoSchema&&!e._options.allowEmptyDB){d.onerror=Nn,a.abort(),d.result.close();var p=n.deleteDatabase(c);p.onsuccess=p.onerror=Z(function(){u(new j.NoSuchDatabase("Database "+c+" doesnt exist"))})}else{a.onerror=Ke(u);var h=f.oldVersion>Math.pow(2,62)?0:f.oldVersion;s=h<1,e._novip.idbdb=d.result,Fp(e,h/10,a,u)}},u),d.onsuccess=Z(function(){a=null;var f=e._novip.idbdb=d.result,p=cr(f.objectStoreNames);if(p.length>0)try{var h=f.transaction(Dp(p),"readonly");t.autoSchema?Gp(e,f,h):(uo(e,e._dbSchema,h),qp(e,h)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),io(e,h)}catch{}On.push(e),f.onversionchange=Z(function(v){t.vcFired=!0,e.on("versionchange").fire(v)}),f.onclose=Z(function(v){e.on("close").fire(v)}),s&&Zp(e._deps,c),l()},u)})})]).then(function(){return i(),t.onReadyBeingFired=[],U.resolve(po(function(){return e.on.ready.fire(e.vip)})).then(function l(){if(t.onReadyBeingFired.length>0){var u=t.onReadyBeingFired.reduce(Pi,W);return t.onReadyBeingFired=[],U.resolve(po(function(){return u(e.vip)})).then(l)}})}).finally(function(){t.onReadyBeingFired=null,t.isBeingOpened=!1}).then(function(){return e}).catch(function(l){t.dbOpenError=l;try{a&&a.abort()}catch{}return r===t.openCanceller&&e._close(),ie(l)}).finally(function(){t.openComplete=!0,o()})}function ho(e){var t=function(a){return e.next(a)},n=function(a){return e.throw(a)},r=o(t),i=o(n);function o(a){return function(s){var l=a(s),u=l.value;return l.done?u:!u||typeof u.then!="function"?de(u)?Promise.all(u).then(r,i):r(u):u.then(r,i)}}return o(t)()}function th(e,t,n){var r=arguments.length;if(r<2)throw new j.InvalidArgument("Too few arguments");for(var i=new Array(r-1);--r;)i[r-1]=arguments[r];n=i.pop();var o=cs(i);return[e,o,n]}function Ks(e,t,n,r,i){return U.resolve().then(function(){var o=M.transless||M,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:o};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(d){return d.name===Di.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(function(){return Ks(e,t,n,null,i)})):ie(d)}var l=Ai(i);l&&an();var u,c=U.follow(function(){if(u=i.call(a,a),u)if(l){var d=tt.bind(null,null);u.then(d,d)}else typeof u.next=="function"&&typeof u.throw=="function"&&(u=ho(u))},s);return(u&&typeof u.then=="function"?U.resolve(u).then(function(d){return a.active?d:ie(new j.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):c.then(function(){return u})).then(function(d){return r&&a._resolve(),a._completion.then(function(){return d})}).catch(function(d){return a._reject(d),ie(d)})})}function Ar(e,t,n){for(var r=de(e)?e.slice():[e],i=0;i0,x=$($({},w),{isVirtual:g,keyTail:m,keyLength:E,extractKey:ro(v),unique:!g&&w.unique});if(b.push(x),x.isPrimaryKey||o.push(x),E>1){var I=E===2?v[0]:v.slice(0,E-1);a(I,m+1,w)}return b.sort(function(C,S){return C.keyTail-S.keyTail}),x}var s=a(r.primaryKey.keyPath,0,r.primaryKey);i[":id"]=[s];for(var l=0,u=r.indexes;l0?Promise.reject(b.failures[0]):_.length1?t:e}:{d:0});else{var n=new rt;return e&&"d"in e&&pe(n,e),n}};en(rt.prototype,(mo={add:function(e){return Ur(this,e),this},addKey:function(e){return Bn(this,e,e),this},addKeys:function(e){var t=this;return e.forEach(function(n){return Bn(t,n,n)}),this}},mo[Ri]=function(){return yo(this)},mo));function Bn(e,t,n){var r=he(t,n);if(!isNaN(r)){if(r>0)throw RangeError();if(go(e))return pe(e,{from:t,to:n,d:1});var i=e.l,o=e.r;if(he(n,e.from)<0)return i?Bn(i,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Gs(e);if(he(t,e.to)>0)return o?Bn(o,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Gs(e);he(t,e.from)<0&&(e.from=t,e.l=null,e.d=o?o.d+1:1),he(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;i&&!e.l&&Ur(e,i),o&&a&&Ur(e,o)}}function Ur(e,t){function n(r,i){var o=i.from,a=i.to,s=i.l,l=i.r;Bn(r,o,a),s&&n(r,s),l&&n(r,l)}go(t)||n(e,t)}function lh(e,t){var n=yo(t),r=n.next();if(r.done)return!1;for(var i=r.value,o=yo(e),a=o.next(i.from),s=a.value;!r.done&&!a.done;){if(he(s.from,i.to)<=0&&he(s.to,i.from)>=0)return!0;he(i.from,s.from)<0?i=(r=n.next(s.from)).value:s=(a=o.next(i.from)).value}return!1}function yo(e){var t=go(e)?null:{s:0,n:e};return{next:function(n){for(var r=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&he(n,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||he(n,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Gs(e){var t,n,r=(((t=e.r)===null||t===void 0?void 0:t.d)||0)-(((n=e.l)===null||n===void 0?void 0:n.d)||0),i=r>1?"r":r<-1?"l":"";if(i){var o=i==="r"?"l":"r",a=$({},e),s=e[i];e.from=s.from,e.to=s.to,e[i]=s[i],a[i]=s[o],e[o]=a,a.d=qs(a)}e.d=qs(e)}function qs(e){var t=e.r,n=e.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1}var uh={stack:"dbcore",level:0,create:function(e){var t=e.schema.name,n=new rt(e.MIN_KEY,e.MAX_KEY);return $($({},e),{table:function(r){var i=e.table(r),o=i.schema,a=o.primaryKey,s=a.extractKey,l=a.outbound,u=$($({},i),{mutate:function(f){var p=f.trans,h=p.mutatedParts||(p.mutatedParts={}),v=function(I){var C="idb://"+t+"/"+r+"/"+I;return h[C]||(h[C]=new rt)},m=v(""),w=v(":dels"),_=f.type,b=f.type==="deleteRange"?[f.range]:f.type==="delete"?[f.keys]:f.values.length<50?[[],f.values]:[],E=b[0],g=b[1],x=f.trans._cache;return i.mutate(f).then(function(I){if(de(E)){_!=="delete"&&(E=I.results),m.addKeys(E);var C=$s(E,x);!C&&_!=="add"&&w.addKeys(E),(C||g)&&ch(v,o,C,g)}else if(E){var S={from:E.lower,to:E.upper};w.add(S),m.add(S)}else m.add(n),w.add(n),o.indexes.forEach(function(R){return v(R.name).add(n)});return I})}}),c=function(f){var p,h,v=f.query,m=v.index,w=v.range;return[m,new rt((p=w.lower)!==null&&p!==void 0?p:e.MIN_KEY,(h=w.upper)!==null&&h!==void 0?h:e.MAX_KEY)]},d={get:function(f){return[a,new rt(f.key)]},getMany:function(f){return[a,new rt().addKeys(f.keys)]},count:c,query:c,openCursor:c};return ne(d).forEach(function(f){u[f]=function(p){var h=M.subscr;if(h){var v=function(x){var I="idb://"+t+"/"+r+"/"+x;return h[I]||(h[I]=new rt)},m=v(""),w=v(":dels"),_=d[f](p),b=_[0],E=_[1];if(v(b.name||"").add(E),!b.isPrimaryKey)if(f==="count")w.add(n);else{var g=f==="query"&&l&&p.values&&i.query($($({},p),{values:!1}));return i[f].apply(this,arguments).then(function(x){if(f==="query"){if(l&&p.values)return g.then(function(R){var D=R.result;return m.addKeys(D),x});var I=p.values?x.result.map(s):x.result;p.values?m.addKeys(I):w.addKeys(I)}else if(f==="openCursor"){var C=x,S=p.values;return C&&Object.create(C,{key:{get:function(){return w.addKey(C.primaryKey),C.key}},primaryKey:{get:function(){var R=C.primaryKey;return w.addKey(R),R}},value:{get:function(){return S&&m.addKey(C.primaryKey),C.value}}})}return x})}}return i[f].apply(this,arguments)}}),u}})}};function ch(e,t,n,r){function i(o){var a=e(o.name||"");function s(u){return u!=null?o.extractKey(u):null}var l=function(u){return o.multiEntry&&de(u)?u.forEach(function(c){return a.addKey(c)}):a.addKey(u)};(n||r).forEach(function(u,c){var d=n&&s(n[c]),f=r&&s(r[c]);he(d,f)!==0&&(d!=null&&l(d),f!=null&&l(f))})}t.indexes.forEach(i)}var _o=function(){function e(t,n){var r=this;this._middlewares={},this.verno=0;var i=e.dependencies;this._options=n=$({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var o=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:W,dbReadyPromise:null,cancelOpen:W,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};a.dbReadyPromise=new U(function(s){a.dbReadyResolve=s}),a.openCanceller=new U(function(s,l){a.cancelOpen=l}),this._state=a,this.name=t,this.on=Dn(this,"populate","blocked","versionchange","close",{ready:[Pi,W]}),this.on.ready.subscribe=as(this.on.ready.subscribe,function(s){return function(l,u){e.vip(function(){var c=r._state;if(c.openComplete)c.dbOpenError||U.resolve().then(l),u&&s(l);else if(c.onReadyBeingFired)c.onReadyBeingFired.push(l),u&&s(l);else{s(l);var d=r;u||s(function f(){d.on.ready.unsubscribe(l),d.on.ready.unsubscribe(f)})}})}}),this.Collection=Sp(this),this.Table=wp(this),this.Transaction=Op(this),this.Version=Yp(this),this.WhereClause=Ap(this),this.on("versionchange",function(s){s.newVersion>0?console.warn("Another connection wants to upgrade database '"+r.name+"'. Closing db now to resume the upgrade."):console.warn("Another connection wants to delete database '"+r.name+"'. Closing db now to resume the delete request."),r.close()}),this.on("blocked",function(s){!s.newVersion||s.newVersion=0&&On.splice(n,1),this.idbdb){try{this.idbdb.close()}catch{}this._novip.idbdb=null}t.dbReadyPromise=new U(function(r){t.dbReadyResolve=r}),t.openCanceller=new U(function(r,i){t.cancelOpen=i})},e.prototype.close=function(){this._close();var t=this._state;this._options.autoOpen=!1,t.dbOpenError=new j.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)},e.prototype.delete=function(){var t=this,n=arguments.length>0,r=this._state;return new U(function(i,o){var a=function(){t.close();var s=t._deps.indexedDB.deleteDatabase(t.name);s.onsuccess=Z(function(){Xp(t._deps,t.name),i()}),s.onerror=Ke(o),s.onblocked=t._fireOnBlocked};if(n)throw new j.InvalidArgument("Arguments not allowed in db.delete()");r.isBeingOpened?r.dbReadyPromise.then(a):a()})},e.prototype.backendDB=function(){return this.idbdb},e.prototype.isOpen=function(){return this.idbdb!==null},e.prototype.hasBeenClosed=function(){var t=this._state.dbOpenError;return t&&t.name==="DatabaseClosed"},e.prototype.hasFailed=function(){return this._state.dbOpenError!==null},e.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(e.prototype,"tables",{get:function(){var t=this;return ne(this._allTables).map(function(n){return t._allTables[n]})},enumerable:!1,configurable:!0}),e.prototype.transaction=function(){var t=th.apply(this,arguments);return this._transaction.apply(this,t)},e.prototype._transaction=function(t,n,r){var i=this,o=M.trans;(!o||o.db!==this||t.indexOf("!")!==-1)&&(o=null);var a=t.indexOf("?")!==-1;t=t.replace("!","").replace("?","");var s,l;try{if(l=n.map(function(c){var d=c instanceof i.Table?c.name:c;if(typeof d!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return d}),t=="r"||t===Zi)s=Zi;else if(t=="rw"||t==Xi)s=Xi;else throw new j.InvalidArgument("Invalid transaction mode: "+t);if(o){if(o.mode===Zi&&s===Xi)if(a)o=null;else throw new j.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o&&l.forEach(function(c){if(o&&o.storeNames.indexOf(c)===-1)if(a)o=null;else throw new j.SubTransaction("Table "+c+" not included in parent transaction.")}),a&&o&&!o.active&&(o=null)}}catch(c){return o?o._promise(null,function(d,f){f(c)}):ie(c)}var u=Ks.bind(null,this,s,l,o,r);return o?o._promise(s,u,"lock"):M.trans?sn(M.transless,function(){return i._whenReady(u)}):this._whenReady(u)},e.prototype.table=function(t){if(!we(this._allTables,t))throw new j.InvalidTable("Table "+t+" does not exist");return this._allTables[t]},e}(),dh=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",fh=function(){function e(t){this._subscribe=t}return e.prototype.subscribe=function(t,n,r){return this._subscribe(!t||typeof t=="function"?{next:t,error:n,complete:r}:t)},e.prototype[dh]=function(){return this},e}();function zs(e,t){return ne(t).forEach(function(n){var r=e[n]||(e[n]=new rt);Ur(r,t[n])}),e}function ph(e){var t=!1,n=void 0,r=new fh(function(i){var o=Ai(e);function a(m){o&&an();var w=function(){return vt(e,{subscr:m,trans:null})},_=M.trans?sn(M.transless,w):w();return o&&_.then(tt,tt),_}var s=!1,l={},u={},c={get closed(){return s},unsubscribe:function(){s=!0,_t.storagemutated.unsubscribe(h)}};i.start&&i.start(c);var d=!1,f=!1;function p(){return ne(u).some(function(m){return l[m]&&lh(l[m],u[m])})}var h=function(m){zs(l,m),p()&&v()},v=function(){if(!(d||s)){l={};var m={},w=a(m);f||(_t(Mn,h),f=!0),d=!0,Promise.resolve(w).then(function(_){t=!0,n=_,d=!1,!s&&(p()?v():(l={},u=m,i.next&&i.next(_)))},function(_){d=!1,t=!1,i.error&&i.error(_),c.unsubscribe()})}};return v(),c});return r.hasValue=function(){return t},r.getValue=function(){return n},r}var wo;try{wo={indexedDB:Y.indexedDB||Y.mozIndexedDB||Y.webkitIndexedDB||Y.msIndexedDB,IDBKeyRange:Y.IDBKeyRange||Y.webkitIDBKeyRange}}catch{wo={indexedDB:null,IDBKeyRange:null}}var Mt=_o;en(Mt,$($({},fr),{delete:function(e){var t=new Mt(e,{addons:[]});return t.delete()},exists:function(e){return new Mt(e,{addons:[]}).open().then(function(t){return t.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(e){try{return Qp(Mt.dependencies).then(e)}catch{return ie(new j.MissingAPI)}},defineClass:function(){function e(t){pe(this,t)}return e},ignoreTransaction:function(e){return M.trans?sn(M.transless,e):e()},vip:po,async:function(e){return function(){try{var t=ho(e.apply(this,arguments));return!t||typeof t.then!="function"?U.resolve(t):t}catch(n){return ie(n)}}},spawn:function(e,t,n){try{var r=ho(e.apply(n,t||[]));return!r||typeof r.then!="function"?U.resolve(r):r}catch(i){return ie(i)}},currentTransaction:{get:function(){return M.trans||null}},waitFor:function(e,t){var n=U.resolve(typeof e=="function"?Mt.ignoreTransaction(e):e).timeout(t||6e4);return M.trans?M.trans.waitFor(n):n},Promise:U,debug:{get:function(){return He},set:function(e){fs(e,e==="dexie"?function(){return!0}:As)}},derive:tn,extend:pe,props:en,override:as,Events:Dn,on:_t,liveQuery:ph,extendObservabilitySet:zs,getByKeyPath:Je,setByKeyPath:Oe,delByKeyPath:Gf,shallowClone:us,deepClone:Sn,getObjectDiff:vo,cmp:he,asap:ss,minKey:Qi,addons:[],connections:On,errnames:Di,dependencies:wo,semVer:Ls,version:Ls.split(".").map(function(e){return parseInt(e)}).reduce(function(e,t,n){return e+t/Math.pow(10,n*2)})})),Mt.maxKey=Vn(Mt.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(_t(Mn,function(e){if(!it){var t;Cr?(t=document.createEvent("CustomEvent"),t.initCustomEvent(yt,!0,!0,e)):t=new CustomEvent(yt,{detail:e}),it=!0,dispatchEvent(t),it=!1}}),addEventListener(yt,function(e){var t=e.detail;it||Or(t)}));function Or(e){var t=it;try{it=!0,_t.storagemutated.fire(e)}finally{it=t}}var it=!1;if(typeof BroadcastChannel<"u"){var Dr=new BroadcastChannel(yt);typeof Dr.unref=="function"&&Dr.unref(),_t(Mn,function(e){it||Dr.postMessage(e)}),Dr.onmessage=function(e){e.data&&Or(e.data)}}else if(typeof self<"u"&&typeof navigator<"u"){_t(Mn,function(e){try{it||(typeof localStorage<"u"&&localStorage.setItem(yt,JSON.stringify({trig:Math.random(),changedParts:e})),typeof self.clients=="object"&&Ii([],self.clients.matchAll({includeUncontrolled:!0}),!0).forEach(function(t){return t.postMessage({type:yt,changedParts:e})}))}catch{}}),typeof addEventListener<"u"&&addEventListener("storage",function(e){if(e.key===yt){var t=JSON.parse(e.newValue);t&&Or(t.changedParts)}});var Ws=self.document&&navigator.serviceWorker;Ws&&Ws.addEventListener("message",hh)}function hh(e){var t=e.data;t&&t.type===yt&&Or(t.changedParts)}U.rejectionMapper=ep,fs(He,As);var cn=(e=>(e.ReadyForUpload="ReadyForUpload",e.UploadComplete="UploadComplete",e))(cn||{}),Vt=(e=>(e.After="after",e.Before="before",e.BeforeAndAfter="beforeAndAfter",e))(Vt||{});const bo="sprig.sessionId",Ys="sprig.disableReplayRecording",vh=30,Qs=()=>{pt.setItem(Ys,"disabled")},jt=()=>!!pt.getItem(Ys),mh=["did not allow mutations","called in an invalid security context"],gh=e=>{if(!e)return!0;for(const t of mh)if(e.toLowerCase().includes(t))return!1;return!0},yh=(e,t,n)=>{jt()||t instanceof Error&&(Qs(),gh(t==null?void 0:t.message)&&(window.UserLeap.reportError(e,t,n),wh()))},_h=async(e,t)=>{var r;let n;try{if((r=window.navigator.storage)!=null&&r.estimate){const{quota:i,usage:o}=await window.navigator.storage.estimate();n={availableSpaceInMB:i&&o?(i-o)/(1024*1024):void 0,quota:i,usage:o}}}catch(i){window.UserLeap.reportError("Error getting storage estimate",i)}yh(e,t,n)},ge=(()=>{const e=pt.getItem(bo);return e?(pt.removeItem(bo),e):Ye()})();window.addEventListener("beforeunload",()=>{pt.setItem(bo,ge)});const wh=async()=>{try{await Promise.allSettled([z.events.clear(),z.chunkUploads.clear(),z.pendingCaptures.clear()])}catch(e){window.UserLeap.reportError("Error wiping database",e)}},Eo=(e,t,n=()=>!0)=>z.table(t).where("timestamp").below(e).and(n).delete(),bh=()=>{z.events.where("sessionId").equals(ge).delete(),z.pendingCaptures.where("sessionId").equals(ge).delete()},Eh=e=>{const t=e.map(n=>{var r;return{...n,sessionId:(r=n.sessionId)!=null?r:ge}});return z.events.bulkAdd(t)},xh=(e,t)=>z.events.where("[sessionId+timestamp]").between([ge,e],[ge,t]).toArray(),Ch=(e,t,n)=>{const r=new Date,i=r.setMinutes(r.getMinutes()+(n!=null?n:vh));return z.events.where("[sessionId+timestamp]").between([ge,e],[ge,t]).modify({expiredAt:i})},Sh=e=>{var t;return z.chunkUploads.add({...e,sessionId:(t=e.sessionId)!=null?t:ge})},Ih=(e,t)=>z.chunkUploads.update(e,{data:null,etag:t,status:cn.UploadComplete}),kh=({status:e,uploadId:t})=>t?z.chunkUploads.where({uploadId:t,status:e}).toArray():z.chunkUploads.where({sessionId:ge,status:e}).toArray(),Th=e=>z.chunkUploads.where({uploadId:e,status:cn.UploadComplete}).toArray(),Lh=e=>z.chunkUploads.where({uploadId:e,status:cn.UploadComplete}).delete(),Rh=e=>{var t;return z.pendingCaptures.add({...e,sessionId:(t=e.sessionId)!=null?t:ge,canUpload:!1})},Ah=()=>z.pendingCaptures.where("sessionId").equals(ge).and(e=>e.targetTimestampz.pendingCaptures.where("sessionId").equals(ge).toArray(),Oh=e=>z.pendingCaptures.where("sessionId").equals(ge).and(t=>t.captureParams.responseGroupId===e).modify({canUpload:!0}),Dh=async e=>{var t;if((t=window.navigator.storage)!=null&&t.estimate){const{quota:n,usage:r}=await window.navigator.storage.estimate();if(n&&r&&(n-r)/1073741824{Qs()});const Nh=async(e,t,n)=>new Promise((r,i)=>{const o=e.createElement("script");o.src=t,o.onload=r,o.onerror=i,n&&(o.nonce=n),e.head.appendChild(o)});let Zs=1,Xs=5e3,xo=6e4;const Mh=5,Js=1e3,el=30,Pr=el+Mh,Co="sprig.pendingCount";let tl=0,nl=Date.now(),So=!1;const Vh=async(e,t,n,r=2,i)=>{try{if(jt()||!t||(i!=null&&i.minAvailableGb&&(Zs=i.minAvailableGb),!await Dh(Zs)))return;i!=null&&i.minDuration&&(Xs=i.minDuration),i!=null&&i.batchDuration&&(xo=i.batchDuration),Vf(r),Gh(),Fh(t+Pr,30*60,t+Pr),Hh(),window.rrwebRecord||await Nh(e,"https://cdn.sprig.com/dependencies/record-2.0.0-alpha.6.min.js",n);const o=window.rrwebRecord;if(!o)return;let a=!0;o({checkoutEveryNms:el*1e3,sampling:{input:"last",scroll:250,media:800},emit:(s,l)=>{if(jt())return;nl=Date.now();const u=a||!!l;a=!1,jh({uuid:Ye(),event:JSON.stringify(s),isValidStart:u,timestamp:Date.now()})},...i}),So=!0,tl||(tl=window.setInterval(()=>{Date.now()-nl>Js&&Fn("Sprig_Noop",{})},Js))}catch(o){return De("Error initializing replay",o)}};let Io=!1,ko=[];const jh=e=>{ko.push(e),Io||Bh()},Bh=()=>{Io=!0,setTimeout(async()=>{if(jt())return;const e=ko;ko=[],Io=!1;try{await Eh(e)}catch(t){De("Error storing replay events",t)}},500)},Fh=(e=6*60,t=30*60,n=4*60)=>{const r=setInterval(()=>{const i=Date.now();jt()||z.transaction("rw!",z.events,z.chunkUploads,z.pendingCaptures,()=>{Eo(i-e*1e3,"events",o=>o.expiredAt===void 0||o.expiredAto.canUpload===void 0||o.canUpload===!1)}).catch(o=>{clearInterval(r),De("Error deleting table rows",o)})},3e4)},Hh=(e=5)=>{setInterval(Qh,e*1e3)},Kh=async(e,t,n,r,i)=>{try{const o=Math.min(e+i,n),a=await xh(e,o);if(!(a!=null&&a.length))return[r,[]];if(!r){let s=-1;return a==null||a.forEach((l,u)=>{if(!l.isValidStart)return;const c=l.timestamp<=t;(s<0||c)&&(s=u)}),s<0?[]:[!0,a==null?void 0:a.slice(s)]}return[r,a]}catch(o){De("Error getting events batch",o)}},$h=(e,t,n)=>{const r=e.length,i=t*1024*1024,o=Math.ceil(r/n),a=Math.max(i,o),s=[];let l=0;for(;lPromise.all(e.map(async t=>{const n=await Bf(t);return await Ih(t.uuid,n),t.uploadId})),il=async e=>{const t=await Th(e);if(!(t!=null&&t.length))return;t.sort((i,o)=>i.chunkIndex-o.chunkIndex);const n=t.map(i=>({ETag:i.etag,PartNumber:i.chunkIndex})).filter(i=>i.ETag!==null),r=t[0];await is({apiUrl:r.apiUrl,surveyId:r.surveyId,uploadId:e,responseGroupUuid:r.responseGroupId,etags:n,headers:r.completeUploadHeaders,replayDuration:r.replayDuration}),await Lh(e)},Gh=async()=>{try{let e=[];if(await z.transaction("rw",z.chunkUploads,async()=>{e=await kh({status:cn.ReadyForUpload}).catch(n=>{De("chunkUploads transaction error",n)})}),!(e!=null&&e.length))return;const t=await rl(e);t!=null&&t.length&&await Promise.all(t.map(async n=>{n&&await il(n)}))}catch(e){De("Error getting chunk upload uuids",e)}},qh=async(e,t)=>{await rl(t),await Promise.all(e.map(n=>il(n)))},zh=e=>{let t=0;e.forEach(i=>{t+=i.length});const n=new Uint8Array(t);let r=0;return e.forEach(i=>{n.set(i,r),r+=i.length}),n},ol=async(e,t,n)=>{const r=new TextEncoder;let i=null,o=null,a=null,s=!1,l=!1,[u,c]=[0,0];const d=e-Pr*1e3,f=[];let p=[];for(let v=d;v_.event).join(",")}`,w=r.encode(m);n?(o===null&&(a=new window.CompressionStream("gzip"),o=a.writable.getWriter()),o.write(w)):f.push(w),s=!0}if(c-u{const n=window.CompressionStream!==void 0;let r=null;const i=t!=null?t:Date.now(),o=i-e;try{r=await ol(o,i,n)}catch(a){if(a instanceof Error&&window.UserLeap.reportError("Error compressing replay",a),n)try{r=await ol(o,i,!1)}catch(s){De("fileData fallback failed",s)}}return r},al=async e=>{const{surveyId:t,responseGroupId:n,visitorId:r,apiUrl:i,completeUploadHeaders:o,replayParams:a,triggerTimestamp:s}=e,l=await Wh(a.replayDurationSeconds*1e3,s);if(!(l!=null&&l.length))return;const u=$h(l,a.minimumChunkSizeMb,a.signedUrls.length),c=await Promise.all(u.map(async(d,f)=>{const p=Ye(),h={apiUrl:i,chunkIndex:f+1,completeUploadHeaders:o,etag:null,responseGroupId:n,status:cn.ReadyForUpload,surveyId:t,timestamp:s,totalChunks:u.length,data:d,uploadId:a.uploadId,uploadUrl:a.signedUrls[f].url,uuid:p,visitorId:r};return await Sh(h),h}));await qh([a.uploadId],c)},sl=async(e,t)=>{if(!jt())try{const{isStandalone:n,replayParams:r,triggerTimestamp:i,responseGroupId:o}=e,a=async()=>{setTimeout(()=>H.removeListener(B.QuestionAnswered,a),0),r.replayDurationType===Vt.Before?await al(e):await Oh(o)};if(r.replayDurationType===Vt.After||r.replayDurationType===Vt.BeforeAndAfter){n||H.on(B.QuestionAnswered,a),await Yh(e);return}if(n||t)await al(e);else{const s=Pr+r.replayDurationSeconds;await Ch(i-s*1e3,i,r.expirationTimeLimitMinutes),H.on(B.QuestionAnswered,a)}}catch(n){De("Error scheduling or capturing replay",n)}},ll=()=>{if(!jt())try{bh()}catch(e){De("Error clearing session event data",e)}};let ot=pt.getItem(Co);const Yh=async e=>{const{surveyId:t}=e,n=await Uh(),r=n==null?void 0:n.filter(a=>a.captureParams.surveyId===t);if(r!=null&&r.length)return;const i={...e,replayParams:{...e.replayParams}};e.replayParams.replayDurationType===Vt.BeforeAndAfter&&(i.replayParams.replayDurationSeconds*=2),i.replayParams.replayDurationType=Vt.Before;const o=e.triggerTimestamp+e.replayParams.replayDurationSeconds*1e3;return i.triggerTimestamp=o,ot=ot?(parseInt(ot)+1).toString():"1",pt.setItem(Co,ot),Rh({uuid:Ye(),targetTimestamp:o,timestamp:Date.now(),captureParams:i})},Qh=async()=>{try{if(ot&&parseInt(ot)>0){const e=await Ah();e.length&&await Promise.all(e.map(async t=>{await z.pendingCaptures.delete(t.uuid),await sl(t.captureParams,t.canUpload)})),ot=(parseInt(ot)-e.length).toString(),pt.setItem(Co,ot)}}catch(e){De("Error initiating pending captures",e)}},Fn=(e,t)=>{var n,r;if(!!So)try{(r=(n=window.rrwebRecord)==null?void 0:n.addCustomEvent)==null||r.call(n,e,t)}catch(i){De("Error recording custom event",i)}},ul=e=>{Fn("Sprig_PageView",e)},Zh=e=>{Fn("Sprig_TrackEvent",e)},Xh=e=>{Fn("Sprig_ShowSurvey",e)},Jh=e=>{Fn("Sprig_SubmitSurvey",e)},De=(e,t)=>(So=!1,_h(e,t));var L=(e=>(e.ConsentLegal="consentlegal",e.Likert="likert",e.MultipleChoice="multiplechoice",e.MultipleSelect="multipleselect",e.NPS="nps",e.Open="open",e.RecordedTask="recordedtask",e.TextUrlPrompt="texturlprompt",e.Thanks="thanks",e.Uploading="uploading",e.VideoVoice="videovoice",e))(L||{}),at=(e=>(e.Answered="answered",e.Equal="eq",e.NotEqual="neq",e.Skipped="skipped",e.LessThan="lt",e.LessThanOrEqual="lte",e.GivenUp="given_up",e.GreaterThan="gt",e.GreaterThanOrEqual="gte",e.ListAll="list_all",e.ListAtLeastOne="list_alo",e.ListExact="list_exact",e.DoesNotInclude="list_dni",e.Contains="contains",e.DoesNotContain="notcontains",e))(at||{}),dn=(e=>(e.Camera="camera",e.Microphone="microphone",e.Screen="screen",e))(dn||{}),Te=(e=>(e.AvPermission="av_permission",e.ScreenPermission="screen_permission",e.StartTask="start_task",e.CompleteTask="complete_task",e))(Te||{}),Bt=(e=>(e.Number="number",e.Smiley="smiley",e.Star="star",e))(Bt||{}),Hn,N,cl,fn,Ft,dl,fl,pl,Nr={},hl=[],ev=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function st(e,t){for(var n in t)e[n]=t[n];return e}function vl(e){var t=e.parentNode;t&&t.removeChild(e)}function ee(e,t,n){var r,i,o,a={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Hn.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return Kn(e,a,r,i,null)}function Kn(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++cl:i};return i==null&&N.vnode!=null&&N.vnode(o),o}function ml(){return{current:null}}function Le(e){return e.children}function tv(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||Mr(e,o,null,n[o],r);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||Mr(e,o,t[o],n[o],r)}function gl(e,t,n){t[0]==="-"?e.setProperty(t,n==null?"":n):e[t]=n==null?"":typeof n!="number"||ev.test(t)?n:n+"px"}function Mr(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||gl(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||gl(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?_l:yl,o):e.removeEventListener(t,o?_l:yl,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n==null?"":n;break e}catch{}typeof n=="function"||(n==null||n===!1&&t.indexOf("-")==-1?e.removeAttribute(t):e.setAttribute(t,n))}}function yl(e){fn=!0;try{return this.l[e.type+!1](N.event?N.event(e):e)}finally{fn=!1}}function _l(e){fn=!0;try{return this.l[e.type+!0](N.event?N.event(e):e)}finally{fn=!1}}function Pe(e,t){this.props=e,this.context=t}function $n(e,t){if(t==null)return e.__?$n(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&Ft.sort(function(l,u){return l.__v.__b-u.__v.__b}));Vr.__r=0}function bl(e,t,n,r,i,o,a,s,l,u){var c,d,f,p,h,v,m,w=r&&r.__k||hl,_=w.length;for(n.__k=[],c=0;c0?Kn(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(f=w[c])===null||f&&p.key==f.key&&p.type===f.type)w[c]=void 0;else for(d=0;d<_;d++){if((f=w[d])&&p.key==f.key&&p.type===f.type){w[d]=void 0;break}f=null}Lo(e,p,f=f||Nr,i,o,a,s,l,u),h=p.__e,(d=p.ref)&&f.ref!=d&&(m||(m=[]),f.ref&&m.push(f.ref,null,p),m.push(d,p.__c||h,p)),h!=null?(v==null&&(v=h),typeof p.type=="function"&&p.__k===f.__k?p.__d=l=El(p,l,e):l=xl(e,p,f,w,h,l),typeof n.type=="function"&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=$n(f))}for(n.__e=v,c=_;c--;)w[c]!=null&&(typeof n.type=="function"&&w[c].__e!=null&&w[c].__e==n.__d&&(n.__d=Cl(r).nextSibling),kl(w[c],w[c]));if(m)for(c=0;c=0;t--)if((n=e.__k[t])&&(r=Cl(n)))return r}return null}function Lo(e,t,n,r,i,o,a,s,l){var u,c,d,f,p,h,v,m,w,_,b,E,g,x,I,C=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(l=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(u=N.__b)&&u(t);try{e:if(typeof C=="function"){if(m=t.props,w=(u=C.contextType)&&r[u.__c],_=u?w?w.props.value:u.__:r,n.__c?v=(c=t.__c=n.__c).__=c.__E:("prototype"in C&&C.prototype.render?t.__c=c=new C(m,_):(t.__c=c=new Pe(m,_),c.constructor=C,c.render=iv),w&&w.sub(c),c.props=m,c.state||(c.state={}),c.context=_,c.__n=r,d=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),C.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=st({},c.__s)),st(c.__s,C.getDerivedStateFromProps(m,c.__s))),f=c.props,p=c.state,c.__v=t,d)C.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(C.getDerivedStateFromProps==null&&m!==f&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(m,_),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(m,c.__s,_)===!1||t.__v===n.__v){for(t.__v!==n.__v&&(c.props=m,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(S){S&&(S.__=t)}),b=0;b2&&(a.children=arguments.length>3?Hn.call(arguments,2):n),Kn(e.type,a,r||e.key,i||e.ref,null)}function Ll(e,t){var n={__c:t="__cC"+pl++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&i.some(function(s){s.__e=!0,To(s)})},this.sub=function(a){i.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){i.splice(i.indexOf(a),1),s&&s.call(a)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Hn=hl.slice,N={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},cl=0,fn=!1,Pe.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=st({},this.state),typeof e=="function"&&(e=e(st({},n),this.props)),e&&st(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),To(this))},Pe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),To(this))},Pe.prototype.render=Le,Ft=[],fl=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Vr.__r=0,pl=0;const Rl=e=>{let t;const n=new Set,r=(l,u)=>{const c=typeof l=="function"?l(t):l;if(!Object.is(c,t)){const d=t;t=(u!=null?u:typeof c!="object")?c:Object.assign({},t,c),n.forEach(f=>f(t,d))}},i=()=>t,s={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>n.clear()};return t=e(r,i,s),s},av=e=>e?Rl(e):Rl;var wt,Q,Ro,Al,hn=0,Ul=[],jr=[],Ol=N.__b,Dl=N.__r,Pl=N.diffed,Nl=N.__c,Ml=N.unmount;function Ht(e,t){N.__h&&N.__h(Q,e,hn||t),hn=0;var n=Q.__H||(Q.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:jr}),n.__[e]}function ue(e){return hn=1,Ao(Kl,e)}function Ao(e,t,n){var r=Ht(wt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Kl(void 0,t),function(o){var a=r.__N?r.__N[0]:r.__[0],s=r.t(a,o);a!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=Q,!Q.u)){Q.u=!0;var i=Q.shouldComponentUpdate;Q.shouldComponentUpdate=function(o,a,s){if(!r.__c.__H)return!0;var l=r.__c.__H.__.filter(function(c){return c.__c});if(l.every(function(c){return!c.__N}))return!i||i.call(this,o,a,s);var u=!1;return l.forEach(function(c){if(c.__N){var d=c.__[0];c.__=c.__N,c.__N=void 0,d!==c.__[0]&&(u=!0)}}),!(!u&&r.__c.props===o)&&(!i||i.call(this,o,a,s))}}return r.__N||r.__}function Re(e,t){var n=Ht(wt++,3);!N.__s&&Do(n.__H,t)&&(n.__=e,n.i=t,Q.__H.__h.push(n))}function Gn(e,t){var n=Ht(wt++,4);!N.__s&&Do(n.__H,t)&&(n.__=e,n.i=t,Q.__h.push(n))}function bt(e){return hn=5,Br(function(){return{current:e}},[])}function Vl(e,t,n){hn=6,Gn(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function Br(e,t){var n=Ht(wt++,7);return Do(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function jl(e,t){return hn=8,Br(function(){return e},t)}function Bl(e){var t=Q.context[e.__c],n=Ht(wt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Q)),t.props.value):e.__}function Uo(e,t){N.useDebugValue&&N.useDebugValue(t?t(e):e)}function sv(e){var t=Ht(wt++,10),n=ue();return t.__=e,Q.componentDidCatch||(Q.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Fl(){var e=Ht(wt++,11);if(!e.__){for(var t=Q.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function lv(){for(var e;e=Ul.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Fr),e.__H.__h.forEach(Oo),e.__H.__h=[]}catch(t){e.__H.__h=[],N.__e(t,e.__v)}}N.__b=function(e){Q=null,Ol&&Ol(e)},N.__r=function(e){Dl&&Dl(e),wt=0;var t=(Q=e.__c).__H;t&&(Ro===Q?(t.__h=[],Q.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=jr,n.__N=n.i=void 0})):(t.__h.forEach(Fr),t.__h.forEach(Oo),t.__h=[])),Ro=Q},N.diffed=function(e){Pl&&Pl(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ul.push(t)!==1&&Al===N.requestAnimationFrame||((Al=N.requestAnimationFrame)||uv)(lv)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==jr&&(n.__=n.__V),n.i=void 0,n.__V=jr})),Ro=Q=null},N.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Fr),n.__h=n.__h.filter(function(r){return!r.__||Oo(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],N.__e(r,n.__v)}}),Nl&&Nl(e,t)},N.unmount=function(e){Ml&&Ml(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Fr(r)}catch(i){t=i}}),n.__H=void 0,t&&N.__e(t,n.__v))};var Hl=typeof requestAnimationFrame=="function";function uv(e){var t,n=function(){clearTimeout(r),Hl&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Hl&&(t=requestAnimationFrame(n))}function Fr(e){var t=Q,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Q=t}function Oo(e){var t=Q;e.__c=e.__(),Q=t}function Do(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Kl(e,t){return typeof t=="function"?t(e):t}function $l(e,t){for(var n in t)e[n]=t[n];return e}function Po(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function No(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Hr(e){this.props=e}function Gl(e,t){function n(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!a:Po(this.props,i)}function r(i){return this.shouldComponentUpdate=n,ee(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Hr.prototype=new Pe).isPureReactComponent=!0,Hr.prototype.shouldComponentUpdate=function(e,t){return Po(this.props,e)||Po(this.state,t)};var ql=N.__b;N.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ql&&ql(e)};var cv=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function zl(e){function t(n){var r=$l({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=cv,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Wl=function(e,t){return e==null?null:lt(lt(e).map(t))},Yl={map:Wl,forEach:Wl,count:function(e){return e?lt(e).length:0},only:function(e){var t=lt(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:lt},dv=N.__e;N.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}dv(e,t,n,r)};var Ql=N.unmount;function Zl(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=$l({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Zl(r,t,n)})),e}function Xl(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Xl(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function qn(){this.__u=0,this.t=null,this.__b=null}function Jl(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function eu(e){var t,n,r;function i(o){if(t||(t=e()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw t;return ee(n,o)}return i.displayName="Lazy",i.__f=!0,i}function vn(){this.u=null,this.o=null}N.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Ql&&Ql(e)},(qn.prototype=new Pe).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=Jl(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Xl(u,u.__c.__P,u.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.t.pop();)c.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},qn.prototype.componentWillUnmount=function(){this.t=[]},qn.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Zl(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&ee(Le,null,e.fallback);return i&&(i.__h=null),[ee(Le,null,t.__a?null:e.children),i]};var tu=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(r)}}),pn(ee(fv,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function nu(e,t){var n=ee(pv,{__v:e,i:t});return n.containerInfo=t,n}(vn.prototype=new Pe).__a=function(e){var t=this,n=Jl(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),tu(t,e,r)):i()};n?n(o):o()}},vn.prototype.render=function(e){this.u=null,this.o=new Map;var t=lt(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},vn.prototype.componentDidUpdate=vn.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){tu(e,n,t)})};var ru=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,hv=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,vv=typeof document<"u",mv=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function iu(e,t,n){return t.__k==null&&(t.textContent=""),pn(e,t),typeof n=="function"&&n(),e?e.__c:null}function ou(e,t,n){return Tl(e,t),typeof n=="function"&&n(),e?e.__c:null}Pe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Pe.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var au=N.event;function gv(){}function yv(){return this.cancelBubble}function _v(){return this.defaultPrevented}N.event=function(e){return au&&(e=au(e)),e.persist=gv,e.isPropagationStopped=yv,e.isDefaultPrevented=_v,e.nativeEvent=e};var su,lu={configurable:!0,get:function(){return this.class}},uu=N.vnode;N.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t=="string"){var i=t.indexOf("-")===-1;for(var o in r={},n){var a=n[o];vv&&o==="children"&&t==="noscript"||o==="value"&&"defaultValue"in n&&a==null||(o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&a===!0?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!mv(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&hv.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():a===null&&(a=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=a)}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=lt(n.children).forEach(function(s){s.props.selected=r.value.indexOf(s.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=lt(n.children).forEach(function(s){s.props.selected=r.multiple?r.defaultValue.indexOf(s.props.value)!=-1:r.defaultValue==s.props.value})),e.props=r,n.class!=n.className&&(lu.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",lu))}e.$$typeof=ru,uu&&uu(e)};var cu=N.__r;N.__r=function(e){cu&&cu(e),su=e.__c};var du={ReactCurrentDispatcher:{current:{readContext:function(e){return su.__n[e.__c].props.value}}}},wv="17.0.2";function fu(e){return ee.bind(null,e)}function Mo(e){return!!e&&e.$$typeof===ru}function pu(e){return Mo(e)?ov.apply(null,arguments):e}function hu(e){return!!e.__k&&(pn(null,e),!0)}function vu(e){return e&&(e.base||e.nodeType===1&&e)||null}var mu=function(e,t){return e(t)},gu=function(e,t){return e(t)},yu=Le;function Vo(e){e()}function _u(e){return e}function wu(){return[!1,Vo]}var bu=Gn;function Eu(e,t){var n=t(),r=ue({h:{__:n,v:t}}),i=r[0].h,o=r[1];return Gn(function(){i.__=n,i.v=t,No(i.__,t())||o({h:i})},[e,n,t]),Re(function(){return No(i.__,i.v())||o({h:i}),e(function(){No(i.__,i.v())||o({h:i})})},[e]),n}var bv={useState:ue,useId:Fl,useReducer:Ao,useEffect:Re,useLayoutEffect:Gn,useInsertionEffect:bu,useTransition:wu,useDeferredValue:_u,useSyncExternalStore:Eu,startTransition:Vo,useRef:bt,useImperativeHandle:Vl,useMemo:Br,useCallback:jl,useContext:Bl,useDebugValue:Uo,version:"17.0.2",Children:Yl,render:iu,hydrate:ou,unmountComponentAtNode:hu,createPortal:nu,createElement:ee,createContext:Ll,createFactory:fu,cloneElement:pu,createRef:ml,Fragment:Le,isValidElement:Mo,findDOMNode:vu,Component:Pe,PureComponent:Hr,memo:Gl,forwardRef:zl,flushSync:gu,unstable_batchedUpdates:mu,StrictMode:yu,Suspense:qn,SuspenseList:vn,lazy:eu,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:du};const Ev=Object.freeze(Object.defineProperty({__proto__:null,Children:Yl,PureComponent:Hr,StrictMode:yu,Suspense:qn,SuspenseList:vn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:du,cloneElement:pu,createFactory:fu,createPortal:nu,default:bv,findDOMNode:vu,flushSync:gu,forwardRef:zl,hydrate:ou,isValidElement:Mo,lazy:eu,memo:Gl,render:iu,startTransition:Vo,unmountComponentAtNode:hu,unstable_batchedUpdates:mu,useDeferredValue:_u,useInsertionEffect:bu,useSyncExternalStore:Eu,useTransition:wu,version:wv,Component:Pe,Fragment:Le,createContext:Ll,createElement:ee,createRef:ml,useCallback:jl,useContext:Bl,useDebugValue:Uo,useEffect:Re,useErrorBoundary:sv,useId:Fl,useImperativeHandle:Vl,useLayoutEffect:Gn,useMemo:Br,useReducer:Ao,useRef:bt,useState:ue},Symbol.toStringTag,{value:"Module"}));var xu={exports:{}},Cu={};const Su=kt(Ev);var Iu={exports:{}},ku={};/** - * @license React - * use-sync-external-store-shim.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var mn=Su;function xv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Cv=typeof Object.is=="function"?Object.is:xv,Sv=mn.useState,Iv=mn.useEffect,kv=mn.useLayoutEffect,Tv=mn.useDebugValue;function Lv(e,t){var n=t(),r=Sv({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return kv(function(){i.value=n,i.getSnapshot=t,jo(i)&&o({inst:i})},[e,n,t]),Iv(function(){return jo(i)&&o({inst:i}),e(function(){jo(i)&&o({inst:i})})},[e]),Tv(n),n}function jo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Cv(e,n)}catch{return!0}}function Rv(e,t){return t()}var Av=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Rv:Lv;ku.useSyncExternalStore=mn.useSyncExternalStore!==void 0?mn.useSyncExternalStore:Av,function(e){e.exports=ku}(Iu);/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Kr=Su,Uv=Iu.exports;function Ov(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dv=typeof Object.is=="function"?Object.is:Ov,Pv=Uv.useSyncExternalStore,Nv=Kr.useRef,Mv=Kr.useEffect,Vv=Kr.useMemo,jv=Kr.useDebugValue;Cu.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Nv(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Vv(function(){function l(p){if(!u){if(u=!0,c=p,p=r(p),i!==void 0&&a.hasValue){var h=a.value;if(i(h,p))return d=h}return d=p}if(h=d,Dv(c,p))return h;var v=r(p);return i!==void 0&&i(h,v)?h:(c=p,d=v)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var s=Pv(e,o[0],o[1]);return Mv(function(){a.hasValue=!0,a.value=s},[s]),jv(s),s},function(e){e.exports=Cu}(xu);const Bv=We(xu.exports),{useSyncExternalStoreWithSelector:Fv}=Bv;function Hv(e,t=e.getState,n){const r=Fv(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return Uo(r),r}const Tu=e=>{const t=typeof e=="function"?av(e):e,n=(r,i)=>Hv(t,r,i);return Object.assign(n,t),n},Lu=e=>e?Tu(e):Tu;var Bo=(e=>(e[e.And=1]="And",e[e.Or=2]="Or",e))(Bo||{});const Ru=1,Fo={eq(e,t){return e==t},neq(e,t){return!this.eq(e,t)},gt(e,t){return e>t},gte(e,t){return e>=t},lt(e,t){return ee.indexOf(n)===-1)},list_alo(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.some(i=>r.has(i))},list_dni(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.every(i=>!r.has(i))},contains(e,t){const n=e.toLowerCase(),r=t.toLowerCase();return n.includes(r)},notcontains(e,t){return!this.contains(e,t)}},Kv=(e,t,n)=>{switch(t){case L.VideoVoice:return Boolean(e&&e.value);case L.Open:return!!n;case L.MultipleSelect:return Boolean(n&&!!Object.keys(n).length);case L.RecordedTask:return(n==null?void 0:n.taskStatus)===ke.Completed;case L.TextUrlPrompt:return!e.value;case L.ConsentLegal:return n!==null;case L.MultipleChoice:return n!==void 0;case L.NPS:return n!==null;case L.Likert:return n!==null;default:return!0}},Au=({cards:e,index:t,hasEndCard:n,allResponses:r,uploadProgress:i={}})=>{if(t>=e.length||t<0)return null;const o=e[t];let a=t+1;const s=o.props.routingOptions||[];for(let c=0;cr.length)continue;let h=Uu({comparator:p.comparator,response:r[p.questionIndex],type:o.type,value:p.value});for(let v=1;vc.type===L.Uploading);let u;return l>0?u=n?e.length-3:e.length-2:u=e.length-1,t>=u||a===-1||a!==null&&a>u?l>0&&Object.values(i).some(d=>d.isSubmitted&&!d.isComplete)?l:n?e.length-1:null:a===-1?null:a},Uu=({comparator:e,response:t,type:n,value:r})=>{if(e===at.Answered)switch(n){case L.TextUrlPrompt:return t===void 0;case L.ConsentLegal:return t&&t.submitted===!0;case L.RecordedTask:return"taskStatus"in t&&t.taskStatus===ke.Completed;case L.Likert:return Number.isInteger(t);case L.Open:return t&&t.length>0;case L.MultipleChoice:case L.MultipleSelect:return Object.keys(t).length>0;case L.NPS:return Number.isInteger(t);case L.VideoVoice:return!!(t!=null&&t.mediaRecordingUid);default:return!1}if(e===at.Skipped)switch(n){case L.TextUrlPrompt:return t==null?void 0:t.skipped;case L.ConsentLegal:return t===null;case L.RecordedTask:return"taskStatus"in t&&t.taskStatus===ke.Abandoned;case L.Likert:return t===null;case L.Open:return(t==null?void 0:t.length)===0;case L.MultipleChoice:return t===void 0;case L.MultipleSelect:return(t==null?void 0:t.length)===0;case L.NPS:return t===null;case L.VideoVoice:return t===null;default:return!1}return e===at.GivenUp?n===L.RecordedTask?"taskStatus"in t&&t.taskStatus===ke.GivenUp:!0:Fo[e](t,r)},$v=13,Gv=(e,t)=>e.reduce((n,r)=>n.concat(n.map(i=>[...i,r])),[[]]).filter(n=>t||n.length>0),qv=e=>{var t,n;switch(e.type){case L.MultipleSelect:return!e||!e.props||!e.props.options?null:e.props.options.length>$v?e.props.options.map(r=>[r.value]):Gv(e.props.options.map(r=>r.value),!e.props.properties.required);case L.MultipleChoice:{if(!e||!e.props||!e.props.options)return null;const r=e.props.options.map(i=>i.value);return e.props.properties.required||r.push(void 0),r}case L.Likert:{const r=Number((n=(t=e.props)==null?void 0:t.properties)==null?void 0:n.range)||5;return[...Array.from(Array(r).keys()).map(o=>o+1),...e.props.properties.required?[]:[null]]}case L.NPS:return[0,1,2,3,4,5,6,7,8,9,10,...e.props.properties.required?[]:[null]];case L.VideoVoice:case L.Open:return["1",...e.props.properties.required?[]:[""]];case L.RecordedTask:return[{taskStatus:ke.Completed},{taskStatus:ke.GivenUp},...e.props.properties.required?[]:[{taskStatus:ke.Abandoned}]];case L.TextUrlPrompt:return[void 0,...e.props.properties.required?[]:[{skipped:!0}]];case L.ConsentLegal:return[Ru,...e.props.properties.required?[]:[null]];default:return[Ru]}},zv=e=>e in Fo,Wv=e=>typeof e=="object"&&e!==null&&"taskStatus"in e,Yv=(e,t=[])=>t.reduce((n,r)=>{const{group:i,target:o}=r;if(!(i!=null&&i.length))return[...n];const a=i.filter(s=>Number(s)?!0:typeof s=="object"?s.questionIndex===e:!1).map(s=>{const{comparator:l,value:u}=s;return{comparator:l,target:o,value:u}});return[...n,...a]},[]),Qv=(e,t)=>{const n=new Set([L.Thanks,L.Uploading]);if(t>=e.length||t<0||n.has(e[t].type))return 0;const r=e.filter(o=>!n.has(o.type));if(t===r.length-1)return 1;const i={[r.length-1]:1,[-1]:0};for(let o=r.length-2;o>=t;o--){const a=r[o],s=Yv(o,a.props.routingOptions);if(s.length===0){i[o]=i[o+1]+1;continue}let l=0,u=qv(a);if(u===null)return r.length-1-t;for(let c=0;c{const m=Kv({value:v},a.type,v);return!(m&&d===at.Answered||!m&&d===at.Skipped||d===at.GivenUp&&Wv(v)&&v.taskStatus===ke.GivenUp||m&&a.type===L.Open&&(d===at.Contains||d===at.DoesNotContain)||m&&zv(d)&&Fo[d](v,p))});if(h.length=r.length)return r.length-1-t;l=Math.max(i[v]+1,l)}u=h}u.length>0&&(l=Math.max(i[o+1]+1,l)),i[o]=l}return i[t]},Zv=e=>!(e.type===L.Thanks||e.type===L.Uploading),X=Lu()((e,t)=>({allResponses:[],answers:void 0,apiURL:"",border:"#000000",cards:[],close:async(n=Zt)=>{const r=t(),{fadeout:i,remove:o,trackHistory:a}=r;await i(n),Ho(r)||a({event:"closed"}),xi.enable(),o({initiator:Qe.Closed})},configureExitOnOverlayClick:()=>{},customMetadata:{},destroy:async n=>{const{eventEmitFn:r,fadeout:i,remove:o}=t();r(Se.SurveyComplete),await i(n),xi.enable(),o({initiator:Qe.Complete})},endCard:{headline:""},envId:"",eventEmitFn:H.emit.bind(H),fadeout:async n=>{const{eventEmitFn:r,headers:i,viewDocument:o}=t();return Xt(i)?Promise.resolve():(r(B.SurveyFadingOut),new Promise(a=>{const s=o.getElementById(n);s?(s.addEventListener("transitionend",()=>{a()}),s.classList.remove("ul-app--visible")):a()}))},forceBrandedLogo:!1,frame:document.createElement("iframe"),handleClickEmbedButton:n=>{const{cards:r,eventEmitFn:i,index:o}=t();i(n,{[Lt.QuestionId]:r[o].name,[Lt.Props]:r[o].props}),e(()=>({hasViewedEmbed:!0}))},handleUploadUpdate:({mediaRecordingUid:n,isComplete:r,progressPct:i,isSubmitted:o})=>{var f,p,h;const{cards:a,destroy:s,index:l,uploadProgress:u}=t(),c={...u,[n]:{progressPct:i||i===0?i:(f=u[n])==null?void 0:f.progressPct,isComplete:r||((p=u[n])==null?void 0:p.isComplete),isSubmitted:o||((h=u[n])==null?void 0:h.isSubmitted)}};if(a[l].type!==L.Uploading){e({uploadProgress:c});return}const d=Object.entries(u).every(([v,m])=>!m.isSubmitted||m.isComplete||n==v&&r);if(d&&l>=a.length-1){s(Zt);return}e({index:d?l+1:l,uploadingCardViewed:!0,uploadProgress:c})},hasViewedEmbed:!1,headers:{Authorization:"","Content-Type":"","userleap-platform":Rt.Web,"x-ul-environment-id":"","x-ul-installation-method":ft.Snippet,"x-ul-sdk-version":"","x-ul-visitor-id":""},index:0,isPreview:!1,marketingUrl:"https://sprig.com",meta:{ch:0,cw:0,l:"",mode:null,p:"",sh:0,sw:0},mode:void 0,next:n=>{const{allResponses:r,cards:i,eventEmitFn:o,index:a,responseGroupUid:s,submit:l,trackHistory:u,uploadProgress:c,viewedCardCount:d}=t(),f=Date.now(),p=[...i],h=p[a],{type:v}=n.data,m={...n.data},w=m.value;Zv(h)&&(h.value=w),m.answeredAt=f,delete m.type;const _={response:m,responseGroupUid:s,questionIndex:a};let b=v===L.MultipleChoice?Object.values(w).find(C=>C!==!1):w;v===L.MultipleSelect&&(b=p[a].props.options.reduce((C,S)=>(w[S.id]&&C.push(S.value),C),[]));const E=r.slice(0);E[a]=b,e({allResponses:E});const g=Au({cards:p,index:a,hasEndCard:!!n.endCard,uploadProgress:c,allResponses:E});if(g===null){_.completedAt=f,l(_),n.completeSurvey();return}else[L.Thanks,L.Uploading].includes(p[g].type)&&(_.completedAt=f);const x=l(_);[L.Thanks,L.Uploading].includes(p[g].type)||x.finally(()=>{u({event:"seen",index:g})});const I=p[g];p[g]&&o&&o(Se.CurrentQuestion,{[Lt.QuestionId]:I.name,[Lt.Props]:I.props}),e({cards:p,hasViewedEmbed:!1,index:g,viewedCardCount:d+1})},previewKey:null,recorder:()=>{},recorderEventEmitter:H,responseGroupUid:"",remove:({initiator:n})=>{const{frame:r,headers:i,eventEmitFn:o}=t();["ios","android"].includes(i["userleap-platform"])&&o(B.SurveyWillClose,{name:B.SurveyWillClose,initiator:n}),!Xt(i)&&(o(B.SurveyWillClose,{name:B.SurveyWillClose,initiator:n}),r.remove())},seen:async()=>{const{trackHistory:n}=t();return n({event:"seen",isNew:!0})},slugName:null,showStripes:!1,showSurveyBrand:!1,styleNonce:"",submit:async({completedAt:n,questionIndex:r,response:i,responseGroupUid:o})=>{const a=t();if(!o||Ho(a))return;const s={responseGroupUid:o,meta:a.meta,customMetadata:a.customMetadata,responses:[i],completedAt:n,previewKey:a.previewKey};n&&Jh({id:a.surveyId});const l=await Ze(`${a.apiURL}/sdk/1/environments/${a.envId}/visitors/${a.userId}/responses/submit`,{body:JSON.stringify(s),headers:a.headers,method:"POST"});if(!l.ok){l.reportError&&(console.warn("[Sprig] (ERR-427) Failed to submit response",l.error),await Ou(a,"submitResponse",l.error));return}a.eventEmitFn(B.QuestionAnswered,{...i,questionIndex:r})},surveyId:0,tabTitle:"",trackHistory:async({event:n,index:r,isNew:i=!1})=>{const o=t();if(Ho(o))return;const{cards:a,index:s}=o,l=r!==void 0?a[r]:a[s],u={sid:o.surveyId,qid:l.name,action:n,vid:o.userId,eid:o.envId,isNew:i,responseGroupUid:o.responseGroupUid,previewKey:o.previewKey},c=await Ze(`${o.apiURL}/sdk/1/visitors/${o.userId}/surveys/${o.surveyId}/history`,{body:JSON.stringify(u),headers:o.headers,method:"POST"});!c.ok&&c.reportError&&(console.warn("[Sprig] (ERR-428) Failed to track survey event",c.error),await Ou(o,"trackHistory",c.error))},update:()=>{const{headers:n,eventEmitFn:r,frame:i,viewDocument:o}=t();setTimeout(()=>{var s;const a=Wa(o);Xt(n)?r(B.SurveyHeight,{name:B.SurveyHeight,contentFrameHeight:a}):(s=i.setHeight)==null||s.call(i,a)},100)},uploadingCardViewed:!1,uploadProgress:{},useDesktopPrototype:void 0,useMobileStyling:!1,userId:"",viewDocument:window.document,viewedCardCount:0})),Ho=e=>!e.userId||e.meta&&e.meta.mode==="test"||e.isPreview,Ou=async(e,t,n)=>{const{mode:r,userId:i,envId:o,apiURL:a,headers:s,viewDocument:l}=e,u=l.documentElement,c={mode:r,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:u.clientWidth,clientHeight:u.clientHeight,location:window.location.href,language:window.navigator.language},d={action:t,err:{message:n==null?void 0:n.message,stack:n==null?void 0:n.stack},meta:c,vid:i,envId:o};(await Ze(`${a}/sdk/1/errors`,{method:"POST",headers:Object.assign({"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},s),body:JSON.stringify(d)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",n)},Xv=async(e,t)=>{var r;const n=await fetch(t,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(n.ok){const i=await n.json();return(r=i==null?void 0:i.upload)==null?void 0:r.url}else return null},Du=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",Pu=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:Du()};return new MediaRecorder(e,t)},Nu=(e,t,n)=>{n[t]=[],e.ondataavailable=function(r){n[t].push(r.data)},e.currentMediaRecordingUid=t,e.start()};function Mu(e,t,n,r,i,o){if(e&&e.state!=="inactive"){const{[K.BeginCallback]:a}=r,s=e.currentMediaRecordingUid;if(!s)return;a&&a(s),e.onstop=()=>Jv(t,e,n,r,s,i,o),e.stop()}}async function Jv(e,t,n,r,i,o,a){const s=X.getState().viewDocument,{[K.UploadCallback]:l,[K.ProgressCallback]:u}=r,c={mediaType:n,updatedAt:new Date().toISOString(),mediaRecordingUid:i,...r[K.PassthroughData]},d=await Xv(c,e);if(!d){l&&l(null,{message:"failed to get upload url"});return}const f=new Blob(a,{type:Du()});if(!s.defaultView)return;const p=new s.defaultView.File([f],`recording video ${Date.now()}`),h=o.createUpload({endpoint:d,file:p,chunkSize:5120});h.on("error",v=>{l&&l(null,v)}),h.on("progress",v=>{u&&u(i,v)}),h.on("success",()=>{l&&l(i,!0)})}const em={state:{...{chunks:{}}},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:n,screenRecorder:r,UpChunk:i}=this.state,o=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?Ie.Video:Ie.Audio;this.state.chunks&&t&&i&&(n!=null&&n.currentMediaRecordingUid&&Mu(n,t,o,e,i,this.state.chunks[n==null?void 0:n.currentMediaRecordingUid]),r!=null&&r.currentMediaRecordingUid&&Mu(r,t,Ie.Screen,e,i,this.state.chunks[r==null?void 0:r.currentMediaRecordingUid]))},handleCancelledStream(e){const t=e.getVideoTracks(),n=e.getAudioTracks();let r=t.length&&t[0];r=r||n.length&&n[0],r&&r.addEventListener("ended",()=>{[this.state.avRecorder,this.state.screenRecorder].map(i=>{i&&(i.state==="recording"&&i.stop(),i.stream.getTracks().map(o=>{o.readyState==="live"&&o.stop()}))}),Object.assign(this.state,{avStream:null,captureStream:null,avRecorder:null,screenRecorder:null})})},taskDurationMillisecond(){return this.state.startTime?new Date().getTime()-this.state.startTime.getTime():0},setUpChunk(e){this.state.UpChunk=e},configure(e,t){Object.assign(this.state,t),this.state.uploadApiEndpoint=`${t.apiURL}/2/environments/integrations/upload`,this.state.chunks={},e.on(ce.PermissionStatus,this.permissionStatusCallback.bind(this)),e.on(ce.AvPermission,async n=>{this.avPermissionCallback(n)}),e.on(ce.BeginRecording,this.beginRecordingCallback.bind(this)),e.on(ce.StartTask,this.startTaskCallback.bind(this)),e.on(ce.ScreenPermission,async n=>{this.screenPermissionCallback(n)}),e.on(ce.FinishTask,async n=>{this.finishTaskCallback(n)})},async avPermissionCallback(e){var r,i,o;const{[K.StreamReadyCallback]:t,[K.PermissionDescriptors]:n}=e;try{(r=this.state.avStream)!=null&&r.active&&(this.state.avStream.getTracks().map(a=>a.readyState==="live"&&a.stop()),((i=this.state.captureStream)==null?void 0:i.getAudioTracks().length)===1&&this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])),this.state.avStream=await navigator.mediaDevices.getUserMedia({video:n.includes(dn.Camera),audio:!0}),((o=this.state.captureStream)==null?void 0:o.getAudioTracks().length)===0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.avStream)}catch(a){console.warn("Error: failed to get permissions: "+a),t&&t(null,null);return}t&&t(this.state.avStream,this.state.captureStream)},async screenPermissionCallback(e){const{[K.ScreenPermissionRequested]:t,[K.StreamReadyCallback]:n}=e;t==null||t(!0);try{this.state.captureStream=await navigator.mediaDevices.getDisplayMedia({video:!0,cursor:"always",displaySurface:"browser",preferCurrentTab:!0})}catch(r){t==null||t(!1),console.warn("Error: failed to get permissions: "+r),n&&n(null,null);return}t==null||t(!1),this.state.avStream&&this.state.avStream.getAudioTracks().length>0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.captureStream),n&&n(this.state.avStream||null,this.state.captureStream)},beginRecordingCallback(e){const{[K.RecordingMediaTypes]:t,[K.StartRecordingCallback]:n}=e;if(!t)return;const r=[];if(t.includes(Ie.Video)&&this.state.avStream){this.state.avRecorder=Pu(this.state.avStream);const i=Ye();Nu(this.state.avRecorder,i,this.state.chunks),r.push(i)}if(t.includes(Ie.Screen)&&this.state.captureStream){this.state.screenRecorder=Pu(this.state.captureStream);const i=Ye();Nu(this.state.screenRecorder,i,this.state.chunks),r.push(i)}r&&n&&n(r)},async finishTaskCallback(e){const{[K.CurrentIndex]:t,[K.TaskResponse]:n,[K.TaskCompleteCallback]:r}=e;await this.stopRecording(e),r&&r(this.taskDurationMillisecond()),this.state.cards&&this.state.hasEndCard!==void 0&&this.lookAheadAndStopStream(t,n,this.state.cards,this.state.hasEndCard)},startTaskCallback(){this.state.startTime=new Date},permissionStatusCallback(e){var r;const{[K.PermissionStatusCallback]:t}=e,n=this.state.avStream;t&&t(n,n?(n==null?void 0:n.getVideoTracks().length)>0:!1,!!((r=this.state.captureStream)!=null&&r.active),this.state.captureStream)},lookAheadAndStopStream(e,t,n,r){const{avRecorder:i,screenRecorder:o}=this.state,{allResponses:a}=X.getState(),s=Au({cards:n,index:e,hasEndCard:r,allResponses:a});s!==null&&n[s].type===L.RecordedTask||[i,o].map(l=>{l&&(l.state==="recording"&&l.stop(),l.stream.getTracks().map(u=>{u.readyState==="live"&&u.stop()}))})}},$r=Object.create(em);Object.freeze($r);function Vu(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ty("button",{...e,className:G("ul-card-text__button",e.className),id:"ul-card-text__button"}),$e=({message:e,properties:t})=>{const n=t==null?void 0:t.captionText;return y(Le,{children:[e&&y("h1",{className:O.QuestionHeader,id:O.QuestionHeader,...n?{}:{style:{marginBottom:"15px"}},children:e}),n&&y("p",{className:O.Caption,id:O.Caption,children:n})]})},ju=({buttonText:e="View Prototype",handleClick:t})=>y("button",{className:"prototype-button",onClick:t,children:e},"prototype-btn"),Et=({defaultBody:e,embeddedType:t="prototype",properties:n})=>{var d;const{handleClickEmbedButton:r,hasViewedEmbed:i,headers:o,useDesktopPrototype:a}=X(f=>({handleClickEmbedButton:f.handleClickEmbedButton,hasViewedEmbed:f.hasViewedEmbed,headers:f.headers,useDesktopPrototype:f.useDesktopPrototype})),s=(n==null?void 0:n.conceptUrl)||((d=n==null?void 0:n.consentDocument)==null?void 0:d.url),l=window.innerWidth{f.preventDefault(),r(p)};if(!a&&l&&!i&&s&&["email","link"].includes(u)){if(t==="prototype")return y(ju,{handleClick:f=>{c(f,Se.ViewPrototypeClick)}});if(t==="pdf")return y(ju,{buttonText:(n==null?void 0:n.viewDocumentText)||"View Document",handleClick:f=>{c(f,Se.ViewAgreementClick)}})}return e()},Bu=(e,t)=>{const n=bt(0),r=()=>{if(e.current){const i=e.current;i.style.height="1px";const o=i.scrollHeight,a=i.offsetHeight-i.clientHeight,s=o+a,l=parseInt(window.getComputedStyle(i).getPropertyValue("max-height")),u=s<=l?s:l;n.current!==u&&t(),n.current=u,i.style.height=`${u}px`}};return Re(r,[]),r},Fu=({border:e,label:t,isSelected:n,value:r,text:i,id:o,isRadio:a,useMobileStyling:s,error:l,allowTextEntry:u,promptText:c,onUserInputChanged:d})=>{const{styleNonce:f,viewDocument:p}=X(S=>({styleNonce:S.styleNonce,viewDocument:S.viewDocument})),[h,v]=ue(!1);im(p,e,f);const m=({isSelected:S,userText:R})=>{d&&d({id:o||"",selected:S,value:r,userText:R})},w=S=>{S.stopPropagation(),m({isSelected:a||!n,userText:i}),v(!1)},_=()=>{h||v(!0)},b=()=>{h&&v(!1)},E=S=>{(S.key==="Enter"||S.key===" ")&&w(S)},g={onClick:S=>w(S),onKeyPress:S=>E(S)};"ontouchstart"in p.documentElement?(g.onTouchStart=b,g.onTouchCancel=b,g.onTouchEnd=b):(g.onMouseDown=_,g.onMouseLeave=b);const x=a?`radio-${o}`:`checkbox-${o}`,I=n||h?[Gr]:[],C=[...l?[Ku]:[],...I];return y("div",{className:G([...re(O.Choice,s),...C]),id:`choice-div-${o}`,style:l?{borderColor:bn}:{},...g,children:[y("div",{className:G([O.ChoiceLabelContainer]),children:[a?y("div",{"aria-labelledby":`label-${o}`,className:G([O.ChoiceRadio,...I]),id:x,role:"radio",tabIndex:0}):y("div",{"aria-checked":n,"aria-labelledby":`label-${o}`,className:O.ChoiceCheckbox,id:x,role:"checkbox",style:n?{backgroundColor:e,borderColor:e,boxShadow:"none"}:{},tabIndex:0,children:n&&y("svg",{fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg",children:y("path",{d:"M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",stroke:"white",strokeLinecap:"round",strokeWidth:"2"})})}),y("label",{className:G(re(O.ChoiceLabel,s)),htmlFor:x,id:`label-${o}`,children:t})]}),u&&n&&y("div",{className:G([O.ChoiceTextEntryContainer,...I]),children:y(nm,{onTextChange:S=>m({isSelected:n,userText:S}),promptText:c||"Please specify",textValue:i,useMobileStyling:s})})]})},nm=({promptText:e,textValue:t,onTextChange:n,useMobileStyling:r})=>{const i=bt(null),{update:o}=X(s=>({update:s.update})),a=Bu(i,()=>o());return Re(()=>{i.current&&i.current.focus()},[]),y("textarea",{"aria-label":e,"aria-multiline":"true","aria-placeholder":e,className:G(re(O.ChoiceTextInput,r)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:s=>{a(),s.stopPropagation(),n(s.currentTarget.value)},onClick:s=>{s.stopPropagation()},onKeyPress:s=>{s.stopPropagation()},placeholder:e,ref:i,role:"textbox",rows:1,value:t})},Hu="ul-select-style-element",Gr="ul-select-active-dynamic-style",Ku="ul-select-error-dynamic-style",rm=e=>e.tagName.toLowerCase()==="style",im=(e,t,n)=>{let r=e.getElementById(Hu),i=!1;r||(r=e.createElement("style"),i=!0),rm(r)&&(r.id=Hu,n&&(r.nonce=n),r.textContent=om(t),i&&e.head.appendChild(r))},om=e=>` - .${Gr} { - border-color: ${e}; - } - .${Gr} .${O.ChoiceRadio}, .${Gr}.${O.ChoiceRadio} { - border: 6px solid ${e}; - box-shadow: none; - } - .${Ku} { - border-color: ${bn}; - } - `,gn=e=>(e==null?void 0:e.buttonText)||"Next",Ko=e=>(e==null?void 0:e.skipButtonText)||"Skip",am=({className:e,message:t,next:n,properties:r,questionId:i,type:o})=>{const{useMobileStyling:a,border:s}=X(S=>({useMobileStyling:S.useMobileStyling,border:S.border})),[l,u]=ue(!1),[c,d]=ue(""),[f,p]=ue(!1),h=r==null?void 0:r.collectName,v=(r==null?void 0:r.nameLabelText)||"Full Name",m=(r==null?void 0:r.consentText)||"I agree to the stated conditions",w=(r==null?void 0:r.submitButtonText)||"Submit",_=!!c.trim(),b=l&&(!h||_),E=(S,R=!1)=>{S.preventDefault(),S.stopPropagation();let D=null;if(!R){if(!b){p(!0);return}D={submitted:!0},h&&(D.name=c)}n({value:D,questionId:i,type:o})},g=S=>{S.preventDefault(),S.stopPropagation(),d(S.currentTarget.value)},x=S=>{S.currentTarget.style.borderColor=f&&!_?bn:s},I=S=>{S.currentTarget.style.borderColor=f&&!_?bn:Ei},C=()=>y("div",{children:[y(Fu,{allowTextEntry:!1,border:s,error:f&&!l,index:0,isRadio:!1,isSelected:l,label:m,onUserInputChanged:({selected:S})=>{S!==l&&u(!l)},useMobileStyling:a}),h&&y("input",{"aria-label":v,"aria-placeholder":v,className:G(re(O.ConsentLegalNameInput,a)),"data-gramm":"false",maxLength:250,name:"name",onBlur:I,onFocus:x,onInput:g,placeholder:v,style:f&&!_?{borderColor:bn}:{},tabIndex:0,value:c}),y("div",{className:"ul-card__button-wrapper ul-card-vertical__button-wrapper",children:[y(Ee,{className:b?"":O.ButtonDisabled,onClick:E,children:w}),r.required===!1&&y("button",{className:O.SkipButton,onClick:S=>E(S,!0),children:Ko(r)})]})]});return y("div",{className:G([e,"ul-card__consent-legal",O.FadeInTransition]),children:[y($e,{message:t}),y("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:r&&r.richTextBody?{__html:r&&r.richTextBody}:void 0,id:"ul-card__consent-legal-body-container"}),y(Et,{properties:r,defaultBody:C,embeddedType:"pdf"})]},i)},sm=({activeValue:e,border:t,icon:n,isPressed:r,onSubmit:i,range:o,scaleLabelType:a,setActiveValue:s,setIsPressed:l,useMobileStyling:u,value:c})=>{const d=`option-${c}`,f=a===Bt.Number,p=a===Bt.Star,h=f&&c===e,[v,m]=(()=>c<=e&&p||c===e?r?[t,1]:[t,.3]:["",1])(),w=()=>{switch(a){case Bt.Star:return G([...re(O.LikertStar,u),...re(`${O.LikertStar}-${c}`,u)]);case Bt.Smiley:return G([...re(O.LikertSmiley,u),...re(`${O.LikertSmiley}-${c}`,u)]);default:return G(c===o?[...re(O.LikertNumber,u),...re(`${O.LikertNumber}-${c}`,u),...re("likert-last-option",u)]:[...re(O.LikertNumber,u),...re(`${O.LikertNumber}-${c}`,u)])}},_=()=>{s(-1),l(!1)};return y("div",{"aria-label":f?void 0:String(c),className:w(),dangerouslySetInnerHTML:{__html:n},id:d,onClick:()=>i(),onPointerDown:()=>l(!0),onPointerEnter:()=>s(c),onPointerLeave:_,role:"radio",style:{color:f?"":v,borderColor:h?v:"",fillOpacity:h?"":m,zIndex:h?3:"auto"},tabIndex:0})},lm=({className:e,labels:t,message:n,next:r,properties:i,questionId:o,type:a})=>{const{border:s,useMobileStyling:l}=X(C=>({border:C.border,useMobileStyling:C.useMobileStyling})),[u,c]=ue(-1),[d,f]=ue(!1),p=t&&t.left,h=t&&t.right;let v;const{range:m,scaleLabelType:w,ratingIcons:_}=i;m&&(v=Number(m));const b=v||5,E=C=>{var S,R;switch(w){case Bt.Star:return(S=_[0])==null?void 0:S.svg;case Bt.Smiley:return(R=_[C])==null?void 0:R.svg;default:return String(C+1)}},g=[...Array(b)].map((C,S)=>{const R=S+1;return y(sm,{activeValue:u,border:s,icon:E(S),isPressed:d,onSubmit:()=>r({value:R,questionId:o,type:a}),range:b,scaleLabelType:w,setActiveValue:c,setIsPressed:f,useMobileStyling:l,value:R},S)}),x=C=>{C.preventDefault(),C.stopPropagation(),r({value:null,questionId:o,type:a})},I=()=>y(Le,{children:[y("div",{"aria-label":`Rating (1 - ${b})`,className:"ul-card--likert__numbers",role:"radiogroup",children:g}),y("div",{className:"ul-card--likert__labels",children:[y("span",{children:p}),y("span",{children:h})]}),!i.required&&y("div",{className:"ul-vertical-centered-container",children:y(Ee,{onClick:x,children:gn(i)})})]});return y("form",{className:G([e,"ul-card--likert",O.FadeInTransition]),children:[y($e,{message:n,properties:i}),y(Et,{properties:i,defaultBody:I})]},o)},$u=({className:e,message:t,onSubmit:n,options:r=[],properties:i,questionId:o,type:a})=>{const{border:s,useMobileStyling:l}=X(g=>({border:g.border,useMobileStyling:g.useMobileStyling})),u=r.reduce((g,x)=>(g[x.id]={isSelected:!1},g),{}),[c,d]=ue(u),f=a===L.MultipleChoice,p=i.required,h=Object.entries(c).some(([g,x])=>{var S;const I=r.find(R=>`${R.id}`===g),C=x.userText===void 0||x.userText.trim()==="";return((S=I==null?void 0:I.optionProperties)==null?void 0:S.allowsTextEntry)&&C&&x.isSelected}),v=Object.values(c).some(g=>g.isSelected),m=h||p&&!v,w=r.map(({id:g,label:x,value:I,optionProperties:C},S)=>{var T,P;const R=`${g}`,{allowsTextEntry:D}=C||{allowsTextEntry:!1};return y(Fu,{allowTextEntry:D,border:s,error:!1,id:R,index:S,isRadio:f,isSelected:!!((T=c[R])!=null&&T.isSelected),label:x,onUserInputChanged:A=>b(A.id,A.selected,A.userText),promptText:"Please specify",text:(P=c[g])==null?void 0:P.userText,useMobileStyling:l,value:I},R)}),_=g=>{g.preventDefault(),g.stopPropagation(),n(c)},b=(g,x,I)=>{const C=Object.assign({},c);if(f&&x)for(const S of Object.values(C))S.isSelected=!1,delete S.userText;C[g]={isSelected:x,userText:I},d(C)},E=()=>y("div",{children:[y("div",{className:G(re(O.ChoiceGroup,l)),role:f?"radiogroup":"group",children:w}),y("div",{className:"ul-card__button-wrapper",children:y(Ee,{disabled:m,onClick:_,children:gn(i)})})]});return y("form",{className:G([e,"ul-card--multiple",O.FadeInTransition]),id:"text-form",onSubmit:_,children:[y($e,{message:t,properties:i}),y(Et,{properties:i,defaultBody:E})]},o)},um=e=>{const{questionId:t,type:n,next:r,options:i}=e;return y($u,{...e,onSubmit:a=>{const s=Object.entries(a).find(([,f])=>f.isSelected)||[void 0,void 0],[l,u]=s,c=i.find(f=>`${f.id}`===l),d=u!=null&&u.userText?{[l]:{userText:u.userText}}:null;r({value:c&&l?{[l]:c.value}:{},secondaryValue:d,questionId:t,type:n})}})},cm=e=>{const{questionId:t,type:n,next:r}=e;return y($u,{...e,onSubmit:o=>{const a={},s=Object.entries(o).reduce((u,[c,d])=>(u[c]=d.isSelected,u),a),l=Object.entries(o).reduce((u,[c,d])=>{if(!d.userText)return u;const f=u||{};return f[c]={userText:d.userText},f},null);r({value:s,secondaryValue:l,questionId:t,type:n})}})},dm=({className:e,props:{labels:t,message:n,properties:r},next:i,questionId:o,type:a})=>{const{border:s,useMobileStyling:l}=X(h=>({border:h.border,useMobileStyling:h.useMobileStyling})),u=t&&t.left,c=t&&t.right,d=[...Array(11)].map((h,v)=>y("div",{className:G([...re(O.NPSNumber,l),...re(`${O.NPSNumber}-${v}`,l)]),id:`option-${v}`,onClick:()=>i({value:v,questionId:o,type:a}),onKeyPress:m=>{m.preventDefault(),(m.key==="Enter"||m.key===" ")&&i({value:v,questionId:o,type:a})},onPointerDown:m=>{m.currentTarget.style.zIndex="2",m.currentTarget.style.borderColor=s},onPointerLeave:m=>{m.currentTarget.style.zIndex="auto",m.currentTarget.style.borderColor=Ei},role:"radio",tabIndex:0,children:v},v)),f=h=>{h.preventDefault(),h.stopPropagation(),i({value:null,questionId:o,type:a})},p=()=>y("div",{children:[y("div",{className:"ul-card--nps__numbers",children:d}),y("div",{className:"ul-card--nps__labels",children:[y("span",{children:u}),y("span",{children:c})]}),!r.required&&y("div",{className:"ul-vertical-centered-container",children:y(Ee,{onClick:f,children:gn(r)})})]});return y("form",{className:G([e,"ul-card--nps",O.FadeInTransition]),children:[y($e,{message:n,properties:r}),y(Et,{properties:r,defaultBody:p})]},o)},fm=({className:e,message:t,next:n,properties:r,questionId:i,type:o})=>{const{border:a,useMobileStyling:s,update:l}=X(g=>({border:g.border,useMobileStyling:g.useMobileStyling,update:g.update})),[u,c]=ue(""),d=bt(null),f=u.trim(),p=r.required===!0&&!f,h=Bu(d,()=>l()),v=g=>{h(),g.preventDefault(),g.stopPropagation(),c(g.currentTarget.value)},m=g=>{g.preventDefault(),g.stopPropagation(),n({value:u,questionId:i,type:o})},w=r&&r.openTextPlaceholder?r.openTextPlaceholder:"",_=g=>{g.currentTarget.style.borderColor=a},b=g=>{g.currentTarget.style.borderColor=Ei},E=()=>y("div",{className:"ul-card-text",children:[y("div",{className:"ul-card-text__container",children:y("textarea",{"aria-label":w,"aria-labelledby":O.QuestionHeader,"aria-multiline":"true","aria-placeholder":w,className:G(re(O.OpenTextInput,s)),"data-gramm":"false",maxLength:5e3,name:"text",onBlur:b,onChange:v,onFocus:_,placeholder:w,ref:d,role:"textbox",tabIndex:0})}),y(Ee,{disabled:p,onClick:m,style:{backgroundColor:p?"":a},children:gn(r)})]});return y("form",{className:G([e,"ul-card--text",O.FadeInTransition]),id:"text-form",children:[y($e,{message:t,properties:r}),y(Et,{defaultBody:E,properties:r})]},i)};var xt=(e=>(e[e.RequestNeeded=1]="RequestNeeded",e[e.TryAgain=2]="TryAgain",e[e.Ready=3]="Ready",e))(xt||{});const qr=e=>e.type===Te.AvPermission,Gu=e=>e.type===Te.ScreenPermission,pm=(e,t)=>!(qr(t)?t.permissionDescriptors:[]).includes(dn.Camera)||e.getVideoTracks().length>0,qu=(e,t)=>{if(e===void 0)return xt.RequestNeeded;if(e){if(!pm(e,t))return xt.RequestNeeded}else return xt.TryAgain;return xt.Ready},zu={avStream:null,currentPage:null,mediaRecordingUids:null,nextQuestion:()=>{},passthroughData:void 0,recordingMediaTypes:void 0,screenPermissionRequested:!1,type:void 0},Ge=Lu(e=>({...zu,reset:()=>{e(zu)},updatePage:t=>{e(t)}}));function $o({currentPage:e,pages:t}){const{avStream:n,recordingMediaTypes:r,updatePage:i}=Ge.getState(),{recorderEventEmitter:o}=X.getState();o.emit(ce.AvPermission,{[K.PermissionDescriptors]:e.permissionDescriptors,[K.StreamReadyCallback]:(a,s)=>{if(n===a)return;let l=e;if(a&&!e.permissionDescriptors.includes(dn.Camera)){const u=t.indexOf(e),c=s!=null&&s.active?u+2:u+1;(s==null?void 0:s.active)&&r&&o.emit(ce.BeginRecording,{[K.RecordingMediaTypes]:r,[K.StartRecordingCallback]:d=>i({mediaRecordingUids:d})}),l=t[c]}i({currentPage:l,avStream:a})}})}function hm({pages:e,userId:t,responseGroupUid:n,surveyId:r,questionId:i,next:o}){const{updatePage:a}=Ge.getState(),{eventEmitFn:s,recorderEventEmitter:l}=X.getState(),u={questionId:i,surveyId:r,visitorId:t,responseGroupUid:n};let c=0;l.emit(Se.RecordedTaskPermissionScreen),s(Se.RecordedTaskPermissionScreen),l.emit(ce.PermissionStatus,{[K.PermissionStatusCallback]:(f,p,h,v)=>{const m=e[c],{type:w}=m,_=[Ie.Screen];if(qr(m)){const{permissionDescriptors:b}=m,E=b==null?void 0:b.includes(dn.Microphone),g=b==null?void 0:b.includes(dn.Camera);E&&_.push(Ie.Audio),g&&_.push(Ie.Video);const x=(f==null?void 0:f.active)&&!g,I=(f==null?void 0:f.active)&&p;(x||I)&&c++}Gu(e[c])&&h&&(c++,l.emit(ce.BeginRecording,{[K.RecordingMediaTypes]:_,[K.StartRecordingCallback]:b=>a({mediaRecordingUids:b})})),a({currentPage:e[c],avStream:f,screenPermissionRequested:h,nextQuestion:o,type:w,passthroughData:u,recordingMediaTypes:_,captureStream:v})}});const d=e[c];return d.type===Te.AvPermission&&$o({currentPage:d,pages:e}),d}function Go({status:e}){const{nextQuestion:t,passthroughData:n,mediaRecordingUids:r,reset:i}=Ge.getState(),{recorderEventEmitter:o,handleUploadUpdate:a,index:s}=X.getState(),l={value:{taskStatus:e},type:L.RecordedTask,questionId:(n==null?void 0:n.questionId)||1};!n||o.emit(ce.FinishTask,{[K.BeginCallback]:u=>{a({mediaRecordingUid:u,isSubmitted:!0,progressPct:0,isComplete:!1})},[K.ProgressCallback]:(u,c)=>{a({mediaRecordingUid:u,progressPct:c.detail,isSubmitted:!1,isComplete:!1})},[K.UploadCallback]:u=>{u&&a({mediaRecordingUid:u,isComplete:!0,isSubmitted:!0,progressPct:100})},[K.PassthroughData]:n,[K.CurrentIndex]:s,[K.TaskResponse]:l,[K.TaskCompleteCallback]:u=>{l.value.taskDurationMillisecond=u,r&&(l.value.mediaRecordingUids=r),i(),t(l)}})}function qo({pages:e,setIsRequestingPermission:t}){const{recorderEventEmitter:n,eventEmitFn:r}=X.getState(),{updatePage:i,currentPage:o,recordingMediaTypes:a,screenPermissionRequested:s}=Ge.getState();if(!o)return;const l=e.indexOf(o);switch(o.type){case Te.AvPermission:{const u=s?l+2:l+1;s&&a&&n.emit(ce.BeginRecording,{[K.RecordingMediaTypes]:a,[K.StartRecordingCallback]:c=>{i({mediaRecordingUids:c})}}),i({currentPage:e[u]});return}case Te.ScreenPermission:n.emit(ce.ScreenPermission,{[K.ScreenPermissionRequested]:t,[K.StreamReadyCallback]:(u,c)=>{const d=c?e[l+1]:o;c&&a&&n.emit(ce.BeginRecording,{[K.RecordingMediaTypes]:a,[K.StartRecordingCallback]:f=>{i({captureStream:c,mediaRecordingUids:f})}}),i({currentPage:d,screenPermissionRequested:!0,captureStream:c})}});return;case Te.StartTask:r(Se.RecordedTaskStart),n.emit(Se.RecordedTaskStart),n.emit(ce.StartTask),i({currentPage:e[l+1],screenPermissionRequested:!0});return;case Te.CompleteTask:return}}const Wu="ul-permission-graphics-container",Yu="ul-permission-body",Qu=G([Wu,"ul_recorded-task-inset-spacing"]),zr=G(["ul-horizontal-button-container","ul-horizontal-button-container-left"]),Zu=({richTextBody:e})=>y("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:e},id:"ul-task-detail-container"}),Wr=({required:e,skipButtonText:t,bottom:n=!1})=>e?null:y(Ee,{className:G([n&&"ul-skip-button-below",O.InactiveButton]),onClick:Go.bind(null,{status:ke.Abandoned}),children:t||"Skip"}),zo=e=>{const{avStream:t,captureStream:n,recordingMediaTypes:r,updatePage:i}=Ge.getState(),o=(r==null?void 0:r.includes(Ie.Audio))||(r==null?void 0:r.includes(Ie.Video));Re(()=>{const a=setInterval(()=>{o&&t&&!t.active?i({avStream:null,currentPage:e[0]}):(!n||!n.active)&&i({captureStream:void 0,currentPage:e[o?1:0]})},1e3);return()=>clearInterval(a)},[t,n,o,e,r,i])},vm=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:i,taskDetail:o}=e;return zo(t),y("div",{className:"ul-task-page",children:[y(Zu,{richTextBody:o}),y("div",{className:zr,children:[y(Ee,{onClick:qo.bind(null,{pages:t}),children:r}),y(Wr,{required:n,skipButtonText:i})]})]},"start-task")},mm=({content:e,pages:t,properties:n})=>{const{buttonText:r,skipButtonText:i}=e;zo(t);const a=y(Et,{properties:n,defaultBody:()=>y("div",{className:zr,children:[y(Ee,{className:"ul-complete-task-button",onClick:Go.bind(null,{status:ke.Completed}),children:r}),y(Ee,{className:G([O.InactiveButton]),onClick:Go.bind(null,{status:ke.GivenUp}),children:i})]})});return y("div",{className:"ul-task-page",children:[y(Zu,{richTextBody:e.taskDetail}),a]},"complete-task")},gm=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:i}=e,[o]=X(l=>[l.tabTitle]),[a,s]=ue(!1);return y("div",{children:[y("div",{className:Qu,children:[y("p",{style:{marginTop:"auto"},children:e.selectTabText}),y("div",{className:"ul-select-tab-container",children:y("p",{className:Yu,children:o})})]}),y("div",{className:n?"":zr,children:[y(Ee,{disabled:a,onClick:qo.bind(null,{pages:t,setIsRequestingPermission:s}),children:r}),y(Wr,{required:n,skipButtonText:i})]})]})},ym=({content:e})=>y("div",{className:G([Wu,"ul_permission_svg_container","ul_recorded-task-inset-spacing","ul-center-horizontally"]),dangerouslySetInnerHTML:{__html:e.svg}},"ul-permission-request-graphic"),_m=({content:e,pages:t,required:n})=>{const{permissionDeniedHeadline:r,permissionDeniedBody:i,skipButtonText:o,tryAgainButtonText:a}=e,s=qr(t[0])?t[0]:null;return Re(()=>{const l=setInterval(()=>{s!==null&&$o({currentPage:s,pages:t})},1e3);return()=>clearInterval(l)},[s,t]),s?y("div",{children:[y("div",{className:Qu,children:y("p",{className:"ul-av-permission-denied-paragraph",children:[y("span",{className:"ul-av-permission-denied-headline",children:r}),y("span",{className:Yu,children:i})]})}),y("div",{className:zr,children:[y(Ee,{onClick:$o.bind(null,{currentPage:s,pages:t}),children:a}),y(Wr,{required:n,skipButtonText:o})]})]}):null},wm=({stream:e})=>y("video",{autoPlay:!0,className:G(["ul_recorded-task-inset-spacing"]),id:"ul-record-task-video-preview",muted:!0,ref:t=>{t&&(t.srcObject=e||null)}}),bm=({content:e,pages:t,required:n})=>{const{skipButtonText:r}=e,{avStream:i}=Ge.getState();return zo(t),y("div",{children:[y(wm,{stream:i}),y("div",{className:"ul-vertical-button-container-center",children:[y(Ee,{onClick:qo.bind(null,{pages:t}),children:e.buttonText}),y(Wr,{bottom:!0,required:n,skipButtonText:r})]})]})},Em=({properties:e})=>{const{pages:t,required:n}=e,{avStream:r,currentPage:i}=Ge.getState();if(i===void 0)return null;switch(i==null?void 0:i.type){case Te.AvPermission:{const o=qu(r,i);return o===xt.RequestNeeded?y(ym,{content:i}):o===xt.TryAgain?y(_m,{content:i,pages:t,required:n}):y(bm,{content:i,pages:t,required:n})}case Te.ScreenPermission:return y(gm,{content:i,pages:t,required:n});case Te.StartTask:return y(vm,{content:i,pages:t,required:n});case Te.CompleteTask:return y(mm,{content:i,pages:t,properties:e});default:return null}},xm=({className:e,properties:t,next:n,questionId:r})=>{const i=X(),{surveyId:o,responseGroupUid:a,userId:s}=i,l=Ge(),{screenPermissionRequested:u}=l,c=Ge(v=>v.avStream);let d=Ge(v=>v.currentPage);d||(d=hm({questionId:r,surveyId:o,next:v=>{n(v)},pages:t.pages,responseGroupUid:a,userId:s}));let f=d.headline,p=d.captionText;const h=qu(c,d);return Gu(d)&&u&&(f=d.permissionDeniedHeadline,p=d.permissionDeniedCaptionText),qr(d)&&h===xt.Ready&&(f=d.permissionGrantedHeadline,p=d.permissionGrantedCaptionText),y("div",{className:G([e,"ul-center-horizontally",O.FadeInTransition]),children:[y($e,{message:f,properties:{captionText:p}}),y(Em,{properties:t})]})},Cm={"{{user_id}}":"externalUserId","{{email}}":"email"},Sm=(e=void 0,t={})=>{if(!e)return e;let n=e;const r=[];for(const[l,u]of Object.entries(Cm))if(n.toLowerCase().includes(l))if(t[u]){const c=new RegExp(l,"gi");n=n.replace(c,t[u])}else r.push(l);if(r.length===0||!n.includes("?"))return n;const i=n.slice(0,n.indexOf("?")),a=n.slice(n.indexOf("?")+1).split("&").map(l=>l.split("=")).filter(l=>!r.includes(l[1]));if(a.length===0)return i;const s=a.map(l=>l.join("=")).join("&");return`${i}?${s}`},Im=({className:e,message:t,next:n,properties:r,questionId:i,type:o})=>{const{visitorAttributes:a}=X(d=>({visitorAttributes:d.visitorAttributes})),s=(d,f=!1)=>{n({value:f?{skipped:!0}:void 0,questionId:i,type:o})},l=d=>{(d.key==="Enter"||d.key===" ")&&n({value:void 0,questionId:i,type:o})},u=()=>{const d=Sm(r&&r.buttonUrl,a);return y("div",{className:"ul-card-button-group",children:[y("a",{className:"ul-card-text__button ul-card__text-url-prompt-button",href:d,id:"ul-card-text__button",onClick:s,onKeyPress:l,rel:"noreferrer",role:d?"link":"button",tabIndex:0,target:"_blank",children:gn(r)}),r.required===!1&&y("button",{className:O.SkipButton,onClick:f=>s(f,!0),children:Ko(r)})]})},c=(d,f)=>d?y("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:d},id:"ul-card__text-url-body-container"}):y("div",{className:"ul-rich-text-body",id:"ul-card__text-url-body-container",children:(f?f.split(/\n\s*\n/g):[]).map((p,h)=>y("p",{children:p},h))});return y("div",{className:G([e,"ul-card__text-url-prompt",O.FadeInTransition]),children:[y($e,{message:t}),c(r&&r.richTextBody,r&&r.body),y(Et,{defaultBody:u,properties:r})]},i)},km=({className:e,questionId:t})=>{const{border:n,destroy:r,endCard:i,forceBrandedLogo:o}=X(l=>({border:l.border,destroy:l.destroy,endCard:l.endCard,forceBrandedLogo:l.forceBrandedLogo}));Re(()=>{setTimeout(()=>{r(Zt)},o?4e3:2e3)},[r,o]);const a=i&&i.subheader?y("p",{className:O.Caption,children:i.subheader}):null,s=i&&i.headline?i.headline:"";return y("div",{className:G([e,"ul-card--thanks",O.FadeInTransition]),children:y("div",{children:y("div",{className:"ul-card--thanks-content",children:[y("div",{className:"ul-thanks-check",children:y("svg",{"aria-labelledby":"title",fill:"none",height:"99",viewBox:"0 0 81 99",width:"81",xmlns:"http://www.w3.org/2000/svg",children:[y("path",{clipRule:"evenodd",d:"M40.5 77C60.9345 77 77.5 60.4345 77.5 40C77.5 19.5655 60.9345 3 40.5 3C20.0655 3 3.5 19.5655 3.5 40C3.5 60.4345 20.0655 77 40.5 77ZM80.5 40C80.5 62.0914 62.5914 80 40.5 80C18.4086 80 0.5 62.0914 0.5 40C0.5 17.9086 18.4086 0 40.5 0C62.5914 0 80.5 17.9086 80.5 40Z",fill:n,fillRule:"evenodd"}),y("path",{clipRule:"evenodd",d:"M55.025 22.9046C55.6299 23.4705 55.6616 24.4198 55.0956 25.0247C54.8724 25.2634 54.6109 25.5285 54.3157 25.8277C52.2547 27.9168 48.5549 31.667 44.8135 39.6658C43.2818 42.9406 42.0864 45.8386 41.0823 48.2729C40.6539 49.3116 40.2603 50.2659 39.8902 51.129C39.287 52.5359 38.7248 53.7508 38.1744 54.625C37.8997 55.0613 37.5806 55.4905 37.2017 55.8245C36.8201 56.1607 36.2613 56.5 35.5457 56.5C34.6742 56.5 34.0892 55.9692 33.7774 55.6083C33.4502 55.2296 33.1752 54.7511 32.9396 54.301C32.7305 53.9013 32.5088 53.4367 32.2797 52.9565C32.2429 52.8794 32.2059 52.8019 32.1688 52.7243C31.8942 52.1499 31.5959 51.534 31.2537 50.8868C29.8886 48.305 27.8539 45.2878 24.2343 43.1382C23.522 42.7152 23.2875 41.7949 23.7105 41.0826C24.1335 40.3703 25.0539 40.1358 25.7662 40.5588C30.0556 43.1062 32.4149 46.6647 33.9058 49.4845C34.2776 50.1876 34.5973 50.8487 34.8753 51.4302C34.9147 51.5124 34.9529 51.5926 34.9902 51.6707C35.2222 52.1567 35.4164 52.5637 35.5978 52.9102C35.6151 52.9434 35.6321 52.9754 35.6485 53.0061C36.0565 52.3531 36.5341 51.3434 37.133 49.9468C37.4781 49.1418 37.8572 48.2229 38.2761 47.2074C39.2886 44.7532 40.5339 41.7347 42.0961 38.3948C46.0591 29.9221 50.0641 25.8648 52.1535 23.7482C52.4423 23.4556 52.6944 23.2002 52.9048 22.9753C53.4708 22.3703 54.42 22.3387 55.025 22.9046ZM35.1994 53.5892C35.1994 53.5892 35.2 53.5888 35.2012 53.5879C35.2 53.5889 35.1994 53.5893 35.1994 53.5892ZM36.0666 53.6682C36.0732 53.674 36.0765 53.6775 36.0765 53.6777C36.0765 53.678 36.0732 53.6751 36.0666 53.6682Z",fill:n,fillRule:"evenodd"}),y("path",{d:"M69.5 97C69.5 98.1046 56.2924 99 40 99C23.7076 99 10.5 98.1046 10.5 97C10.5 95.8954 23.7076 95 40 95C56.2924 95 69.5 95.8954 69.5 97Z",fill:"black",fillOpacity:"0.2"})]})}),y($e,{message:s}),a]})})},t)},Kt="https://cdn.sprig.com",V={document:void 0,videojs:void 0},Tm=`/* progress control styles */ -.video-js .vjs-control { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; -} - -.video-js .vjs-progress-control .vjs-progress-holder { - margin: 0 0px; -} - -.video-js .vjs-progress-control { - position: absolute; - height: 3px; - width: 100%; -} -/* position and align the buttons and button texts */ -.ul-control-panel { - bottom: 0; - width: 100%; - flex-direction: column; - background-color: white; - height: fit-content; - z-index: 2; -} - -.ul-buttons-panel { - color: black; - display: flex; - gap: 20px; - height: 50px; - justify-content: center; - margin: 10px; - padding: 2px 14px 0; -} - -.video-js .vjs-volume-panel { - height: 30px; - width: 40px; -} - -.ul-inactive { - opacity: 0.3; - cursor: default; - pointer-events: none; -} - -/* buttons */ -.ul-buttons-panel > .vjs-button { - background-color: rgba(0, 0, 0, 0.05); - border-radius: 50%; - display: flex; - height: 3em; - justify-content: center; - width: 3em; -} - -.vjs-button>.vjs-icon-placeholder:before { - align-items: center; - display: flex; - font-size: unset; - line-height: 0.5; - justify-content: center; -} - -span.ul-button-text { - align-self: flex-end; - position: relative; - top: 14px; -} - -#ul-camera-button { - white-space: nowrap; -} - -.video-js .vjs-volume-control.vjs-volume-horizontal { - background-color: #fff; - z-index: 1; -} - -.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level { - background-color: black; -} - -.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, -.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, -.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active { - width: 40px; -} - -.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active, -.video-js .vjs-volume-panel .vjs-volume-control:active, -.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control, -.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control, -.video-js .vjs-volume-panel:active .vjs-volume-control, -.video-js .vjs-volume-panel:focus .vjs-volume-control { - visibility: visible; - left: 40px; - position: absolute; - transition: visibility 0.1s, opacity 0.1s, height 0.1s, width 0.1s, left 0s, top 0s; -} - -/* play button customization */ -.video-js .vjs-play-control { - color: black; -} - -.video-js .vjs-play-control .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5363 6.40226L1.93958 10.7006C1.64037 10.8502 1.28833 10.6326 1.28833 10.2981V1.7014C1.28833 1.36688 1.64037 1.14931 1.93958 1.29891L10.5363 5.59727C10.868 5.76311 10.868 6.23642 10.5363 6.40226Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); -} - -/* position and style the current timer */ -.ul-time-panel { - position: absolute; - bottom: 80px; - left: 10px; - height: 22px; - color: black; - border: 1px solid #e0e0eb; - border-radius: 23px; - background-color: white; - width: fit-content; -} - -.video-js .vjs-current-time, -.vjs-no-flex .vjs-current-time { - display: flex; - align-items: center; - text-align: center; -} - -/* remove the dot progress indicator */ -.video-js .vjs-play-progress:before, -.video-js .vjs-volume-level:before, -.vjs-icon-circle:before, -.vjs-seek-to-live-control .vjs-icon-placeholder:before { - content: none; -} - -.video-js .vjs-mute-control .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='19' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.825.324A.75.75 0 019.25 1v11.667a.75.75 0 01-1.219.585l-3.96-3.169H1a.75.75 0 01-.75-.75v-5a.75.75 0 01.75-.75h3.07L8.031.414a.75.75 0 01.794-.09zM7.75 2.56L4.802 4.92a.75.75 0 01-.469.164H1.75v3.5h2.583a.75.75 0 01.469.165l2.948 2.358V2.56zM14.911.47a.75.75 0 011.061 0 9.084 9.084 0 010 12.844.75.75 0 01-1.06-1.06 7.584 7.584 0 000-10.724.75.75 0 010-1.06zM11.97 3.41a.75.75 0 011.06 0 4.917 4.917 0 010 6.953.75.75 0 11-1.06-1.06 3.417 3.417 0 000-4.832.75.75 0 010-1.06z' fill='%23262136'/%3E%3C/svg%3E"); -} - -.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='19' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.5 1.167L4.333 4.5H1v5h3.333L8.5 12.833V1.167zM17.17 4.5l-5 5M12.17 4.5l5 5' stroke='%23262136' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); -} - -.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.82489 0.32403C9.08474 0.44892 9.25 0.711703 9.25 1.00001V12.6667C9.25 12.955 9.08474 13.2178 8.82489 13.3427C8.56504 13.4675 8.25661 13.4324 8.03148 13.2523L4.07025 10.0833H1C0.585786 10.0833 0.25 9.74755 0.25 9.33334V4.33334C0.25 3.91913 0.585786 3.58334 1 3.58334H4.07025L8.03148 0.414355C8.25661 0.234253 8.56504 0.19914 8.82489 0.32403ZM7.75 2.56048L4.80185 4.91899C4.66887 5.02538 4.50364 5.08334 4.33333 5.08334H1.75V8.58334H4.33333C4.50364 8.58334 4.66887 8.6413 4.80185 8.74769L7.75 11.1062V2.56048Z' fill='%23262136'/%3E%3C/svg%3E%0A"); -} - -.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.82489 0.32403C9.08474 0.44892 9.25 0.711703 9.25 1.00001V12.6667C9.25 12.955 9.08474 13.2178 8.82489 13.3427C8.56504 13.4675 8.25661 13.4324 8.03148 13.2523L4.07025 10.0833H1C0.585786 10.0833 0.25 9.74755 0.25 9.33334V4.33334C0.25 3.91913 0.585786 3.58334 1 3.58334H4.07025L8.03148 0.414355C8.25661 0.234253 8.56504 0.19914 8.82489 0.32403ZM7.75 2.56048L4.80185 4.91899C4.66887 5.02538 4.50364 5.08334 4.33333 5.08334H1.75V8.58334H4.33333C4.50364 8.58334 4.66887 8.6413 4.80185 8.74769L7.75 11.1062V2.56048Z' fill='%23262136'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.9698 3.41124C12.2627 3.11839 12.7376 3.11846 13.0304 3.4114C13.9521 4.33341 14.4699 5.58376 14.4699 6.88748C14.4699 8.19121 13.9521 9.44156 13.0304 10.3636C12.7376 10.6565 12.2627 10.6566 11.9698 10.3637C11.6768 10.0709 11.6767 9.596 11.9696 9.30307C12.6101 8.66235 12.9699 7.79346 12.9699 6.88748C12.9699 5.98151 12.6101 5.11262 11.9696 4.4719C11.6767 4.17896 11.6768 3.70409 11.9698 3.41124Z' fill='%23262136'/%3E%3C/svg%3E%0A"); -} - -.video-js .vjs-volume-control:hover .vjs-mouse-display { - display: none !important; -} - -.video-js .vjs-play-progress { - background-color: black; -} - -/* position video player inside the container */ -.video-js .vjs-tech { - position: static; -} - -.video-js .vjs-time-tooltip { - padding: 0.25em 0.75em; - align-items: center; - color: #333; - background: #FCFCFD; - border-radius: 99px; - text-align: center; - border: 1px solid #E0E0EB; - display: flex; - align-items: center; - justify-content: center; - top: -25px; - font-size: 12px !important; - width: 50px !important; -} - -.video-js .vjs-play-progress.vjs-slider-bar .vjs-time-tooltip { - visibility: hidden !important; -} - -.video-js .vjs-progress-control .vjs-mouse-display { - z-index: 2; -} - -.ul-video-player { - width: 100%; - display: flex; - flex-direction: column; - height: auto; - border: 1px solid #E6E6E6; - background-color: white; - box-sizing: border-box; - border-radius: 4px; - background-clip: border-box; - overflow: hidden; -} - -.video-js.vjs-fullscreen:not(.vjs-ios-native-fs) { - border: none; -} - -#video-response-player-secondary-video-player { - max-width: 200px; - margin-right: 20px; - background-color: transparent; -} - -#ul-card-video__player_recorder-video-recorder.vjs-fullscreen { - display: table; -} - -.video-js div.vjs-progress-control { - margin-top: -3px; -} - -.video-js .vjs-progress-control .vjs-slider { - background-color: #B2BBBD; -} - -.vjs-record.video-js .vjs-control.vjs-button.vjs-fullscreen-control { - position:relative; -} - -.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.82143 2.54004L12.2614 2.54004C12.9242 2.54004 13.4614 3.0773 13.4614 3.74004L13.4614 6.18004' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6.17955 13.46L3.73955 13.46C3.07681 13.46 2.53955 12.9227 2.53955 12.26L2.53955 9.81996' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12.7772 3.22266L9.36475 6.63516' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6.29434 9.70605L2.88184 13.1186' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); -} - -.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.583 9.813H5.25a1 1 0 011 1v3.666M5.375 10.688L1 15.061M14.917 5.813H11.25a1 1 0 01-1-1V1.146M15.063 1l-4.376 4.375' stroke='%23262136' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); -} - -.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before, .video-js .vjs-icon-replay:before { - content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5363 6.40226L1.93958 10.7006C1.64037 10.8502 1.28833 10.6326 1.28833 10.2981V1.7014C1.28833 1.36688 1.64037 1.14931 1.93958 1.29891L10.5363 5.59727C10.868 5.76311 10.868 6.23642 10.5363 6.40226Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); -} - -.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before, .vjs-icon-pause:before { - content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3.61885' y='2.06074' width='3.16185' height='11.88' rx='0.9' fill='black' stroke='%23EDEDED' stroke-width='0.6' stroke-linecap='round'/%3E%3Crect x='9.21797' y='2.06074' width='3.16185' height='11.88' rx='0.9' fill='black' stroke='%23EDEDED' stroke-width='0.6' stroke-linecap='round'/%3E%3C/svg%3E%0A"); - padding: 2px; -} - -.vjs-error-display { - display: none; -} - -.ul-video-player-video { - position: relative; - top: 0; - left: 0; - width: 100%; -} - -.ul-video-container { - width: 100%; - height: auto; - left: 0px; - top: 0px; - - background-color: transparent; - border-radius: 4px; - - align-items: start; - display: flex; - flex-direction: column; - - /* Inside Auto Layout */ - - flex: none; - order: 0; - flex-grow: 0; - margin: 10px 0px; - position: relative; -} - -.vjs-record button.vjs-device-button.vjs-control { - background: rgba(255, 255, 255, 96); - width: 100%; - height: 100%; - left: 0; - top: 0; - margin: 0; - border-radius: 0; - line-height: 0.6; - padding: 10px; - display: flex; - align-items: center; - flex-direction: column; - justify-content: center; - z-index: 3; -} - -.vjs-record .vjs-device-button.vjs-control:before { - font-size: 14px !important; - color: #333; - content: "Your browser needs to access your camera and microphone for video recording"; - line-height: 135%; -} - -.vjs-record .vjs-device-button.vjs-control.permission-denied:before { - font-size: 16px !important; - color: #262136; - content: "Unable to access your camera and microphone"; -} - -.vjs-record .vjs-device-button.vjs-control:after { - display: inline-block; - background: #F0F0F5; - font-size: 13px; - border-radius: 4px; - content: "Request Permissions"; - padding: 1em 2em; - color: #333; - margin-top: 20px; -} - -.vjs-record .vjs-device-button.vjs-control.permission-denied:after { - display: inline-block; - background: white; - font-size: 13px; - content: "Please go to your browser settings and update permissions to enable recording"; - padding: 1em; - color: #4B575D; - margin: 5px; - line-height: 135%; - text-align: center; -} - -.vjs-control.vjs-button.ul-video-recorder-delete-button, .vjs-control.vjs-button.ul-video-recorder-toggle-button, .vjs-control.vjs-button.ul-video-recorder-camera-off-button-audio-only, .vjs-control.vjs-button.ul-video-recorder-camera-off-button { - cursor: pointer; -} - -.ul-video-recorder-delete-button .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.21234 7.37549V11.1193M2.53931 4.25595H13.4593H2.53931ZM5.57234 4.25595V3.00833C5.57222 2.84433 5.60354 2.68192 5.6645 2.53038C5.72546 2.37884 5.81488 2.24115 5.92762 2.12519C6.04037 2.00922 6.17424 1.91726 6.32158 1.85456C6.46892 1.79185 6.62683 1.75964 6.78628 1.75977H9.21234C9.37179 1.75964 9.5297 1.79185 9.67703 1.85456C9.82437 1.91726 9.95824 2.00922 10.071 2.12519C10.1837 2.24115 10.2732 2.37884 10.3341 2.53038C10.3951 2.68192 10.4264 2.84433 10.4263 3.00833V4.25595H5.57234ZM12.2463 4.25595V12.9912C12.2463 13.3223 12.1184 13.6399 11.8907 13.8741C11.6631 14.1082 11.3543 14.2398 11.0323 14.2398H4.96628C4.64432 14.2398 4.33555 14.1082 4.10789 13.8741C3.88023 13.6399 3.75234 13.3223 3.75234 12.9912V4.25595H12.2463ZM6.78628 7.37549V11.1193V7.37549Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); -} - -.ul-video-recorder-toggle-button .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0Z' fill='%23D15153'/%3E%3C/svg%3E"); -} - -.ul-video-recorder-toggle-button.ul-recording-in-session .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 10L12 2C12 0.89543 11.1046 -4.85396e-07 10 -4.37114e-07L2 -8.74228e-08C0.89543 -3.91405e-08 -4.85396e-07 0.895431 -4.37114e-07 2L-8.74228e-08 10C-3.91405e-08 11.1046 0.895431 12 2 12L10 12C11.1046 12 12 11.1046 12 10Z' fill='%23D15153'/%3E%3C/svg%3E%0A"); -} - -.ul-video-recorder-camera-off-button .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2645_4654)'%3E%3Cpath d='M15.1491 4.75L10.5991 8L15.1491 11.25V4.75Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.29912 3.4502H2.14912C1.43115 3.4502 0.849121 4.03223 0.849121 4.7502V11.2502C0.849121 11.9682 1.43115 12.5502 2.14912 12.5502H9.29912C10.0171 12.5502 10.5991 11.9682 10.5991 11.2502V4.7502C10.5991 4.03223 10.0171 3.4502 9.29912 3.4502Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2645_4654'%3E%3Crect width='15.6' height='15.6' fill='white' transform='translate(0.199951 0.200195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E"); -} - -.ul-video-recorder-camera-off-button-audio-only .vjs-icon-placeholder:before { - content: url("data:image/svg+xml,%3Csvg width='22' height='15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M.75 3A2.75 2.75 0 013.5.25h9.081A2.75 2.75 0 0115.331 3v9a2.75 2.75 0 01-2.75 2.75H3.5A2.75 2.75 0 01.75 12V3zM3.5 1.75c-.69 0-1.25.56-1.25 1.25v9c0 .69.56 1.25 1.25 1.25h9.081c.69 0 1.25-.56 1.25-1.25V3c0-.69-.56-1.25-1.25-1.25H3.5z' fill='%23262136'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M14.53 2.03l-12 12-1.06-1.06 12-12 1.06 1.06zM20.87 1.525a.75.75 0 01.38.652v10.588a.75.75 0 01-1.134.644l-5.92-3.53a.75.75 0 01-.365-.643v-3.53a.75.75 0 01.366-.644l5.919-3.53a.75.75 0 01.754-.007zm-5.539 4.607V8.81l4.419 2.635V3.497l-4.419 2.635z' fill='%23262136'/%3E%3C/svg%3E"); - transform: scale(0.75); -} - -.ul-upload-progress-label { - padding: 0.15em 0.75em; - align-items: center; - font-size: 12px; - color: #333; - background: #FCFCFD; - border-radius: 99px; - text-align: center; - border: 1px solid #E0E0EB; - display: flex; - align-items: center; - justify-content: center; - position: absolute; - bottom: 75px; - left: calc(50% - 65px); - width: 130px; - z-index: 5; -} - -.ul-upload-progress-label__time { - display: inline-flex; - margin-left: 0.8em; - align-items: center; -} - -.ul-upload-progress-label__time:before { - content: ""; - display: inline-flex; - width: 1px; - height: 12px; - background-color: #E0E0EB; - margin-right: 0.8em; -} - -@keyframes grow { - 0% { - transform: scale(1); - background-color: #EEECFC; - } - 50% { - transform: scale(1.2); - background-color: #E1DFF4; - } - 100% { - transform: scale(1); - background-color: #EEECFC; - } -} - -.ul-audio-recorder-placeholder:before { - width: 80px; - height: 80px; - border-radius: 120px; - background-color: #EEECFC; - content: ""; - position: absolute; - left: calc(50% - 40px); - top: calc(50% - 40px); - animation: 6s infinite grow; - transform-origin: 50% 60%; -} - -.ul-audio-recorder-placeholder:after { - content: url("data:image/svg+xml,%3Csvg width='98' height='98' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='a' maskUnits='userSpaceOnUse' x='0' y='0' width='98' height='98'%3E%3Ccircle cx='49' cy='49' r='49' fill='%23EDECF8'/%3E%3C/mask%3E%3Cg mask='url(%23a)'%3E%3Ccircle cx='49' cy='49' r='50' fill='%23645CC2'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.422 81.812c5.405-15.547 20.187-26.706 37.576-26.706 17.39 0 32.172 11.159 37.577 26.707-9.164 10.43-22.601 17.013-37.576 17.013-14.976 0-28.414-6.583-37.577-17.014z' fill='%23fff' fill-opacity='.6'/%3E%3Ccircle cx='49' cy='29' r='17' fill='%23fff' fill-opacity='.7'/%3E%3C/g%3E%3C/svg%3E"); - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - transform: translate(-50%, -50%) scale(0.6); -} - -.ul-audio-recorder-placeholder { - min-height: 150px; - width: 100%; - background-color: #fcfcfd; - display: block; - position: relative; -} - -.vjs-fullscreen .ul-audio-recorder-placeholder { - vertical-align: middle; - display: table-cell; -} - -.vjs-fullscreen .ul-control-panel { - height: 80px; - position: absolute; - bottom: 0; - left: 0; - width: 100%; - max-width: 100%; - background-color: #F8F8F8; -} - -.vjs-playback-rate .vjs-playback-rate-value { - align-items: center; - display: flex; - font-size: 12px; - justify-content: center; -} - -.vjs-playback-rate .vjs-menu { - left: -5px; - bottom: 3px; -} - -.vjs-menu-button-popup .vjs-menu .vjs-menu-content { - background-color: white; - border: 1px solid rgba(0, 0, 0, 0.1); - box-sizing: border-box; - border-radius: 4px; -} - -.vjs-menu li { - font-size: 12px; - padding: 5px 0; -} - -.vjs-menu li.vjs-selected { - color: lightgray; -} - -.vjs-menu li.vjs-menu-item:hover { - background-color: rgba(0, 0, 0, 0.05); -} - -.vjs-fullscreen .ul-buttons-panel { - top: calc(50% - 30px); - position: relative; -} - -.vjs-fullscreen .vjs-record-indicator.vjs-control { - bottom: 90px !important; -} - -.vjs-record.video-js div.vjs-control.vjs-record-indicator { - padding: 0.3em 0.75em 0.15em 15px; - align-items: center; - font-size: 12px; - color: #333; - background: #FCFCFD; - border-radius: 99px; - text-align: center; - border: 1px solid #E0E0EB; - display: flex; - justify-content: center; - align-items: center; - position: absolute; - bottom: 75px; - top: auto; - left: calc(50% - 21px); - width: 43px; - height: 16px; - z-index: 4; -} - -.vjs-record.video-js div.vjs-control.vjs-record-indicator:after { - content: ""; - background-color: #EB5757; - width: 6px; - height: 6px; - border-radius: 8px; - animation: none; - top: 4px; - left: 5px; -} - -.vjs-record.video-js div.vjs-control.vjs-record-indicator:before { - position: relative; - font-size: 9px; - animation: none; - opacity: 1; - color: #333; - top: auto; - left: auto; -} - -.ul-video-player-loading { - display: inline-block; - position: relative; - width: 6rem; - height: 6rem; - -} -.ul-video-player-loading div { - box-sizing: border-box; - position: absolute; - display: block; - width: 80%; - height: 80%; - margin: 5px; - border: 5px solid #666; - border-radius: 50%; - animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite; - border-color: #666 transparent transparent transparent; -} - -.first { - animation-delay: -0.45s; -} -.second { - animation-delay: -0.3s; -} -.third { - animation-delay: -0.15s; -} - -@keyframes lds-ring { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } -} - -.ul-video-btn { - width: 100%; - border: 1px solid #E6E6E6; - border-radius: 4px; - background-color: rgba(0, 0, 0, 0.02); - padding: 8px; - font-weight: 500; - font-size: 15px; -} - -.ul-record-response-btn:before, .ul-record-response-btn:after, .ul-back-question-btn:before, .ul-back-question-btn:after { - margin: 0 5px; - vertical-align: middle; -} - -.ul-record-response-btn:before { - content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2645_4654)'%3E%3Cpath d='M15.1491 4.75L10.5991 8L15.1491 11.25V4.75Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.29912 3.4502H2.14912C1.43115 3.4502 0.849121 4.03223 0.849121 4.7502V11.2502C0.849121 11.9682 1.43115 12.5502 2.14912 12.5502H9.29912C10.0171 12.5502 10.5991 11.9682 10.5991 11.2502V4.7502C10.5991 4.03223 10.0171 3.4502 9.29912 3.4502Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2645_4654'%3E%3Crect width='15.6' height='15.6' fill='white' transform='translate(0.199951 0.200195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E"); - display: inline-block; - transform: translate(0px, 2px); -} - -.ul-record-response-btn:after { - content: 'Record your Response'; -} - -.ul-back-question-btn:before { - content: url("data:image/svg+xml,%3Csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.8757 8.22361L1.1118 14.6056C0.945578 14.6887 0.75 14.5678 0.75 14.382V1.61803C0.75 1.43219 0.945579 1.31131 1.1118 1.39443L13.8757 7.77639C14.06 7.86852 14.06 8.13148 13.8757 8.22361Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); - display: inline-block; - transform: scale(0.85) translate(0, 1px); - -moz-transform: scale(0.85) translate(0, 2px); -} - -.ul-back-question-btn:after { - content: 'Back to Question'; -} - -.hidden { - display: none !important; - opacity: 0; - visibility: hidden; -} - -.visible { - visibility: visible; - opacity: 1; - animation: fade 0.3s; -} - -@keyframes fade { - 0% { - opacity: 0; - } - - 100% { - opacity: 1; - } -} - -#ul-recording-countdown-screen { - width: 100%; - height: 100%; - color: black; - background-color: rgba(255, 255, 255, 0.8); - position: absolute; - text-align: center; - font-size: 15px; - z-index: 1; - display: table; -} - -.ul-countdown-text { - vertical-align: middle; - display: table-cell; - transform: translate(0, -25px); -} - -.vjs-fullscreen > #ul-recording-countdown-screen { - font-size: 25px; - transform: unset; -} - -.vjs-poster { - background-size: cover; -} -`,Lm=e=>{const t=V.document.createElement("div");return t.className="ul-video-player-loading",t.id=Wo(e),["first","second","third","fourth"].map(n=>{const r=V.document.createElement("div");r.className=n,t.appendChild(r)}),t},Wo=e=>e+"-loading-spiner",ae="hidden",Xu=".m3u8",Yo="questionId",Qo="ul-video-recorder-camera-off-button",Zo="ul-recording-in-session",Rm=[{type:"link",content:`${Kt}/dependencies/videojs-record-4.5.0.min.css`},{type:"script",content:`${Kt}/dependencies/RecordRTC-5.6.2.js`},{type:"script",content:`${Kt}/dependencies/adapter.8.0.0.min.js`},{type:"script",content:`${Kt}/dependencies/videojs-record-4.5.0.min.js`},{type:"script",content:`${Kt}/userleap-web-upchunk-v2.2.2.js`}],Ju=[{type:"link",content:`${Kt}/dependencies/video-js-7.18.0.min.css`},{type:"script",content:`${Kt}/dependencies/video-js-7.18.0.min.js`},{type:"style",content:Tm}],ec="-video-player",tc="-secondary-video-player",nc="-video-recorder";let qe,rc;const Ct=async({event:e,apiBase:t,headers:n,visitorId:r,envId:i,metadata:o})=>{const a=V.document.documentElement;if(!r||!i)return;const s={event:`SDK - ${e}`,visitorId:r,environmentId:i,metadata:{...o||{},screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:a.clientWidth,clientHeight:a.clientHeight,location:window.location.href,language:navigator.language}};(await fetch(`${t}/sdk/1/visitors/${r}/analytics`,{method:"POST",cache:"no-cache",headers:n,body:JSON.stringify(s)})).ok||console.warn("[Sprig] (ERR-444) Failed to track analytics",e)},ut=async(e,t,n,r,i,o)=>{Ct({event:`Video Error ${t}`,apiBase:n,headers:r,visitorId:i,envId:o,metadata:{errorMessage:e.message}});const a=V.document.documentElement,s={screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:a.clientWidth,clientHeight:a.clientHeight,location:window.location.href,language:navigator.language},l={action:t,err:{message:e.message,stack:e.stack},meta:s,vid:i,envId:o};(await fetch(`${n}/sdk/1/errors`,{method:"POST",cache:"no-cache",headers:{...r,"userleap-platform":"video_recorder","x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(l)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",e)},Am=(e,{type:t,content:n})=>new Promise(function(r,i){let o;t==="script"?(o=V.document.createElement("script"),o.src=n):t==="link"?(o=V.document.createElement("link"),o.rel="stylesheet",o.href=n,o.type="text/css"):(o=V.document.createElement("style"),o.innerHTML=n),o.onload=function(){r(n)},o.onerror=function(){i(n)},o.async=!1,o.id=btoa(n),e.appendChild(o)}),ic=(e,t)=>{if(e.length===0)return t&&t();Promise.all(e.reduce((n,r)=>(n.push(Am(V.document.head,r)),n),[])).then(()=>{V.videojs=V.document.defaultView.videojs,t&&t()}).catch(function(n){console.log(n+" failed to load")})},oc=(e,t,n)=>{if(t==="start"&&(e.style.visibility="visible"),t==="none")e.style.visibility=ae;else if(t==="success")e.style.visibility=ae,e.innerHTML="Upload succeeded!";else{const r=Math.round(parseFloat(n));e.innerHTML=`Uploading ${r}%`,e.style.background=`linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${r}%, #FCFCFD ${r}%, #FCFCFD 100%)`}},Xo=(e,t)=>{const n=V.videojs(e.id());return n==null?void 0:n.payload[t]},Um=(e,t,n,r,i)=>{const{surveyId:o,responseGroupUid:a,visitorId:s,envId:l}=e.payload;e.on("deviceError",function(){console.warn("device error: ",e.deviceErrorCode),e.deviceErrorCode.message==="Permission denied"?(e.deviceButton.addClass("permission-denied"),n&&n(F.ERROR,{type:F.PERMISSION_DENIED}),Ct({event:"Video Permission Denied",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{questionId:Xo(e,Yo),responseGroupUid:a,surveyId:o}})):(n&&n(F.ERROR,{type:F.OTHER}),ut(new Error(e.deviceErrorCode.message),"recorderDeviceError",t,i,s,l))}),e.on("error",function(u,c){ut(c||e.error(),"recorderError",t,i,s,l)}),e.on("startRecord",function(u,c){r(e.uploadProgressLabel,"none"),Ct({event:"Video Record Start",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{questionId:Xo(e,Yo),responseGroupUid:a,surveyId:o}})}),e.on("finishRecord",async function(){r(e.uploadProgressLabel,"start",0);const u=Xo(e,Yo);if(!o){const v="internal error: missing fields in payload";return n&&n(F.ERROR,{type:F.OTHER}),ut(new Error(v),"finishRecord",t,i,s,l),null}e.record().stopDevice();const c=e.cameraOff?F.MEDIA_TYPE_AUDIO:F.MEDIA_TYPE_VIDEO,d=Ye();Ct({event:"Video Record Finish",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{mediaRecordingUid:d,questionId:u,responseGroupUid:a,surveyId:o,mediaType:c}});const f={surveyId:o,updatedAt:new Date().toISOString(),mediaType:c,mediaRecordingUid:d};u&&(f.questionId=u),a&&(f.responseGroupUid=a),s&&(f.visitorId=s);const h=await(async()=>{const v=await fetch(`${t}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});if(v.ok){const m=await v.json();return n&&n(F.UPLOAD_STARTED,{[F.UPLOAD_ID]:m.upload.id,[F.MEDIA_TYPE]:c,[F.MEDIA_RECORDING_UID]:d}),m.upload.url}else return n&&n(F.ERROR,{type:F.OTHER,response:v}),ut(new Error("failed to get upload response with url"),"finishRecord",t,i,s,l),null})();!h||(qe=V.document.defaultView.UpChunk.createUpload({endpoint:h,file:new V.document.defaultView.File([e.recordedData],`recording ${c} ${Date.now()}`),chunkSize:5120}),qe.startTime=Date.now(),Ct({event:"Video Upload Start",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{mediaRecordingUid:d,questionId:u,responseGroupUid:a,surveyId:o,mediaType:c,url:h}}),qe.on("error",v=>{r(e.uploadProgressLabel,"none"),n&&n(F.UPLOAD_FINISHED,{[F.MEDIA_RECORDING_UID]:d}),ut(v,"finishRecord",t,i,s,l)}),qe.on("progress",v=>{n&&n(F.UPLOAD_PROGRESS,{[F.MEDIA_RECORDING_UID]:d,[F.UPLOAD_PROGRESS_PCT]:v.detail}),r(e.uploadProgressLabel,"progress",v.detail)}),qe.on("success",()=>{r(e.uploadProgressLabel,"success"),n&&n(F.UPLOAD_FINISHED,{[F.MEDIA_RECORDING_UID]:d}),Ct({event:"Video Upload Success",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{mediaRecordingUid:d,questionId:u,responseGroupUid:a,surveyId:o,mediaType:c,url:h,elapsedMs:qe.startTime&&Date.now()-qe.startTime}})}))})},ac=(e,t)=>{const n=new(V.videojs.getComponent("Component"))(e);return n.addClass("ul-buttons-panel"),t.map(r=>{n.addChild(r)}),Om(n),n},Om=e=>{e.children().forEach(t=>{if(Ne[t.name_]){const n=Yr(Ne[t.name_],`ul-${Ne[t.name_]}`);t.el_.appendChild(n)}})},Yr=(e,t="")=>{const n=V.document.createElement("span");return n.className="ul-button-text",n.innerHTML=e,n.id=t,n},sc=(e,t,n,r,i=!1,o)=>{e.addClass("ul-video-player");const a=new(V.videojs.getComponent("Component"))(e);a.addClass("ul-control-panel"),e.progressBar=a.addChild("ProgressControl"),n&&e.src(n),e.audioPlayerPlaceholder=new(V.videojs.getComponent("Component"))(e),e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const s=n&&n.src?Fm(n.src):null;n&&(i||!s)?(e.children()[0].classList.add("vjs-hidden"),V.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.audioPlayerPlaceholder.hide(),V.document.getElementById(`${e.id()}_html5_api`).style.height="100%",s&&e.poster(s)),e.on("play",()=>{!i&&n&&!s&&Nm(e,!1),o==null||o.play()}),e.on("pause",()=>{o==null||o.pause()}),e.on("seeked",()=>{o==null||o.currentTime(e.currentTime())}),e.on("ratechange",()=>{o==null||o.playbackRate(e.playbackRate())}),e.addChild(e.audioPlayerPlaceholder,{},1),a.addChild(t),e.addChild(a),r&&r(e)},Dm=(e,t,n)=>{e.addClass(`ul${tc}`);const r=new(V.videojs.getComponent("Component"))(e);t&&e.src(t),e.addChild(r),n&&n(e)},Pm=(e,t,n,r,i,o,a,s=!1)=>{rc=Date.now();const u=Qr(t,{controls:!1,bigPlayButton:!1,fluid:!1,width:1280,height:720,playsinline:!0,plugins:{record:{audio:!0,video:{mandatory:{minWidth:1280,minHeight:720}},frameWidth:1280,frameHeight:720,maxLength:600,autoMuteDevice:!0}}});if(!u)return;u.payload=n;const{surveyId:c,questionId:d,responseGroupUid:f,visitorId:p,envId:h}=n;let v;const m=D=>{const T=Qo,P=Qo+"-audio-only";oc(u.uploadProgressLabel,"none"),qe&&qe.startTime>=rc&&qe.abort();const A=V.document.getElementById("ul-camera-button");D?(u.children()[0].classList.add("vjs-hidden"),E.removeClass(T),E.addClass(P),A.innerHTML=Ne.TurnOnCamera,u.audioPlayerPlaceholder.removeClass("vjs-hidden"),v==null||v.getTracks().forEach(k=>{k.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then(k=>{v=k,k.getVideoTracks().forEach(J=>{J.enabled=!1}),u.record().onDeviceReady(k)}).catch(u.record().onDeviceError.bind(u.record()))):(v==null||v.getVideoTracks().forEach(k=>{k.enabled=!0}),u.children()[0].classList.remove("vjs-hidden"),u.record().getDevice(),E.removeClass(P),E.addClass(T),A.innerHTML=Ne.TurnOffCamera,u.audioPlayerPlaceholder.addClass("vjs-hidden"))},w=new(V.videojs.getComponent("Button"))(u,{clickHandler:()=>{w.hasClass(ae)||(Ct({event:"Video Delete Button Clicked",apiBase:r,headers:a,visitorId:p,envId:h,metadata:{questionId:d,responseGroupUid:f,surveyId:c}}),m(u.cameraOff),i(F.DELETE,{}),E.removeClass(ae),w.addClass(ae))}});w.addClass("ul-video-recorder-delete-button"),w.el_.appendChild(Yr(Ne.DeleteButton,"ul-delete-button"));const _=V.document.getElementById(t),b=()=>{_.classList.contains("vjs-fullscreen")&&u.cameraOff?_.style.display="table":_.style.display="flex"};b();const E=new(V.videojs.getComponent("Button"))(u,{clickHandler:()=>{u.record().isRecording()||(u.cameraOff=!u.cameraOff,Ct({event:"Video Camera Button Clicked",apiBase:r,headers:a,visitorId:n.visitorId,envId:n.envId,metadata:{questionId:d,responseGroupUid:f,surveyId:c,cameraOff:u.cameraOff}}),m(u.cameraOff),!w.hasClass(ae)&&w.addClass(ae),i(F.DELETE,{}),b())}});E.addClass(Qo),E.el_.appendChild(Yr(Ne.TurnOffCamera,"ul-camera-button"));const g=new(V.videojs.getComponent("Button"))(u,{clickHandler:()=>{const D=V.document.getElementById("ul-recorder-toggle");if(u.record().isRecording())u.record().stop(),D&&(D.innerHTML=Ne.RecordButton),g.removeClass(Zo),w.removeClass(ae);else{const T=V.document.getElementById("ul-recording-countdown-screen");if(T)T.remove(),D&&(D.innerHTML=Ne.RecordButton),m(u.cameraOff),i(F.DELETE,{}),E.removeClass(ae),w.addClass(ae),g.removeClass(Zo),C.show();else{g.addClass(Zo),C.hide(),E.addClass(ae),w.addClass(ae),D&&(D.innerHTML=Ne.StopButton);const P=V.document.createElement("div");P.id="ul-recording-countdown-screen",_.insertBefore(P,_.children[1]),P.style.height=`${_.offsetHeight}px`,lc(u,3)}}}});g.addClass("ul-video-recorder-toggle-button"),g.el_.appendChild(Yr(Ne.RecordButton,"ul-recorder-toggle"));const x=V.document.createElement("p");x.style.visibility="hidden",x.className="ul-upload-progress-label",e.appendChild(x),u.uploadProgressLabel=x;const I=ac(u,[w,E,"PlayToggle",g,"FullscreenToggle"]),C=I.children().find(D=>D.name_==="FullscreenToggle");C.hasClass("vjs-disabled")&&C.hide();const S=I.children().find(D=>D.name_==="PlayToggle");S.hide(),o&&E.addClass(ae),!o&&w.addClass(ae),sc(u,I,o,!1,s),u.on("stopRecord",()=>{g.hide(),S.show(),C.show(),w.removeClass(ae)}),u.on("deviceReady",()=>{g.show(),S.hide(),w.addClass(ae)}),Um(u,r,i,oc,a),o&&(u.deviceButton&&u.deviceButton.hide(),u.src(o),S.show(),g.hide(),w.removeClass(ae));const R=[{name:"microphone"}];!u.cameraOff&&R.push({name:"camera"}),Promise.all(R.map(D=>{var T;return(T=navigator==null?void 0:navigator.permissions)==null?void 0:T.query(D)})).then(D=>{D.reduce((P,A)=>P&A.state==="granted",!0)&&u&&(u.deviceButton&&u.deviceButton.hide(),!o&&u.record().getDevice())}).catch(D=>{})},lc=(e,t=3)=>{const n=V.document.getElementById("ul-recording-countdown-screen");n&&t===0?(n.remove(),e.record().start()):n&&(n.innerHTML=`Recording in... ${t}`,setTimeout(()=>{lc(e,t-1)},1e3))},uc=e=>{const t=V.document.createElement("div");return t.className="ul-video-container",t.appendChild(Lm(e)),t},Jo=(e,t)=>{const n=V.document.createElement("video");n.id=e,n.className="video-js vjs-default-skin ul-video-player-video";const r=V.document.createElement("p");r.className="vjs-no-js",r.innerHTML="To view this video please enable JavaScript, and consider upgrading to a web browser that";const i=V.document.createElement("a");return i.href="https://videojs.com/html5-video-support/",i.target="_blank",i.innerHTML="supports HTML5 video",r.appendChild(i),n.appendChild(r),t.appendChild(n),t},Nm=(e,t)=>{t?(e.children()[0].classList.add("vjs-hidden"),e.audioPlayerPlaceholder.show(),V.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),V.document.getElementById(`${e.id()}_html5_api`).style.height="100%")},Qr=(e,t)=>V.document.getElementById(e)?t?V.videojs(e,t):V.videojs(e):(console.error(`Error in finding player element with ID, ${e}`),null),Mm=(e,t,n,r=!1,i="https://api.sprig.com",o=document,a=null,s=null)=>{V.document=o;const l=e+ec,u=uc(l);return V.document.addEventListener("securitypolicyviolation",c=>{ut(new Error(`Voice & Video feature violates ${c.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",i,{})}),ic(Ju,()=>{V.document.getElementById(Wo(l)).remove(),Jo(l,u);const c={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const d=e+tc;Jo(d,u);const f=Qr(l,c),p=Qr(d,{muted:!0,...c});if(!f||!p)return;Dm(p,a,s),a||p.addClass(ae);const h=ac(f,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),v=h.children().find(m=>m.name_==="FullscreenToggle");v.hasClass("vjs-disabled")&&v.hide(),sc(f,h,t,n,r,p)}catch(d){ut(new Error(`Error when creating video player object ${d}`),"playerDeviceError",i,{});return}}),u},Vm=(e,t={},n="https://api.userleap.com",r,i,o,a=!1,s=document)=>{V.document=s;const l=e+nc,u=uc(l);return V.document.addEventListener("securitypolicyviolation",c=>{ut(new Error(`Voice & Video feature violates ${c.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",n,o,t.visitorId,t.envId)}),ic(Ju.concat(Rm),()=>{Jo(l,u),V.document.getElementById(Wo(l)).remove();try{Pm(u,l,t,n,r,i,o,a)}catch(c){ut(new Error(`Error when creating video recorder player object ${c}`),"recorderDeviceError",n,o,t.visitorId,t.envId);return}}),u},jm=e=>{const t=e+nc;if(!!V.document.getElementById(t)&&!!V.videojs){try{if(!V.videojs(t).record().stream)return}catch{return}V.videojs(t).record().stop(),V.videojs(t).record().stopDevice()}},Bm=e=>{const t=Qr(e+ec);t==null||t.pause()},Fm=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let n=t?t[1]:null;return n.includes(Xu)&&(n=n.replace(Xu,"")),n?`https://image.mux.com/${n}/thumbnail.jpg?time=0`:null},F={UPLOAD_STARTED:"upload.started",UPLOAD_PROGRESS:"upload.progress",UPLOAD_FINISHED:"upload.finished",DELETE:"delete",ERROR:"error",MEDIA_TYPE:"media.type",PERMISSION_DENIED:"permission_denied",OTHER:"other",UPLOAD_ID:"upload.id",UPLOAD_PROGRESS_PCT:"upload.progress.pct",MEDIA_RECORDING_UID:"media.recording.uid",MEDIA_TYPE_VIDEO:"video",MEDIA_TYPE_AUDIO:"audio"},Ne={PlaybackRateMenuButton:"Speed",PlayToggle:"Play",FullscreenToggle:"Expand",TurnOnCamera:"Turn on",TurnOffCamera:"Turn off",DeleteButton:"Delete",RecordButton:"Record",StopButton:"Stop",PauseButton:"Pause"},zn="ul-card-video__player_recorder",Hm="ul-card-video__skip_button",Km="ul-video-interview-form",cc="ul-video-btn",$m=({className:e,message:t,next:n,properties:r,questionId:i,type:o})=>{const{apiURL:a,envId:s,handleUploadUpdate:l,headers:u,responseGroupUid:c,surveyId:d,viewDocument:f,visitorId:p}=X(T=>({apiURL:T.apiURL,envId:T.envId,handleUploadUpdate:T.handleUploadUpdate,headers:T.headers,responseGroupUid:T.responseGroupUid,surveyId:T.surveyId,viewDocument:T.viewDocument,visitorId:T.userId})),[h,v]=ue(!1),[m,w]=ue(null),[_,b]=ue(null),[E,g]=ue(0),x=r&&r.videoUrl,I=(T,P)=>{T===F.UPLOAD_STARTED?(w(P[F.UPLOAD_ID]),b(P[F.MEDIA_RECORDING_UID]),v(!0)):T===F.DELETE?(w(null),b(null),v(!1)):T===F.UPLOAD_PROGRESS?isNaN(P[F.UPLOAD_PROGRESS_PCT])?l({mediaRecordingUid:P[F.MEDIA_RECORDING_UID],isComplete:!0}):l({mediaRecordingUid:P[F.MEDIA_RECORDING_UID],progressPct:P[F.UPLOAD_PROGRESS_PCT]}):T===F.UPLOAD_FINISHED&&l({mediaRecordingUid:P[F.MEDIA_RECORDING_UID],isComplete:!0})},C=T=>{if(T&&T.children.length===0){const P=Mm(zn,{src:x,type:"application/x-mpegURL"},void 0,r.mediaType===F.MEDIA_TYPE_AUDIO,a,f);T.appendChild(P)}},S=T=>{if(T&&T.children.length===0){const P=Vm(zn,{surveyId:d,responseGroupUid:c,questionId:i,visitorId:p,envId:s},a,I,void 0,{...u,"x-ul-video-recorder-origin":"sdk"},r.mediaType===F.MEDIA_TYPE_AUDIO,f);T.appendChild(P)}},R=T=>{T.preventDefault(),T.stopPropagation(),jm(zn),m&&_?(l({mediaRecordingUid:_,isSubmitted:!0}),n({value:{mediaRecordingUid:_},questionId:i,type:o})):n({value:null,questionId:i,type:o})},D=()=>y(Et,{defaultBody:()=>y("button",{className:`${cc} ul-record-response-btn`,onClick:T=>{T.preventDefault(),T.stopPropagation(),Bm(zn),g(1)}}),properties:r});return y("form",{className:G([e,O.VideoCard,O.FadeInTransition]),id:Km,children:[y($e,{message:t,properties:r}),y("div",{id:"ul-card-voice__video",children:[y("div",{children:[y("div",{id:"ul-question-player-container",style:{display:E===0?"":"none"},children:[y("div",{id:zn,ref:C}),D()]}),y("div",{style:{display:E===1?"block":"none"},children:[y("button",{className:`${cc} ul-back-question-btn`,onClick:T=>{T.preventDefault(),T.stopPropagation(),g(0)}}),y("div",{id:"ul-recorder-player-container",ref:S})]})]}),y(Ee,{disabled:!h,onClick:R,children:gn(r)}),y("button",{className:`ul-card-text__button ${O.InactiveButton} ${O.SkipButton}`,id:Hm,onClick:R,style:{display:r.required?"none":"block",...h?{display:"none"}:{}},children:Ko(r)})]})]})},Gm=({className:e})=>{const{uploadProgress:t}=X(o=>({uploadProgress:o.uploadProgress}));let n,r;Object.values(t).filter(o=>o.isSubmitted).length>1?(n="Your responses are processing",r="Please keep this tab open until your responses are fully processed."):(n="Your response is processing",r="Please keep this tab open until your response is fully processed.");const i=Math.round(Math.min(99,...Object.values(t).filter(o=>o.isSubmitted).map(o=>o.progressPct)));return y("div",{className:G([e,"ul-card--uploading",O.FadeInTransition]),children:[y("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:O.LoadingSpinnerContainer,role:"progressbar",children:y("div",{className:O.LoadingSpinner,children:[y("div",{className:O.LoadingSpinnerFirst}),y("div",{className:O.LoadingSpinnerSecond}),y("div",{className:O.LoadingSpinnerThird}),y("div",{className:O.LoadingSpinnerFourth})]})}),y($e,{message:`${n} (${i}% complete)`}),y("p",{className:O.Caption,children:r})]})},dc=({logoOnly:e=!1,style:t={}})=>y("svg",{alt:`${e?"Powered by ":""}Sprig`,width:e?"35":"112",height:"15",viewBox:e?"79 0 31 15":"0 0 112 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",...t},children:[!e&&y("path",{d:"M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.7812 4.99121 44.9619 6.38135 44.9619 8.45068V8.93311H40.0742C40.0996 10.2534 40.8232 11.0215 41.9595 11.0215C42.8418 11.0215 43.3687 10.5835 43.5337 10.228L43.5591 10.1772L44.8857 10.1709L44.873 10.228C44.6445 11.1357 43.6924 12.1514 41.9277 12.1514ZM41.8643 6.12109C40.9248 6.12109 40.2139 6.76221 40.0933 7.94922H43.5972C43.4893 6.71777 42.7974 6.12109 41.8643 6.12109ZM49.1133 12.1323C47.3804 12.1323 46.2568 10.7422 46.2568 8.57764V8.56494C46.2568 6.38135 47.3613 5.00391 49.1133 5.00391C50.0591 5.00391 50.8652 5.47363 51.2334 6.21631H51.3413V2.42041H52.7124V12.0181H51.3413V10.9326H51.2334C50.8335 11.688 50.0781 12.1323 49.1133 12.1323ZM49.5068 10.958C50.6558 10.958 51.3604 10.0503 51.3604 8.57764V8.56494C51.3604 7.09229 50.6494 6.18457 49.5068 6.18457C48.3516 6.18457 47.6597 7.08594 47.6597 8.56494V8.57764C47.6597 10.0566 48.3516 10.958 49.5068 10.958ZM61.98 12.1323C61.0151 12.1323 60.2598 11.688 59.8599 10.9326H59.7583V12.0181H58.3809V2.42041H59.7583V6.21631H59.8599C60.228 5.47363 61.0342 5.00391 61.98 5.00391C63.7319 5.00391 64.8364 6.38135 64.8364 8.56494V8.57764C64.8364 10.7422 63.7192 12.1323 61.98 12.1323ZM61.5928 10.958C62.7417 10.958 63.4336 10.0566 63.4336 8.57764V8.56494C63.4336 7.08594 62.7417 6.18457 61.5928 6.18457C60.4438 6.18457 59.7329 7.09229 59.7329 8.56494V8.57764C59.7329 10.0503 60.4438 10.958 61.5928 10.958ZM66.8867 14.4429C66.7153 14.4429 66.5122 14.4302 66.3345 14.4111V13.3257C66.4678 13.3447 66.6392 13.3511 66.7979 13.3511C67.439 13.3511 67.8262 13.0781 68.0293 12.3799L68.1309 12.0244L65.6299 5.12451H67.1152L68.8418 10.6343H68.9624L70.6826 5.12451H72.1299L69.5654 12.2847C68.9814 13.9287 68.2832 14.4429 66.8867 14.4429Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M81.1088 6.63629C79.6878 6.32154 78.9672 5.76865 78.9672 4.99369C78.9672 4.19299 79.736 3.5886 80.7556 3.5886C81.8066 3.5886 82.5995 4.25285 82.5995 5.13336V5.20352H84.0518V5.13336C84.0518 3.52424 82.6405 2.30774 80.7693 2.30774C79.8676 2.30774 79.0414 2.58451 78.4433 3.08655C78.1463 3.33144 77.9077 3.63818 77.7448 3.98479C77.5818 4.33141 77.4984 4.70934 77.5005 5.09153C77.4946 5.44197 77.5675 5.78934 77.714 6.10857C77.8605 6.42779 78.0769 6.71092 78.3475 6.93752C78.8512 7.37584 79.5659 7.70024 80.4709 7.90299C81.9949 8.23898 82.7676 8.81054 82.7676 9.60094C82.7676 10.4576 81.9258 11.1032 80.813 11.1032C79.6571 11.1032 78.7854 10.3856 78.7854 9.43424V9.36408H77.3318V9.43424C77.3318 11.1167 78.8219 12.3847 80.7973 12.3847C81.7421 12.3847 82.6093 12.0983 83.2393 11.5769C83.5519 11.3237 83.8034 11.0048 83.9753 10.6433C84.1472 10.2818 84.2352 9.88702 84.2329 9.48766C84.2329 8.05875 83.1833 7.09907 81.1088 6.63629Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M89.2394 4.68276C88.6963 4.67605 88.1596 4.79915 87.6751 5.04156C87.1905 5.28397 86.7725 5.63851 86.4566 6.07497V4.85204H85.0747V14.8479H86.4566V11.0356C86.7725 11.472 87.1906 11.8265 87.6751 12.0688C88.1596 12.3111 88.6963 12.434 89.2394 12.4272C91.3836 12.4272 93 10.7627 93 8.55495C93 6.34723 91.3836 4.68276 89.2394 4.68276ZM91.5608 8.84202C91.5057 9.41605 91.2512 9.95356 90.8406 10.3633C90.4299 10.773 89.8883 11.0296 89.3078 11.0896C88.5363 11.1669 87.8177 10.9461 87.2841 10.4692C86.7505 9.99222 86.4566 9.3106 86.4566 8.55495C86.4566 7.10159 87.5538 6.00546 89.0087 6.00546C89.7619 6.00546 90.4421 6.29124 90.9171 6.81002C91.407 7.34232 91.6357 8.06385 91.5608 8.84202Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M109.95 4.85407V6.06349C109.298 5.18298 108.292 4.68286 107.153 4.68286C105.017 4.68286 103.406 6.31709 103.406 8.48426C103.406 10.6514 105.017 12.285 107.153 12.285C108.296 12.285 109.303 11.79 109.95 10.9185V11.1046C109.95 12.6101 108.993 13.5826 107.513 13.5826C106.513 13.5826 105.68 13.1494 105.284 12.424L105.264 12.3867H103.838L103.871 12.48C104.112 13.1892 104.583 13.8001 105.211 14.2179C105.841 14.6324 106.637 14.8512 107.513 14.8512C108.637 14.8512 109.594 14.4972 110.28 13.8285C110.967 13.1597 111.332 12.2194 111.332 11.1213V4.85407H109.95ZM109.175 10.3502C108.588 10.905 107.752 11.138 106.879 10.9887C106.361 10.8984 105.886 10.6475 105.523 10.2725C105.16 9.89751 104.927 9.41787 104.859 8.90328C104.736 8.03757 104.999 7.21756 105.581 6.655C106.069 6.19093 106.723 5.93643 107.401 5.94699C107.565 5.94713 107.729 5.96026 107.891 5.98625C108.946 6.15489 109.781 7.01609 109.921 8.0852C110.039 8.96507 109.766 9.78958 109.175 10.3502Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M101.89 2.12378C101.63 2.06766 101.358 2.11486 101.133 2.25518C100.908 2.39551 100.747 2.61769 100.687 2.87371C100.626 3.12973 100.67 3.39902 100.809 3.62339C100.947 3.84775 101.17 4.00917 101.428 4.07275C101.503 4.08936 101.58 4.09778 101.657 4.09786C101.906 4.09824 102.146 4.0083 102.331 3.84518C102.517 3.68206 102.636 3.45714 102.664 3.21327C102.693 2.9694 102.63 2.72361 102.487 2.5227C102.344 2.32179 102.132 2.17981 101.89 2.12378Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M100.967 10.934H99.7755C98.9285 10.934 98.4196 10.3644 98.4196 9.40982C98.4196 8.4791 98.8757 7.36945 99.8054 6.01778L99.8178 5.99976V5.61807L95.8571 5.06453C95.8585 4.90331 95.8162 4.74466 95.7346 4.60501C95.653 4.46536 95.5352 4.34979 95.3932 4.27027C95.0381 4.07718 94.6498 4.07717 94.3279 4.26383C94.1667 4.35799 94.035 4.4945 93.9476 4.65816C93.8602 4.82182 93.8205 5.00623 93.8328 5.19087C93.8452 5.37552 93.9092 5.55315 94.0176 5.70402C94.1261 5.85489 94.2748 5.97309 94.4472 6.04546L93.2151 12.258H94.5833L95.7196 6.35891L97.8593 6.7155C97.284 7.73439 96.9921 8.68442 96.9921 9.53919C96.9921 11.1168 97.9577 12.1498 99.5187 12.2496V12.258H102.346V4.87723H100.967V10.934Z",fill:"black",fillOpacity:"0.7"})]}),qm=()=>{const{border:e,cards:t,forceBrandedLogo:n,headers:r,index:i,marketingUrl:o,showSurveyBrand:a,slugName:s,surveyId:l,viewedCardCount:u}=X(b=>({border:b.border,cards:b.cards,forceBrandedLogo:b.forceBrandedLogo,headers:b.headers,index:b.index,marketingUrl:b.marketingUrl,showSurveyBrand:b.showSurveyBrand,slugName:b.slugName,surveyId:b.surveyId,viewedCardCount:b.viewedCardCount})),c=bt(null),d=t.filter(b=>b.type!==L.Uploading&&b.type!==L.Thanks),f=Qv(t,i),p=u+1,h=p/(p+f),v=`${o}?utm_source=survey_branding&utm_medium=website&utm_campaign=${s}&utm_content=${l}${n&&"&utm_term=poweredby_pill"}`;Re(()=>{c.current&&(c.current.style.width=`${h*100}%`)},[h]);const m=()=>y(Le,{children:[d.length>1&&y("div",{id:"ul-progress-bar-container",children:y("div",{id:"ul-progress-bar-current",ref:c,style:{border:`1px solid ${e||"#000"}`}})}),a?y("div",{className:n?"yellow-footer-logo":"",style:{marginTop:"4px"},children:y("a",{href:v,rel:"noreferrer",target:"_blank",children:y("div",{style:{display:"flex"},children:[y(dc,{logoOnly:!1}),n&&y(fc,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}):null]}),w=()=>y("a",{dir:"ltr",href:v,rel:"noreferrer",target:"_blank",children:y("div",{className:"thank-you-card-link",children:[y("div",{className:"sprig-box-logo",children:y(dc,{logoOnly:!0,style:{margin:"auto"}})}),y("div",{children:y("p",{children:["Capture insights about your own product",y(fc,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}),_=t[i].type===L.Thanks;return y("footer",{className:`ul-footer ${r["userleap-platform"]==="link"?"ul-footer__link":""}`,style:a?{}:{marginBottom:"10px"},children:_&&n?w():m()})},fc=({style:e})=>y("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[y("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),y("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),zm=()=>{const{answers:e,border:t,cards:n,close:r,configureExitOnOverlayClick:i,destroy:o,endCard:a,eventEmitFn:s,fontFamily:l,headers:u,index:c,next:d,showStripes:f,update:p,useMobileStyling:h,viewDocument:v}=X(A=>({answers:A.answers,border:A.border,cards:A.cards,close:A.close,configureExitOnOverlayClick:A.configureExitOnOverlayClick,destroy:A.destroy,endCard:A.endCard,eventEmitFn:A.eventEmitFn,fontFamily:A.fontFamily,headers:A.headers,index:A.index,next:A.next,showStripes:A.showStripes,update:A.update,useMobileStyling:A.useMobileStyling,viewDocument:A.viewDocument})),m=bt(null),w=bt(!1),_=u["userleap-platform"],{props:b,type:E,name:g}=n[c],x=n.length;Re(()=>{m.current&&(m.current.classList.contains("ul-app--visible")||m.current.classList.add("ul-app--visible"),!w.current&&s&&(w.current=!0,s(B.SurveyAppeared)))},[s]),Re(()=>{p()},[c,p]),Re(()=>{i(()=>r())},[r,i]);const I=()=>r(Zt),C=A=>{A.key==="Enter"&&I()},S=async function(A){d({data:A,completeSurvey:()=>{o(Zt)},endCard:a}),Rf(v)};if(e){for(const A of e)if(A.questionId===g){let k;if(E===L.MultipleChoice){const J=b.options.find(({value:ve})=>ve===A.value);if(!J)break;k={[J.id]:J.value}}else k=A.value;S({value:k,type:E,questionId:A.questionId});break}}const R=()=>[Rt.Email,Rt.Link].includes(u["userleap-platform"])?!1:!a||c+1!==x,D=()=>h?{borderColor:t}:{borderColor:t,margin:"15px"},T=()=>{const A={className:"ul-card",next:S,questionId:g,type:E};switch(E){case L.ConsentLegal:return ee(am,{...A,...b,key:g});case L.Likert:return ee(lm,{...A,...b,key:g});case L.MultipleChoice:return ee(um,{...A,...b,key:g});case L.MultipleSelect:return ee(cm,{...A,...b,key:g});case L.NPS:return ee(dm,{...A,key:g,props:b});case L.Open:return ee(fm,{...A,...b,key:g});case L.RecordedTask:return ee(xm,{...A,...b,key:g});case L.TextUrlPrompt:return ee(Im,{...A,...b,key:g});case L.Thanks:return ee(km,{...A,...b,key:g});case L.Uploading:return ee(Gm,{...A,...b,key:g});case L.VideoVoice:return ee($m,{...A,...b,key:g});default:return null}},P=A=>{var Ve;const k=window.sprigAPI,J=A.target;if(!k||!J)return;const ve=[J,J.parentElement];for(const me of ve)if(((Ve=me==null?void 0:me.tagName)==null?void 0:Ve.toLowerCase())==="a"){A.preventDefault(),k==null||k.openUrl(me.href);return}};return y("div",{className:G("ul-app",Xt(u)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:Zt,onClick:P,ref:m,style:{"--theme":t,...l?{fontFamily:l.replace(";","")}:{}},children:y("div",{className:"ul-app__container",children:y("div",{className:G(re(O.CardContainer,h)),style:D(),children:[R()&&y("div",{className:G(re(O.CloseContainer,h)),children:y("div",{"aria-label":"Close button",className:O.CloseButton,onClick:I,onKeyPress:C,role:"button",tabIndex:0,children:y("svg",{fill:"none",height:"18px",viewBox:"0 0 13 13",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:y("path",{d:"M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z",fill:"#262136"})})})}),f&&y("div",{className:"ul-header__container",dir:"ltr",children:y("div",{className:"ul-header",children:"For development purposes only"})}),y("div",{className:G(Uf(O.CardMainContent,_)),children:T()}),y(qm,{})]})})})},Wm=`html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;margin:auto}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.ul-card__container{background:#ffffff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;overflow:auto;padding:20px 20px 5px;position:relative;text-align:center;word-break:break-word}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;margin-bottom:3px;display:flex;gap:16px;justify-content:center}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email{flex-grow:55;display:flex}.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{margin-bottom:5px}.ul-question{color:#343442;display:block;font-size:20px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-caption{flex:1 0 auto;margin-top:8px;margin-bottom:15px;font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.select-checkbox{height:16px;width:16px;border-radius:3px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 3px 3px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.fade-in-transition{animation:fadeIn .4s ease-in;-webkit-animation:fadeIn .4s ease-in;-moz-animation:fadeIn .4s ease-in;-o-animation:fadeIn .4s ease-in;-ms-animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-ms-keyframes fadeIn{0%{opacity:0}to{opacity:1}}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{box-shadow:unset;border-radius:unset;border:none!important;position:unset}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:rgba(0,0,0,.01);box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:white}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-text{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:rgba(0,0,0,.01);box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:white}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}#ul-card-voice__video{align-items:center;display:flex;flex-direction:column}#ul-card-voice__video>div{margin-bottom:10px;width:100%}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#ffffff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:30px;justify-content:center}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;left:0;position:absolute;top:0;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:auto;flex-grow:1;width:100%}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:rgba(0,0,0,.01);border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:rgba(0,0,0,.03)}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:rgba(249,198,0,1);border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%}.close-btn{cursor:pointer;height:18px;margin-inline-end:-10px;position:relative;top:-10px;width:18px;z-index:1}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}#ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px;max-width:250px;margin:25px 0}#ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{width:100%;background:rgba(0,0,0,.01);border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:1;margin:0;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer} -`,Ym=(e,t)=>{const n=[...e],r=new Set([L.VideoVoice,L.RecordedTask]);return e.some(i=>r.has(i.type))&&n.push({name:-2,props:{routingOptions:[]},type:L.Uploading}),t&&n.push({name:-1,props:{routingOptions:[]},type:L.Thanks}),n},Qm=({mode:e=null,viewWindow:t,viewDocument:n})=>{const r=n.documentElement;return{mode:e,sw:t.screen.width,sh:t.screen.height,cw:r.clientWidth,ch:r.clientHeight,p:t.location.href,l:t.navigator.language}};function Zm(e,t=!0){var g;const{answers:n,apiURL:r,customStyles:i,endCard:o,eventEmitFn:a,fontFamilyURL:s,frame:l,previewKey:u,viewDocument:c,viewWindow:d}=e,f=Xt(e.headers)?e.frame:c.body,p=e.UpChunk||window.UpChunk,h=H,v=Ym(e.cards,!!o);$r.configure(h,{cards:v,hasEndCard:!!o,apiURL:r,UpChunk:p}),X.setState({apiURL:r,answers:n,border:e.border,index:e.startingQuestionIdx||0,cards:v,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:a,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:l,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:Qm({mode:e.mode,viewWindow:d,viewDocument:c}),mode:e.mode,previewKey:u,recorder:$r,recorderEventEmitter:h,responseGroupUid:e.responseGroupUid,showStripes:e.showStripes,showSurveyBrand:e.showSurveyBrand,slugName:e.slugName,styleNonce:e.styleNonce,surveyId:e.surveyId,tabTitle:e.tabTitle,uploadingCardViewed:!1,uploadProgress:{},useMobileStyling:e.useMobileStyling,useDesktopPrototype:e.useDesktopPrototype,userId:e.userId,viewDocument:e.viewDocument,visitorAttributes:e.visitorAttributes,viewedCardCount:e.startingQuestionIdx||0});const{seen:m}=X.getState();m();const{head:w}=c,_=c.createElement("style");if(_.id="sprig-style",_.textContent=Wm,_.nonce=e.styleNonce,w.appendChild(_),e.fontFamily&&s&&parent){const x=c.createElement("link");x.rel="stylesheet",x.href=s,w.appendChild(x)}if(e.customStyles&&za(c,i,e.styleNonce),!p)if(e.installationMethod!==ft.Npm){const x=c.createElement("script");x.src="https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js",x.onload=()=>{$r.setUpChunk(d.UpChunk)},x.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},w.appendChild(x)}else console.warn("[Sprig] - recording functionality not configured due to missing UpChunk dependency");const b="2.24.12-beta.0",E=a||((g=l.eventEmitter)==null?void 0:g.emit);E==null||E(Se.VerifyViewVersion,{[Lt.ViewVersion]:b}),f&&t&&pn(y(zm,{}),f)}const Xm={configure:Zm};window.UserLeap&&window.Sprig&&(window.Sprig._gtm?window.Sprig=window.UserLeap:window.UserLeap=window.Sprig),window.UserLeap||(window.UserLeap=window.Sprig),window.Sprig||(window.Sprig=window.UserLeap);const Jm="rgba(255,255,255, 0.95)",eg="rgba(0,0,0,0.9)",tg="360px",ea="0px",pc=()=>{window.UserLeap.container=document.createElement("div"),window.UserLeap.container.className="ul-container",document.body.appendChild(window.UserLeap.container)},hc=e=>{ag();const t=window.UserLeap.container;if(!(!t||!t.parentNode))try{t.parentNode.removeChild(t),window.UserLeap.container=null,xe("trackStartUrl",null),H.emit(B.SurveyLifeCycle,{state:"dismissed"}),H.emit(B.SurveyClosed,{name:B.SurveyClosed,initiator:e})}catch(n){console.warn(`[Sprig] (ERR-412) Error removing UserLeap container by ${e} `+t),n instanceof Error&&window.UserLeap.reportError("dismissActiveSurvey",n)}},vc=()=>{H.on(B.SurveyWillClose,({initiator:e})=>{hc(e)})},ng=(e,t)=>{const r={...{position:"fixed",overflow:"auto",top:"0px",left:"0px",display:"none",height:"100%",width:"100%",transition:"background-color 0.3s ease-out",zIndex:2147483646}},i=t?e.overlayStyleMobile:e.overlayStyle;r["background-color"]=i==="light"?Jm:eg,t||(r.margin="auto"),window.UserLeap.container&&Object.assign(window.UserLeap.container.style,r)},rg=(e,t,n)=>{var s,l;const r={position:"fixed",bottom:"0px",right:ea,border:0,backgroundColor:"rgba(0,0,0,0)",zIndex:2147483646},i=Object.assign({},t,window.UserLeap);let o,a=!1;return n?((s=window.UserLeap.windowDimensions)!=null&&s.width?r.width=`${window.UserLeap.windowDimensions.width}px`:r.width="100%",(l=window.UserLeap.windowDimensions)!=null&&l.height?r.maxHeight=`${window.UserLeap.windowDimensions.height-20}px`:window.UserLeap.maxHeight?r.maxHeight=window.UserLeap.maxHeight:r.maxHeight=`${document.body.clientHeight-20}px`,["light","dark"].includes(i.overlayStyleMobile)&&(a=!0)):(r.width=tg,r.maxHeight=window.UserLeap.maxHeight||"66vh",i.framePosition===En.BottomLeft?o={left:ea}:i.framePosition===En.TopLeft?o={left:ea,top:"0px"}:i.framePosition===En.TopRight?o={top:"0px"}:i.framePosition===En.Center&&(a=!0,o={margin:"auto",position:"static"},r.maxHeight=null)),a&&ng(i,n),Object.assign(e.style,r,o),a},ig=(e,t)=>{var s,l;const n="ul-frame";pc(),og();const r=document.createElement("iframe");r.id=n,r.setAttribute("title","Sprig User Feedback Dialog");const i=rg(r,e,t);vc(),r.setHeight=u=>{parseInt(r.style.height)!=u&&(r.style.height=`${u}px`,H.emit(B.SurveyHeight,{name:B.SurveyHeight,contentFrameHeight:u}))},(s=window.UserLeap.container)==null||s.appendChild(r),e&&(t?e.exitOnOverlayClickMobile:e.exitOnOverlayClick)&&window.UserLeap.container&&(window.UserLeap.container.onclick=()=>{H.emit(B.CloseSurveyOnOverlayClick)}),H.emit(B.SurveyLifeCycle,{state:"presented"}),H.emit(B.SurveyPresented,{name:B.SurveyPresented});const o=(l=r.contentWindow)==null?void 0:l.document;o&&(o.open("text/html","replace"),o.write(""),o.close());const a=o==null?void 0:o.head;return{frameId:n,contentWinDocHead:a,contentWindow:r.contentWindow,hasOverlay:i,iframe:r}},mc={[B.SurveyFadingOut]:()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{"background-color":"rgba(0,0,0,0)"})}},og=()=>{Object.entries(mc).forEach(([e,t])=>{H.on(e,t)})},ag=()=>{Object.entries(mc).forEach(([e,t])=>{H.off(e,t)})},sg="!launch_darkly_";class lg{constructor(){se(this,"_ldData",{})}getAllLaunchDarklyVariations(){return this._ldData}setLDFlagsVariations(t){try{return!t||typeof t!="object"||Array.isArray(t)?!1:(Object.keys(this._ldData).forEach(n=>{delete this._ldData[n]}),Object.keys(t).forEach(n=>{var r;return this._ldData[`${sg}${n}`]=((r=t[n])!=null?r:0)+1}),!0)}catch(n){return n instanceof Error&&window.UserLeap.reportError("setAllLDFlagsVariations",n),console.warn("[Sprig] An issue had occured when setting LaunchDarkly flags and variations."),!1}}}const ta=new lg;Object.freeze(ta);const ug="!optimizely_experiments_";class cg{constructor(){se(this,"_optimizelyData",{})}setOptimizelyExperiment(t,n=!0){if(!t||typeof t!="object")return!1;const{experiments:r}=t;try{return n&&Object.keys(this._optimizelyData).map(i=>{delete this._optimizelyData[i]}),r&&r.map(i=>{const{id:o,variation:a}=i,s=this.transformExperimentId(o);a&&typeof a=="string"&&(this._optimizelyData[s]=a)}),!0}catch(i){return i instanceof Error&&window.UserLeap.reportError("setOptimizelyExperiment",i),!1}}getAllOptimizelyExperiments(){return this._optimizelyData}getOptimizelyVariationName(t){return this._optimizelyData[this.transformExperimentId(t)]}transformExperimentId(t){return ug+t}getAndSetWebOptimizelyExperiments(){var t;try{if(window&&window.optimizely&&typeof window.optimizely.get=="function"){const n=(t=window.optimizely.get("state"))==null?void 0:t.getExperimentStates({isActive:!0});if(n){const r=Object.keys(n).map(i=>{var o,a;return(o=n[i].variation)!=null&&o.name?{id:i,variation:(a=n[i].variation)==null?void 0:a.name}:{id:i,variation:"Original"}});return this.setOptimizelyExperiment({experiments:r},!1),!0}return!1}return!1}catch(n){return n instanceof Error&&window.UserLeap.reportError("getAndSetWebOptimizely",n),!1}}}const Zr=new cg;Object.freeze(Zr);class dg{constructor(t,n){se(this,"paused");se(this,"queue");se(this,"ul");this.ul=t,this.paused=!1,this.queue=[],this.flush(n)}flush(t){const n=t.length;if(n)for(let r=0;r{};const r=new Promise(function(i){n=function(){i(t())}});return this.queue.push(n),r}else return t()}empty(){this.queue.length=0}}var Me=(e=>(e.Ready="ready",e.NoSurvey="no survey",e))(Me||{}),gc=(e=>(e.Preview="sprigPreviewKey",e))(gc||{});const fg=["popState","pushState","replaceState"],pg={test:"test"},Wn="!email",hg=["ios","android"],$t="environments",na="pageUrl",Gt="visitors",yc="ul-view-sdk-script",_c=Object.freeze({contains:(e,t)=>t.includes(e),notContains:(e,t)=>!t.includes(e),exactly:(e,t)=>t===e,notExactly:(e,t)=>t!==e,startsWith:(e,t)=>t.startsWith(e),endsWith:(e,t)=>t.endsWith(e),regex:(e,t)=>new RegExp(e).test(t),legacy:(e,t)=>new RegExp(e,"i").test(t)});function ra(e,t){const{matchType:n,pattern:r}=e,i=n?_c[n]:_c.legacy;let o=!1;try{o=i(r,t)}catch(a){const s=`[Sprig] (ERR-445) Failed to check url match with pattern ${r}`;a instanceof Error&&(console.warn(s,a),a.stack=JSON.stringify(e),window.UserLeap.reportError(s,a))}return o}function vg(e,t){const{pageUrlEvents:n,interactiveEvents:r,dismissOnPageChange:i}=window.UserLeap._config;if(!i)return!0;const o=[];n&&n.length&&o.push(...n),r&&r.length&&o.push(...r);const a=e&&o.find(s=>s.id===e);return a?ra(a,window.location.href):t===window.location.href}function Yn(e){const{pageUrlEvents:t,interactiveEvents:n,dismissOnPageChange:r,platform:i}=window.UserLeap._config;if(i&&i!==Rt.Web)return;const o=qt("trackStartUrl"),a=o?String(o):null;t&&xc(window.location.href),n&&(bc(),mg()),r&&a&&a!==window.location.href&&e&&fg.includes(e.type)&&window.UserLeap("dismissActiveSurvey",Qe.PageChange)}const wc={capture:!0},mg=()=>{const t=window.UserLeap._config.interactiveEvents.filter(r=>ra(r,window.location.href)).map(r=>{const{name:i,properties:o}=r,{selector:a,innerText:s}=o;return a?l=>{if(qa(l.target))try{l.target.closest(a)&&window.UserLeap("track",i)}catch{}return!1}:l=>(qa(l.target)&&l.target.innerText===s&&window.UserLeap("track",i),!1)}),n=r=>t.forEach(i=>i(r));window.UserLeap._config.interactiveEventsHandler=n,window.addEventListener("click",n,wc)},bc=()=>{window.UserLeap._config.interactiveEventsHandler&&window.removeEventListener("click",window.UserLeap._config.interactiveEventsHandler,wc),delete window.UserLeap._config.interactiveEventsHandler};function gg(){["hashchange","popstate"].forEach(e=>window.addEventListener(e,Yn,!0))}function yg(){["hashchange","popstate"].forEach(e=>window.removeEventListener(e,Yn,!0)),window.UserLeap._config.interactiveEvents&&bc()}function ct(e,t,n){const r=[window.UserLeap._API_URL,"sdk",e];return t&&t.forEach(i=>{r.push(i),i===$t?r.push(window.UserLeap.envId):i===Gt&&r.push(ia())}),n&&r.push(n),r.join("/")}function _g(e,t){let n=ct("1",[$t],"questions?");return e!=null&&(n+=`&vid=${e}`),t&&(t.surveyId&&(n+=`&surveyid=${t.surveyId}`),t.surveyTemplateId&&(n+=`&surveytemplateid=${t.surveyTemplateId}`),t.previewLanguage&&(n+=`&previewLanguage=${encodeURIComponent(t.previewLanguage)}`)),n}function qt(e){const t=_e.getItem(ye.Credentials);if(t)try{const r=JSON.parse(t)[window.UserLeap.envId];return r&&r[e]||null}catch(n){n instanceof Error&&(n.stack=t,window.UserLeap.reportError("Failed to parse local storage credentials",n)),console.warn("[Sprig] (ERR-427) Failed to lookup saved ids",n)}return null}function xe(e,t){const n=_e.getItem(ye.Credentials);let r={};if(n)try{r=JSON.parse(n)}catch(o){o instanceof Error&&(o.stack=n,window.UserLeap.reportError("Failed to parse local storage credentials",o)),console.warn("[Sprig] (ERR-427) Failed to lookup saved ids",o)}let i=r[window.UserLeap.envId];i?i[e]=t:i={[e]:t},r[window.UserLeap.envId]=i;try{_e.setItem(ye.Credentials,JSON.stringify(r))}catch(o){o instanceof Error&&console.warn(`[Sprig] (ERR-426) Unable to write to Local Storage:: ${o.message}`)}}function Ec(){window.previewMode||(window.UserLeap.visitorId=Ye(),xe("vid",window.UserLeap.visitorId),H.emit(B.VisitorIDUpdated,{visitorId:window.UserLeap.visitorId}))}function ia(){return window.previewMode?"0":window.UserLeap.visitorId||""}function xc(e,t,n){if(e.endsWith("mock_snippet.html"))return;const r=window.UserLeap._config.pageUrlEvents;let i=!1;if(r&&r.length)for(let c=0;c0){const c=s[s.length-1],d=(Date.now()-c.viewedAt)/1e3;c.location!=e&&d>a&&ul({url:e}),(c.location!=e&&d>a||d>o)&&(window.UserLeap._queue.push(["track",na,t,{url:e},n]),s.push(l))}else window.UserLeap._queue.push(["track",na,t,{url:e},n]),s.push(l),ul({url:e});s.length>5&&s.splice(0,s.length-5);try{_e.setItem(ye.PageViews,JSON.stringify(s))}catch(c){c instanceof Error&&console.warn(`[Sprig] Unable to write to Local Storage: ${c.message}`)}}catch(c){c instanceof Error&&window.UserLeap.reportError("trackPageView",c,{pageViewsStorage:u}),console.warn("[Sprig] (ERR-425) Failed to update page views in local storage")}}function wg(){const e="Backbone"in window&&window.Backbone&&window.Backbone.history?window.Backbone.history:window.history;"pushState"in e&&(e.pushState=(t=>function(...r){const i=t.apply(this,r),o=new Event("pushState");return window.dispatchEvent(o),Yn(o),i})(e.pushState)),"replaceState"in e&&(e.replaceState=(t=>function(...r){const i=t.apply(this,r),o=new Event("replaceState");return window.dispatchEvent(o),Yn(o),i})(e.replaceState)),gg()}async function oa(e,t){const n=ia();e&&!t&&(window.UserLeap._config.mode=pg.test);const r=await St(_g(n,{...e,previewLanguage:window.UserLeap._config.previewLanguage}),{},0,!0);return r.ok?(r.json.delay&&await sr(r.json.delay),Cc(r.json)):(r.reportError&&r.error&&(console.warn("[Sprig] (ERR-414) Failed to request questions from the server",r.error),window.UserLeap.reportError("getQuestions",r.error)),{success:!1,surveyState:Me.NoSurvey})}const Cc=async e=>{var T,P,A;const{context:t,forceBrandedLogo:n,endCard:r,locale:i,productConfig:o,questions:a,responseGroupUid:s,surveyId:l,uuid:u,vid:c,sessionReplay:d}=e,f=Jt(window.UserLeap),p=aa(f),h=bg(f);if(d)if(p){const k={mediaRecordingUid:Ye(),mediaType:Ie.Screen,questionId:1,responseGroupUid:s,surveyId:l,updatedAt:new Date().toISOString(),visitorId:window.UserLeap.visitorId,isReplay:!0};H.emit(B.ReplayCapture,{responseGroupUid:s,hasQuestions:!!(a!=null&&a.length),surveyId:l,uploadId:d.uploadId,replayType:(T=d.replayDurationType)!=null?T:Vt.Before,seconds:d.replayDurationSeconds,generateVideoUploadUrlPayload:k})}else sl({responseGroupId:s,surveyId:l,visitorId:c,replayParams:d,completeUploadHeaders:f,apiUrl:window.UserLeap._API_URL,triggerTimestamp:Date.now(),isStandalone:a.length===0});if(c==null||!a||!a.length)return{success:!1,message:"[Sprig] no survey found",surveyState:Me.NoSurvey};if(window.UserLeap.container){const k="[Sprig] (ERR-409) Found an existing Survey container, aborting rendering of this survey";return console.warn(k),{success:!1,message:k,surveyState:Me.NoSurvey}}if(c!==window.UserLeap.visitorId&&u!==window.UserLeap.visitorId&&!window.previewMode){const k="Attempted to display survey to a different visitor";return window.UserLeap.reportError("DisplaySurvey",new Error(k)),{success:!1,message:k,surveyState:Me.NoSurvey}}Xh({id:l}),xi.disable(),H.emit(B.SurveyWillPresent,{name:B.SurveyWillPresent,[Ha.SurveyId]:l});let v,m=document.createElement("div"),w,_,b;const E=k=>{const{[Lt.ViewVersion]:J}=k;J!==f["x-ul-sdk-version"]&&hc(),H.removeListener(Se.VerifyViewVersion,E)};H.on(Se.VerifyViewVersion,E),Xt(f)?(v="ul-direct-embeded-frame",w=document.head,_=window,b=!1,p&&(pc(),m.id=v,window.UserLeap.container.appendChild(m),vc(),H.emit(B.SurveyLifeCycle,{state:"presented"}),H.emit(B.SurveyPresented,{name:B.SurveyPresented}))):{frameId:v,contentWinDocHead:w,contentWindow:_,hasOverlay:b,iframe:m}=ig(o,h),window.UserLeap.frameId=v,window.UserLeap.useMobileStyling=h;const g=k=>{H.on(B.CloseSurveyOnOverlayClick,k)},x=Object.assign({frame:m,envId:window.UserLeap.envId,surveyId:l,userId:u,visitorAttributes:{externalUserId:window.UserLeap.userId,email:window.UserLeap.email},cards:a,context:t,locale:i,fontFamily:window.UserLeap.fontFamily,fontFamilyURL:window.UserLeap.fontFamilyURL,apiURL:window.UserLeap._API_URL,responseGroupUid:s,headers:f,endCard:r,useMobileStyling:h,mobileSDKVersion:window.UserLeap.mobileSDKVersion,configureExitOnOverlayClick:g,eventEmitFn:H.emit.bind(H),ulEvents:Ka,viewDocument:_==null?void 0:_.document,viewWindow:_,tabTitle:document.title,startingQuestionIdx:(P=window.UserLeap.config)==null?void 0:P.startingQuestionIdx,styleNonce:window.UserLeap.styleNonce,previewKey:_e.getItem(ye.Preview),forceBrandedLogo:n},window.UserLeap._config);(A=window.UserLeap.config)!=null&&A.startingQuestionIdx&&(window.UserLeap.config={...window.UserLeap.config,startingQuestionIdx:null}),window.UserLeap.customStyles&&(x.customStyles=window.UserLeap.customStyles),_&&(_.__cfg=x);function I(){const k=document.createElement("script");return window.UserLeap.nonce&&k.setAttribute("nonce",window.UserLeap.nonce),k.id=yc,k}const C=window.UserLeap.viewSDKURL?window.UserLeap.viewSDKURL:x.path,S=document.getElementById(yc);S&&S.remove();const R=I(),D=()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{display:"flex"})};return x.installationMethod===ft.Npm||x.installationMethod===ft.NpmBundled?(Xm.configure(x),b&&window.UserLeap.container&&D()):C&&(R.src=C,b&&R.addEventListener("load",()=>{window.UserLeap.container&&D()}),_==null||_.addEventListener("error",k=>{k.target instanceof HTMLScriptElement&&k.target.src===C&&window.UserLeap.reportError("loadFrameScript",new Error("Frame script failed to load"))},{capture:!0,once:!0})),w==null||w.appendChild(R),{success:!0,surveyState:Me.Ready,surveyId:l,responseGroupUid:s}};function bg(e){if(window.UserLeap.useMobileStyling!==void 0)return window.UserLeap.useMobileStyling;const t=window.UserLeap.windowDimensions&&window.UserLeap.windowDimensions.width||document.body.clientWidth;return aa(e)||t>10&&t{var v,m,w,_,b;const{userId:i,anonymousId:o,metadata:a={},properties:s,showSurveyCallback:l}=r;let{eventName:u}=r;if(window.UserLeap.debugMode&&u!==na&&console.info("[DEBUG] Sprig track",r),e.mode==="test")return;const c=(v=_e.getItem(ye.Preview))!=null?v:void 0;if(e.requireUserIdForTracking&&!window.UserLeap.userId&&!i){const E="[Sprig] - Skipping tracking without userId";return console.warn(E),{success:!1,message:E,surveyState:Me.NoSurvey}}if(!u||u.trim().length===0){u=u?String(u):"";const E="[Sprig] - Invalid event name "+u;return console.warn(E),{success:!1,message:E,surveyState:Me.NoSurvey}}const d=window.location.href;if(a.url||(a.url=d),xe("trackStartUrl",d),(w=(m=window.UserLeap)==null?void 0:m._config)!=null&&w.optimizelyEnabled){const E=Jt(window.UserLeap);aa(E)||Zr.getAndSetWebOptimizelyExperiments(),a.optimizelyExperiments=Object.assign({},Zr.getAllOptimizelyExperiments())}(b=(_=window.UserLeap)==null?void 0:_._config)!=null&&b.launchDarklyEnabled&&(a.launchDarklyFlags=ta.getAllLaunchDarklyVariations()),i&&(window.UserLeap.userId=i),o&&(window.UserLeap.partnerAnonymousId=o),s&&(a.eventProperties=s),Zh({name:u});const f=window.UserLeap.delayingSurvey?await St(ct("1",[Gt],"events/batch"),{body:JSON.stringify({events:[{event:u,metadata:a}],previewKey:c}),method:"POST"},0,!0):await St(ct("1",[Gt],"events"),{body:JSON.stringify({event:u,metadata:a,previewKey:c}),method:"POST"},0,!0);if(!f.ok){const E="[Sprig] (ERR-421) Failed to track event";return f.reportError&&(console.warn(E,f.error),f.error&&window.UserLeap.reportError("track",f.error)),{success:!1,message:E,error:f.error,surveyState:Me.NoSurvey}}i&&xe("uid",i),o&&xe("aid",o);const p=f.json;return p.invalidPreviewKey&&_e.removeItem(ye.Preview),await Cg(f,l)?vg(p.eventId,d)?Cc(p):{success:!1,message:"Study should not be displayed after page navigation",surveyState:Me.NoSurvey}:{success:!1,message:"[Sprig] Callback returned false, aborting rendering of survey",surveyState:Me.NoSurvey}},n={async displaySurvey(r){return console.warn("[Sprig] displaySurvey should only be used to debug your studies; not intended for production usage."),window.UserLeap("dismissActiveSurvey",Qe.Override),oa({surveyId:r},!0)},_previewSurvey(r){window.UserLeap("dismissActiveSurvey",Qe.Override),oa({surveyTemplateId:r},!1)},_reviewSurvey(r){window.UserLeap("dismissActiveSurvey",Qe.Override),oa({surveyId:r},!1)},previewSurvey(r){n._previewSurvey(r)},reviewSurvey(r){n._reviewSurvey(r)},mute(){window.UserLeap._queue.pause()},unmute(){window.UserLeap._queue.unpause()},setVisitorToken(){console.warn("[Sprig] setVisitorToken is deprecated.")},dismissActiveSurvey(r=Qe.API){H.emit(B.SurveyWillClose,{name:B.SurveyWillClose,initiator:r})},async setAttribute(r,i){if(!r||!i&&i!==0){const o="[Sprig] - Disregarding empty attribute / value provided";return console.warn(o),{success:!1,message:o}}return this.setAttributes({[r]:i})},async setAttributes(r){if(r==null||Object.keys(r).length===0){const i="[Sprig] - Disregarding empty attributes provided";return console.warn(i),{success:!1,message:i}}return this.identifyAndSetAttributes({attributes:r})},async identifyAndSetAttributes(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig identifyAndSetAttributes",r),e.mode==="test")return;if(r===null||typeof r!="object"||!(r.userId||r.anonymousId||r.attributes)){const u="[Sprig] - Disregarding empty payload provided";return console.warn(u),{success:!1,message:u}}const{userId:i,anonymousId:o,attributes:a}=r;if(e.requireUserIdForTracking&&!window.UserLeap.userId&&!i){const u="[Sprig] - Skipping tracking without userId";return console.warn(u),{success:!1,message:u}}if(!a&&(!i||window.UserLeap.userId===i)&&(!o||window.UserLeap.partnerAnonymousId===o))return{success:!0};const s={};i&&(s.userId=window.UserLeap.userId=i),o&&(s.partnerAnonymousId=window.UserLeap.partnerAnonymousId=o);let l;return a?(a.email&&!Object.prototype.hasOwnProperty.call(a,Wn)&&(a[Wn]=a.email,delete a.email),l=await St(ct("1",[$t,Gt],"attributes"),{body:JSON.stringify(a),method:"PUT"}),!l.ok&&l.reportError&&(console.warn("[Sprig] (ERR-432) identifyAndSetAttributes failed",l.error),l.error&&window.UserLeap.reportError("identifyAndSetAttributes",l.error))):l=await St(ct("1",[$t,Gt]),{body:JSON.stringify(s),method:"PUT"}),a&&a[Wn]&&(window.UserLeap.email=a[Wn]),l.ok&&(i&&xe("uid",i),o&&xe("aid",o)),{success:!!l.ok}},async removeAttributes(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig removeAttributes",r),e.mode==="test")return;if(r==null||r.length===0){const o="[Sprig] - Disregarding empty attributes provided";return console.warn(o),{success:!1,message:o}}if(e.requireUserIdForTracking&&!window.UserLeap.userId){const o="[Sprig] - Skipping tracking without userId";return console.warn(o),{success:!1,message:o}}const i=await St(ct("1",[$t,Gt],"attributes"),{body:JSON.stringify({delete:r}),method:"DELETE"});return!i.ok&&i.reportError&&(console.warn("[Sprig] (ERR-433) Remove attributes failed",i.error),i.error&&window.UserLeap.reportError("removeAttributes",i.error)),{success:!!i.ok}},async addSurveyListener(r){H.on(B.SurveyLifeCycle,r)},async removeSurveyListener(r){H.removeListener(B.SurveyLifeCycle,r)},async addListener(r,i){H.on(r,i)},async removeListener(r,i){H.removeListener(r,i)},async removeAllListeners(){H.removeAllListeners()},setPreviewKey(r){!r||typeof r!="string"||_e.isStorageAvailable&&r&&_e.setItem(ye.Preview,r)},async setUserId(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig setUserId",r),r==null){const a=`[Sprig] - Invalid userId ${r}`;return console.warn(a),{success:!1,message:a}}if(e.mode==="test"||r===window.UserLeap.userId)return;window.UserLeap.userId=r;const i=window.UserLeap.visitorId,o=await St(ct("1",[$t,Gt]),{body:JSON.stringify({userId:r}),method:"PUT"});if(!o.ok){o.reportError&&(console.warn("[Sprig] (ERR-420) Failed to set user id",o.error),o.error&&window.UserLeap.reportError("setUserId",o.error));return}i!==window.UserLeap.visitorId&&ll(),xe("uid",r)},async setPartnerAnonymousId(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig setPartnerAnonymousId",r),r==null){const i=`[Sprig] - Invalid partnerAnonymousId ${r}`;return console.warn(i),{success:!1,message:i}}return window.UserLeap.partnerAnonymousId=r,xe("aid",r),{success:!0}},async track(r,i,o={},a=void 0){return t({eventName:r,properties:i,metadata:o,showSurveyCallback:a})},async identifyAndTrack(r){return await t(r)},trackPageView(r,i=void 0,o=void 0){xc(r,i,o)},applyStyles(r){if(window.UserLeap.customStyles=r,window.UserLeap.container){const i=window.UserLeap.container.children[0].contentDocument;if(i){const o=i.getElementById(O.CustomStyle);o?o.textContent=r:za(i,r,window.UserLeap.styleNonce)}}},setWindowDimensions(r,i){var l,u;const o=typeof r=="string"?parseInt(r,10):r,a=typeof i=="string"?parseInt(i,10):i;if(!isNaN(o)&&!isNaN(a)&&(window.UserLeap.windowDimensions={width:o,height:a}),!window.UserLeap.frameId)return;const s=document.getElementById(window.UserLeap.frameId);!s||(window.UserLeap.useMobileStyling&&((l=window.UserLeap.windowDimensions)!=null&&l.width&&(s.style.width=`${window.UserLeap.windowDimensions.width}px`),(u=window.UserLeap.windowDimensions)!=null&&u.height&&(s.style.maxHeight=`${window.UserLeap.windowDimensions.height-20}px`),s.contentDocument&&(s.style.height=String(Wa(s.contentDocument))+"px")),H.emit(B.SurveyDimensions,{name:B.SurveyDimensions,contentFrameWidth:s.clientWidth,contentFrameHeight:s.clientHeight}))},logoutUser(){window.UserLeap.debugMode&&console.info("[DEBUG] Sprig logout"),window.UserLeap.visitorId=null,window.UserLeap.userId=null,window.UserLeap.partnerAnonymousId=null,window.UserLeap.token=null,window.UserLeap.email=null,_e.removeItem(ye.Credentials),_e.removeItem(ye.PageViews),window.UserLeap._queue.isPaused()&&window.UserLeap._queue.empty(),Ec(),ll(),window.UserLeap._queue.unpause()},teardown(){yg(),window.UserLeap("dismissActiveSurvey",Qe.API),delete window.UserLeap,delete window.Sprig,delete window._Sprig},integrateOptimizely(r,i=!0){var o,a;if(!((a=(o=window.UserLeap)==null?void 0:o._config)!=null&&a.optimizelyEnabled)){console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");return}try{const s=typeof r=="string"?JSON.parse(r):r;Zr.setOptimizelyExperiment(s,i)}catch(s){console.warn("[Sprig] Error with integrating Optimizely data"),s instanceof Error&&window.UserLeap.reportError("integrateOptimizely",s)}},integrateOptimizelyClient(r){var o,a;if(!((a=(o=window.UserLeap)==null?void 0:o._config)!=null&&a.optimizelyEnabled)){console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");return}const i=({experiment:s,variation:l})=>{const u={experiments:[{id:s.id,variation:l.key}]};window.UserLeap("integrateOptimizely",u,!1)};r.notificationCenter.addNotificationListener(Ef.NOTIFICATION_TYPES.ACTIVATE,i)},importLaunchDarklyData(r){var i,o;if(!((o=(i=window.UserLeap)==null?void 0:i._config)!=null&&o.launchDarklyEnabled)){console.warn("[SPRIG] LaunchDarkly integration is currently not enabled for your product.");return}ta.setLDFlagsVariations(r)},setVisitorAttribute(r,i){return console.warn("[Sprig] setVisitorAttribute is deprecated. Please use setAttribute"),n.setAttribute(r,i)},async setEmail(r){return n.setAttribute(Wn,r)},async setVisitorEmail(r){return console.warn("[Sprig] setVisitorEmail is deprecated. Please use setEmail"),n.setEmail(r)},async _generateVideoUploadUrl(r){return Tg(r)},async _completeSessionReplay({surveyId:r,responseGroupUuid:i,eventDigest:o}){if(!r||!i)return;const a=window.UserLeap._API_URL;try{await is({surveyId:r,responseGroupUuid:i,eventDigest:o,apiUrl:a,headers:Jt(window.UserLeap)},!0)}catch(s){console.warn("[Sprig] Error with completing session replay"),s instanceof Error&&window.UserLeap.reportError("completeSessionReplay",s)}}};Object.assign(window.UserLeap,n)};async function Ig(e){const t=Jt(window.UserLeap);document.addEventListener("securitypolicyviolation",Ci);const n=await Ze(ct("1",[$t],"config"),{headers:t}),r="TypeError";if(window.UserLeap.error=n.error,!n.ok&&n.error&&n.error.name===r?(window.UserLeap._API_URL="https://api.sprig.com",window.UserLeap.reportError("sprigDomainRequest",n.error)):document.removeEventListener("securitypolicyviolation",Ci),!n.ok)return n.reportError&&(console.warn("[Sprig] (ERR-422) Failed to load configuration",n.error),n.error&&window.UserLeap.reportError("applyRemoteConfig",n.error)),Si("Disabled: failed to fetch configuration"),e;const i=n.json;return i!=null&&i.disabled?(Si(`Disabled: ${i.disabled}`),{disabled:i.disabled}):Object.assign({},i,e)}async function kg(e,t,n={}){const r=window.__cfg&&window.__cfg.mode,i=ia(),o=window.UserLeap.envId,a=window.document.documentElement,s={mode:r,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:a.clientWidth,clientHeight:a.clientHeight,location:window.location.href,language:window.navigator.language,...n},l={action:e,err:{message:t.message,stack:t.stack},meta:s,vid:i,envId:o};(await St(ct("1",null,"errors"),{method:"POST",headers:{[Fe.Error]:window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(l)},0,!0)).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",t)}async function Tg(e){var n;if(!e)return;const t=`${window.UserLeap._API_URL}/2/environments/integrations/upload`;try{const r=await fetch(t,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(r.ok){const i=await r.json();return(n=i==null?void 0:i.upload)==null?void 0:n.url}else return null}catch(r){console.warn("[Sprig] Error with generating video upload url"),r instanceof Error&&window.UserLeap.reportError("generateVideoUploadUrl",r)}}function Lg(e={}){var r;const t=(r=new URLSearchParams(window.location.search).get(gc.Preview))!=null?r:"";window.UserLeap.UPDATES=Ka,window.UserLeap("setPreviewKey",t);async function n(){if(window.UserLeap.loaded)return;if(window.UserLeap.reportError=kg,window.UserLeap.loaded=!0,window.UserLeap._config=Object.assign({},e,window.UserLeap.config),window.UserLeap.delayingSurvey=!1,window.UserLeap._config&&typeof window.UserLeap._config=="object")for(const l in window.UserLeap._config)window.UserLeap[l]=window.UserLeap._config[l];if(!window.UserLeap.envId)if(window.UserLeap.appId)window.UserLeap.envId=window.UserLeap.appId;else throw new Error("Missing Environment id");window.UserLeap.debugMode&&console.info("[DEBUG] Sprig debug mode enabled");const i=window.UserLeap.sampleRate;if(i){let l=qt("sampled");if(l===null&&(l=Math.random()` +`+r).join("")):""}var Zr=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],En=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Zr),zs={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function et(e,t){this._e=De(),this.name=e,this.message=t}function ei(e,t){return e+". Errors: "+Object.keys(t).map(n=>t[n].toString()).filter((n,r,i)=>i.indexOf(n)===r).join(` +`)}function Ft(e,t,n,r){this._e=De(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=ei(e,t)}function pt(e,t){this._e=De(),this.name="BulkError",this.failures=Object.keys(t).map(n=>t[n]),this.failuresByPos=t,this.message=ei(e,t)}Xe(et).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Sn(this._e,2))}},toString:function(){return this.name+": "+this.message}}),Xe(Ft).from(et),Xe(pt).from(et);var Ln=En.reduce((e,t)=>(e[t]=t+"Error",e),{});const Gs=et;var x=En.reduce((e,t)=>{var n=t+"Error";function r(i,s){this._e=De(),this.name=n,i?typeof i=="string"?(this.message=`${i}${s?` + `+s:""}`,this.inner=s||null):typeof i=="object"&&(this.message=`${i.name} ${i.message}`,this.inner=i):(this.message=zs[t]||n,this.inner=null)}return Xe(r).from(Gs),e[t]=r,e},{});x.Syntax=SyntaxError,x.Type=TypeError,x.Range=RangeError;var ti=Zr.reduce((e,t)=>(e[t+"Error"]=x[t],e),{}),Mt=En.reduce((e,t)=>(["Syntax","Type","Range"].indexOf(t)===-1&&(e[t+"Error"]=x[t]),e),{});function T(){}function ft(e){return e}function Hs(e,t){return e==null||e===ft?t:function(n){return t(e(n))}}function Pe(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function Ys(e,t){return e===T?t:function(){var n=e.apply(this,arguments);n!==void 0&&(arguments[0]=n);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var s=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?Pe(r,this.onsuccess):r),i&&(this.onerror=this.onerror?Pe(i,this.onerror):i),s!==void 0?s:n}}function Js(e,t){return e===T?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Pe(n,this.onsuccess):n),r&&(this.onerror=this.onerror?Pe(r,this.onerror):r)}}function Qs(e,t){return e===T?t:function(n){var r=e.apply(this,arguments);G(n,r);var i=this.onsuccess,s=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?Pe(i,this.onsuccess):i),s&&(this.onerror=this.onerror?Pe(s,this.onerror):s),r===void 0?o===void 0?void 0:o:G(r,o)}}function Xs(e,t){return e===T?t:function(){return t.apply(this,arguments)!==!1&&e.apply(this,arguments)}}function kn(e,t){return e===T?t:function(){var n=e.apply(this,arguments);if(n&&typeof n.then=="function"){for(var r=this,i=arguments.length,s=new Array(i);i--;)s[i]=arguments[i];return n.then(function(){return t.apply(r,s)})}return t.apply(this,arguments)}}Mt.ModifyError=Ft,Mt.DexieError=et,Mt.BulkError=pt;var yt={};const ni=100,[In,$t,Un]=typeof Promise>"u"?[]:(()=>{let e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,ut(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,ut(t),e]})(),ri=$t&&$t.then,Vt=In&&In.constructor,xn=!!Un;var An=!1,Zs=Un?()=>{Un.then(Gt)}:j.setImmediate?setImmediate.bind(null,Gt):j.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{Gt(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Gt,0)},mt=function(e,t){gt.push([e,t]),qt&&(Zs(),qt=!1)},On=!0,qt=!0,Re=[],Wt=[],Dn=null,Pn=ft,tt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:pi,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{pi(e[0],e[1])}catch{}})}},U=tt,gt=[],Ce=0,zt=[];function k(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=T,this._lib=!1;var t=this._PSD=U;if(ae&&(this._stackHolder=De(),this._prev=null,this._numPrev=0),typeof e!="function"){if(e!==yt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Cn(this,this._value))}this._state=null,this._value=null,++t.ref,si(this,e)}const Rn={get:function(){var e=U,t=Jt;function n(r,i){var s=!e.global&&(e!==U||t!==Jt);const o=s&&!pe();var a=new k((l,u)=>{Tn(this,new ii(Xt(r,e,s,o),Xt(i,e,s,o),l,u,e))});return ae&&li(a,this),a}return n.prototype=yt,n},set:function(e){ue(this,"then",e&&e.prototype===yt?Rn:{get:function(){return e},set:Rn.set})}};function ii(e,t,n,r,i){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=n,this.reject=r,this.psd=i}function si(e,t){try{t(n=>{if(e._state===null){if(n===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&wt();n&&typeof n.then=="function"?si(e,(i,s)=>{n instanceof k?n._then(i,s):n.then(i,s)}):(e._state=!0,e._value=n,oi(e)),r&&vt()}},Cn.bind(null,e))}catch(n){Cn(e,n)}}function Cn(e,t){if(Wt.push(t),e._state===null){var n=e._lib&&wt();t=Pn(t),e._state=!1,e._value=t,ae&&t!==null&&typeof t=="object"&&!t._promise&&function(r,i,s){try{r.apply(null,s)}catch(o){i&&i(o)}}(()=>{var r=gn(t,"stack");t._promise=e,ue(t,"stack",{get:()=>An?r&&(r.get?r.get.apply(t):r.value):e.stack})}),function(r){Re.some(i=>i._value===r._value)||Re.push(r)}(e),oi(e),n&&vt()}}function oi(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n{--Ce==0&&Bn()},[]))}function Tn(e,t){if(e._state!==null){var n=e._state?t.onFulfilled:t.onRejected;if(n===null)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Ce,mt(eo,[n,e,t])}else e._listeners.push(t)}function eo(e,t,n){try{Dn=t;var r,i=t._value;t._state?r=e(i):(Wt.length&&(Wt=[]),r=e(i),Wt.indexOf(i)===-1&&function(s){for(var o=Re.length;o;)if(Re[--o]._value===s._value)return void Re.splice(o,1)}(t)),n.resolve(r)}catch(s){n.reject(s)}finally{Dn=null,--Ce==0&&Bn(),--n.psd.ref||n.psd.finalize()}}function ai(e,t,n){if(t.length===n)return t;var r="";if(e._state===!1){var i,s,o=e._value;o!=null?(i=o.name||"Error",s=o.message||o,r=Sn(o,0)):(i=o,s=""),t.push(i+(s?": "+s:"")+r)}return ae&&((r=Sn(e._stackHolder,2))&&t.indexOf(r)===-1&&t.push(r),e._prev&&ai(e._prev,t,n)),t}function li(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function Gt(){wt()&&vt()}function wt(){var e=On;return On=!1,qt=!1,e}function vt(){var e,t,n;do for(;gt.length>0;)for(e=gt,gt=[],n=e.length,t=0;t0);On=!0,qt=!0}function Bn(){var e=Re;Re=[],e.forEach(r=>{r._PSD.onunhandled.call(null,r._value,r)});for(var t=zt.slice(0),n=t.length;n;)t[--n]()}function Ht(e){return new k(yt,!1,e)}function K(e,t){var n=U;return function(){var r=wt(),i=U;try{return Se(n,!0),e.apply(this,arguments)}catch(s){t&&t(s)}finally{Se(i,!1),r&&vt()}}}Qe(k.prototype,{then:Rn,_then:function(e,t){Tn(this,new ii(null,null,e,t,U))},catch:function(e){if(arguments.length===1)return this.then(null,e);var t=arguments[0],n=arguments[1];return typeof t=="function"?this.then(null,r=>r instanceof t?n(r):Ht(r)):this.then(null,r=>r&&r.name===t?n(r):Ht(r))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),Ht(t)))},stack:{get:function(){if(this._stack)return this._stack;try{An=!0;var e=ai(this,[],20).join(` +From previous: `);return this._state!==null&&(this._stack=e),e}finally{An=!1}}},timeout:function(e,t){return e<1/0?new k((n,r)=>{var i=setTimeout(()=>r(new x.Timeout(t)),e);this.then(n,r).finally(clearTimeout.bind(null,i))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&ue(k.prototype,Symbol.toStringTag,"Dexie.Promise"),tt.env=ci(),Qe(k,{all:function(){var e=he.apply(null,arguments).map(Qt);return new k(function(t,n){e.length===0&&t([]);var r=e.length;e.forEach((i,s)=>k.resolve(i).then(o=>{e[s]=o,--r||t(e)},n))})},resolve:e=>{if(e instanceof k)return e;if(e&&typeof e.then=="function")return new k((n,r)=>{e.then(n,r)});var t=new k(yt,!0,e);return li(t,Dn),t},reject:Ht,race:function(){var e=he.apply(null,arguments).map(Qt);return new k((t,n)=>{e.map(r=>k.resolve(r).then(t,n))})},PSD:{get:()=>U,set:e=>U=e},totalEchoes:{get:()=>Jt},newPSD:_e,usePSD:rt,scheduler:{get:()=>mt,set:e=>{mt=e}},rejectionMapper:{get:()=>Pn,set:e=>{Pn=e}},follow:(e,t)=>new k((n,r)=>_e((i,s)=>{var o=U;o.unhandleds=[],o.onunhandled=s,o.finalize=Pe(function(){(function(a){function l(){a(),zt.splice(zt.indexOf(l),1)}zt.push(l),++Ce,mt(()=>{--Ce==0&&Bn()},[])})(()=>{this.unhandleds.length===0?i():s(this.unhandleds[0])})},o.finalize),e()},t,n,r))}),Vt&&(Vt.allSettled&&ue(k,"allSettled",function(){const e=he.apply(null,arguments).map(Qt);return new k(t=>{e.length===0&&t([]);let n=e.length;const r=new Array(n);e.forEach((i,s)=>k.resolve(i).then(o=>r[s]={status:"fulfilled",value:o},o=>r[s]={status:"rejected",reason:o}).then(()=>--n||t(r)))})}),Vt.any&&typeof AggregateError<"u"&&ue(k,"any",function(){const e=he.apply(null,arguments).map(Qt);return new k((t,n)=>{e.length===0&&n(new AggregateError([]));let r=e.length;const i=new Array(r);e.forEach((s,o)=>k.resolve(s).then(a=>t(a),a=>{i[o]=a,--r||n(new AggregateError(i))}))})}));const z={awaits:0,echoes:0,id:0};var to=0,Yt=[],jn=0,Jt=0,no=0;function _e(e,t,n,r){var i=U,s=Object.create(i);s.parent=i,s.ref=0,s.global=!1,s.id=++no;var o=tt.env;s.env=xn?{Promise:k,PromiseProp:{value:k,configurable:!0,writable:!0},all:k.all,race:k.race,allSettled:k.allSettled,any:k.any,resolve:k.resolve,reject:k.reject,nthen:di(o.nthen,s),gthen:di(o.gthen,s)}:{},t&&G(s,t),++i.ref,s.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=rt(s,e,n,r);return s.ref===0&&s.finalize(),a}function nt(){return z.id||(z.id=++to),++z.awaits,z.echoes+=ni,z.id}function pe(){return!!z.awaits&&(--z.awaits==0&&(z.id=0),z.echoes=z.awaits*ni,!0)}function Qt(e){return z.echoes&&e&&e.constructor===Vt?(nt(),e.then(t=>(pe(),t),t=>(pe(),F(t)))):e}function ro(e){++Jt,z.echoes&&--z.echoes!=0||(z.echoes=z.id=0),Yt.push(U),Se(e,!0)}function io(){var e=Yt[Yt.length-1];Yt.pop(),Se(e,!1)}function Se(e,t){var n=U;if((t?!z.echoes||jn++&&e===U:!jn||--jn&&e===U)||ui(t?ro.bind(null,e):io),e!==U&&(U=e,n===tt&&(tt.env=ci()),xn)){var r=tt.env.Promise,i=e.env;$t.then=i.nthen,r.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(j,"Promise",i.PromiseProp),r.all=i.all,r.race=i.race,r.resolve=i.resolve,r.reject=i.reject,i.allSettled&&(r.allSettled=i.allSettled),i.any&&(r.any=i.any))}}function ci(){var e=j.Promise;return xn?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(j,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:$t.then,gthen:e.prototype.then}:{}}function rt(e,t,n,r,i){var s=U;try{return Se(e,!0),t(n,r,i)}finally{Se(s,!1)}}function ui(e){ri.call(In,e)}function Xt(e,t,n,r){return typeof e!="function"?e:function(){var i=U;n&&nt(),Se(t,!0);try{return e.apply(this,arguments)}finally{Se(i,!1),r&&ui(pe)}}}function di(e,t){return function(n,r){return e.call(this,Xt(n,t),Xt(r,t))}}(""+ri).indexOf("[native code]")===-1&&(nt=pe=T);const hi="unhandledrejection";function pi(e,t){var n;try{n=t.onuncatched(e)}catch{}if(n!==!1)try{var r,i={promise:t,reason:e};if(j.document&&document.createEvent?((r=document.createEvent("Event")).initEvent(hi,!0,!0),G(r,i)):j.CustomEvent&&G(r=new CustomEvent(hi,{detail:i}),i),r&&j.dispatchEvent&&(dispatchEvent(r),!j.PromiseRejectionEvent&&j.onunhandledrejection))try{j.onunhandledrejection(r)}catch{}ae&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch{}}var F=k.reject;function Kn(e,t,n,r){if(e.idbdb&&(e._state.openComplete||U.letThrough||e._vip)){var i=e._createTransaction(t,n,e._dbSchema);try{i.create(),e._state.PR1398_maxLoop=3}catch(s){return s.name===Ln.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(()=>Kn(e,t,n,r))):F(s)}return i._promise(t,(s,o)=>_e(()=>(U.trans=i,r(s,o,i)))).then(s=>i._completion.then(()=>s))}if(e._state.openComplete)return F(new x.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return F(new x.DatabaseClosed);e.open().catch(T)}return e._state.dbReadyPromise.then(()=>Kn(e,t,n,r))}const fi="3.2.4",Te="ï¿¿",Nn=-1/0,fe="Invalid key provided. Keys must be of type string, number, Date or Array.",yi="String expected.",bt=[],Zt=typeof navigator<"u"&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),so=Zt,oo=Zt,mi=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),en="__dbnames",Fn="readonly",Mn="readwrite";function Be(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const gi={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function tn(e){return typeof e!="string"||/\./.test(e)?t=>t:t=>(t[e]===void 0&&e in t&&delete(t=ht(t))[e],t)}class ao{_trans(t,n,r){const i=this._tx||U.trans,s=this.name;function o(l,u,c){if(!c.schema[s])throw new x.NotFound("Table "+s+" not part of transaction");return n(c.idbtrans,c)}const a=wt();try{return i&&i.db===this.db?i===U.trans?i._promise(t,o,r):_e(()=>i._promise(t,o,r),{trans:i,transless:U.transless||U}):Kn(this.db,t,[this.name],o)}finally{a&&vt()}}get(t,n){return t&&t.constructor===Object?this.where(t).first(n):this._trans("readonly",r=>this.core.get({trans:r,key:t}).then(i=>this.hook.reading.fire(i))).then(n)}where(t){if(typeof t=="string")return new this.db.WhereClause(this,t);if(W(t))return new this.db.WhereClause(this,`[${t.join("+")}]`);const n=N(t);if(n.length===1)return this.where(n[0]).equals(t[n[0]]);const r=this.schema.indexes.concat(this.schema.primKey).filter(u=>u.compound&&n.every(c=>u.keyPath.indexOf(c)>=0)&&u.keyPath.every(c=>n.indexOf(c)>=0))[0];if(r&&this.db._maxKey!==Te)return this.where(r.name).equals(r.keyPath.map(u=>t[u]));!r&&ae&&console.warn(`The query ${JSON.stringify(t)} on ${this.name} would benefit of a compound index [${n.join("+")}]`);const{idxByName:i}=this.schema,s=this.db._deps.indexedDB;function o(u,c){try{return s.cmp(u,c)===0}catch{return!1}}const[a,l]=n.reduce(([u,c],h)=>{const d=i[h],p=t[h];return[u||d,u||!d?Be(c,d&&d.multi?g=>{const y=de(g,h);return W(y)&&y.some(w=>o(p,w))}:g=>o(p,de(g,h))):c]},[null,null]);return a?this.where(a.name).equals(t[a.keyPath]).filter(l):r?this.filter(l):this.where(n).equals("")}filter(t){return this.toCollection().and(t)}count(t){return this.toCollection().count(t)}offset(t){return this.toCollection().offset(t)}limit(t){return this.toCollection().limit(t)}each(t){return this.toCollection().each(t)}toArray(t){return this.toCollection().toArray(t)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(t){return new this.db.Collection(new this.db.WhereClause(this,W(t)?`[${t.join("+")}]`:t))}reverse(){return this.toCollection().reverse()}mapToClass(t){this.schema.mappedClass=t;const n=r=>{if(!r)return r;const i=Object.create(t.prototype);for(var s in r)if(Z(r,s))try{i[s]=r[s]}catch{}return i};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=n,this.hook("reading",n),t}defineClass(){return this.mapToClass(function(t){G(this,t)})}add(t,n){const{auto:r,keyPath:i}=this.schema.primKey;let s=t;return i&&r&&(s=tn(i)(t)),this._trans("readwrite",o=>this.core.mutate({trans:o,type:"add",keys:n!=null?[n]:null,values:[s]})).then(o=>o.numFailures?k.reject(o.failures[0]):o.lastResult).then(o=>{if(i)try{ne(t,i,o)}catch{}return o})}update(t,n){if(typeof t!="object"||W(t))return this.where(":id").equals(t).modify(n);{const r=de(t,this.schema.primKey.keyPath);if(r===void 0)return F(new x.InvalidArgument("Given object does not contain its primary key"));try{typeof n!="function"?N(n).forEach(i=>{ne(t,i,n[i])}):n(t,{value:t,primKey:r})}catch{}return this.where(":id").equals(r).modify(n)}}put(t,n){const{auto:r,keyPath:i}=this.schema.primKey;let s=t;return i&&r&&(s=tn(i)(t)),this._trans("readwrite",o=>this.core.mutate({trans:o,type:"put",values:[s],keys:n!=null?[n]:null})).then(o=>o.numFailures?k.reject(o.failures[0]):o.lastResult).then(o=>{if(i)try{ne(t,i,o)}catch{}return o})}delete(t){return this._trans("readwrite",n=>this.core.mutate({trans:n,type:"delete",keys:[t]})).then(n=>n.numFailures?k.reject(n.failures[0]):void 0)}clear(){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"deleteRange",range:gi})).then(t=>t.numFailures?k.reject(t.failures[0]):void 0)}bulkGet(t){return this._trans("readonly",n=>this.core.getMany({keys:t,trans:n}).then(r=>r.map(i=>this.hook.reading.fire(i))))}bulkAdd(t,n,r){const i=Array.isArray(n)?n:void 0,s=(r=r||(i?void 0:n))?r.allKeys:void 0;return this._trans("readwrite",o=>{const{auto:a,keyPath:l}=this.schema.primKey;if(l&&i)throw new x.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(i&&i.length!==t.length)throw new x.InvalidArgument("Arguments objects and keys must have the same length");const u=t.length;let c=l&&a?t.map(tn(l)):t;return this.core.mutate({trans:o,type:"add",keys:i,values:c,wantResults:s}).then(({numFailures:h,results:d,lastResult:p,failures:g})=>{if(h===0)return s?d:p;throw new pt(`${this.name}.bulkAdd(): ${h} of ${u} operations failed`,g)})})}bulkPut(t,n,r){const i=Array.isArray(n)?n:void 0,s=(r=r||(i?void 0:n))?r.allKeys:void 0;return this._trans("readwrite",o=>{const{auto:a,keyPath:l}=this.schema.primKey;if(l&&i)throw new x.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(i&&i.length!==t.length)throw new x.InvalidArgument("Arguments objects and keys must have the same length");const u=t.length;let c=l&&a?t.map(tn(l)):t;return this.core.mutate({trans:o,type:"put",keys:i,values:c,wantResults:s}).then(({numFailures:h,results:d,lastResult:p,failures:g})=>{if(h===0)return s?d:p;throw new pt(`${this.name}.bulkPut(): ${h} of ${u} operations failed`,g)})})}bulkDelete(t){const n=t.length;return this._trans("readwrite",r=>this.core.mutate({trans:r,type:"delete",keys:t})).then(({numFailures:r,lastResult:i,failures:s})=>{if(r===0)return i;throw new pt(`${this.name}.bulkDelete(): ${r} of ${n} operations failed`,s)})}}function _t(e){var t={},n=function(o,a){if(a){for(var l=arguments.length,u=new Array(l-1);--l;)u[l-1]=arguments[l];return t[o].subscribe.apply(null,u),e}if(typeof o=="string")return t[o]};n.addEventType=s;for(var r=1,i=arguments.length;rBe(r(),t()):t,e.justLimit=n&&!r}function nn(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new x.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function wi(e,t,n){const r=nn(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:e.dir==="prev",unique:!!e.unique,query:{index:r,range:e.range}})}function rn(e,t,n,r){const i=e.replayFilter?Be(e.filter,e.replayFilter()):e.filter;if(e.or){const s={},o=(a,l,u)=>{if(!i||i(l,u,d=>l.stop(d),d=>l.fail(d))){var c=l.primaryKey,h=""+c;h==="[object ArrayBuffer]"&&(h=""+new Uint8Array(c)),Z(s,h)||(s[h]=!0,t(a,l,u))}};return Promise.all([e.or._iterate(o,n),vi(wi(e,r,n),e.algorithm,o,!e.keysOnly&&e.valueMapper)])}return vi(wi(e,r,n),Be(e.algorithm,i),t,!e.keysOnly&&e.valueMapper)}function vi(e,t,n,r){var i=K(r?(s,o,a)=>n(r(s),o,a):n);return e.then(s=>{if(s)return s.start(()=>{var o=()=>s.continue();t&&!t(s,a=>o=a,a=>{s.stop(a),o=T},a=>{s.fail(a),o=T})||i(s.value,s,a=>o=a),o()})})}function H(e,t){try{const n=bi(e),r=bi(t);if(n!==r)return n==="Array"?1:r==="Array"?-1:n==="binary"?1:r==="binary"?-1:n==="string"?1:r==="string"?-1:n==="Date"?1:r!=="Date"?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:ern(n,t,r,n.table.core))}count(t){return this._read(n=>{const r=this._ctx,i=r.table.core;if(it(r,!0))return i.count({trans:n,query:{index:nn(r,i.schema),range:r.range}}).then(o=>Math.min(o,r.limit));var s=0;return rn(r,()=>(++s,!1),n,i).then(()=>s)}).then(t)}sortBy(t,n){const r=t.split(".").reverse(),i=r[0],s=r.length-1;function o(u,c){return c?o(u[r[c]],c-1):u[i]}var a=this._ctx.dir==="next"?1:-1;function l(u,c){var h=o(u,s),d=o(c,s);return hd?a:0}return this.toArray(function(u){return u.sort(l)}).then(n)}toArray(t){return this._read(n=>{var r=this._ctx;if(r.dir==="next"&&it(r,!0)&&r.limit>0){const{valueMapper:i}=r,s=nn(r,r.table.core.schema);return r.table.core.query({trans:n,limit:r.limit,values:!0,query:{index:s,range:r.range}}).then(({result:o})=>i?o.map(i):o)}{const i=[];return rn(r,s=>i.push(s),n,r.table.core).then(()=>i)}},t)}offset(t){var n=this._ctx;return t<=0||(n.offset+=t,it(n)?Vn(n,()=>{var r=t;return(i,s)=>r===0||(r===1?(--r,!1):(s(()=>{i.advance(r),r=0}),!1))}):Vn(n,()=>{var r=t;return()=>--r<0})),this}limit(t){return this._ctx.limit=Math.min(this._ctx.limit,t),Vn(this._ctx,()=>{var n=t;return function(r,i,s){return--n<=0&&i(s),n>=0}},!0),this}until(t,n){return $n(this._ctx,function(r,i,s){return!t(r.value)||(i(s),n)}),this}first(t){return this.limit(1).toArray(function(n){return n[0]}).then(t)}last(t){return this.reverse().first(t)}filter(t){var n,r;return $n(this._ctx,function(i){return t(i.value)}),n=this._ctx,r=t,n.isMatch=Be(n.isMatch,r),this}and(t){return this.filter(t)}or(t){return new this.db.WhereClause(this._ctx.table,t,this)}reverse(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,i){t(i.key,i)})}eachUniqueKey(t){return this._ctx.unique="unique",this.eachKey(t)}eachPrimaryKey(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,i){t(i.primaryKey,i)})}keys(t){var n=this._ctx;n.keysOnly=!n.isMatch;var r=[];return this.each(function(i,s){r.push(s.key)}).then(function(){return r}).then(t)}primaryKeys(t){var n=this._ctx;if(n.dir==="next"&&it(n,!0)&&n.limit>0)return this._read(i=>{var s=nn(n,n.table.core.schema);return n.table.core.query({trans:i,values:!1,limit:n.limit,query:{index:s,range:n.range}})}).then(({result:i})=>i).then(t);n.keysOnly=!n.isMatch;var r=[];return this.each(function(i,s){r.push(s.primaryKey)}).then(function(){return r}).then(t)}uniqueKeys(t){return this._ctx.unique="unique",this.keys(t)}firstKey(t){return this.limit(1).keys(function(n){return n[0]}).then(t)}lastKey(t){return this.reverse().firstKey(t)}distinct(){var t=this._ctx,n=t.index&&t.table.schema.idxByName[t.index];if(!n||!n.multi)return this;var r={};return $n(this._ctx,function(i){var s=i.primaryKey.toString(),o=Z(r,s);return r[s]=!0,!o}),this}modify(t){var n=this._ctx;return this._write(r=>{var i;if(typeof t=="function")i=t;else{var s=N(t),o=s.length;i=function(y){for(var w=!1,m=0;m{const{failures:m,numFailures:f}=w;d+=y-f;for(let v of N(m))h.push(m[v])};return this.clone().primaryKeys().then(y=>{const w=m=>{const f=Math.min(c,y.length-m);return a.getMany({trans:r,keys:y.slice(m,m+f),cache:"immutable"}).then(v=>{const b=[],_=[],E=l?[]:null,S=[];for(let L=0;L0&&a.mutate({trans:r,type:"add",values:b}).then(L=>{for(let B in L.failures)S.splice(parseInt(B),1);g(b.length,L)})).then(()=>(_.length>0||O&&typeof t=="object")&&a.mutate({trans:r,type:"put",keys:E,values:_,criteria:O,changeSpec:typeof t!="function"&&t}).then(L=>g(_.length,L))).then(()=>(S.length>0||O&&t===qn)&&a.mutate({trans:r,type:"delete",keys:S,criteria:O}).then(L=>g(S.length,L))).then(()=>y.length>m+f&&w(m+c))})};return w(0).then(()=>{if(h.length>0)throw new Ft("Error modifying one or more objects",h,d,p);return y.length})})})}delete(){var t=this._ctx,n=t.range;return it(t)&&(t.isPrimKey&&!oo||n.type===3)?this._write(r=>{const{primaryKey:i}=t.table.core.schema,s=n;return t.table.core.count({trans:r,query:{index:i,range:s}}).then(o=>t.table.core.mutate({trans:r,type:"deleteRange",range:s}).then(({failures:a,lastResult:l,results:u,numFailures:c})=>{if(c)throw new Ft("Could not delete some values",Object.keys(a).map(h=>a[h]),o-c);return o-c}))}):this.modify(qn)}}const qn=(e,t)=>t.value=null;function co(e,t){return et?-1:e===t?0:1}function ee(e,t,n){var r=e instanceof Ei?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function st(e){return new e.Collection(e,()=>Si("")).limit(0)}function ho(e,t,n,r,i,s){for(var o=Math.min(e.length,r.length),a=-1,l=0;l=0?e.substr(0,a)+t[a]+n.substr(a+1):null;i(e[l],u)<0&&(a=l)}return otypeof y=="string"))return ee(e,yi);function d(y){i=function(m){return m==="next"?f=>f.toUpperCase():f=>f.toLowerCase()}(y),s=function(m){return m==="next"?f=>f.toLowerCase():f=>f.toUpperCase()}(y),o=y==="next"?co:uo;var w=n.map(function(m){return{lower:s(m),upper:i(m)}}).sort(function(m,f){return o(m.lower,f.lower)});a=w.map(function(m){return m.upper}),l=w.map(function(m){return m.lower}),u=y,c=y==="next"?"":r}d("next");var p=new e.Collection(e,()=>Ee(a[0],l[h-1]+r));p._ondirectionchange=function(y){d(y)};var g=0;return p._addAlgorithm(function(y,w,m){var f=y.key;if(typeof f!="string")return!1;var v=s(f);if(t(v,l,g))return!0;for(var b=null,_=g;_0)&&(b=E)}return w(b!==null?function(){y.continue(b+c)}:m),!1}),p}function Ee(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Si(e){return{type:1,lower:e,upper:e}}class Ei{get Collection(){return this._ctx.table.db.Collection}between(t,n,r,i){r=r!==!1,i=i===!0;try{return this._cmp(t,n)>0||this._cmp(t,n)===0&&(r||i)&&(!r||!i)?st(this):new this.Collection(this,()=>Ee(t,n,!r,!i))}catch{return ee(this,fe)}}equals(t){return t==null?ee(this,fe):new this.Collection(this,()=>Si(t))}above(t){return t==null?ee(this,fe):new this.Collection(this,()=>Ee(t,void 0,!0))}aboveOrEqual(t){return t==null?ee(this,fe):new this.Collection(this,()=>Ee(t,void 0,!1))}below(t){return t==null?ee(this,fe):new this.Collection(this,()=>Ee(void 0,t,!1,!0))}belowOrEqual(t){return t==null?ee(this,fe):new this.Collection(this,()=>Ee(void 0,t))}startsWith(t){return typeof t!="string"?ee(this,yi):this.between(t,t+Te,!0,!0)}startsWithIgnoreCase(t){return t===""?this.startsWith(t):sn(this,(n,r)=>n.indexOf(r[0])===0,[t],Te)}equalsIgnoreCase(t){return sn(this,(n,r)=>n===r[0],[t],"")}anyOfIgnoreCase(){var t=he.apply(Ze,arguments);return t.length===0?st(this):sn(this,(n,r)=>r.indexOf(n)!==-1,t,"")}startsWithAnyOfIgnoreCase(){var t=he.apply(Ze,arguments);return t.length===0?st(this):sn(this,(n,r)=>r.some(i=>n.indexOf(i)===0),t,Te)}anyOf(){const t=he.apply(Ze,arguments);let n=this._cmp;try{t.sort(n)}catch{return ee(this,fe)}if(t.length===0)return st(this);const r=new this.Collection(this,()=>Ee(t[0],t[t.length-1]));r._ondirectionchange=s=>{n=s==="next"?this._ascending:this._descending,t.sort(n)};let i=0;return r._addAlgorithm((s,o,a)=>{const l=s.key;for(;n(l,t[i])>0;)if(++i,i===t.length)return o(a),!1;return n(l,t[i])===0||(o(()=>{s.continue(t[i])}),!1)}),r}notEqual(t){return this.inAnyRange([[Nn,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const t=he.apply(Ze,arguments);if(t.length===0)return new this.Collection(this);try{t.sort(this._ascending)}catch{return ee(this,fe)}const n=t.reduce((r,i)=>r?r.concat([[r[r.length-1][1],i]]):[[Nn,i]],null);return n.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(n,{includeLowers:!1,includeUppers:!1})}inAnyRange(t,n){const r=this._cmp,i=this._ascending,s=this._descending,o=this._min,a=this._max;if(t.length===0)return st(this);if(!t.every(f=>f[0]!==void 0&&f[1]!==void 0&&i(f[0],f[1])<=0))return ee(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",x.InvalidArgument);const l=!n||n.includeLowers!==!1,u=n&&n.includeUppers===!0;let c,h=i;function d(f,v){return h(f[0],v[0])}try{c=t.reduce(function(f,v){let b=0,_=f.length;for(;b<_;++b){const E=f[b];if(r(v[0],E[1])<0&&r(v[1],E[0])>0){E[0]=o(E[0],v[0]),E[1]=a(E[1],v[1]);break}}return b===_&&f.push(v),f},[]),c.sort(d)}catch{return ee(this,fe)}let p=0;const g=u?f=>i(f,c[p][1])>0:f=>i(f,c[p][1])>=0,y=l?f=>s(f,c[p][0])>0:f=>s(f,c[p][0])>=0;let w=g;const m=new this.Collection(this,()=>Ee(c[0][0],c[c.length-1][1],!l,!u));return m._ondirectionchange=f=>{f==="next"?(w=g,h=i):(w=y,h=s),c.sort(d)},m._addAlgorithm((f,v,b)=>{for(var _=f.key;w(_);)if(++p,p===c.length)return v(b),!1;return!!function(E){return!g(E)&&!y(E)}(_)||(this._cmp(_,c[p][1])===0||this._cmp(_,c[p][0])===0||v(()=>{h===i?f.continue(c[p][0]):f.continue(c[p][1])}),!1)}),m}startsWithAnyOf(){const t=he.apply(Ze,arguments);return t.every(n=>typeof n=="string")?t.length===0?st(this):this.inAnyRange(t.map(n=>[n,n+Te])):ee(this,"startsWithAnyOf() only works with strings")}}function le(e){return K(function(t){return Et(t),e(t.target.error),!1})}function Et(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const Lt="storagemutated",Le="x-storagemutated-1",ke=_t(null,Lt);class po{_lock(){return dt(!U.global),++this._reculock,this._reculock!==1||U.global||(U.lockOwnerFor=this),this}_unlock(){if(dt(!U.global),--this._reculock==0)for(U.global||(U.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{rt(t[1],t[0])}catch{}}return this}_locked(){return this._reculock&&U.lockOwnerFor!==this}create(t){if(!this.mode)return this;const n=this.db.idbdb,r=this.db._state.dbOpenError;if(dt(!this.idbtrans),!t&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new x.DatabaseClosed(r);case"MissingAPIError":throw new x.MissingAPI(r.message,r);default:throw new x.OpenFailed(r)}if(!this.active)throw new x.TransactionInactive;return dt(this._completion._state===null),(t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=K(i=>{Et(i),this._reject(t.error)}),t.onabort=K(i=>{Et(i),this.active&&this._reject(new x.Abort(t.error)),this.active=!1,this.on("abort").fire(i)}),t.oncomplete=K(()=>{this.active=!1,this._resolve(),"mutatedParts"in t&&ke.storagemutated.fire(t.mutatedParts)}),this}_promise(t,n,r){if(t==="readwrite"&&this.mode!=="readwrite")return F(new x.ReadOnly("Transaction is readonly"));if(!this.active)return F(new x.TransactionInactive);if(this._locked())return new k((s,o)=>{this._blockedFuncs.push([()=>{this._promise(t,n,r).then(s,o)},U])});if(r)return _e(()=>{var s=new k((o,a)=>{this._lock();const l=n(o,a,this);l&&l.then&&l.then(o,a)});return s.finally(()=>this._unlock()),s._lib=!0,s});var i=new k((s,o)=>{var a=n(s,o,this);a&&a.then&&a.then(s,o)});return i._lib=!0,i}_root(){return this.parent?this.parent._root():this}waitFor(t){var n=this._root();const r=k.resolve(t);if(n._waitingFor)n._waitingFor=n._waitingFor.then(()=>r);else{n._waitingFor=r,n._waitingQueue=[];var i=n.idbtrans.objectStore(n.storeNames[0]);(function o(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(i.get(-1/0).onsuccess=o)})()}var s=n._waitingFor;return new k((o,a)=>{r.then(l=>n._waitingQueue.push(K(o.bind(null,l))),l=>n._waitingQueue.push(K(a.bind(null,l)))).finally(()=>{n._waitingFor===s&&(n._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new x.Abort))}table(t){const n=this._memoizedTables||(this._memoizedTables={});if(Z(n,t))return n[t];const r=this.schema[t];if(!r)throw new x.NotFound("Table "+t+" not part of transaction");const i=new this.db.Table(t,r,this);return i.core=this.db.core.table(t),n[t]=i,i}}function Wn(e,t,n,r,i,s,o){return{name:e,keyPath:t,unique:n,multi:r,auto:i,compound:s,src:(n&&!o?"&":"")+(r?"*":"")+(i?"++":"")+Li(t)}}function Li(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function ki(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:Gr(n,r=>[r.name,r])}}let kt=e=>{try{return e.only([[]]),kt=()=>[[]],[[]]}catch{return kt=()=>Te,Te}};function zn(e){return e==null?()=>{}:typeof e=="string"?function(t){return t.split(".").length===1?r=>r[t]:r=>de(r,t)}(e):t=>de(t,e)}function Ii(e){return[].slice.call(e)}let fo=0;function It(e){return e==null?":id":typeof e=="string"?e:`[${e.join("+")}]`}function yo(e,t,n){function r(l){if(l.type===3)return null;if(l.type===4)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:u,upper:c,lowerOpen:h,upperOpen:d}=l;return u===void 0?c===void 0?null:t.upperBound(c,!!d):c===void 0?t.lowerBound(u,!!h):t.bound(u,c,!!h,!!d)}const{schema:i,hasGetAll:s}=function(l,u){const c=Ii(l.objectStoreNames);return{schema:{name:l.name,tables:c.map(h=>u.objectStore(h)).map(h=>{const{keyPath:d,autoIncrement:p}=h,g=W(d),y=d==null,w={},m={name:h.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:y,compound:g,keyPath:d,autoIncrement:p,unique:!0,extractKey:zn(d)},indexes:Ii(h.indexNames).map(f=>h.index(f)).map(f=>{const{name:v,unique:b,multiEntry:_,keyPath:E}=f,S={name:v,compound:W(E),keyPath:E,unique:b,multiEntry:_,extractKey:zn(E)};return w[It(E)]=S,S}),getIndexByKeyPath:f=>w[It(f)]};return w[":id"]=m.primaryKey,d!=null&&(w[It(d)]=m.primaryKey),m})},hasGetAll:c.length>0&&"getAll"in u.objectStore(c[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),o=i.tables.map(l=>function(u){const c=u.name;return{name:c,schema:u,mutate:function({trans:h,type:d,keys:p,values:g,range:y}){return new Promise((w,m)=>{w=K(w);const f=h.objectStore(c),v=f.keyPath==null,b=d==="put"||d==="add";if(!b&&d!=="delete"&&d!=="deleteRange")throw new Error("Invalid operation type: "+d);const{length:_}=p||g||{length:1};if(p&&g&&p.length!==g.length)throw new Error("Given keys array must have same length as given values array.");if(_===0)return w({numFailures:0,failures:{},results:[],lastResult:void 0});let E;const S=[],O=[];let L=0;const B=$=>{++L,Et($)};if(d==="deleteRange"){if(y.type===4)return w({numFailures:L,failures:O,results:[],lastResult:void 0});y.type===3?S.push(E=f.clear()):S.push(E=f.delete(r(y)))}else{const[$,M]=b?v?[g,p]:[g,null]:[p,null];if(b)for(let A=0;A<_;++A)S.push(E=M&&M[A]!==void 0?f[d]($[A],M[A]):f[d]($[A])),E.onerror=B;else for(let A=0;A<_;++A)S.push(E=f[d]($[A])),E.onerror=B}const R=$=>{const M=$.target.result;S.forEach((A,xe)=>A.error!=null&&(O[xe]=A.error)),w({numFailures:L,failures:O,results:d==="delete"?p:S.map(A=>A.result),lastResult:M})};E.onerror=$=>{B($),R($)},E.onsuccess=R})},getMany:({trans:h,keys:d})=>new Promise((p,g)=>{p=K(p);const y=h.objectStore(c),w=d.length,m=new Array(w);let f,v=0,b=0;const _=S=>{const O=S.target;m[O._pos]=O.result,++b===v&&p(m)},E=le(g);for(let S=0;Snew Promise((p,g)=>{p=K(p);const y=h.objectStore(c).get(d);y.onsuccess=w=>p(w.target.result),y.onerror=le(g)}),query:function(h){return d=>new Promise((p,g)=>{p=K(p);const{trans:y,values:w,limit:m,query:f}=d,v=m===1/0?void 0:m,{index:b,range:_}=f,E=y.objectStore(c),S=b.isPrimaryKey?E:E.index(b.name),O=r(_);if(m===0)return p({result:[]});if(h){const L=w?S.getAll(O,v):S.getAllKeys(O,v);L.onsuccess=B=>p({result:B.target.result}),L.onerror=le(g)}else{let L=0;const B=w||!("openKeyCursor"in S)?S.openCursor(O):S.openKeyCursor(O),R=[];B.onsuccess=$=>{const M=B.result;return M?(R.push(w?M.value:M.primaryKey),++L===m?p({result:R}):void M.continue()):p({result:R})},B.onerror=le(g)}})}(s),openCursor:function({trans:h,values:d,query:p,reverse:g,unique:y}){return new Promise((w,m)=>{w=K(w);const{index:f,range:v}=p,b=h.objectStore(c),_=f.isPrimaryKey?b:b.index(f.name),E=g?y?"prevunique":"prev":y?"nextunique":"next",S=d||!("openKeyCursor"in _)?_.openCursor(r(v),E):_.openKeyCursor(r(v),E);S.onerror=le(m),S.onsuccess=K(O=>{const L=S.result;if(!L)return void w(null);L.___id=++fo,L.done=!1;const B=L.continue.bind(L);let R=L.continuePrimaryKey;R&&(R=R.bind(L));const $=L.advance.bind(L),M=()=>{throw new Error("Cursor not stopped")};L.trans=h,L.stop=L.continue=L.continuePrimaryKey=L.advance=()=>{throw new Error("Cursor not started")},L.fail=K(m),L.next=function(){let A=1;return this.start(()=>A--?this.continue():this.stop()).then(()=>this)},L.start=A=>{const xe=new Promise((J,qe)=>{J=K(J),S.onerror=le(qe),L.fail=qe,L.stop=Ot=>{L.stop=L.continue=L.continuePrimaryKey=L.advance=M,J(Ot)}}),at=()=>{if(S.result)try{A()}catch(J){L.fail(J)}else L.done=!0,L.start=()=>{throw new Error("Cursor behind last entry")},L.stop()};return S.onsuccess=K(J=>{S.onsuccess=at,at()}),L.continue=B,L.continuePrimaryKey=R,L.advance=$,at(),xe},w(L)},m)})},count({query:h,trans:d}){const{index:p,range:g}=h;return new Promise((y,w)=>{const m=d.objectStore(c),f=p.isPrimaryKey?m:m.index(p.name),v=r(g),b=v?f.count(v):f.count();b.onsuccess=K(_=>y(_.target.result)),b.onerror=le(w)})}}}(l)),a={};return o.forEach(l=>a[l.name]=l),{stack:"dbcore",transaction:e.transaction.bind(e),table(l){if(!a[l])throw new Error(`Table '${l}' not found`);return a[l]},MIN_KEY:-1/0,MAX_KEY:kt(t),schema:i}}function Gn({_novip:e},t){const n=t.db,r=function(i,s,{IDBKeyRange:o,indexedDB:a},l){return{dbcore:function(c,h){return h.reduce((d,{create:p})=>({...d,...p(d)}),c)}(yo(s,o,l),i.dbcore)}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach(i=>{const s=i.name;e.core.schema.tables.some(o=>o.name===s)&&(i.core=e.core.table(s),e[s]instanceof e.Table&&(e[s].core=i.core))})}function on({_novip:e},t,n,r){n.forEach(i=>{const s=r[i];t.forEach(o=>{const a=gn(o,i);(!a||"value"in a&&a.value===void 0)&&(o===e.Transaction.prototype||o instanceof e.Transaction?ue(o,i,{get(){return this.table(i)},set(l){qr(this,i,{value:l,writable:!0,configurable:!0,enumerable:!0})}}):o[i]=new e.Table(i,s))})})}function Hn({_novip:e},t){t.forEach(n=>{for(let r in n)n[r]instanceof e.Table&&delete n[r]})}function mo(e,t){return e._cfg.version-t._cfg.version}function go(e,t,n,r){const i=e._dbSchema,s=e._createTransaction("readwrite",e._storeNames,i);s.create(n),s._completion.catch(r);const o=s._reject.bind(s),a=U.transless||U;_e(()=>{U.trans=s,U.transless=a,t===0?(N(i).forEach(l=>{Yn(n,l,i[l].primKey,i[l].indexes)}),Gn(e,n),k.follow(()=>e.on.populate.fire(s)).catch(o)):function({_novip:l},u,c,h){const d=[],p=l._versions;let g=l._dbSchema=Qn(l,l.idbdb,h),y=!1;const w=p.filter(f=>f._cfg.version>=u);function m(){return d.length?k.resolve(d.shift()(c.idbtrans)).then(m):k.resolve()}return w.forEach(f=>{d.push(()=>{const v=g,b=f._cfg.dbschema;Xn(l,v,h),Xn(l,b,h),g=l._dbSchema=b;const _=Ui(v,b);_.add.forEach(S=>{Yn(h,S[0],S[1].primKey,S[1].indexes)}),_.change.forEach(S=>{if(S.recreate)throw new x.Upgrade("Not yet support for changing primary key");{const O=h.objectStore(S.name);S.add.forEach(L=>Jn(O,L)),S.change.forEach(L=>{O.deleteIndex(L.name),Jn(O,L)}),S.del.forEach(L=>O.deleteIndex(L))}});const E=f._cfg.contentUpgrade;if(E&&f._cfg.version>u){Gn(l,h),c._memoizedTables={},y=!0;let S=Hr(b);_.del.forEach(R=>{S[R]=v[R]}),Hn(l,[l.Transaction.prototype]),on(l,[l.Transaction.prototype],N(S),S),c.schema=S;const O=_n(E);let L;O&&nt();const B=k.follow(()=>{if(L=E(c),L&&O){var R=pe.bind(null,null);L.then(R,R)}});return L&&typeof L.then=="function"?k.resolve(L):B.then(()=>L)}}),d.push(v=>{(!y||!so)&&function(b,_){[].slice.call(_.db.objectStoreNames).forEach(E=>b[E]==null&&_.db.deleteObjectStore(E))}(f._cfg.dbschema,v),Hn(l,[l.Transaction.prototype]),on(l,[l.Transaction.prototype],l._storeNames,l._dbSchema),c.schema=l._dbSchema})}),m().then(()=>{var f,v;v=h,N(f=g).forEach(b=>{v.db.objectStoreNames.contains(b)||Yn(v,b,f[b].primKey,f[b].indexes)})})}(e,t,s,n).catch(o)})}function Ui(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const i=e[r],s=t[r];if(i){const o={name:r,def:s,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(s.primKey.keyPath||"")||i.primKey.auto!==s.primKey.auto&&!Zt)o.recreate=!0,n.change.push(o);else{const a=i.idxByName,l=s.idxByName;let u;for(u in a)l[u]||o.del.push(u);for(u in l){const c=a[u],h=l[u];c?c.src!==h.src&&o.change.push(h):o.add.push(h)}(o.del.length>0||o.add.length>0||o.change.length>0)&&n.change.push(o)}}else n.add.push([r,s])}return n}function Yn(e,t,n,r){const i=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach(s=>Jn(i,s)),i}function Jn(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Qn(e,t,n){const r={};return Nt(t.objectStoreNames,0).forEach(i=>{const s=n.objectStore(i);let o=s.keyPath;const a=Wn(Li(o),o||"",!1,!1,!!s.autoIncrement,o&&typeof o!="string",!0),l=[];for(let c=0;c{if(t[r]!==null){var i=t[r].split(",").map((o,a)=>{const l=(o=o.trim()).replace(/([&*]|\+\+)/g,""),u=/^\[/.test(l)?l.match(/^\[(.*)\]$/)[1].split("+"):l;return Wn(l,u||null,/\&/.test(o),/\*/.test(o),/\+\+/.test(o),W(u),a===0)}),s=i.shift();if(s.multi)throw new x.Schema("Primary key cannot be multi-valued");i.forEach(o=>{if(o.auto)throw new x.Schema("Only primary key can be marked as autoIncrement (++)");if(!o.keyPath)throw new x.Schema("Index must have a name and cannot be an empty string")}),n[r]=ki(r,s,i)}})}stores(t){const n=this.db;this._cfg.storesSource=this._cfg.storesSource?G(this._cfg.storesSource,t):t;const r=n._versions,i={};let s={};return r.forEach(o=>{G(i,o._cfg.storesSource),s=o._cfg.dbschema={},o._parseStoresSpec(i,s)}),n._dbSchema=s,Hn(n,[n._allTables,n,n.Transaction.prototype]),on(n,[n._allTables,n,n.Transaction.prototype,this._cfg.tables],N(s),s),n._storeNames=N(s),this}upgrade(t){return this._cfg.contentUpgrade=kn(this._cfg.contentUpgrade||T,t),this}}function Zn(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new je(en,{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function er(e){return e&&typeof e.databases=="function"}function tr(e){return _e(function(){return U.letThrough=!0,e()})}function vo(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()}).finally(function(){return clearInterval(e)}):Promise.resolve()}function bo(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(()=>t.dbOpenError?F(t.dbOpenError):e);ae&&(t.openCanceller._stackHolder=De()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function i(){if(t.openCanceller!==r)throw new x.DatabaseClosed("db.open() was cancelled")}let s=t.dbReadyResolve,o=null,a=!1;return k.race([r,(typeof navigator>"u"?k.resolve():vo()).then(()=>new k((l,u)=>{if(i(),!n)throw new x.MissingAPI;const c=e.name,h=t.autoSchema?n.open(c):n.open(c,Math.round(10*e.verno));if(!h)throw new x.MissingAPI;h.onerror=le(u),h.onblocked=K(e._fireOnBlocked),h.onupgradeneeded=K(d=>{if(o=h.transaction,t.autoSchema&&!e._options.allowEmptyDB){h.onerror=Et,o.abort(),h.result.close();const g=n.deleteDatabase(c);g.onsuccess=g.onerror=K(()=>{u(new x.NoSuchDatabase(`Database ${c} doesnt exist`))})}else{o.onerror=le(u);var p=d.oldVersion>Math.pow(2,62)?0:d.oldVersion;a=p<1,e._novip.idbdb=h.result,go(e,p/10,o,u)}},u),h.onsuccess=K(()=>{o=null;const d=e._novip.idbdb=h.result,p=Nt(d.objectStoreNames);if(p.length>0)try{const y=d.transaction((g=p).length===1?g[0]:g,"readonly");t.autoSchema?function({_novip:w},m,f){w.verno=m.version/10;const v=w._dbSchema=Qn(0,m,f);w._storeNames=Nt(m.objectStoreNames,0),on(w,[w._allTables],N(v),v)}(e,d,y):(Xn(e,e._dbSchema,y),function(w,m){const f=Ui(Qn(0,w.idbdb,m),w._dbSchema);return!(f.add.length||f.change.some(v=>v.add.length||v.change.length))}(e,y)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Gn(e,y)}catch{}var g;bt.push(e),d.onversionchange=K(y=>{t.vcFired=!0,e.on("versionchange").fire(y)}),d.onclose=K(y=>{e.on("close").fire(y)}),a&&function({indexedDB:y,IDBKeyRange:w},m){!er(y)&&m!==en&&Zn(y,w).put({name:m}).catch(T)}(e._deps,c),l()},u)}))]).then(()=>(i(),t.onReadyBeingFired=[],k.resolve(tr(()=>e.on.ready.fire(e.vip))).then(function l(){if(t.onReadyBeingFired.length>0){let u=t.onReadyBeingFired.reduce(kn,T);return t.onReadyBeingFired=[],k.resolve(tr(()=>u(e.vip))).then(l)}}))).finally(()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1}).then(()=>e).catch(l=>{t.dbOpenError=l;try{o&&o.abort()}catch{}return r===t.openCanceller&&e._close(),F(l)}).finally(()=>{t.openComplete=!0,s()})}function nr(e){var t=s=>e.next(s),n=i(t),r=i(s=>e.throw(s));function i(s){return o=>{var a=s(o),l=a.value;return a.done?l:l&&typeof l.then=="function"?l.then(n,r):W(l)?Promise.all(l).then(n,r):n(l)}}return i(t)()}function _o(e,t,n){var r=arguments.length;if(r<2)throw new x.InvalidArgument("Too few arguments");for(var i=new Array(r-1);--r;)i[r-1]=arguments[r];return n=i.pop(),[e,Yr(i),n]}function xi(e,t,n,r,i){return k.resolve().then(()=>{const s=U.transless||U,o=e._createTransaction(t,n,e._dbSchema,r),a={trans:o,transless:s};if(r)o.idbtrans=r.idbtrans;else try{o.create(),e._state.PR1398_maxLoop=3}catch(h){return h.name===Ln.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(()=>xi(e,t,n,null,i))):F(h)}const l=_n(i);let u;l&&nt();const c=k.follow(()=>{if(u=i.call(o,o),u)if(l){var h=pe.bind(null,null);u.then(h,h)}else typeof u.next=="function"&&typeof u.throw=="function"&&(u=nr(u))},a);return(u&&typeof u.then=="function"?k.resolve(u).then(h=>o.active?h:F(new x.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):c.then(()=>u)).then(h=>(r&&o._resolve(),o._completion.then(()=>h))).catch(h=>(o._reject(h),F(h)))})}function an(e,t,n){const r=W(e)?e.slice():[e];for(let i=0;i0,m={...d,isVirtual:w,keyTail:h,keyLength:y,extractKey:zn(c),unique:!w&&d.unique};return g.push(m),m.isPrimaryKey||s.push(m),y>1&&o(y===2?c[0]:c.slice(0,y-1),h+1,d),g.sort((f,v)=>f.keyTail-v.keyTail),m}const a=o(r.primaryKey.keyPath,0,r.primaryKey);i[":id"]=[a];for(const c of r.indexes)o(c.keyPath,0,c);function l(c){const h=c.query.index;return h.isVirtual?{...c,query:{index:h,range:(d=c.query.range,p=h.keyTail,{type:d.type===1?2:d.type,lower:an(d.lower,d.lowerOpen?e.MAX_KEY:e.MIN_KEY,p),lowerOpen:!0,upper:an(d.upper,d.upperOpen?e.MIN_KEY:e.MAX_KEY,p),upperOpen:!0})}}:c;var d,p}return{...n,schema:{...r,primaryKey:a,indexes:s,getIndexByKeyPath:function(c){const h=i[It(c)];return h&&h[0]}},count:c=>n.count(l(c)),query:c=>n.query(l(c)),openCursor(c){const{keyTail:h,isVirtual:d,keyLength:p}=c.query.index;return d?n.openCursor(l(c)).then(g=>g&&function(y){return Object.create(y,{continue:{value:function(m){m!=null?y.continue(an(m,c.reverse?e.MAX_KEY:e.MIN_KEY,h)):c.unique?y.continue(y.key.slice(0,p).concat(c.reverse?e.MIN_KEY:e.MAX_KEY,h)):y.continue()}},continuePrimaryKey:{value(m,f){y.continuePrimaryKey(an(m,e.MAX_KEY,h),f)}},primaryKey:{get:()=>y.primaryKey},key:{get(){const m=y.key;return p===1?m[0]:m.slice(0,p)}},value:{get:()=>y.value}})}(g)):n.openCursor(c)}}}}}};function rr(e,t,n,r){return n=n||{},r=r||"",N(e).forEach(i=>{if(Z(t,i)){var s=e[i],o=t[i];if(typeof s=="object"&&typeof o=="object"&&s&&o){const a=vn(s);a!==vn(o)?n[r+i]=t[i]:a==="Object"?rr(s,o,n,r+i+"."):s!==o&&(n[r+i]=t[i])}else s!==o&&(n[r+i]=t[i])}else n[r+i]=void 0}),N(t).forEach(i=>{Z(e,i)||(n[r+i]=t[i])}),n}const Eo={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema;return{...n,mutate(s){const o=U.trans,{deleting:a,creating:l,updating:u}=o.table(t).hook;switch(s.type){case"add":if(l.fire===T)break;return o._promise("readwrite",()=>c(s),!0);case"put":if(l.fire===T&&u.fire===T)break;return o._promise("readwrite",()=>c(s),!0);case"delete":if(a.fire===T)break;return o._promise("readwrite",()=>c(s),!0);case"deleteRange":if(a.fire===T)break;return o._promise("readwrite",()=>function(d){return h(d.trans,d.range,1e4)}(s),!0)}return n.mutate(s);function c(d){const p=U.trans,g=d.keys||function(y,w){return w.type==="delete"?w.keys:w.keys||w.values.map(y.extractKey)}(r,d);if(!g)throw new Error("Keys missing");return(d=d.type==="add"||d.type==="put"?{...d,keys:g}:{...d}).type!=="delete"&&(d.values=[...d.values]),d.keys&&(d.keys=[...d.keys]),function(y,w,m){return w.type==="add"?Promise.resolve([]):y.getMany({trans:w.trans,keys:m,cache:"immutable"})}(n,d,g).then(y=>{const w=g.map((m,f)=>{const v=y[f],b={onerror:null,onsuccess:null};if(d.type==="delete")a.fire.call(b,m,v,p);else if(d.type==="add"||v===void 0){const _=l.fire.call(b,m,d.values[f],p);m==null&&_!=null&&(m=_,d.keys[f]=m,r.outbound||ne(d.values[f],r.keyPath,m))}else{const _=rr(v,d.values[f]),E=u.fire.call(b,_,m,v,p);if(E){const S=d.values[f];Object.keys(E).forEach(O=>{Z(S,O)?S[O]=E[O]:ne(S,O,E[O])})}}return b});return n.mutate(d).then(({failures:m,results:f,numFailures:v,lastResult:b})=>{for(let _=0;_(w.forEach(f=>f.onerror&&f.onerror(m)),Promise.reject(m)))})}function h(d,p,g){return n.query({trans:d,values:!1,query:{index:r,range:p},limit:g}).then(({result:y})=>c({type:"delete",keys:y,trans:d}).then(w=>w.numFailures>0?Promise.reject(w.failures[0]):y.length({table:t=>{const n=e.table(t);return{...n,getMany:r=>{if(!r.cache)return n.getMany(r);const i=Ai(r.keys,r.trans._cache,r.cache==="clone");return i?k.resolve(i):n.getMany(r).then(s=>(r.trans._cache={keys:r.keys,values:r.cache==="clone"?ht(s):s},s))},mutate:r=>(r.type!=="add"&&(r.trans._cache=null),n.mutate(r))}}})};function ir(e){return!("from"in e)}const ye=function(e,t){if(!this){const n=new ye;return e&&"d"in e&&G(n,e),n}G(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Ut(e,t,n){const r=H(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(ir(e))return G(e,{from:t,to:n,d:1});const i=e.l,s=e.r;if(H(n,e.from)<0)return i?Ut(i,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Oi(e);if(H(t,e.to)>0)return s?Ut(s,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Oi(e);H(t,e.from)<0&&(e.from=t,e.l=null,e.d=s?s.d+1:1),H(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const o=!e.r;i&&!e.l&&ln(e,i),s&&o&&ln(e,s)}function ln(e,t){ir(t)||function n(r,{from:i,to:s,l:o,r:a}){Ut(r,i,s),o&&n(r,o),a&&n(r,a)}(e,t)}function ko(e,t){const n=sr(t);let r=n.next();if(r.done)return!1;let i=r.value;const s=sr(e);let o=s.next(i.from),a=o.value;for(;!r.done&&!o.done;){if(H(a.from,i.to)<=0&&H(a.to,i.from)>=0)return!0;H(i.from,a.from)<0?i=(r=n.next(a.from)).value:a=(o=s.next(i.from)).value}return!1}function sr(e){let t=ir(e)?null:{s:0,n:e};return{next(n){const r=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&H(n,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||H(n,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Oi(e){var t,n;const r=(((t=e.r)===null||t===void 0?void 0:t.d)||0)-(((n=e.l)===null||n===void 0?void 0:n.d)||0),i=r>1?"r":r<-1?"l":"";if(i){const s=i==="r"?"l":"r",o={...e},a=e[i];e.from=a.from,e.to=a.to,e[i]=a[i],o[i]=a[s],e[s]=o,o.d=Di(o)}e.d=Di(e)}function Di({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}Qe(ye.prototype,{add(e){return ln(this,e),this},addKey(e){return Ut(this,e,e),this},addKeys(e){return e.forEach(t=>Ut(this,t,t)),this},[bn](){return sr(this)}});const Io={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new ye(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const i=e.table(r),{schema:s}=i,{primaryKey:o}=s,{extractKey:a,outbound:l}=o,u={...i,mutate:d=>{const p=d.trans,g=p.mutatedParts||(p.mutatedParts={}),y=E=>{const S=`idb://${t}/${r}/${E}`;return g[S]||(g[S]=new ye)},w=y(""),m=y(":dels"),{type:f}=d;let[v,b]=d.type==="deleteRange"?[d.range]:d.type==="delete"?[d.keys]:d.values.length<50?[[],d.values]:[];const _=d.trans._cache;return i.mutate(d).then(E=>{if(W(v)){f!=="delete"&&(v=E.results),w.addKeys(v);const S=Ai(v,_);S||f==="add"||m.addKeys(v),(S||b)&&function(O,L,B,R){function $(M){const A=O(M.name||"");function xe(J){return J!=null?M.extractKey(J):null}const at=J=>M.multiEntry&&W(J)?J.forEach(qe=>A.addKey(qe)):A.addKey(J);(B||R).forEach((J,qe)=>{const Ot=B&&xe(B[qe]),Er=R&&xe(R[qe]);H(Ot,Er)!==0&&(Ot!=null&&at(Ot),Er!=null&&at(Er))})}L.indexes.forEach($)}(y,s,S,b)}else if(v){const S={from:v.lower,to:v.upper};m.add(S),w.add(S)}else w.add(n),m.add(n),s.indexes.forEach(S=>y(S.name).add(n));return E})}},c=({query:{index:d,range:p}})=>{var g,y;return[d,new ye((g=p.lower)!==null&&g!==void 0?g:e.MIN_KEY,(y=p.upper)!==null&&y!==void 0?y:e.MAX_KEY)]},h={get:d=>[o,new ye(d.key)],getMany:d=>[o,new ye().addKeys(d.keys)],count:c,query:c,openCursor:c};return N(h).forEach(d=>{u[d]=function(p){const{subscr:g}=U;if(g){const y=b=>{const _=`idb://${t}/${r}/${b}`;return g[_]||(g[_]=new ye)},w=y(""),m=y(":dels"),[f,v]=h[d](p);if(y(f.name||"").add(v),!f.isPrimaryKey){if(d!=="count"){const b=d==="query"&&l&&p.values&&i.query({...p,values:!1});return i[d].apply(this,arguments).then(_=>{if(d==="query"){if(l&&p.values)return b.then(({result:S})=>(w.addKeys(S),_));const E=p.values?_.result.map(a):_.result;p.values?w.addKeys(E):m.addKeys(E)}else if(d==="openCursor"){const E=_,S=p.values;return E&&Object.create(E,{key:{get:()=>(m.addKey(E.primaryKey),E.key)},primaryKey:{get(){const O=E.primaryKey;return m.addKey(O),O}},value:{get:()=>(S&&w.addKey(E.primaryKey),E.value)}})}return _})}m.add(n)}}return i[d].apply(this,arguments)}}),u}}}};class je{constructor(t,n){this._middlewares={},this.verno=0;const r=je.dependencies;this._options=n={addons:je.addons,autoOpen:!0,indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange,...n},this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};const{addons:i}=n;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const s={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:T,dbReadyPromise:null,cancelOpen:T,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var o;s.dbReadyPromise=new k(a=>{s.dbReadyResolve=a}),s.openCanceller=new k((a,l)=>{s.cancelOpen=l}),this._state=s,this.name=t,this.on=_t(this,"populate","blocked","versionchange","close",{ready:[kn,T]}),this.on.ready.subscribe=Wr(this.on.ready.subscribe,a=>(l,u)=>{je.vip(()=>{const c=this._state;if(c.openComplete)c.dbOpenError||k.resolve().then(l),u&&a(l);else if(c.onReadyBeingFired)c.onReadyBeingFired.push(l),u&&a(l);else{a(l);const h=this;u||a(function d(){h.on.ready.unsubscribe(l),h.on.ready.unsubscribe(d)})}})}),this.Collection=(o=this,St(lo.prototype,function(a,l){this.db=o;let u=gi,c=null;if(l)try{u=l()}catch(g){c=g}const h=a._ctx,d=h.table,p=d.hook.reading.fire;this._ctx={table:d,index:h.index,isPrimKey:!h.index||d.schema.primKey.keyPath&&h.index===d.schema.primKey.name,range:u,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:c,or:h.or,valueMapper:p!==ft?p:null}})),this.Table=function(a){return St(ao.prototype,function(l,u,c){this.db=a,this._tx=c,this.name=l,this.schema=u,this.hook=a._allTables[l]?a._allTables[l].hook:_t(null,{creating:[Ys,T],reading:[Hs,ft],updating:[Qs,T],deleting:[Js,T]})})}(this),this.Transaction=function(a){return St(po.prototype,function(l,u,c,h,d){this.db=a,this.mode=l,this.storeNames=u,this.schema=c,this.chromeTransactionDurability=h,this.idbtrans=null,this.on=_t(this,"complete","error","abort"),this.parent=d||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new k((p,g)=>{this._resolve=p,this._reject=g}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},p=>{var g=this.active;return this.active=!1,this.on.error.fire(p),this.parent?this.parent._reject(p):g&&this.idbtrans&&this.idbtrans.abort(),F(p)})})}(this),this.Version=function(a){return St(wo.prototype,function(l){this.db=a,this._cfg={version:l,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(a){return St(Ei.prototype,function(l,u,c){this.db=a,this._ctx={table:l,index:u===":id"?null:u,or:c};const h=a._deps.indexedDB;if(!h)throw new x.MissingAPI;this._cmp=this._ascending=h.cmp.bind(h),this._descending=(d,p)=>h.cmp(p,d),this._max=(d,p)=>h.cmp(d,p)>0?d:p,this._min=(d,p)=>h.cmp(d,p)<0?d:p,this._IDBKeyRange=a._deps.IDBKeyRange})}(this),this.on("versionchange",a=>{a.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",a=>{!a.newVersion||a.newVersionnew this.Transaction(a,l,u,this._options.chromeTransactionDurability,c),this._fireOnBlocked=a=>{this.on("blocked").fire(a),bt.filter(l=>l.name===this.name&&l!==this&&!l._state.vcFired).map(l=>l.on("versionchange").fire(a))},this.use(So),this.use(Eo),this.use(Io),this.use(Lo),this.vip=Object.create(this,{_vip:{value:!0}}),i.forEach(a=>a(this))}version(t){if(isNaN(t)||t<.1)throw new x.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new x.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);const n=this._versions;var r=n.filter(i=>i._cfg.version===t)[0];return r||(r=new this.Version(t),n.push(r),n.sort(mo),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(t){return this.idbdb&&(this._state.openComplete||U.letThrough||this._vip)?t():new k((n,r)=>{if(this._state.openComplete)return r(new x.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void r(new x.DatabaseClosed);this.open().catch(T)}this._state.dbReadyPromise.then(n,r)}).then(t)}use({stack:t,create:n,level:r,name:i}){i&&this.unuse({stack:t,name:i});const s=this._middlewares[t]||(this._middlewares[t]=[]);return s.push({stack:t,create:n,level:r??10,name:i}),s.sort((o,a)=>o.level-a.level),this}unuse({stack:t,name:n,create:r}){return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter(i=>r?i.create!==r:!!n&&i.name!==n)),this}open(){return bo(this)}_close(){const t=this._state,n=bt.indexOf(this);if(n>=0&&bt.splice(n,1),this.idbdb){try{this.idbdb.close()}catch{}this._novip.idbdb=null}t.dbReadyPromise=new k(r=>{t.dbReadyResolve=r}),t.openCanceller=new k((r,i)=>{t.cancelOpen=i})}close(){this._close();const t=this._state;this._options.autoOpen=!1,t.dbOpenError=new x.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)}delete(){const t=arguments.length>0,n=this._state;return new k((r,i)=>{const s=()=>{this.close();var o=this._deps.indexedDB.deleteDatabase(this.name);o.onsuccess=K(()=>{(function({indexedDB:a,IDBKeyRange:l},u){!er(a)&&u!==en&&Zn(a,l).delete(u).catch(T)})(this._deps,this.name),r()}),o.onerror=le(i),o.onblocked=this._fireOnBlocked};if(t)throw new x.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(s):s()})}backendDB(){return this.idbdb}isOpen(){return this.idbdb!==null}hasBeenClosed(){const t=this._state.dbOpenError;return t&&t.name==="DatabaseClosed"}hasFailed(){return this._state.dbOpenError!==null}dynamicallyOpened(){return this._state.autoSchema}get tables(){return N(this._allTables).map(t=>this._allTables[t])}transaction(){const t=_o.apply(this,arguments);return this._transaction.apply(this,t)}_transaction(t,n,r){let i=U.trans;i&&i.db===this&&t.indexOf("!")===-1||(i=null);const s=t.indexOf("?")!==-1;let o,a;t=t.replace("!","").replace("?","");try{if(a=n.map(u=>{var c=u instanceof this.Table?u.name:u;if(typeof c!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return c}),t=="r"||t===Fn)o=Fn;else{if(t!="rw"&&t!=Mn)throw new x.InvalidArgument("Invalid transaction mode: "+t);o=Mn}if(i){if(i.mode===Fn&&o===Mn){if(!s)throw new x.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&a.forEach(u=>{if(i&&i.storeNames.indexOf(u)===-1){if(!s)throw new x.SubTransaction("Table "+u+" not included in parent transaction.");i=null}}),s&&i&&!i.active&&(i=null)}}catch(u){return i?i._promise(null,(c,h)=>{h(u)}):F(u)}const l=xi.bind(null,this,o,a,i,r);return i?i._promise(o,l,"lock"):U.trans?rt(U.transless,()=>this._whenReady(l)):this._whenReady(l)}table(t){if(!Z(this._allTables,t))throw new x.InvalidTable(`Table ${t} does not exist`);return this._allTables[t]}}const Uo=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable";class xo{constructor(t){this._subscribe=t}subscribe(t,n,r){return this._subscribe(t&&typeof t!="function"?t:{next:t,error:n,complete:r})}[Uo](){return this}}function Pi(e,t){return N(t).forEach(n=>{ln(e[n]||(e[n]=new ye),t[n])}),e}function Ao(e){let t,n=!1;const r=new xo(i=>{const s=_n(e);let o=!1,a={},l={};const u={get closed(){return o},unsubscribe:()=>{o=!0,ke.storagemutated.unsubscribe(p)}};i.start&&i.start(u);let c=!1,h=!1;function d(){return N(l).some(y=>a[y]&&ko(a[y],l[y]))}const p=y=>{Pi(a,y),d()&&g()},g=()=>{if(c||o)return;a={};const y={},w=function(m){s&&nt();const f=()=>_e(e,{subscr:m,trans:null}),v=U.trans?rt(U.transless,f):f();return s&&v.then(pe,pe),v}(y);h||(ke(Lt,p),h=!0),c=!0,Promise.resolve(w).then(m=>{n=!0,t=m,c=!1,o||(d()?g():(a={},l=y,i.next&&i.next(m)))},m=>{c=!1,n=!1,i.error&&i.error(m),u.unsubscribe()})};return g(),u});return r.hasValue=()=>n,r.getValue=()=>t,r}let or;try{or={indexedDB:j.indexedDB||j.mozIndexedDB||j.webkitIndexedDB||j.msIndexedDB,IDBKeyRange:j.IDBKeyRange||j.webkitIDBKeyRange}}catch{or={indexedDB:null,IDBKeyRange:null}}const Ke=je;function cn(e){let t=me;try{me=!0,ke.storagemutated.fire(e)}finally{me=t}}Qe(Ke,{...Mt,delete:e=>new Ke(e,{addons:[]}).delete(),exists:e=>new Ke(e,{addons:[]}).open().then(t=>(t.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return function({indexedDB:t,IDBKeyRange:n}){return er(t)?Promise.resolve(t.databases()).then(r=>r.map(i=>i.name).filter(i=>i!==en)):Zn(t,n).toCollection().primaryKeys()}(Ke.dependencies).then(e)}catch{return F(new x.MissingAPI)}},defineClass:()=>function(e){G(this,e)},ignoreTransaction:e=>U.trans?rt(U.transless,e):e(),vip:tr,async:function(e){return function(){try{var t=nr(e.apply(this,arguments));return t&&typeof t.then=="function"?t:k.resolve(t)}catch(n){return F(n)}}},spawn:function(e,t,n){try{var r=nr(e.apply(n,t||[]));return r&&typeof r.then=="function"?r:k.resolve(r)}catch(i){return F(i)}},currentTransaction:{get:()=>U.trans||null},waitFor:function(e,t){const n=k.resolve(typeof e=="function"?Ke.ignoreTransaction(e):e).timeout(t||6e4);return U.trans?U.trans.waitFor(n):n},Promise:k,debug:{get:()=>ae,set:e=>{Qr(e,e==="dexie"?()=>!0:mi)}},derive:Xe,extend:G,props:Qe,override:Wr,Events:_t,on:ke,liveQuery:Ao,extendObservabilitySet:Pi,getByKeyPath:de,setByKeyPath:ne,delByKeyPath:function(e,t){typeof t=="string"?ne(e,t,void 0):"length"in t&&[].map.call(t,function(n){ne(e,n,void 0)})},shallowClone:Hr,deepClone:ht,getObjectDiff:rr,cmp:H,asap:zr,minKey:Nn,addons:[],connections:bt,errnames:Ln,dependencies:or,semVer:fi,version:fi.split(".").map(e=>parseInt(e)).reduce((e,t,n)=>e+t/Math.pow(10,2*n))}),Ke.maxKey=kt(Ke.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(ke(Lt,e=>{if(!me){let t;Zt?(t=document.createEvent("CustomEvent"),t.initCustomEvent(Le,!0,!0,e)):t=new CustomEvent(Le,{detail:e}),me=!0,dispatchEvent(t),me=!1}}),addEventListener(Le,({detail:e})=>{me||cn(e)}));let me=!1;if(typeof BroadcastChannel<"u"){const e=new BroadcastChannel(Le);typeof e.unref=="function"&&e.unref(),ke(Lt,t=>{me||e.postMessage(t)}),e.onmessage=t=>{t.data&&cn(t.data)}}else if(typeof self<"u"&&typeof navigator<"u"){ke(Lt,t=>{try{me||(typeof localStorage<"u"&&localStorage.setItem(Le,JSON.stringify({trig:Math.random(),changedParts:t})),typeof self.clients=="object"&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(n=>n.postMessage({type:Le,changedParts:t})))}catch{}}),typeof addEventListener<"u"&&addEventListener("storage",t=>{if(t.key===Le){const n=JSON.parse(t.newValue);n&&cn(n.changedParts)}});const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:t}){t&&t.type===Le&&cn(t.changedParts)})}k.rejectionMapper=function(e,t){if(!e||e instanceof et||e instanceof TypeError||e instanceof SyntaxError||!e.name||!ti[e.name])return e;var n=new ti[e.name](t||e.message,e);return"stack"in e&&ue(n,"stack",{get:function(){return this.inner.stack}}),n},Qr(ae,mi);var ot=(e=>(e.ReadyForUpload="ReadyForUpload",e.UploadComplete="UploadComplete",e))(ot||{}),Ne=(e=>(e.After="after",e.Before="before",e.BeforeAndAfter="beforeAndAfter",e))(Ne||{});const ar="sprig.sessionId",Ri="sprig.disableReplayRecording",Oo=30,Ci=()=>{ve.setItem(Ri,"disabled")},Fe=()=>!!ve.getItem(Ri),Do=["did not allow mutations","called in an invalid security context"],Po=e=>{if(!e)return!0;for(const t of Do)if(e.toLowerCase().includes(t))return!1;return!0},Ro=(e,t,n)=>{Fe()||t instanceof Error&&(Ci(),Po(t==null?void 0:t.message)&&(window.UserLeap.reportError(e,t,n),To()))},Co=async(e,t)=>{var r;let n;try{if((r=window.navigator.storage)!=null&&r.estimate){const{quota:i,usage:s}=await window.navigator.storage.estimate();n={availableSpaceInMB:i&&s?(i-s)/(1024*1024):void 0,quota:i,usage:s}}}catch(i){window.UserLeap.reportError("Error getting storage estimate",i)}Ro(e,t,n)},Y=(()=>{const e=ve.getItem(ar);if(e)return I(`Found saved session id: ${e}`),ve.removeItem(ar),e;const t=We();return I(`Generating new uuid: ${t}`),t})();window.addEventListener("beforeunload",()=>{I(`Before page unload saving session id: ${Y}`),ve.setItem(ar,Y)});const To=async()=>{try{await Promise.allSettled([C.events.clear(),C.chunkUploads.clear(),C.pendingCaptures.clear()])}catch{}},lr=(e,t,n=()=>!0)=>C.table(t).where("timestamp").below(e).and(n).delete(),Bo=()=>{C.events.where("sessionId").equals(Y).delete(),C.pendingCaptures.where("sessionId").equals(Y).delete()},jo=e=>{const t=e.map(n=>({...n,sessionId:n.sessionId??Y}));return C.events.bulkAdd(t)},Ko=(e,t)=>C.events.where("[sessionId+timestamp]").between([Y,e],[Y,t]).toArray(),No=(e,t,n)=>{const r=new Date,i=r.setMinutes(r.getMinutes()+(n??Oo));return C.events.where("[sessionId+timestamp]").between([Y,e],[Y,t]).modify({expiredAt:i})},Fo=e=>C.chunkUploads.add({...e,sessionId:e.sessionId??Y}),Mo=(e,t)=>C.chunkUploads.update(e,{data:null,etag:t,status:ot.UploadComplete}),$o=({status:e,uploadId:t})=>t?C.chunkUploads.where({uploadId:t,status:e}).toArray():C.chunkUploads.where({sessionId:Y,status:e}).toArray(),Vo=e=>C.chunkUploads.where({uploadId:e,status:ot.UploadComplete}).toArray(),qo=e=>C.chunkUploads.where({uploadId:e,status:ot.UploadComplete}).delete(),Wo=e=>C.pendingCaptures.add({...e,sessionId:e.sessionId??Y,canUpload:!1}),zo=()=>C.pendingCaptures.where("sessionId").equals(Y).and(e=>e.targetTimestampC.pendingCaptures.where("sessionId").equals(Y).toArray(),Ho=e=>C.pendingCaptures.where("sessionId").equals(Y).and(t=>t.captureParams.responseGroupId===e).modify({canUpload:!0}),Yo=async e=>{var t;if((t=window.navigator.storage)!=null&&t.estimate){const{quota:n,usage:r}=await window.navigator.storage.estimate();if(n&&r&&(n-r)/1073741824{jr(`Error opening replay storage: ${JSON.stringify(e)}`),Ci()});const Qo=async(e,t,n)=>new Promise((r,i)=>{const s=e.createElement("script");s.src=t,s.onload=r,s.onerror=i,n&&(s.nonce=n),e.head.appendChild(s)});let Ti=1,cr=5e3,un=6e4;const Xo=5,Bi=1e3,ji=30,dn=ji+Xo,ur="sprig.pendingCount";let Ki=0,Ni=Date.now(),dr=!1;var hr=(e=>(e.Left="left_click",e.Right="right_click",e))(hr||{});const Zo=async(e,t,n,r=2,i)=>{try{if(Fe()){I("Not initializing replay because recording is disabled");return}if(!t){I("Not initializing replay because config didn't specify maxReplayDurationSeconds");return}if(i!=null&&i.minAvailableGb&&(Ti=i.minAvailableGb),!await Yo(Ti)){Br("Minimum storage not available");return}I("Initializing replay"),i!=null&&i.minDuration&&(cr=i.minDuration),i!=null&&i.batchDuration&&(un=i.batchDuration),Ts(r),oa(),na(t+dn,30*60,t+dn),ra(),window.rrwebRecord||(I("Loading recording script"),await Qo(e,"https://cdn.sprig.com/dependencies/record-2.0.0-alpha.6.min.js",n),I("Recording script finished loading"));const s=window.rrwebRecord;if(!s){Br("Record script failed to set global function");return}let o=!0;s({checkoutEveryNms:ji*1e3,sampling:{input:"last",scroll:250,media:800},emit:(a,l)=>{if(Fe())return;Ni=Date.now();const u=o||!!l;o=!1,ea({uuid:We(),event:JSON.stringify(a),isValidStart:u,timestamp:Date.now()})},...i}),dr=!0,Ki||(Ki=window.setInterval(()=>{Date.now()-Ni>Bi&&Ie("Sprig_Noop",{})},Bi))}catch(s){return re("Error initializing replay",s)}};let pr=!1,fr=[];const ea=e=>{fr.push(e),pr||ta()},ta=()=>{pr=!0,setTimeout(async()=>{if(Fe())return;const e=fr;fr=[],pr=!1;try{await jo(e)}catch(t){re("Error storing replay events",t)}},500)},na=(e=6*60,t=30*60,n=4*60)=>{const r=setInterval(()=>{const i=Date.now();Fe()||(ct(`Performing periodic replay data cleanup / Event Seconds ${e} / Chunk Seconds ${t} / Pending Capture Seconds ${n}`),C.transaction("rw!",C.events,C.chunkUploads,C.pendingCaptures,()=>{lr(i-e*1e3,"events",s=>s.expiredAt===void 0||s.expiredAts.canUpload===void 0||s.canUpload===!1)}).catch(s=>{clearInterval(r),re("Error deleting table rows",s)}),I("Cleanup complete"))},3e4)},ra=(e=5)=>{setInterval(da,e*1e3)},ia=async(e,t,n,r,i)=>{try{const s=Math.min(e+i,n),o=`from: ${new Date(e).toLocaleTimeString()} to ${new Date(s).toLocaleTimeString()}`;I(`Getting event batch ${o}`);const a=await Ko(e,s);if(!(a!=null&&a.length))return I(`No events found ${o}`),[r,[]];if(!r){I(`Searching for valid start in ${a.length} events ${o}`);let l=-1;if(a==null||a.forEach((c,h)=>{if(!c.isValidStart)return;const d=c.timestamp<=t;(l<0||d)&&(l=h)}),l<0)return I(`No valid start found in ${a.length} events ${o}`),[];const u=a[l].timestamp;return I(`Found valid start at: ${new Date(u).toLocaleTimeString()} in events ${o}`),[!0,a==null?void 0:a.slice(l)]}return[r,a]}catch(s){re("Error getting events batch",s)}},sa=(e,t,n)=>{const r=e.length,i=t*1024*1024,s=Math.ceil(r/n),o=Math.max(i,s);I(`Total file bytes: ${r} / target chunk size: ${o}`);const a=[];let l=0;for(;lPromise.all(e.map(async t=>{const n=await js(t);return await Mo(t.uuid,n),t.uploadId})),Mi=async e=>{I(`Marking upload complete if finished: ${e}`);const t=await Vo(e);if(!(t!=null&&t.length)){I(`No finished chunks found for upload: ${e}`);return}const n=t.reduce((s,o)=>(s.find(a=>a.chunkIndex===o.chunkIndex)||s.push(o),s),[]);n.sort((s,o)=>s.chunkIndex-o.chunkIndex);const r=n.map(s=>({ETag:s.etag,PartNumber:s.chunkIndex})).filter(s=>s.ETag!==null),i=n[0];await Vr({apiUrl:i.apiUrl,surveyId:i.surveyId,uploadId:e,responseGroupUuid:i.responseGroupId,etags:r,headers:i.completeUploadHeaders,replayDuration:i.replayDuration}),I(`Cleaning up chunks for ${e}`),await qo(e),I(`Done cleaning up chunks for ${e}`)},oa=async()=>{try{let e=[];if(await C.transaction("rw",C.chunkUploads,async()=>{e=await $o({status:ot.ReadyForUpload}).catch(n=>{re("chunkUploads transaction error",n)})}),!(e!=null&&e.length))return;const t=await Fi(e);I(`Finished uploading unfinished chunks for ${t}`),t!=null&&t.length&&await Promise.all(t.map(async n=>{n&&await Mi(n)}))}catch(e){re("Error getting chunk upload uuids",e)}},aa=async(e,t)=>{await Fi(t),I(`Done uploading chunks for uploads: ${e.join(",")}`),await Promise.all(e.map(n=>Mi(n)))},la=e=>{let t=0;e.forEach(i=>{t+=i.length});const n=new Uint8Array(t);let r=0;return e.forEach(i=>{n.set(i,r),r+=i.length}),n},$i=async(e,t,n)=>{const r=new TextEncoder;let i=null,s=null,o=null,a=!1,l=!1,[u,c]=[0,0];const h=e-dn*1e3,d=[];let p=[];I(`Getting events between ${new Date(e).toLocaleTimeString()} and ${new Date(t).toLocaleTimeString()}`),I(`Using batch duration: ${un}ms`);for(let y=h;yf.event).join(",")}`,m=r.encode(w);n?(s===null&&(ct("Attempting compression"),o=new window.CompressionStream("gzip"),s=o.writable.getWriter()),s.write(m)):d.push(m),a=!0}if(c-u{const n=window.CompressionStream!==void 0;let r=null;const i=t??Date.now(),s=i-e;try{r=await $i(s,i,n)}catch(o){if(o instanceof Error&&window.UserLeap.reportError("Error compressing replay",o),n)try{r=await $i(s,i,!1)}catch(a){re("fileData fallback failed",a)}}return r},Vi=async e=>{const{surveyId:t,responseGroupId:n,visitorId:r,apiUrl:i,completeUploadHeaders:s,replayParams:o,triggerTimestamp:a}=e,l=await ca(o.replayDurationSeconds*1e3,a);if(l!=null&&l.length)I(`Found file data for survey: ${t}`);else{I(`File data is empty for survey: ${t}`);return}const u=sa(l,o.minimumChunkSizeMb,o.signedUrls.length);I(`Got ${u.length} chunks for survey: ${t}`);const c=await Promise.all(u.map(async(h,d)=>{const p=We(),g={apiUrl:i,chunkIndex:d+1,completeUploadHeaders:s,etag:null,responseGroupId:n,status:ot.ReadyForUpload,surveyId:t,timestamp:a,totalChunks:u.length,data:h,uploadId:o.uploadId,uploadUrl:o.signedUrls[d].url,uuid:p,visitorId:r};return I(`Recording chunk upload: ${JSON.stringify({index:g.chunkIndex,surveyId:g.surveyId,uploadId:g.uploadId,size:h.length,id:p},null,2)}`),await Fo(g),I(`Done creating chunk upload: ${p}`),g}));I(`All chunk records created. Beginning upload for survey: ${t}`),await aa([o.uploadId],c)},qi=async(e,t)=>{try{if(I(`Attempting replay capture: ${JSON.stringify({isStandalone:e.isStandalone,duration:e.replayParams.replayDurationSeconds,type:e.replayParams.replayDurationType,responseGroupId:e.responseGroupId,surveyId:e.surveyId,triggerTimestamp:e.triggerTimestamp,visitorId:e.visitorId},null,2)}`),Fe()){I(`Replay recording is disabled: ${e.surveyId}`);return}I(`Replay recording enabled: ${e.surveyId}`);const{isStandalone:n,replayParams:r,triggerTimestamp:i,responseGroupId:s}=e,o=async()=>{setTimeout(()=>P.removeListener(D.QuestionAnswered,o),0),r.replayDurationType===Ne.Before?await Vi(e):await Ho(s)};if(r.replayDurationType===Ne.After||r.replayDurationType===Ne.BeforeAndAfter){n||(I("Attaching QuestionAnswered listener for non-standalone replay"),P.on(D.QuestionAnswered,o)),I(`Scheduling capture for replay of type: ${r.replayDurationType}`),await ua(e);return}if(n||t)I(`Proceeding to capture replay for survey: ${e.surveyId} / standalone? ${n} / canUpload? ${t}`),await Vi(e);else{const a=dn+r.replayDurationSeconds,l=i-a*1e3,u=i;I(`Setting expiry minutes to ${r.expirationTimeLimitMinutes} for events from ${new Date(l).toLocaleTimeString()} to ${new Date(u).toLocaleTimeString()}`),await No(l,u,r.expirationTimeLimitMinutes),I("Attaching QuestionAnswered listener"),P.on(D.QuestionAnswered,o)}}catch(n){re("Error scheduling or capturing replay",n)}},Wi=()=>{if(Fe()){ct("Not clearing user data, replay is disabled");return}try{Bo()}catch(e){re("Error clearing session event data",e)}};let ge=ve.getItem(ur);const ua=async e=>{I(`Scheduling replay capture: ${JSON.stringify(e)}`);const{surveyId:t}=e,n=await Go(),r=n==null?void 0:n.filter(o=>o.captureParams.surveyId===t);if(r!=null&&r.length){I(`Pending capture exists for survey: ${t}`);return}const i={...e,replayParams:{...e.replayParams}};e.replayParams.replayDurationType===Ne.BeforeAndAfter&&(i.replayParams.replayDurationSeconds*=2),i.replayParams.replayDurationType=Ne.Before;const s=e.triggerTimestamp+e.replayParams.replayDurationSeconds*1e3;return i.triggerTimestamp=s,ge=ge?(parseInt(ge)+1).toString():"1",ve.setItem(ur,ge),Wo({uuid:We(),targetTimestamp:s,timestamp:Date.now(),captureParams:i})},da=async()=>{try{if(ge&&parseInt(ge)>0){const e=await zo();e.length&&await Promise.all(e.map(async t=>{await C.pendingCaptures.delete(t.uuid),await qi(t.captureParams,t.canUpload)})),ge=(parseInt(ge)-e.length).toString(),ve.setItem(ur,ge)}}catch(e){re("Error initiating pending captures",e)}},Ie=(e,t)=>{var n,r;if(dr)try{(r=(n=window.rrwebRecord)==null?void 0:n.addCustomEvent)==null||r.call(n,e,t)}catch(i){re("Error recording custom event",i)}},zi=e=>{Ie("Sprig_PageView",e)},ha=e=>{Ie("Sprig_TrackEvent",e)},pa=e=>{Ie("Sprig_ShowSurvey",e)},fa=e=>{Ie("Sprig_Click",e)},ya=()=>{Ie("Sprig_Refresh",{})},ma=()=>{Ie("Sprig_BackForward",{})},ga=e=>{Ie("Sprig_Keystroke",e)},re=(e,t)=>(dr=!1,jr(`${e} - ${JSON.stringify(t)}`),Co(e,t)),yr={capture:!0},wa=["a","button","input","option","li","link"],va=["Escape","Enter","Backspace","F5","Tab"],ba=["label","type","role","title","placeholder","errormessage","valuetext","href"],Gi="aria-",_a=e=>{const t=e.getAttribute("type");return t?`${t} ${e.tagName.toLowerCase()}`:e.tagName.toLowerCase()},Hi=e=>{if(e.tagName.toLowerCase()==="html")return{element:"html"};const t=e.textContent,n=t?{text:t}:{};n.element=_a(e);for(const r of e.attributes){let i=r.name;const s=r.value;i.startsWith(Gi)&&(i=i.substring(Gi.length)),ba.includes(i)&&(n[i]=s)}return n},Sa=e=>{if(!e)return{};const n={...Hi(e)},r=e.parentElement;if(r&&wa.includes(r.tagName.toLowerCase())){const i=Hi(r);Object.assign(n,i)}return n},Yi=(e,t)=>{fa({x:t.x,y:t.y,type:e,elementAttributes:Sa(t.target)})},Ea=e=>t=>Yi(e,t),La=e=>{va.includes(e.key)&&ga({key:e.key})},ka=()=>{window.performance.getEntriesByType("navigation").map(t=>t.type).includes("reload")&&ya()},Ia=()=>{window.performance.getEntriesByType("navigation").map(t=>t.type).includes("back_forward")&&ma()},Ua=()=>{window.addEventListener("click",Ea(hr.Left),yr),window.addEventListener("mousedown",e=>{e.button===2&&Yi(hr.Right,e)},yr),window.addEventListener("keydown",La,yr),ka(),Ia()};window.UserLeap&&window.Sprig&&(window.Sprig._gtm?window.Sprig=window.UserLeap:window.UserLeap=window.Sprig),window.UserLeap||(window.UserLeap=window.Sprig),window.Sprig||(window.Sprig=window.UserLeap);const xa="rgba(255,255,255, 0.95)",Aa="rgba(0,0,0,0.9)",Oa="360px",mr="0px",Ji=()=>{window.UserLeap.container=document.createElement("div"),window.UserLeap.container.className="ul-container",document.body.appendChild(window.UserLeap.container)},Qi=e=>{Ta();const t=window.UserLeap.container;if(!(!t||!t.parentNode))try{t.parentNode.removeChild(t),window.UserLeap.container=null,te("trackStartUrl",null),P.emit(D.SurveyLifeCycle,{state:"dismissed"}),P.emit(D.SurveyClosed,{name:D.SurveyClosed,initiator:e})}catch(n){console.warn(`[Sprig] (ERR-412) Error removing UserLeap container by ${e} `+t),n instanceof Error&&window.UserLeap.reportError("dismissActiveSurvey",n)}},Xi=()=>{P.on(D.SurveyWillClose,({initiator:e})=>{Qi(e)})},Da=(e,t)=>{const r={...{position:"fixed",overflow:"auto",top:"0px",left:"0px",display:"none",height:"100%",width:"100%",transition:"background-color 0.3s ease-out",zIndex:2147483646}},i=t?e.overlayStyleMobile:e.overlayStyle;r["background-color"]=i==="light"?xa:Aa,t||(r.margin="auto"),window.UserLeap.container&&Object.assign(window.UserLeap.container.style,r)},Pa=(e,t,n)=>{var a,l;const r={position:"fixed",bottom:"0px",right:mr,border:0,backgroundColor:"rgba(0,0,0,0)",zIndex:2147483646,transition:"width 0.2s ease-in-out, height 0.2s ease-in-out"},i=Object.assign({},t,window.UserLeap);let s,o=!1;return n?((a=window.UserLeap.windowDimensions)!=null&&a.width?r.width=`${window.UserLeap.windowDimensions.width}px`:r.width="100%",(l=window.UserLeap.windowDimensions)!=null&&l.height?r.maxHeight=`${window.UserLeap.windowDimensions.height-20}px`:window.UserLeap.maxHeight?r.maxHeight=window.UserLeap.maxHeight:r.maxHeight=`${document.body.clientHeight-20}px`,["light","dark"].includes(i.overlayStyleMobile)&&(o=!0)):(r.width=Oa,r.maxHeight=window.UserLeap.maxHeight||"66vh",i.framePosition===lt.BottomLeft?s={left:mr}:i.framePosition===lt.TopLeft?s={left:mr,top:0}:i.framePosition===lt.TopRight?s={top:0}:i.framePosition===lt.Center&&(o=!0,s={margin:"auto",position:"static"},r.maxHeight=null)),o&&Da(i,n),Object.assign(e.style,r,s),o},Ra=(e,t,n)=>{var l,u;const r="ul-frame";Ji(),Ca();const i=document.createElement("iframe");i.id=r,i.setAttribute("title","Sprig User Feedback Dialog");const s=Pa(i,e,t);Xi(),i.setHeight=c=>{parseInt(i.style.height)!=c&&(i.style.height=`${c}px`,P.emit(D.SurveyHeight,{name:D.SurveyHeight,contentFrameHeight:c}))},i.setWidth=c=>{parseInt(i.style.width)!=c&&(i.style.width=`${c}px`,P.emit(D.SurveyWidth,{name:D.SurveyWidth,contentFrameWidth:c}))},(l=window.UserLeap.container)==null||l.appendChild(i),e&&(t?e.exitOnOverlayClickMobile:e.exitOnOverlayClick)&&window.UserLeap.container&&(window.UserLeap.container.onclick=()=>{P.emit(D.CloseSurveyOnOverlayClick)}),P.emit(D.SurveyLifeCycle,{state:"presented"}),P.emit(D.SurveyPresented,{name:D.SurveyPresented,[Pt.SurveyId]:n});const o=(u=i.contentWindow)==null?void 0:u.document;o&&(o.open("text/html","replace"),o.write(""),o.close());const a=o==null?void 0:o.head;return{frameId:r,contentWinDocHead:a,contentWindow:i.contentWindow,hasOverlay:s,iframe:i}},Zi={[D.SurveyFadingOut]:()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{"background-color":"rgba(0,0,0,0)"})}},Ca=()=>{Object.entries(Zi).forEach(([e,t])=>{P.on(e,t)})},Ta=()=>{Object.entries(Zi).forEach(([e,t])=>{P.off(e,t)})},Ba="!launch_darkly_";class ja{constructor(){V(this,"_ldData",{})}getAllLaunchDarklyVariations(){return this._ldData}setLDFlagsVariations(t){try{return!t||typeof t!="object"||Array.isArray(t)?!1:(Object.keys(this._ldData).forEach(n=>{delete this._ldData[n]}),Object.keys(t).forEach(n=>this._ldData[`${Ba}${n}`]=(t[n]??0)+1),!0)}catch(n){return n instanceof Error&&window.UserLeap.reportError("setAllLDFlagsVariations",n),console.warn("[Sprig] An issue had occured when setting LaunchDarkly flags and variations."),!1}}}const gr=new ja;Object.freeze(gr);const Ka="!optimizely_experiments_";class Na{constructor(){V(this,"_optimizelyData",{})}setOptimizelyExperiment(t,n=!0){if(!t||typeof t!="object")return!1;const{experiments:r}=t;try{return n&&Object.keys(this._optimizelyData).map(i=>{delete this._optimizelyData[i]}),r&&r.map(i=>{const{id:s,variation:o}=i,a=this.transformExperimentId(s);o&&typeof o=="string"&&(this._optimizelyData[a]=o)}),!0}catch(i){return i instanceof Error&&window.UserLeap.reportError("setOptimizelyExperiment",i),!1}}getAllOptimizelyExperiments(){return this._optimizelyData}getOptimizelyVariationName(t){return this._optimizelyData[this.transformExperimentId(t)]}transformExperimentId(t){return Ka+t}getAndSetWebOptimizelyExperiments(){var t;try{if(window&&window.optimizely&&typeof window.optimizely.get=="function"){const n=(t=window.optimizely.get("state"))==null?void 0:t.getExperimentStates({isActive:!0});if(n){const r=Object.keys(n).map(i=>{var s,o;return(s=n[i].variation)!=null&&s.name?{id:i,variation:(o=n[i].variation)==null?void 0:o.name}:{id:i,variation:"Original"}});return this.setOptimizelyExperiment({experiments:r},!1),!0}return!1}return!1}catch(n){return n instanceof Error&&window.UserLeap.reportError("getAndSetWebOptimizely",n),!1}}}const hn=new Na;Object.freeze(hn);class Fa{constructor(t,n){V(this,"paused");V(this,"queue");V(this,"ul");this.ul=t,this.paused=!1,this.queue=[],this.flush(n)}flush(t){const n=t.length;if(n)for(let r=0;r{};const r=new Promise(function(i){n=function(){i(t())}});return this.queue.push(n),r}else return t()}empty(){this.queue.length=0}}var ie=(e=>(e.Ready="ready",e.NoSurvey="no survey",e))(ie||{}),es=(e=>(e.Preview="sprigPreviewKey",e))(es||{});const Ma=["popState","pushState","replaceState"],$a={test:"test"},xt="!email",Va=["ios","android"],Me="environments",wr="pageUrl",$e="visitors",ts="ul-view-sdk-script",ns=Object.freeze({contains:(e,t)=>t.includes(e),notContains:(e,t)=>!t.includes(e),exactly:(e,t)=>t===e,notExactly:(e,t)=>t!==e,startsWith:(e,t)=>t.startsWith(e),endsWith:(e,t)=>t.endsWith(e),regex:(e,t)=>new RegExp(e).test(t),legacy:(e,t)=>new RegExp(e,"i").test(t)});function vr(e,t){const{matchType:n,pattern:r}=e,i=n?ns[n]:ns.legacy;let s=!1;try{s=i(r,t)}catch(o){const a=`[Sprig] (ERR-445) Failed to check url match with pattern ${r}`;o instanceof Error&&(console.warn(a,o),o.stack=JSON.stringify(e),window.UserLeap.reportError(a,o))}return s}function qa(e,t){const{pageUrlEvents:n,interactiveEvents:r,dismissOnPageChange:i}=window.UserLeap._config;if(!i)return!0;const s=[];n&&n.length&&s.push(...n),r&&r.length&&s.push(...r);const o=e&&s.find(a=>a.id===e);return o?vr(o,window.location.href):t===window.location.href}function At(e){const{pageUrlEvents:t,interactiveEvents:n,dismissOnPageChange:r,platform:i}=window.UserLeap._config;if(i&&i!==Rt.Web)return;const s=Ve("trackStartUrl"),o=s?String(s):null;t&&os(window.location.href),n&&(is(),Wa()),r&&o&&o!==window.location.href&&e&&Ma.includes(e.type)&&window.UserLeap("dismissActiveSurvey",Oe.PageChange)}const rs={capture:!0},Wa=()=>{const t=window.UserLeap._config.interactiveEvents.filter(r=>vr(r,window.location.href)).map(r=>{const{name:i,properties:s}=r,{selector:o,innerText:a}=s;return o?l=>{if(Or(l.target))try{l.target.closest(o)&&window.UserLeap("track",i)}catch{}return!1}:l=>(Or(l.target)&&l.target.innerText===a&&window.UserLeap("track",i),!1)}),n=r=>t.forEach(i=>i(r));window.UserLeap._config.interactiveEventsHandler=n,window.addEventListener("click",n,rs)},is=()=>{window.UserLeap._config.interactiveEventsHandler&&window.removeEventListener("click",window.UserLeap._config.interactiveEventsHandler,rs),delete window.UserLeap._config.interactiveEventsHandler};function za(){["hashchange","popstate"].forEach(e=>window.addEventListener(e,At,!0))}function Ga(){["hashchange","popstate"].forEach(e=>window.removeEventListener(e,At,!0)),window.UserLeap._config.interactiveEvents&&is()}function we(e,t,n){const r=[window.UserLeap._API_URL,"sdk",e];return t&&t.forEach(i=>{r.push(i),i===Me?r.push(window.UserLeap.envId):i===$e&&r.push(br())}),n&&r.push(n),r.join("/")}function Ha(e,t){let n=we("1",[Me],"questions?");return e!=null&&(n+=`&vid=${e}`),t&&(t.surveyId&&(n+=`&surveyid=${t.surveyId}`),t.surveyTemplateId&&(n+=`&surveytemplateid=${t.surveyTemplateId}`),t.previewLanguage&&(n+=`&previewLanguage=${encodeURIComponent(t.previewLanguage)}`)),n}function Ve(e){const t=X.getItem(Q.Credentials);if(t)try{const r=JSON.parse(t)[window.UserLeap.envId];return r&&r[e]||null}catch(n){n instanceof Error&&(n.stack=t,window.UserLeap.reportError("Failed to parse local storage credentials",n)),console.warn("[Sprig] (ERR-427) Failed to lookup saved ids",n)}return null}function te(e,t){const n=X.getItem(Q.Credentials);let r={};if(n)try{r=JSON.parse(n)}catch(s){s instanceof Error&&(s.stack=n,window.UserLeap.reportError("Failed to parse local storage credentials",s)),console.warn("[Sprig] (ERR-427) Failed to lookup saved ids",s)}let i=r[window.UserLeap.envId];i?i[e]=t:i={[e]:t},r[window.UserLeap.envId]=i;try{X.setItem(Q.Credentials,JSON.stringify(r))}catch(s){s instanceof Error&&console.warn(`[Sprig] (ERR-426) Unable to write to Local Storage:: ${s.message}`)}}function ss(){window.previewMode||(window.UserLeap.visitorId=We(),I(`Generating new vid: ${window.UserLeap.visitorId}`),te("vid",window.UserLeap.visitorId),P.emit(D.VisitorIDUpdated,{visitorId:window.UserLeap.visitorId}))}function br(){return window.previewMode?"0":window.UserLeap.visitorId||""}function os(e,t,n){if(e.endsWith("mock_snippet.html"))return;I(`Tracking page view: ${e}`);const r=window.UserLeap._config.pageUrlEvents;let i=!1;if(r&&r.length)for(let c=0;c0){const c=a[a.length-1],h=(Date.now()-c.viewedAt)/1e3;c.location!=e&&h>o&&zi({url:e,referrer:document.referrer,description:document.title}),(c.location!=e&&h>o||h>s)&&(window.UserLeap._queue.push(["track",wr,t,{url:e},n]),a.push(l))}else window.UserLeap._queue.push(["track",wr,t,{url:e},n]),a.push(l),zi({url:e});a.length>5&&a.splice(0,a.length-5),X.setItem(Q.PageViews,JSON.stringify(a))}catch(c){c instanceof Error&&window.UserLeap.reportError("trackPageView",c,{pageViewsStorage:u}),console.warn("[Sprig] (ERR-425) Failed to update page views in local storage")}}function Ya(){const e="Backbone"in window&&window.Backbone&&window.Backbone.history?window.Backbone.history:window.history;"pushState"in e&&(e.pushState=(t=>function(...r){const i=t.apply(this,r),s=new Event("pushState");return window.dispatchEvent(s),At(s),i})(e.pushState)),"replaceState"in e&&(e.replaceState=(t=>function(...r){const i=t.apply(this,r),s=new Event("replaceState");return window.dispatchEvent(s),At(s),i})(e.replaceState)),za()}async function _r(e,t){const n=br();e&&!t&&(window.UserLeap._config.mode=$a.test);const r=await Ue(Ha(n,{...e,previewLanguage:window.UserLeap._config.previewLanguage}),{},0,!0);return r.ok?(r.json.delay&&await Ct(r.json.delay),as(r.json)):(r.reportError&&r.error&&(console.warn("[Sprig] (ERR-414) Failed to request questions from the server",r.error),window.UserLeap.reportError("getQuestions",r.error)),{success:!1,surveyState:ie.NoSurvey})}const as=async e=>{var $,M;const{context:t,forceBrandedLogo:n,endCard:r,locale:i,productConfig:s,questions:o,responseGroupUid:a,surveyId:l,uuid:u,vid:c,sessionReplay:h}=e,d=Ye(window.UserLeap),p=Sr(d),g=Ja(d);if(I(`Attempting to display survey: ${l}`),h)if(I("Survey has replay attached"),p){const A={mediaRecordingUid:We(),mediaType:Ur.Screen,questionId:1,responseGroupUid:a,surveyId:l,updatedAt:new Date().toISOString(),visitorId:window.UserLeap.visitorId,isReplay:!0};P.emit(D.ReplayCapture,{responseGroupUid:a,hasQuestions:!!(o!=null&&o.length),surveyId:l,uploadId:h.uploadId,replayType:h.replayDurationType??Ne.Before,seconds:h.replayDurationSeconds,generateVideoUploadUrlPayload:A})}else qi({responseGroupId:a,surveyId:l,visitorId:c,replayParams:h,completeUploadHeaders:d,apiUrl:window.UserLeap._API_URL,triggerTimestamp:Date.now(),isStandalone:o.length===0});if(c==null||!o||!o.length)return I(`Not displaying survey: vid: ${c} / questions: ${o}`),{success:!1,message:"[Sprig] no survey found",surveyState:ie.NoSurvey};if(window.UserLeap.container){I("Already displaying a survey");const A="[Sprig] (ERR-409) Found an existing Survey container, aborting rendering of this survey";return console.warn(A),{success:!1,message:A,surveyState:ie.NoSurvey}}if(c!==window.UserLeap.visitorId&&u!==window.UserLeap.visitorId&&!window.previewMode){const A="Attempted to display survey to a different visitor";return I(A),window.UserLeap.reportError("DisplaySurvey",new Error(A)),{success:!1,message:A,surveyState:ie.NoSurvey}}I(`Showing survey: ${l}`),pa({id:l}),ds.disable(),P.emit(D.SurveyWillPresent,{name:D.SurveyWillPresent,[Pt.SurveyId]:l});let y,w=document.createElement("div"),m,f,v;const b=A=>{const{[Ir.ViewVersion]:xe}=A;xe!==d["x-ul-sdk-version"]&&Qi(),P.removeListener(pn.VerifyViewVersion,b)};P.on(pn.VerifyViewVersion,b),gs(d)?(y="ul-direct-embeded-frame",m=document.head,f=window,v=!1,p&&(Ji(),w.id=y,window.UserLeap.container.appendChild(w),Xi(),P.emit(D.SurveyLifeCycle,{state:"presented"}),P.emit(D.SurveyPresented,{name:D.SurveyPresented,[Pt.SurveyId]:l}))):{frameId:y,contentWinDocHead:m,contentWindow:f,hasOverlay:v,iframe:w}=Ra(s,g,l),window.UserLeap.frameId=y,window.UserLeap.useMobileStyling=g;const _=A=>{P.on(D.CloseSurveyOnOverlayClick,A)},E=Object.assign({frame:w,envId:window.UserLeap.envId,surveyId:l,userId:u,visitorAttributes:{externalUserId:window.UserLeap.userId,email:window.UserLeap.email},cards:o,context:t,locale:i,fontFamily:window.UserLeap.fontFamily,fontFamilyURL:window.UserLeap.fontFamilyURL,apiURL:window.UserLeap._API_URL,responseGroupUid:a,headers:d,endCard:r,useMobileStyling:g,mobileSDKVersion:window.UserLeap.mobileSDKVersion,configureExitOnOverlayClick:_,eventEmitFn:P.emit.bind(P),ulEvents:kr,viewDocument:f==null?void 0:f.document,viewWindow:f,tabTitle:document.title,startingQuestionIdx:($=window.UserLeap.config)==null?void 0:$.startingQuestionIdx,styleNonce:window.UserLeap.styleNonce,previewKey:X.getItem(Q.Preview),forceBrandedLogo:n},window.UserLeap._config);(M=window.UserLeap.config)!=null&&M.startingQuestionIdx&&(window.UserLeap.config={...window.UserLeap.config,startingQuestionIdx:null}),window.UserLeap.customStyles&&(E.customStyles=window.UserLeap.customStyles),f&&(f.__cfg=E);function S(){const A=document.createElement("script");return window.UserLeap.nonce&&A.setAttribute("nonce",window.UserLeap.nonce),A.id=ts,A}const O=window.UserLeap.viewSDKURL?window.UserLeap.viewSDKURL:E.path,L=document.getElementById(ts);L&&L.remove();const B=S(),R=()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{display:"flex"})};if(E.installationMethod===ze.Npm||E.installationMethod===ze.NpmBundled){const{default:A}=await import("../view/view.tsx");A.configure(E),v&&window.UserLeap.container&&R()}else O&&(B.src=O,v&&B.addEventListener("load",()=>{window.UserLeap.container&&R()}),f==null||f.addEventListener("error",A=>{A.target instanceof HTMLScriptElement&&A.target.src===O&&window.UserLeap.reportError("loadFrameScript",new Error("Frame script failed to load"))},{capture:!0,once:!0}));return m==null||m.appendChild(B),{success:!0,surveyState:ie.Ready,surveyId:l,responseGroupUid:a}};function Ja(e){if(window.UserLeap.useMobileStyling!==void 0)return window.UserLeap.useMobileStyling;const t=window.UserLeap.windowDimensions&&window.UserLeap.windowDimensions.width||document.body.clientWidth;return Sr(e)||t>10&&t{var y,w,m,f;const{userId:i,anonymousId:s,metadata:o={},properties:a,showSurveyCallback:l}=r;let{eventName:u}=r;if(window.UserLeap.debugMode&&u!==wr&&console.info("[DEBUG] Sprig track",r),e.mode==="test")return;const c=X.getItem(Q.Preview)??void 0;if(e.requireUserIdForTracking&&!window.UserLeap.userId&&!i){const v="[Sprig] - Skipping tracking without userId";return console.warn(v),{success:!1,message:v,surveyState:ie.NoSurvey}}if(!u||u.trim().length===0){u=u?String(u):"";const v="[Sprig] - Invalid event name "+u;return console.warn(v),{success:!1,message:v,surveyState:ie.NoSurvey}}const h=window.location.href;if(o.url||(o.url=h),te("trackStartUrl",h),(w=(y=window.UserLeap)==null?void 0:y._config)!=null&&w.optimizelyEnabled){const v=Ye(window.UserLeap);Sr(v)||hn.getAndSetWebOptimizelyExperiments(),o.optimizelyExperiments=Object.assign({},hn.getAllOptimizelyExperiments())}(f=(m=window.UserLeap)==null?void 0:m._config)!=null&&f.launchDarklyEnabled&&(o.launchDarklyFlags=gr.getAllLaunchDarklyVariations()),i&&(window.UserLeap.userId=i),s&&(window.UserLeap.partnerAnonymousId=s),a&&(o.eventProperties=a),ha({name:u,url:o.url}),I(`Tracking event: ${u}`);const d=window.UserLeap.delayingSurvey?await Ue(we("1",[$e],"events/batch"),{body:JSON.stringify({events:[{event:u,metadata:o}],previewKey:c}),method:"POST"},0,!0):await Ue(we("1",[$e],"events"),{body:JSON.stringify({event:u,metadata:o,previewKey:c}),method:"POST"},0,!0);if(!d.ok){const v="[Sprig] (ERR-421) Failed to track event";return d.reportError&&(console.warn(v,d.error),d.error&&window.UserLeap.reportError("track",d.error)),{success:!1,message:v,error:d.error,surveyState:ie.NoSurvey}}i&&te("uid",i),s&&te("aid",s);const p=d.json;return p.invalidPreviewKey&&X.removeItem(Q.Preview),await Za(d,l)?qa(p.eventId,h)?as(p):{success:!1,message:"Study should not be displayed after page navigation",surveyState:ie.NoSurvey}:{success:!1,message:"[Sprig] Callback returned false, aborting rendering of survey",surveyState:ie.NoSurvey}},n={async displaySurvey(r){return console.warn("[Sprig] displaySurvey should only be used to debug your studies; not intended for production usage."),window.UserLeap("dismissActiveSurvey",Oe.Override),_r({surveyId:r},!0)},_previewSurvey(r){window.UserLeap("dismissActiveSurvey",Oe.Override),_r({surveyTemplateId:r},!1)},_reviewSurvey(r){window.UserLeap("dismissActiveSurvey",Oe.Override),_r({surveyId:r},!1)},previewSurvey(r){n._previewSurvey(r)},reviewSurvey(r){n._reviewSurvey(r)},mute(){window.UserLeap._queue.pause()},unmute(){window.UserLeap._queue.unpause()},setVisitorToken(){console.warn("[Sprig] setVisitorToken is deprecated.")},dismissActiveSurvey(r=Oe.API){P.emit(D.SurveyWillClose,{name:D.SurveyWillClose,initiator:r})},async setAttribute(r,i){if(!r||!i&&i!==0){const s="[Sprig] - Disregarding empty attribute / value provided";return console.warn(s),{success:!1,message:s}}return this.setAttributes({[r]:i})},async setAttributes(r){if(r==null||Object.keys(r).length===0){const i="[Sprig] - Disregarding empty attributes provided";return console.warn(i),{success:!1,message:i}}return this.identifyAndSetAttributes({attributes:r})},async identifyAndSetAttributes(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig identifyAndSetAttributes",r),e.mode==="test")return;if(r===null||typeof r!="object"||!(r.userId||r.anonymousId||r.attributes)){const u="[Sprig] - Disregarding empty payload provided";return console.warn(u),{success:!1,message:u}}const{userId:i,anonymousId:s,attributes:o}=r;if(e.requireUserIdForTracking&&!window.UserLeap.userId&&!i){const u="[Sprig] - Skipping tracking without userId";return console.warn(u),{success:!1,message:u}}if(!o&&(!i||window.UserLeap.userId===i)&&(!s||window.UserLeap.partnerAnonymousId===s))return{success:!0};const a={};i&&(a.userId=window.UserLeap.userId=i),s&&(a.partnerAnonymousId=window.UserLeap.partnerAnonymousId=s);let l;return o?(o.email&&!Object.prototype.hasOwnProperty.call(o,xt)&&(o[xt]=o.email,delete o.email),I(`Setting attributes: ${JSON.stringify(o)}`),l=await Ue(we("1",[Me,$e],"attributes"),{body:JSON.stringify(o),method:"PUT"}),!l.ok&&l.reportError&&(console.warn("[Sprig] (ERR-432) identifyAndSetAttributes failed",l.error),l.error&&window.UserLeap.reportError("identifyAndSetAttributes",l.error))):l=await Ue(we("1",[Me,$e]),{body:JSON.stringify(a),method:"PUT"}),o&&o[xt]&&(window.UserLeap.email=o[xt]),l.ok&&(i&&te("uid",i),s&&te("aid",s)),{success:!!l.ok}},async removeAttributes(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig removeAttributes",r),e.mode==="test")return;if(r==null||r.length===0){const s="[Sprig] - Disregarding empty attributes provided";return console.warn(s),{success:!1,message:s}}if(e.requireUserIdForTracking&&!window.UserLeap.userId){const s="[Sprig] - Skipping tracking without userId";return console.warn(s),{success:!1,message:s}}const i=await Ue(we("1",[Me,$e],"attributes"),{body:JSON.stringify({delete:r}),method:"DELETE"});return!i.ok&&i.reportError&&(console.warn("[Sprig] (ERR-433) Remove attributes failed",i.error),i.error&&window.UserLeap.reportError("removeAttributes",i.error)),{success:!!i.ok}},async addSurveyListener(r){P.on(D.SurveyLifeCycle,r)},async removeSurveyListener(r){P.removeListener(D.SurveyLifeCycle,r)},async addListener(r,i){P.on(r,i)},async removeListener(r,i){P.removeListener(r,i)},async removeAllListeners(){P.removeAllListeners()},setPreviewKey(r){!r||typeof r!="string"||X.isStorageAvailable&&r&&X.setItem(Q.Preview,r)},async setUserId(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig setUserId",r),r==null){const o=`[Sprig] - Invalid userId ${r}`;return console.warn(o),{success:!1,message:o}}if(e.mode==="test"||r===window.UserLeap.userId)return;window.UserLeap.userId=r;const i=window.UserLeap.visitorId,s=await Ue(we("1",[Me,$e]),{body:JSON.stringify({userId:r}),method:"PUT"});if(!s.ok){s.reportError&&(console.warn("[Sprig] (ERR-420) Failed to set user id",s.error),s.error&&window.UserLeap.reportError("setUserId",s.error));return}i!==window.UserLeap.visitorId&&Wi(),te("uid",r)},async setPartnerAnonymousId(r){if(window.UserLeap.debugMode&&console.info("[DEBUG] Sprig setPartnerAnonymousId",r),r==null){const i=`[Sprig] - Invalid partnerAnonymousId ${r}`;return console.warn(i),{success:!1,message:i}}return window.UserLeap.partnerAnonymousId=r,te("aid",r),{success:!0}},async track(r,i,s={},o=void 0){return t({eventName:r,properties:i,metadata:s,showSurveyCallback:o})},async identifyAndTrack(r){return await t(r)},trackPageView(r,i=void 0,s=void 0){os(r,i,s)},applyStyles(r){if(window.UserLeap.customStyles=r,window.UserLeap.container){const i=window.UserLeap.container.children[0].contentDocument;if(i){const s=i.getElementById(Dt.CustomStyle);s?s.textContent=r:ps(i,r,window.UserLeap.styleNonce)}}},setWindowDimensions(r,i){var l,u;const s=typeof r=="string"?parseInt(r,10):r,o=typeof i=="string"?parseInt(i,10):i;if(!isNaN(s)&&!isNaN(o)&&(window.UserLeap.windowDimensions={width:s,height:o}),!window.UserLeap.frameId)return;const a=document.getElementById(window.UserLeap.frameId);a&&(window.UserLeap.useMobileStyling&&((l=window.UserLeap.windowDimensions)!=null&&l.width&&(a.style.width=`${window.UserLeap.windowDimensions.width}px`),(u=window.UserLeap.windowDimensions)!=null&&u.height&&(a.style.maxHeight=`${window.UserLeap.windowDimensions.height-20}px`),a.contentDocument&&(a.style.height=String(ys(a.contentDocument)[0])+"px")),P.emit(D.SurveyDimensions,{name:D.SurveyDimensions,contentFrameWidth:a.clientWidth,contentFrameHeight:a.clientHeight}))},logoutUser(){window.UserLeap.debugMode&&console.info("[DEBUG] Sprig logout"),I(`Logging out user: ${window.UserLeap.userId} / vid: ${window.UserLeap.visitorId}`),window.UserLeap.visitorId=null,window.UserLeap.userId=null,window.UserLeap.partnerAnonymousId=null,window.UserLeap.token=null,window.UserLeap.email=null,X.removeItem(Q.Credentials),X.removeItem(Q.PageViews),window.UserLeap._queue.isPaused()&&window.UserLeap._queue.empty(),ss(),Wi(),window.UserLeap._queue.unpause()},teardown(){Ga(),window.UserLeap("dismissActiveSurvey",Oe.API),delete window.UserLeap,delete window.Sprig,delete window._Sprig},integrateOptimizely(r,i=!0){var s,o;if(!((o=(s=window.UserLeap)==null?void 0:s._config)!=null&&o.optimizelyEnabled)){console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");return}try{const a=typeof r=="string"?JSON.parse(r):r;hn.setOptimizelyExperiment(a,i)}catch(a){console.warn("[Sprig] Error with integrating Optimizely data"),a instanceof Error&&window.UserLeap.reportError("integrateOptimizely",a)}},integrateOptimizelyClient(r){var s,o;if(!((o=(s=window.UserLeap)==null?void 0:s._config)!=null&&o.optimizelyEnabled)){console.warn("[SPRIG] Optimizely integration is currently not enabled for your product.");return}const i=({experiment:a,variation:l})=>{const u={experiments:[{id:a.id,variation:l.key}]};window.UserLeap("integrateOptimizely",u,!1)};r.notificationCenter.addNotificationListener("ACTIVATE:experiment, user_id,attributes, variation, event",i)},importLaunchDarklyData(r){var i,s;if(!((s=(i=window.UserLeap)==null?void 0:i._config)!=null&&s.launchDarklyEnabled)){console.warn("[SPRIG] LaunchDarkly integration is currently not enabled for your product.");return}gr.setLDFlagsVariations(r)},setVisitorAttribute(r,i){return console.warn("[Sprig] setVisitorAttribute is deprecated. Please use setAttribute"),n.setAttribute(r,i)},async setEmail(r){return n.setAttribute(xt,r)},async setVisitorEmail(r){return console.warn("[Sprig] setVisitorEmail is deprecated. Please use setEmail"),n.setEmail(r)},async _generateVideoUploadUrl(r){return il(r)},async _completeSessionReplay({surveyId:r,responseGroupUuid:i,eventDigest:s}){if(!r||!i)return;const o=window.UserLeap._API_URL;try{await Vr({surveyId:r,responseGroupUuid:i,eventDigest:s,apiUrl:o,headers:Ye(window.UserLeap)},!0)}catch(a){console.warn("[Sprig] Error with completing session replay"),a instanceof Error&&window.UserLeap.reportError("completeSessionReplay",a)}}};Object.assign(window.UserLeap,n)};async function tl(e){const t=Ye(window.UserLeap);document.addEventListener("securitypolicyviolation",yn);const n=await Je(we("1",[Me],"config"),{headers:t}),r="TypeError";if(window.UserLeap.error=n.error,!n.ok&&n.error&&n.error.name===r?(window.UserLeap._API_URL="https://api.sprig.com",window.UserLeap.reportError("sprigDomainRequest",n.error)):document.removeEventListener("securitypolicyviolation",yn),!n.ok)return n.reportError&&(console.warn("[Sprig] (ERR-422) Failed to load configuration",n.error),n.error&&window.UserLeap.reportError("applyRemoteConfig",n.error)),mn("Disabled: failed to fetch configuration"),e;const i=n.json;return i!=null&&i.disabled?(mn(`Disabled: ${i.disabled}`),{disabled:i.disabled}):Object.assign({},i,e)}const nl=e=>typeof e=="object"&&e&&"inner"in e&&!!e.inner&&typeof e.inner=="object";async function rl(e,t,n={}){var h,d;const r=window.__cfg&&window.__cfg.mode,i=br(),s=window.UserLeap.envId,o=window.document.documentElement,a=nl(t)?{inner:{message:(h=t.inner)==null?void 0:h.message,stack:(d=t.inner)==null?void 0:d.stack}}:{},l={mode:r,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:o.clientWidth,clientHeight:o.clientHeight,location:window.location.href,language:window.navigator.language,...n,...a},u={action:e,err:{message:t.message,stack:t.stack},meta:l,vid:i,envId:s},c=await Ue(we("1",null,"errors"),{method:"POST",headers:{[oe.Error]:window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(u)},0,!0);if(!c.ok)console.warn("[Sprig] (ERR-444) Failed to report error to API",t);else{const{presignedUrl:p}=c.json;As(p)}}async function il(e){var n;if(!e)return;const t=`${window.UserLeap._API_URL}/2/environments/integrations/upload`;try{const r=await fetch(t,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(r.ok){const i=await r.json();return(n=i==null?void 0:i.upload)==null?void 0:n.url}else return null}catch(r){console.warn("[Sprig] Error with generating video upload url"),r instanceof Error&&window.UserLeap.reportError("generateVideoUploadUrl",r)}}function sl(e={}){const t=new URLSearchParams(window.location.search).get(es.Preview)??"";window.UserLeap.UPDATES=kr,window.UserLeap("setPreviewKey",t);async function n(){if(window.UserLeap.loaded)return;if(I("Loading sprig on page load"),window.UserLeap.reportError=rl,window.UserLeap.loaded=!0,window.UserLeap._config=Object.assign({},e,window.UserLeap.config),window.UserLeap.delayingSurvey=!1,window.UserLeap._config&&typeof window.UserLeap._config=="object")for(const a in window.UserLeap._config)window.UserLeap[a]=window.UserLeap._config[a];if(!window.UserLeap.envId)if(window.UserLeap.appId)window.UserLeap.envId=window.UserLeap.appId;else throw new Error("Missing Environment id");window.UserLeap.debugMode&&console.info("[DEBUG] Sprig debug mode enabled");const r=window.UserLeap.sampleRate;if(r){let a=Ve("sampled");if(a===null&&(a=Math.random(){Ua()}),Os(o.logBufferLimit,o.logLevel),el(o),await Xa(o),window.UserLeap._queue.unpause(),P.emit(D.SDKReady,{maxMobileReplayDurationSeconds:o.maxMobileReplayDurationSeconds,mobileReplaySettings:o.mobileReplaySettings}),P.emit(D.VisitorIDUpdated,{visitorId:window.UserLeap.visitorId})}document.readyState==="complete"?n():window.attachEvent?window.attachEvent("onload",n):window.addEventListener("load",()=>{n()},!1)}const ol="sprig-web-view-sdk";let ls;ls={path:`https://cdn.sprig.com/${ol}-v2.26.2.js`},sl(ls)})(); //# sourceMappingURL=shim.js.map diff --git a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/sprig_web_assets.bundle/snippet.js b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/sprig_web_assets.bundle/snippet.js index f8044f4..a79d754 100644 --- a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/sprig_web_assets.bundle/snippet.js +++ b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/sprig_web_assets.bundle/snippet.js @@ -37,19 +37,24 @@ function handleSurveyCallback(surveyState, callbackId) { } // Function to get the background property -function getBackgroundColor(cssString, selector) { - const hexColorRegex = /^#([0-9A-F]{3}){1,2}$/i; - const cssRegex = new RegExp(`${selector}\\s*{[^}]*background\\s*:\\s*([^;}]+)`, 'i'); +function getBackgroundColor(selector, cssString = '') { + try { + if (cssString && typeof cssString === 'string') { + const hexColorRegex = /^#([0-9A-F]{3}){1,2}$/i; + const cssRegex = new RegExp(`${selector}\\s*{[^}]*background\\s*:\\s*([^;}]+)`, 'i'); - const match = cssString.match(cssRegex); + const match = cssString.match(cssRegex); - if (match?.[1]) { - const backgroundColor = match[1].trim(); - if (hexColorRegex.test(backgroundColor)) { - return backgroundColor; + if (match?.[1]) { + const backgroundColor = match[1].trim(); + if (hexColorRegex.test(backgroundColor)) { + return backgroundColor; + } + } } + } catch (e) { + console.log('Failed to get backgroundColor', e); } - // Return a default value if not found or not a valid hex color return '#ffffff'; } @@ -58,10 +63,10 @@ Sprig('addListener', 'visitor.id.updated', (payload) => { window.webkit.messageHandlers.sprigWebController.postMessage({type: 'visitorIdUpdated', visitorId: payload.visitorId}); }); Sprig('addListener', 'sdk.ready', (payload) => { - window.webkit.messageHandlers.sprigWebController.postMessage({type: 'sdkReady', maxMobileReplayDurationSeconds: JSON.stringify(payload.maxMobileReplayDurationSeconds), mobileReplaySettings: JSON.stringify(payload.mobileReplaySettings), cardBgColor: getBackgroundColor(S._config.customStyles, '.ul-card__container') }); + window.webkit.messageHandlers.sprigWebController.postMessage({type: 'sdkReady', maxMobileReplayDurationSeconds: JSON.stringify(payload.maxMobileReplayDurationSeconds), mobileReplaySettings: JSON.stringify(payload.mobileReplaySettings), cardBgColor: getBackgroundColor('.ul-card__container', S._config.customStyles) }); }); Sprig('addListener', 'replay.capture', (payload) => { - window.webkit.messageHandlers.sprigWebController.postMessage({type: 'replayCapture', responseGroupUid: payload.responseGroupUid, hasQuestions: JSON.stringify(payload.hasQuestions), surveyId: JSON.stringify(payload.surveyId), uploadId: payload.uploadId, replayType: payload.type, seconds: JSON.stringify(payload.seconds), uploadUrl: payload.uploadUrl, generateVideoUploadUrlPayload: JSON.stringify(payload.generateVideoUploadUrlPayload) }); + window.webkit.messageHandlers.sprigWebController.postMessage({type: 'replayCapture', responseGroupUid: payload.responseGroupUid, hasQuestions: JSON.stringify(payload.hasQuestions), surveyId: JSON.stringify(payload.surveyId), uploadId: payload.uploadId, replayType: payload.replayType, seconds: JSON.stringify(payload.seconds), uploadUrl: payload.uploadUrl, generateVideoUploadUrlPayload: payload.generateVideoUploadUrlPayload }); }); Sprig('addListener', 'survey.height', (payload) => { window.webkit.messageHandlers.sprigWebController.postMessage({type: 'setHeight', height: payload.contentFrameHeight.toString() }); diff --git a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/sprig_web_assets.bundle/view.js b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/sprig_web_assets.bundle/view.js index 7124fce..f0d1bdf 100644 --- a/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/sprig_web_assets.bundle/view.js +++ b/UserLeapKit.xcframework/ios-arm64_x86_64-simulator/UserLeapKit.framework/sprig_web_assets.bundle/view.js @@ -1,4 +1,4 @@ -(function(ce){typeof define=="function"&&define.amd?define(ce):ce()})(function(){"use strict";var Ad=Object.defineProperty;var Dd=(ce,D,ze)=>D in ce?Ad(ce,D,{enumerable:!0,configurable:!0,writable:!0,value:ze}):ce[D]=ze;var Ee=(ce,D,ze)=>(Dd(ce,typeof D!="symbol"?D+"":D,ze),ze);var ce,D,ze,mt,it,Si,Ti,Pi,dn={},Ii=[],Ds=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function je(e,t){for(var n in t)e[n]=t[n];return e}function Ri(e){var t=e.parentNode;t&&t.removeChild(e)}function Y(e,t,n){var r,i,o,a={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?ce.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return Bt(e,a,r,i,null)}function Bt(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++ze:i};return i==null&&D.vnode!=null&&D.vnode(o),o}function Ai(){return{current:null}}function he(e){return e.children}function Os(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||fn(e,o,null,n[o],r);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||fn(e,o,t[o],n[o],r)}function Di(e,t,n){t[0]==="-"?e.setProperty(t,n==null?"":n):e[t]=n==null?"":typeof n!="number"||Ds.test(t)?n:n+"px"}function fn(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Di(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Di(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?ji:Oi,o):e.removeEventListener(t,o?ji:Oi,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n==null?"":n;break e}catch{}typeof n=="function"||(n==null||n===!1&&t.indexOf("-")==-1?e.removeAttribute(t):e.setAttribute(t,n))}}function Oi(e){mt=!0;try{return this.l[e.type+!1](D.event?D.event(e):e)}finally{mt=!1}}function ji(e){mt=!0;try{return this.l[e.type+!0](D.event?D.event(e):e)}finally{mt=!1}}function _e(e,t){this.props=e,this.context=t}function Nt(e,t){if(t==null)return e.__?Nt(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&it.sort(function(l,c){return l.__v.__b-c.__v.__b}));pn.__r=0}function Mi(e,t,n,r,i,o,a,s,l,c){var u,d,f,v,p,h,g,_=r&&r.__k||Ii,b=_.length;for(n.__k=[],u=0;u0?Bt(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)!=null){if(v.__=n,v.__b=n.__b+1,(f=_[u])===null||f&&v.key==f.key&&v.type===f.type)_[u]=void 0;else for(d=0;d=0;t--)if((n=e.__k[t])&&(r=Ui(n)))return r}return null}function ir(e,t,n,r,i,o,a,s,l){var c,u,d,f,v,p,h,g,_,b,x,w,m,C,S,k=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(l=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(c=D.__b)&&c(t);try{e:if(typeof k=="function"){if(g=t.props,_=(c=k.contextType)&&r[c.__c],b=c?_?_.props.value:c.__:r,n.__c?h=(u=t.__c=n.__c).__=u.__E:("prototype"in k&&k.prototype.render?t.__c=u=new k(g,b):(t.__c=u=new _e(g,b),u.constructor=k,u.render=Ms),_&&_.sub(u),u.props=g,u.state||(u.state={}),u.context=b,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),k.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=je({},u.__s)),je(u.__s,k.getDerivedStateFromProps(g,u.__s))),f=u.props,v=u.state,u.__v=t,d)k.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(k.getDerivedStateFromProps==null&&g!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(g,b),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(g,u.__s,b)===!1||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(E){E&&(E.__=t)}),x=0;x2&&(a.children=arguments.length>3?ce.call(arguments,2):n),Bt(e.type,a,r||e.key,i||e.ref,null)}function Ki(e,t){var n={__c:t="__cC"+Pi++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&i.some(function(s){s.__e=!0,rr(s)})},this.sub=function(a){i.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){i.splice(i.indexOf(a),1),s&&s.call(a)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}ce=Ii.slice,D={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},ze=0,mt=!1,_e.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=je({},this.state),typeof e=="function"&&(e=e(je({},n),this.props)),e&&je(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),rr(this))},_e.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),rr(this))},_e.prototype.render=he,it=[],Ti=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,pn.__r=0,Pi=0;var or=(e=>(e.Closed="close.click",e.Complete="survey.completed",e.PageChange="page.change",e.API="api",e.Override="override",e))(or||{}),Se=(e=>(e.ReplayCapture="replay.capture",e.SDKReady="sdk.ready",e.SurveyAppeared="survey.appeared",e.SurveyClosed="survey.closed",e.SurveyDimensions="survey.dimensions",e.SurveyFadingOut="survey.fadingOut",e.SurveyHeight="survey.height",e.SurveyPresented="survey.presented",e.SurveyLifeCycle="survey.lifeCycle",e.SurveyWillClose="survey.willClose",e.SurveyWillPresent="survey.will.present",e.CloseSurveyOnOverlayClick="close.survey.overlayClick",e.VisitorIDUpdated="visitor.id.updated",e.QuestionAnswered="question.answered",e))(Se||{}),Te=(e=>(e.VerifyViewVersion="verify.view.version",e.CurrentQuestion="survey.question",e.ViewPrototypeClick="question.prototype.click",e.ViewAgreementClick="question.agreement.click",e.RecordedTaskStart="recorded.task.start",e.RecordedTaskPermissionScreen="recorded.task.permission.screen",e.SurveyComplete="survey.complete",e))(Te||{}),yt=(e=>(e.ViewVersion="view.version",e.QuestionId="qid",e.Props="props",e))(yt||{});const _t="ul-app";var O=(e=>(e.Caption="ul-caption",e.CardContainer="ul-card__container",e.CardMainContent="ul-card-main-content",e.Choice="choice",e.ChoiceCheckbox="select-checkbox",e.ChoiceGroup="ul-card__choices",e.ChoiceLabel="select-label",e.ChoiceLabelContainer="choice-label-container",e.ChoiceRadio="select-radio",e.ChoiceTextEntryContainer="choice-text-entry-container",e.ChoiceTextInput="choice-text-input",e.CloseButton="close-btn",e.CloseContainer="close-container",e.ConsentLegalNameInput="ul-consent-legal__name-input",e.CustomStyle="ul-custom-style",e.DesktopSuffix="--desktop",e.FadeInTransition="fade-in-transition",e.LikertNumber="likert-number",e.LikertSmiley="likert-smiley",e.LikertStar="likert-star",e.LoadingSpinner="ul-loading-spinner",e.LoadingSpinnerContainer="ul-loading-spinner-container",e.LoadingSpinnerFirst="first",e.LoadingSpinnerFourth="fourth",e.LoadingSpinnerSecond="second",e.LoadingSpinnerThird="third",e.MobileSuffix="--mobile",e.NPSNumber="nps-number",e.OpenTextInput="ul-card-text__input",e.QuestionHeader="ul-question",e.VideoCard="ul-card--video",e.CheckmarkButton="ul-button-checkmark",e.InactiveButton="ul-button-inactive",e.LeftAlignButton="ul-button-left-align",e.ButtonDisabled="sprig-button-disabled",e.SkipButton="ul-card-skip__button",e))(O||{});const ar="#e6e6e6",Ut="#bd282a",Ns=1030,Us=1,Vs=(e,t,n)=>{const r=e.createElement("style");n&&(r.nonce=n),r.textContent=t,r.id=O.CustomStyle,e.head.appendChild(r)},Fs=e=>{const t=e.querySelector(`.${O.CardContainer}`);let n=600,r=0;if(t){n=t.scrollHeight;const i=getComputedStyle(t),o=parseFloat(i.marginTop)+parseFloat(i.marginBottom),a=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth);r=o+a}return n+r+Us},Hs=e=>{const t=e.querySelector(`.${O.CardContainer}`);t&&(t.scrollTop=0)};var $s=class extends Error{constructor(e,t,n){super(`Possible EventEmitter memory leak detected. ${n} ${t.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`),this.emitter=e,this.type=t,this.count=n,this.name="MaxListenersExceededWarning"}},zi=class{static listenerCount(e,t){return e.listenerCount(t)}constructor(){this.events=new Map,this.maxListeners=zi.defaultMaxListeners,this.hasWarnedAboutPotentialMemoryLeak=!1}_emitInternalEvent(e,t,n){this.emit(e,t,n)}_getListeners(e){return Array.prototype.concat.apply([],this.events.get(e))||[]}_removeListener(e,t){const n=e.indexOf(t);return n>-1&&e.splice(n,1),[]}_wrapOnceListener(e,t){const n=(...r)=>(this.removeListener(e,n),t.apply(this,r));return Object.defineProperty(n,"name",{value:t.name}),n}setMaxListeners(e){return this.maxListeners=e,this}getMaxListeners(){return this.maxListeners}eventNames(){return Array.from(this.events.keys())}emit(e,...t){const n=this._getListeners(e);return n.forEach(r=>{r.apply(this,t)}),n.length>0}addListener(e,t){this._emitInternalEvent("newListener",e,t);const n=this._getListeners(e).concat(t);if(this.events.set(e,n),this.maxListeners>0&&this.listenerCount(e)>this.maxListeners&&!this.hasWarnedAboutPotentialMemoryLeak){this.hasWarnedAboutPotentialMemoryLeak=!0;const r=new $s(this,e,this.listenerCount(e));console.warn(r)}return this}on(e,t){return this.addListener(e,t)}once(e,t){return this.addListener(e,this._wrapOnceListener(e,t))}prependListener(e,t){const n=this._getListeners(e);if(n.length>0){const r=[t].concat(n);this.events.set(e,r)}else this.events.set(e,n.concat(t));return this}prependOnceListener(e,t){return this.prependListener(e,this._wrapOnceListener(e,t))}removeListener(e,t){const n=this._getListeners(e);return n.length>0&&(this._removeListener(n,t),this.events.set(e,n),this._emitInternalEvent("removeListener",e,t)),this}off(e,t){return this.removeListener(e,t)}removeAllListeners(e){return e?this.events.delete(e):this.events.clear(),this}listeners(e){return Array.from(this._getListeners(e))}listenerCount(e){return this._getListeners(e).length}rawListeners(e){return this.listeners(e)}},qi=zi;qi.defaultMaxListeners=10;const hn=new qi;var ot=(e=>(e.Error="x-ul-error",e.EnvironmentID="x-ul-environment-id",e.InstallationMethod="x-ul-installation-method",e.PartnerAnonymousId="x-ul-anonymous-id",e.Platform="userleap-platform",e.PreviewMode="x-ul-preview-mode",e.UserID="x-ul-user-id",e.VisitorID="x-ul-visitor-id",e))(ot||{}),bt=(e=>(e.Email="email",e.Link="link",e.Web="web",e))(bt||{}),xt=(e=>(e.Npm="web-npm",e.NpmBundled="web-npm-bundled",e.Gtm="web-gtm",e.Segment="web-segment",e.SegmentAndroid="android-segment",e.SegmentReactNative="react-native-segment",e.SegmentIOS="ios-segment",e.Snippet="web-snippet",e))(xt||{});const Wi=e=>new Promise(t=>{setTimeout(()=>{t()},e)}),Vt=({"userleap-platform":e})=>e!==bt.Web,X=(e,t)=>{const n=t?O.MobileSuffix:O.DesktopSuffix;return[e+n,e]},Ks=(e,t)=>[e,`${e}__${t}`];class Gi{constructor(t){Ee(this,"storage");Ee(this,"tempStorage",{});Ee(this,"isStorageAvailable");this.storage=window[t],this.isStorageAvailable=this.checkIfStorageAvailable()}checkIfStorageAvailable(){try{const t="__storage_test__";return this.storage.setItem(t,t),this.storage.removeItem(t),!0}catch{return!1}}setItem(t,n){this.isStorageAvailable?this.storage.setItem(t,n):this.tempStorage[t]=n}getItem(t){return this.isStorageAvailable?this.storage.getItem(t):this.tempStorage[t]}removeItem(t){this.isStorageAvailable?this.storage.removeItem(t):delete this.tempStorage[t]}clear(){this.isStorageAvailable?this.storage.clear():this.tempStorage={}}}const Ft=new Gi("sessionStorage");new Gi("localStorage");var T=(e=>(e.ConsentLegal="consentlegal",e.Likert="likert",e.MultipleChoice="multiplechoice",e.MultipleSelect="multipleselect",e.NPS="nps",e.Open="open",e.RecordedTask="recordedtask",e.TextUrlPrompt="texturlprompt",e.Thanks="thanks",e.Uploading="uploading",e.VideoVoice="videovoice",e))(T||{}),Me=(e=>(e.Answered="answered",e.Equal="eq",e.NotEqual="neq",e.Skipped="skipped",e.LessThan="lt",e.LessThanOrEqual="lte",e.GivenUp="given_up",e.GreaterThan="gt",e.GreaterThanOrEqual="gte",e.ListAll="list_all",e.ListAtLeastOne="list_alo",e.ListExact="list_exact",e.DoesNotInclude="list_dni",e.Contains="contains",e.DoesNotContain="notcontains",e))(Me||{}),wt=(e=>(e.Camera="camera",e.Microphone="microphone",e.Screen="screen",e))(wt||{}),ve=(e=>(e.AvPermission="av_permission",e.ScreenPermission="screen_permission",e.StartTask="start_task",e.CompleteTask="complete_task",e))(ve||{}),at=(e=>(e.Number="number",e.Smiley="smiley",e.Star="star",e))(at||{});let vn;const zs=new Uint8Array(16);function qs(){if(!vn&&(vn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!vn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vn(zs)}const te=[];for(let e=0;e<256;++e)te.push((e+256).toString(16).slice(1));function Ws(e,t=0){return(te[e[t+0]]+te[e[t+1]]+te[e[t+2]]+te[e[t+3]]+"-"+te[e[t+4]]+te[e[t+5]]+"-"+te[e[t+6]]+te[e[t+7]]+"-"+te[e[t+8]]+te[e[t+9]]+"-"+te[e[t+10]]+te[e[t+11]]+te[e[t+12]]+te[e[t+13]]+te[e[t+14]]+te[e[t+15]]).toLowerCase()}const Zi={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function mn(e,t,n){if(Zi.randomUUID&&!t&&!e)return Zi.randomUUID();e=e||{};const r=e.random||(e.rng||qs)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return Ws(r)}var be=(e=>(e.Video="video",e.Audio="audio",e.Screen="screen",e))(be||{}),re=(e=>(e.PermissionStatus="permission.status",e.AvPermission="av.permission",e.ScreenPermission="screen.permission",e.BeginRecording="begin.recording",e.StartTask="start.task",e.FinishTask="finish.task",e))(re||{}),me=(e=>(e.Abandoned="abandoned",e.GivenUp="given.up",e.Completed="completed",e))(me||{}),F=(e=>(e.ScreenPermissionRequested="screen.permission.requested",e.PermissionDescriptors="permission.descriptors",e.PermissionStatusCallback="permission.status.callback",e.StreamReadyCallback="stream.ready.callback",e.StreamCanceledCallback="stream.canceled.callback",e.TaskCompleteCallback="task.complete.callback",e.TaskResponse="task.response",e.TaskStatus="task.status",e.RecordingMediaTypes="recording.media.types",e.StartRecordingCallback="start.recording.callback",e.PassthroughData="passthrough.data",e.CurrentIndex="current.index",e.UploadCallback="upload.callback",e.ProgressCallback="progress.callback",e.BeginCallback="begin.callback",e))(F||{});const Yi=e=>{let t;const n=new Set,r=(l,c)=>{const u=typeof l=="function"?l(t):l;if(!Object.is(u,t)){const d=t;t=(c!=null?c:typeof u!="object")?u:Object.assign({},t,u),n.forEach(f=>f(t,d))}},i=()=>t,s={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>n.clear()};return t=e(r,i,s),s},Gs=e=>e?Yi(e):Yi;var qe,z,sr,Qi,Ct=0,Xi=[],gn=[],Ji=D.__b,eo=D.__r,to=D.diffed,no=D.__c,ro=D.unmount;function st(e,t){D.__h&&D.__h(z,e,Ct||t),Ct=0;var n=z.__H||(z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:gn}),n.__[e]}function ne(e){return Ct=1,lr(uo,e)}function lr(e,t,n){var r=st(qe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):uo(void 0,t),function(o){var a=r.__N?r.__N[0]:r.__[0],s=r.t(a,o);a!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.u)){z.u=!0;var i=z.shouldComponentUpdate;z.shouldComponentUpdate=function(o,a,s){if(!r.__c.__H)return!0;var l=r.__c.__H.__.filter(function(u){return u.__c});if(l.every(function(u){return!u.__N}))return!i||i.call(this,o,a,s);var c=!1;return l.forEach(function(u){if(u.__N){var d=u.__[0];u.__=u.__N,u.__N=void 0,d!==u.__[0]&&(c=!0)}}),!(!c&&r.__c.props===o)&&(!i||i.call(this,o,a,s))}}return r.__N||r.__}function ge(e,t){var n=st(qe++,3);!D.__s&&dr(n.__H,t)&&(n.__=e,n.i=t,z.__H.__h.push(n))}function Ht(e,t){var n=st(qe++,4);!D.__s&&dr(n.__H,t)&&(n.__=e,n.i=t,z.__h.push(n))}function We(e){return Ct=5,yn(function(){return{current:e}},[])}function io(e,t,n){Ct=6,Ht(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function yn(e,t){var n=st(qe++,7);return dr(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function oo(e,t){return Ct=8,yn(function(){return e},t)}function ao(e){var t=z.context[e.__c],n=st(qe++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(z)),t.props.value):e.__}function ur(e,t){D.useDebugValue&&D.useDebugValue(t?t(e):e)}function Zs(e){var t=st(qe++,10),n=ne();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function so(){var e=st(qe++,11);if(!e.__){for(var t=z.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Ys(){for(var e;e=Xi.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(_n),e.__H.__h.forEach(cr),e.__H.__h=[]}catch(t){e.__H.__h=[],D.__e(t,e.__v)}}D.__b=function(e){z=null,Ji&&Ji(e)},D.__r=function(e){eo&&eo(e),qe=0;var t=(z=e.__c).__H;t&&(sr===z?(t.__h=[],z.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=gn,n.__N=n.i=void 0})):(t.__h.forEach(_n),t.__h.forEach(cr),t.__h=[])),sr=z},D.diffed=function(e){to&&to(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Xi.push(t)!==1&&Qi===D.requestAnimationFrame||((Qi=D.requestAnimationFrame)||Qs)(Ys)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==gn&&(n.__=n.__V),n.i=void 0,n.__V=gn})),sr=z=null},D.__c=function(e,t){t.some(function(n){try{n.__h.forEach(_n),n.__h=n.__h.filter(function(r){return!r.__||cr(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],D.__e(r,n.__v)}}),no&&no(e,t)},D.unmount=function(e){ro&&ro(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{_n(r)}catch(i){t=i}}),n.__H=void 0,t&&D.__e(t,n.__v))};var lo=typeof requestAnimationFrame=="function";function Qs(e){var t,n=function(){clearTimeout(r),lo&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);lo&&(t=requestAnimationFrame(n))}function _n(e){var t=z,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),z=t}function cr(e){var t=z;e.__c=e.__(),z=t}function dr(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function uo(e,t){return typeof t=="function"?t(e):t}function co(e,t){for(var n in t)e[n]=t[n];return e}function fr(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function bn(e){this.props=e}function fo(e,t){function n(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!a:fr(this.props,i)}function r(i){return this.shouldComponentUpdate=n,Y(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(bn.prototype=new _e).isPureReactComponent=!0,bn.prototype.shouldComponentUpdate=function(e,t){return fr(this.props,e)||fr(this.state,t)};var po=D.__b;D.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),po&&po(e)};var Xs=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ho(e){function t(n){var r=co({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Xs,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var vo=function(e,t){return e==null?null:Le(Le(e).map(t))},mo={map:vo,forEach:vo,count:function(e){return e?Le(e).length:0},only:function(e){var t=Le(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Le},Js=D.__e;D.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Js(e,t,n,r)};var go=D.unmount;function yo(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=co({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return yo(r,t,n)})),e}function _o(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return _o(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function $t(){this.__u=0,this.t=null,this.__b=null}function bo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function xo(e){var t,n,r;function i(o){if(t||(t=e()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw t;return Y(n,o)}return i.displayName="Lazy",i.__f=!0,i}function kt(){this.u=null,this.o=null}D.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),go&&go(e)},($t.prototype=new _e).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=bo(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=_o(c,c.__c.__P,c.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.t.pop();)u.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},$t.prototype.componentWillUnmount=function(){this.t=[]},$t.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=yo(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&Y(he,null,e.fallback);return i&&(i.__h=null),[Y(he,null,t.__a?null:e.children),i]};var wo=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(r)}}),gt(Y(el,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Co(e,t){var n=Y(tl,{__v:e,i:t});return n.containerInfo=t,n}(kt.prototype=new _e).__a=function(e){var t=this,n=bo(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),wo(t,e,r)):i()};n?n(o):o()}},kt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Le(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},kt.prototype.componentDidUpdate=kt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){wo(e,n,t)})};var ko=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,nl=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,rl=typeof document<"u",il=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Eo(e,t,n){return t.__k==null&&(t.textContent=""),gt(e,t),typeof n=="function"&&n(),e?e.__c:null}function So(e,t,n){return $i(e,t),typeof n=="function"&&n(),e?e.__c:null}_e.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(_e.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var To=D.event;function ol(){}function al(){return this.cancelBubble}function sl(){return this.defaultPrevented}D.event=function(e){return To&&(e=To(e)),e.persist=ol,e.isPropagationStopped=al,e.isDefaultPrevented=sl,e.nativeEvent=e};var Po,Io={configurable:!0,get:function(){return this.class}},Ro=D.vnode;D.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t=="string"){var i=t.indexOf("-")===-1;for(var o in r={},n){var a=n[o];rl&&o==="children"&&t==="noscript"||o==="value"&&"defaultValue"in n&&a==null||(o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&a===!0?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!il(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&nl.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():a===null&&(a=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=a)}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=Le(n.children).forEach(function(s){s.props.selected=r.value.indexOf(s.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=Le(n.children).forEach(function(s){s.props.selected=r.multiple?r.defaultValue.indexOf(s.props.value)!=-1:r.defaultValue==s.props.value})),e.props=r,n.class!=n.className&&(Io.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",Io))}e.$$typeof=ko,Ro&&Ro(e)};var Ao=D.__r;D.__r=function(e){Ao&&Ao(e),Po=e.__c};var Do={ReactCurrentDispatcher:{current:{readContext:function(e){return Po.__n[e.__c].props.value}}}},ll="17.0.2";function Oo(e){return Y.bind(null,e)}function hr(e){return!!e&&e.$$typeof===ko}function jo(e){return hr(e)?Bs.apply(null,arguments):e}function Lo(e){return!!e.__k&&(gt(null,e),!0)}function Mo(e){return e&&(e.base||e.nodeType===1&&e)||null}var Bo=function(e,t){return e(t)},No=function(e,t){return e(t)},Uo=he;function vr(e){e()}function Vo(e){return e}function Fo(){return[!1,vr]}var Ho=Ht;function $o(e,t){var n=t(),r=ne({h:{__:n,v:t}}),i=r[0].h,o=r[1];return Ht(function(){i.__=n,i.v=t,pr(i.__,t())||o({h:i})},[e,n,t]),ge(function(){return pr(i.__,i.v())||o({h:i}),e(function(){pr(i.__,i.v())||o({h:i})})},[e]),n}var ul={useState:ne,useId:so,useReducer:lr,useEffect:ge,useLayoutEffect:Ht,useInsertionEffect:Ho,useTransition:Fo,useDeferredValue:Vo,useSyncExternalStore:$o,startTransition:vr,useRef:We,useImperativeHandle:io,useMemo:yn,useCallback:oo,useContext:ao,useDebugValue:ur,version:"17.0.2",Children:mo,render:Eo,hydrate:So,unmountComponentAtNode:Lo,createPortal:Co,createElement:Y,createContext:Ki,createFactory:Oo,cloneElement:jo,createRef:Ai,Fragment:he,isValidElement:hr,findDOMNode:Mo,Component:_e,PureComponent:bn,memo:fo,forwardRef:ho,flushSync:No,unstable_batchedUpdates:Bo,StrictMode:Uo,Suspense:$t,SuspenseList:kt,lazy:xo,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Do};const cl=Object.freeze(Object.defineProperty({__proto__:null,Children:mo,PureComponent:bn,StrictMode:Uo,Suspense:$t,SuspenseList:kt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Do,cloneElement:jo,createFactory:Oo,createPortal:Co,default:ul,findDOMNode:Mo,flushSync:No,forwardRef:ho,hydrate:So,isValidElement:hr,lazy:xo,memo:fo,render:Eo,startTransition:vr,unmountComponentAtNode:Lo,unstable_batchedUpdates:Bo,useDeferredValue:Vo,useInsertionEffect:Ho,useSyncExternalStore:$o,useTransition:Fo,version:ll,Component:_e,Fragment:he,createContext:Ki,createElement:Y,createRef:Ai,useCallback:oo,useContext:ao,useDebugValue:ur,useEffect:ge,useErrorBoundary:Zs,useId:so,useImperativeHandle:io,useLayoutEffect:Ht,useMemo:yn,useReducer:lr,useRef:We,useState:ne},Symbol.toStringTag,{value:"Module"}));var dl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pl(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Ko={exports:{}},zo={};const qo=pl(cl);var Wo={exports:{}},Go={};/** +var pd=Object.defineProperty;var fd=(ge,T,Fe)=>T in ge?pd(ge,T,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):ge[T]=Fe;var he=(ge,T,Fe)=>(fd(ge,typeof T!="symbol"?T+"":T,Fe),Fe);(function(){"use strict";var ge,T,Fe,et,So,Eo,er,Po,Lt={},To=[],Ra=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ln=Array.isArray;function je(e,t){for(var n in t)e[n]=t[n];return e}function Io(e){var t=e.parentNode;t&&t.removeChild(e)}function G(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?ge.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Nt(e,s,r,o,null)}function Nt(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++Fe,__i:-1,__u:0};return o==null&&T.vnode!=null&&T.vnode(i),i}function jo(){return{current:null}}function le(e){return e.children}function ve(e,t){this.props=e,this.context=t}function ft(e,t){if(t==null)return e.__?ft(e.__,e.__i+1):null;for(var n;tt&&et.sort(er));cn.__r=0}function Ro(e,t,n,r,o,i,s,a,l,u,d){var c,h,p,y,f,_=r&&r.__k||To,m=t.length;for(n.__d=l,Da(n,t,_),l=n.__d,c=0;c0?Nt(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=Aa(o,n,s=r+c,d),o.__i=a,i=null,a!==-1&&(d--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&c--,typeof o.type!="function"&&(o.__u|=65536)):a!==s&&(a===s+1?c++:a>s?d>l-s?c+=a-s:c--:c=a(l!=null&&!(131072&l.__u)?1:0))for(;s>=0||a=0){if((l=t[s])&&!(131072&l.__u)&&o==l.key&&i===l.type)return s;s--}if(a2&&(a.children=arguments.length>3?ge.call(arguments,2):n),Nt(e.type,a,r||e.key,o||e.ref,null)}function Bo(e,t){var n={__c:t="__cC"+Po++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&o.some(function(a){a.__e=!0,tr(a)})},this.sub=function(s){o.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){o.splice(o.indexOf(s),1),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}ge=To.slice,T={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},Fe=0,ve.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=je({},this.state),typeof e=="function"&&(e=e(je({},n),this.props)),e&&je(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),tr(this))},ve.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),tr(this))},ve.prototype.render=le,et=[],Eo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,er=function(e,t){return e.__v.__b-t.__v.__b},cn.__r=0,Po=0;function Uo(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t=n.__.length&&n.__.push({__V:dn}),n.__[e]}function X(e){return gt=1,sr(Xo,e)}function sr(e,t,n){var r=tt(Re++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Xo(void 0,t),function(a){var l=r.__N?r.__N[0]:r.__[0],u=r.t(l,a);l!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=H,!H.u)){var o=function(a,l,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(h){return h.__c});if(d.every(function(h){return!h.__N}))return!i||i.call(this,a,l,u);var c=!1;return d.forEach(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(c=!0)}}),!(!c&&r.__c.props===a)&&(!i||i.call(this,a,l,u))};H.u=!0;var i=H.shouldComponentUpdate,s=H.componentWillUpdate;H.componentWillUpdate=function(a,l,u){if(this.__e){var d=i;i=void 0,o(a,l,u),i=d}s&&s.call(this,a,l,u)},H.shouldComponentUpdate=o}return r.__N||r.__}function pe(e,t){var n=tt(Re++,3);!T.__s&&cr(n.__H,t)&&(n.__=e,n.i=t,H.__H.__h.push(n))}function Mt(e,t){var n=tt(Re++,4);!T.__s&&cr(n.__H,t)&&(n.__=e,n.i=t,H.__h.push(n))}function He(e){return gt=5,hn(function(){return{current:e}},[])}function Go(e,t,n){gt=6,Mt(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function hn(e,t){var n=tt(Re++,7);return cr(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Zo(e,t){return gt=8,hn(function(){return e},t)}function Yo(e){var t=H.context[e.__c],n=tt(Re++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(H)),t.props.value):e.__}function ar(e,t){T.useDebugValue&&T.useDebugValue(t?t(e):e)}function $a(e){var t=tt(Re++,10),n=X();return t.__=e,H.componentDidCatch||(H.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Qo(){var e=tt(Re++,11);if(!e.__){for(var t=H.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Ba(){for(var e;e=Fo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pn),e.__H.__h.forEach(lr),e.__H.__h=[]}catch(t){e.__H.__h=[],T.__e(t,e.__v)}}T.__b=function(e){H=null,Ho&&Ho(e)},T.__r=function(e){qo&&qo(e),Re=0;var t=(H=e.__c).__H;t&&(ir===H?(t.__h=[],H.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=dn,n.__N=n.i=void 0})):(t.__h.forEach(pn),t.__h.forEach(lr),t.__h=[],Re=0)),ir=H},T.diffed=function(e){Ko&&Ko(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Fo.push(t)!==1&&Vo===T.requestAnimationFrame||((Vo=T.requestAnimationFrame)||Ua)(Ba)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==dn&&(n.__=n.__V),n.i=void 0,n.__V=dn})),ir=H=null},T.__c=function(e,t){t.some(function(n){try{n.__h.forEach(pn),n.__h=n.__h.filter(function(r){return!r.__||lr(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],T.__e(r,n.__v)}}),zo&&zo(e,t)},T.unmount=function(e){Wo&&Wo(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{pn(r)}catch(o){t=o}}),n.__H=void 0,t&&T.__e(t,n.__v))};var Jo=typeof requestAnimationFrame=="function";function Ua(e){var t,n=function(){clearTimeout(r),Jo&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Jo&&(t=requestAnimationFrame(n))}function pn(e){var t=H,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),H=t}function lr(e){var t=H;e.__c=e.__(),H=t}function cr(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Xo(e,t){return typeof t=="function"?t(e):t}function ei(e,t){for(var n in t)e[n]=t[n];return e}function ur(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function fn(e){this.props=e}function ti(e,t){function n(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:ur(this.props,o)}function r(o){return this.shouldComponentUpdate=n,G(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(fn.prototype=new ve).isPureReactComponent=!0,fn.prototype.shouldComponentUpdate=function(e,t){return ur(this.props,e)||ur(this.state,t)};var ni=T.__b;T.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ni&&ni(e)};var Va=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ri(e){function t(n){var r=ei({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Va,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var oi=function(e,t){return e==null?null:Oe(Oe(e).map(t))},ii={map:oi,forEach:oi,count:function(e){return e?Oe(e).length:0},only:function(e){var t=Oe(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Oe},Fa=T.__e;T.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}Fa(e,t,n,r)};var si=T.unmount;function ai(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=ei({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return ai(r,t,n)})),e}function li(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return li(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function $t(){this.__u=0,this.t=null,this.__b=null}function ci(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ui(e){var t,n,r;function o(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return G(n,i)}return o.displayName="Lazy",o.__f=!0,o}function vt(){this.u=null,this.o=null}T.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),si&&si(e)},($t.prototype=new ve).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=ci(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=li(l,l.__c.__P,l.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.t.pop();)u.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},$t.prototype.componentWillUnmount=function(){this.t=[]},$t.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=ai(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&G(le,null,e.fallback);return o&&(o.__u&=-33),[G(le,null,t.__a?null:e.children),o]};var di=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(r)}}),mt(G(Ha,{context:t.context},e.__v),t.l)}function hi(e,t){var n=G(qa,{__v:e,i:t});return n.containerInfo=t,n}(vt.prototype=new ve).__a=function(e){var t=this,n=ci(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),di(t,e,r)):o()};n?n(i):i()}},vt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Oe(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},vt.prototype.componentDidUpdate=vt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){di(e,n,t)})};var pi=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ka=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,za=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Wa=/[A-Z0-9]/g,Ga=typeof document<"u",Za=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function fi(e,t,n){return t.__k==null&&(t.textContent=""),mt(e,t),typeof n=="function"&&n(),e?e.__c:null}function mi(e,t,n){return $o(e,t),typeof n=="function"&&n(),e?e.__c:null}ve.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ve.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var gi=T.event;function Ya(){}function Qa(){return this.cancelBubble}function Ja(){return this.defaultPrevented}T.event=function(e){return gi&&(e=gi(e)),e.persist=Ya,e.isPropagationStopped=Qa,e.isDefaultPrevented=Ja,e.nativeEvent=e};var dr,Xa={enumerable:!1,configurable:!0,get:function(){return this.class}},vi=T.vnode;T.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||Ga&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":a==="ondoubleclick"?i="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||Za(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":za.test(i)?i=a:r.indexOf("-")===-1&&Ka.test(i)?i=i.replace(Wa,"-$&").toLowerCase():s===null&&(s=void 0):a=i="oninput",a==="oninput"&&o[i=a]&&(i="oninputCapture"),o[i]=s}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=Oe(n.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=Oe(n.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",Xa)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=pi,vi&&vi(e)};var yi=T.__r;T.__r=function(e){yi&&yi(e),dr=e.__c};var _i=T.diffed;T.diffed=function(e){_i&&_i(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),dr=null};var bi={ReactCurrentDispatcher:{current:{readContext:function(e){return dr.__n[e.__c].props.value}}}},el="17.0.2";function xi(e){return G.bind(null,e)}function Bt(e){return!!e&&e.$$typeof===pi}function wi(e){return Bt(e)&&e.type===le}function ki(e){return Bt(e)?Ma.apply(null,arguments):e}function Ci(e){return!!e.__k&&(mt(null,e),!0)}function Si(e){return e&&(e.base||e.nodeType===1&&e)||null}var Ei=function(e,t){return e(t)},Pi=function(e,t){return e(t)},Ti=le;function hr(e){e()}function Ii(e){return e}function ji(){return[!1,hr]}var Oi=Mt,Ri=Bt;function Di(e,t){var n=t(),r=X({h:{__:n,v:t}}),o=r[0].h,i=r[1];return Mt(function(){o.__=n,o.v=t,pr(o)&&i({h:o})},[e,n,t]),pe(function(){return pr(o)&&i({h:o}),e(function(){pr(o)&&i({h:o})})},[e]),n}function pr(e){var t,n,r=e.v,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var tl={useState:X,useId:Qo,useReducer:sr,useEffect:pe,useLayoutEffect:Mt,useInsertionEffect:Oi,useTransition:ji,useDeferredValue:Ii,useSyncExternalStore:Di,startTransition:hr,useRef:He,useImperativeHandle:Go,useMemo:hn,useCallback:Zo,useContext:Yo,useDebugValue:ar,version:"17.0.2",Children:ii,render:fi,hydrate:mi,unmountComponentAtNode:Ci,createPortal:hi,createElement:G,createContext:Bo,createFactory:xi,cloneElement:ki,createRef:jo,Fragment:le,isValidElement:Bt,isElement:Ri,isFragment:wi,findDOMNode:Si,Component:ve,PureComponent:fn,memo:ti,forwardRef:ri,flushSync:Pi,unstable_batchedUpdates:Ei,StrictMode:Ti,Suspense:$t,SuspenseList:vt,lazy:ui,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:bi};const nl=Object.freeze(Object.defineProperty({__proto__:null,Children:ii,Component:ve,Fragment:le,PureComponent:fn,StrictMode:Ti,Suspense:$t,SuspenseList:vt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:bi,cloneElement:ki,createContext:Bo,createElement:G,createFactory:xi,createPortal:hi,createRef:jo,default:tl,findDOMNode:Si,flushSync:Pi,forwardRef:ri,hydrate:mi,isElement:Ri,isFragment:wi,isValidElement:Bt,lazy:ui,memo:ti,render:fi,startTransition:hr,unmountComponentAtNode:Ci,unstable_batchedUpdates:Ei,useCallback:Zo,useContext:Yo,useDebugValue:ar,useDeferredValue:Ii,useEffect:pe,useErrorBoundary:$a,useId:Qo,useImperativeHandle:Go,useInsertionEffect:Oi,useLayoutEffect:Mt,useMemo:hn,useReducer:sr,useRef:He,useState:X,useSyncExternalStore:Di,useTransition:ji,version:el},Symbol.toStringTag,{value:"Module"})),yt="ul-app";var j=(e=>(e.Caption="ul-caption",e.CardContainer="ul-card__container",e.CardMainContent="ul-card-main-content",e.Choice="choice",e.ChoiceCheckbox="select-checkbox",e.ChoiceGroup="ul-card__choices",e.ChoiceLabel="select-label",e.ChoiceLabelContainer="choice-label-container",e.ChoiceRadio="select-radio",e.ChoiceTextEntryContainer="choice-text-entry-container",e.ChoiceTextInput="choice-text-input",e.CloseButton="close-btn",e.CloseContainer="close-container",e.ConsentLegalNameInput="ul-consent-legal__name-input",e.CustomStyle="ul-custom-style",e.DesktopSuffix="--desktop",e.FadeInTransition="fade-in-transition",e.LikertNumber="likert-number",e.LikertSmiley="likert-smiley",e.LikertStar="likert-star",e.LoadingSpinner="ul-loading-spinner",e.LoadingSpinnerContainer="ul-loading-spinner-container",e.LoadingSpinnerFirst="first",e.LoadingSpinnerFourth="fourth",e.LoadingSpinnerSecond="second",e.LoadingSpinnerThird="third",e.MobileSuffix="--mobile",e.NPSNumber="nps-number",e.OpenTextInput="ul-card-text__input",e.QuestionHeader="ul-question",e.VideoCard="ul-card--video",e.CheckmarkButton="ul-button-checkmark",e.InactiveButton="ul-button-inactive",e.LeftAlignButton="ul-button-left-align",e.ButtonDisabled="sprig-button-disabled",e.SkipButton="ul-card-skip__button",e))(j||{});const fr="#e6e6e6",Ut="#bd282a",rl=1030;var nt=(e=>(e.Error="x-ul-error",e.EnvironmentID="x-ul-environment-id",e.InstallationMethod="x-ul-installation-method",e.PartnerAnonymousId="x-ul-anonymous-id",e.Platform="userleap-platform",e.PreviewMode="x-ul-preview-mode",e.UserID="x-ul-user-id",e.VisitorID="x-ul-visitor-id",e))(nt||{}),_t=(e=>(e.Email="email",e.Link="link",e.Web="web",e))(_t||{}),bt=(e=>(e.Npm="web-npm",e.NpmBundled="web-npm-bundled",e.Gtm="web-gtm",e.Segment="web-segment",e.SegmentAndroid="android-segment",e.SegmentReactNative="react-native-segment",e.SegmentIOS="ios-segment",e.Snippet="web-snippet",e))(bt||{});const Ai=e=>new Promise(t=>{setTimeout(()=>{t()},e)}),mn=({"userleap-platform":e})=>e!==_t.Web,Q=(e,t)=>{const n=t?j.MobileSuffix:j.DesktopSuffix;return[e+n,e]},ol=(e,t)=>[e,`${e}__${t}`];class Li{constructor(t){he(this,"storage");he(this,"tempStorage",{});he(this,"isStorageAvailable");this.storage=window[t],this.isStorageAvailable=this.checkIfStorageAvailable()}checkIfStorageAvailable(){try{const t="__storage_test__";return this.storage.setItem(t,t),this.storage.removeItem(t),!0}catch{return!1}}setItem(t,n){this.isStorageAvailable?this.storage.setItem(t,n):this.tempStorage[t]=n}getItem(t){return this.isStorageAvailable?this.storage.getItem(t):this.tempStorage[t]}removeItem(t){this.isStorageAvailable?this.storage.removeItem(t):delete this.tempStorage[t]}clear(){this.isStorageAvailable?this.storage.clear():this.tempStorage={}}}const Vt=new Li("sessionStorage");new Li("localStorage");const Ni=e=>{let t;const n=new Set,r=(l,u)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const c=t;t=u??typeof d!="object"?d:Object.assign({},t,d),n.forEach(h=>h(t,c))}},o=()=>t,a={setState:r,getState:o,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>n.clear()};return t=e(r,o,a),a},il=e=>e?Ni(e):Ni;var sl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function al(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var $i={exports:{}},Bi={};const Ui=al(nl);var Vi={exports:{}},Fi={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -6,7 +6,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Et=qo;function hl(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vl=typeof Object.is=="function"?Object.is:hl,ml=Et.useState,gl=Et.useEffect,yl=Et.useLayoutEffect,_l=Et.useDebugValue;function bl(e,t){var n=t(),r=ml({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return yl(function(){i.value=n,i.getSnapshot=t,mr(i)&&o({inst:i})},[e,n,t]),gl(function(){return mr(i)&&o({inst:i}),e(function(){mr(i)&&o({inst:i})})},[e]),_l(n),n}function mr(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vl(e,n)}catch{return!0}}function xl(e,t){return t()}var wl=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?xl:bl;Go.useSyncExternalStore=Et.useSyncExternalStore!==void 0?Et.useSyncExternalStore:wl,function(e){e.exports=Go}(Wo);/** + */var xt=Ui;function ll(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cl=typeof Object.is=="function"?Object.is:ll,ul=xt.useState,dl=xt.useEffect,hl=xt.useLayoutEffect,pl=xt.useDebugValue;function fl(e,t){var n=t(),r=ul({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return hl(function(){o.value=n,o.getSnapshot=t,mr(o)&&i({inst:o})},[e,n,t]),dl(function(){return mr(o)&&i({inst:o}),e(function(){mr(o)&&i({inst:o})})},[e]),pl(n),n}function mr(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!cl(e,n)}catch{return!0}}function ml(e,t){return t()}var gl=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ml:fl;Fi.useSyncExternalStore=xt.useSyncExternalStore!==void 0?xt.useSyncExternalStore:gl,Vi.exports=Fi;var vl=Vi.exports;/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -14,35 +14,25 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var xn=qo,Cl=Wo.exports;function kl(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var El=typeof Object.is=="function"?Object.is:kl,Sl=Cl.useSyncExternalStore,Tl=xn.useRef,Pl=xn.useEffect,Il=xn.useMemo,Rl=xn.useDebugValue;zo.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Tl(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Il(function(){function l(v){if(!c){if(c=!0,u=v,v=r(v),i!==void 0&&a.hasValue){var p=a.value;if(i(p,v))return d=p}return d=v}if(p=d,El(u,v))return p;var h=r(v);return i!==void 0&&i(p,h)?p:(u=v,d=h)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var s=Sl(e,o[0],o[1]);return Pl(function(){a.hasValue=!0,a.value=s},[s]),Rl(s),s},function(e){e.exports=zo}(Ko);const Al=fl(Ko.exports),{useSyncExternalStoreWithSelector:Dl}=Al;function Ol(e,t=e.getState,n){const r=Dl(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return ur(r),r}const Zo=e=>{const t=typeof e=="function"?Gs(e):e,n=(r,i)=>Ol(t,r,i);return Object.assign(n,t),n},Yo=e=>e?Zo(e):Zo,Qo=()=>{try{return window.parent.Intercom}catch(e){return console.error(e),null}},Xo=[Object.freeze(Object.defineProperty({__proto__:null,enable:()=>{const e=Qo();!e||(e.ul_wasVisible&&e("update",{hide_default_launcher:!1}),delete e.ul_wasVisible)},disable:()=>{const e=Qo();!e||(e.ul_wasVisible=!!document.querySelector("iframe.intercom-launcher-frame"),e.ul_wasVisible&&e("update",{hide_default_launcher:!0}))}},Symbol.toStringTag,{value:"Module"}))];class Jo{static disable(){Xo.forEach(t=>t.disable())}static enable(){Xo.forEach(t=>t.enable())}}class jl{constructor(t){Ee(this,"payload");Ee(this,"promise");Ee(this,"reject",()=>{});Ee(this,"resolve",()=>{});this.payload=t,this.promise=new Promise((n,r)=>{this.reject=r,this.resolve=n})}resolveRequest(t){this.resolve(t)}}const Ll={RATELIMIT_RESET_DEFAULT:10};let ea=!1,ta="",wn=!1,Ml=!1,Cn=[];const Bl=e=>e._config&&e._config.installationMethod?e._config.installationMethod:e._gtm?xt.Gtm:e._segment?xt.Segment:xt.Snippet,Nl=(e="")=>{ea=!0,ta=e};function Ul(e={}){const t={"Content-Type":"application/json","userleap-platform":bt.Web,"x-ul-sdk-version":"2.24.12-beta.0",[ot.InstallationMethod]:Bl(e)};if(e.envId&&(t[ot.EnvironmentID]=e.envId),e.token&&(t.Authorization="Bearer "+e.token),e.userId&&(t[ot.UserID]=e.userId),e.visitorId&&(t[ot.VisitorID]=e.visitorId),e.partnerAnonymousId&&(t[ot.PartnerAnonymousId]=e.partnerAnonymousId),e.mobileHeadersJSON){const n=JSON.parse(e.mobileHeadersJSON);Object.assign(t,n)}return e.locale&&(t["accept-language"]=e.locale),window.previewMode&&(t[ot.PreviewMode]="1"),t}const na=async(e,t,n)=>{if(e)return{status:429};{const r=new jl(n);return Cn.push(r),r.promise}},St=async(e,t,n=0,r=!1,i=!1)=>{const o={url:e,options:t,attempt:n,shouldDropOnRateLimit:r};if(wn&&!i)return na(r,i,o);const a={ok:!1,reportError:!1};if(ea)return console.info(`UserLeap - ${ta}`),a;try{t.headers=Object.assign(Ul(),t.headers);const s=await fetch(e,t);if(s.status===429)if(!wn&&!r||i){wn=!0;const c=s.headers.has("ratelimit-reset")?Number(s.headers.get("ratelimit-reset")):Ll.RATELIMIT_RESET_DEFAULT;return await Wi(c*1e3),St(e,t,0,r,!0)}else return na(r,!1,o);if(wn=!1,Cn.length&&(Cn.map(l=>{const{url:c,options:u,attempt:d,shouldDropOnRateLimit:f}=l.payload;St(c,u,d,f).then(v=>{l.resolveRequest(v)})}),Cn=[]),s.ok){if(s.status===249)return Nl(),a;const l=await s.text();try{return l&&l!=="OK"&&(s.json=JSON.parse(l)),s}catch{return{ok:!1,reportError:!1,error:new Error(`failed parsing response json for ${e} - ${l}`)}}}return s}catch(s){const l=n+1;return l>5||Ml?{ok:!1,reportError:!1,error:s}:(await Wi(Math.pow(2,n)*1e3),St(e,t,l))}};var ra={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(dl,function(){var n=function(o,a){if(a=a||{},typeof o!="function")throw new i("fetch must be a function");if(typeof a!="object")throw new i("defaults must be an object");if(a.retries!==void 0&&!r(a.retries))throw new i("retries must be a positive integer");if(a.retryDelay!==void 0&&!r(a.retryDelay)&&typeof a.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(a.retryOn!==void 0&&!Array.isArray(a.retryOn)&&typeof a.retryOn!="function")throw new i("retryOn property expects an array or function");var s={retries:3,retryDelay:1e3,retryOn:[]};return a=Object.assign(s,a),function(c,u){var d=a.retries,f=a.retryDelay,v=a.retryOn;if(u&&u.retries!==void 0)if(r(u.retries))d=u.retries;else throw new i("retries must be a positive integer");if(u&&u.retryDelay!==void 0)if(r(u.retryDelay)||typeof u.retryDelay=="function")f=u.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(u&&u.retryOn)if(Array.isArray(u.retryOn)||typeof u.retryOn=="function")v=u.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(p,h){var g=function(b){var x=typeof Request<"u"&&c instanceof Request?c.clone():c;o(x,u).then(function(w){if(Array.isArray(v)&&v.indexOf(w.status)===-1)p(w);else if(typeof v=="function")try{return Promise.resolve(v(b,null,w)).then(function(m){m?_(b,null,w):p(w)}).catch(h)}catch(m){h(m)}else b=0}function i(o){this.name="ArgumentError",this.message=o}return n})})(ra);const Vl=ra.exports;Vl(fetch);/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var H=function(){return H=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u"?Q:Reflect.ownKeys)(t).forEach(function(n){Be(e,n,t[n])})}var ia=Object.defineProperty;function Be(e,t,n,r){ia(e,t,ae(n&&de(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function Pt(e){return{from:function(t){return e.prototype=Object.create(t.prototype),Be(e.prototype,"constructor",e),{extend:Tt.bind(null,e.prototype)}}}}var Hl=Object.getOwnPropertyDescriptor;function yr(e,t){var n=Hl(e,t),r;return n||(r=Kt(e))&&yr(r,t)}var $l=[].slice;function kn(e,t,n){return $l.call(e,t,n)}function oa(e,t){return t(e)}function zt(e){if(!e)throw new Error("Assertion Failed")}function aa(e){q.setImmediate?setImmediate(e):setTimeout(e,0)}function sa(e,t){return e.reduce(function(n,r,i){var o=t(r,i);return o&&(n[o[0]]=o[1]),n},{})}function Kl(e,t,n){try{e.apply(null,n)}catch(r){t&&t(r)}}function Ne(e,t){if(de(e,t))return e[t];if(!t)return e;if(typeof t!="string"){for(var n=[],r=0,i=t.length;r=0)t=e;else{var i=Kt(e);t=i===Object.prototype?{}:Object.create(i),Ge&&Ge.set(e,t);for(var o in e)de(e,o)&&(t[o]=_r(e[o]))}return t}var Gl={}.toString;function br(e){return Gl.call(e).slice(8,-1)}var xr=typeof Symbol<"u"?Symbol.iterator:"@@iterator",Zl=typeof xr=="symbol"?function(e){var t;return e!=null&&(t=e[xr])&&t.apply(e)}:function(){return null},It={};function Ue(e){var t,n,r,i;if(arguments.length===1){if(ie(e))return e.slice();if(this===It&&typeof e=="string")return[e];if(i=Zl(e)){for(n=[];r=i.next(),!r.done;)n.push(r.value);return n}if(e==null)return[e];if(t=e.length,typeof t=="number"){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}var wr=typeof Symbol<"u"?function(e){return e[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},Pe=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function da(e,t){Pe=e,fa=t}var fa=function(){return!0},Yl=!new Error("").stack;function lt(){if(Yl)try{throw lt.arguments,new Error}catch(e){return e}return new Error}function Cr(e,t){var n=e.stack;return n?(t=t||0,n.indexOf(e.name)===0&&(t+=(e.name+e.message).split(` + */var gn=Ui,yl=vl;function _l(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bl=typeof Object.is=="function"?Object.is:_l,xl=yl.useSyncExternalStore,wl=gn.useRef,kl=gn.useEffect,Cl=gn.useMemo,Sl=gn.useDebugValue;Bi.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=wl(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Cl(function(){function l(p){if(!u){if(u=!0,d=p,p=r(p),o!==void 0&&s.hasValue){var y=s.value;if(o(y,p))return c=y}return c=p}if(y=c,bl(d,p))return y;var f=r(p);return o!==void 0&&o(y,f)?y:(d=p,c=f)}var u=!1,d,c,h=n===void 0?null:n;return[function(){return l(t())},h===null?void 0:function(){return l(h())}]},[t,n,r,o]);var a=xl(e,i[0],i[1]);return kl(function(){s.hasValue=!0,s.value=a},[a]),Sl(a),a},$i.exports=Bi;var El=$i.exports;const Pl=Mi(El),{useSyncExternalStoreWithSelector:Tl}=Pl;function Il(e,t=e.getState,n){const r=Tl(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return ar(r),r}const Hi=e=>{const t=typeof e=="function"?il(e):e,n=(r,o)=>Il(t,r,o);return Object.assign(n,t),n},qi=e=>e?Hi(e):Hi;var gr=(e=>(e.Closed="close.click",e.Complete="survey.completed",e.PageChange="page.change",e.API="api",e.Override="override",e))(gr||{}),Ce=(e=>(e.ReplayCapture="replay.capture",e.SDKReady="sdk.ready",e.SurveyAppeared="survey.appeared",e.SurveyClosed="survey.closed",e.SurveyDimensions="survey.dimensions",e.SurveyFadingOut="survey.fadingOut",e.SurveyHeight="survey.height",e.SurveyPresented="survey.presented",e.SurveyLifeCycle="survey.lifeCycle",e.SurveyWidth="survey.width",e.SurveyWillClose="survey.willClose",e.SurveyWillPresent="survey.will.present",e.CloseSurveyOnOverlayClick="close.survey.overlayClick",e.VisitorIDUpdated="visitor.id.updated",e.QuestionAnswered="question.answered",e))(Ce||{}),Ki=(e=>(e.SurveyId="survey.id",e))(Ki||{}),Se=(e=>(e.VerifyViewVersion="verify.view.version",e.CurrentQuestion="survey.question",e.ViewPrototypeClick="question.prototype.click",e.ViewAgreementClick="question.agreement.click",e.RecordedTaskStart="recorded.task.start",e.RecordedTaskPermissionScreen="recorded.task.permission.screen",e.SurveyComplete="survey.complete",e))(Se||{}),wt=(e=>(e.ViewVersion="view.version",e.QuestionId="qid",e.Props="props",e))(wt||{}),jl=class extends Error{constructor(e,t,n){super(`Possible EventEmitter memory leak detected. ${n} ${t.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`),this.emitter=e,this.type=t,this.count=n,this.name="MaxListenersExceededWarning"}},zi=class{static listenerCount(e,t){return e.listenerCount(t)}constructor(){this.events=new Map,this.maxListeners=zi.defaultMaxListeners,this.hasWarnedAboutPotentialMemoryLeak=!1}_emitInternalEvent(e,t,n){this.emit(e,t,n)}_getListeners(e){return Array.prototype.concat.apply([],this.events.get(e))||[]}_removeListener(e,t){const n=e.indexOf(t);return n>-1&&e.splice(n,1),[]}_wrapOnceListener(e,t){const n=(...r)=>(this.removeListener(e,n),t.apply(this,r));return Object.defineProperty(n,"name",{value:t.name}),n}setMaxListeners(e){return this.maxListeners=e,this}getMaxListeners(){return this.maxListeners}eventNames(){return Array.from(this.events.keys())}emit(e,...t){const n=this._getListeners(e);return n.forEach(r=>{r.apply(this,t)}),n.length>0}addListener(e,t){this._emitInternalEvent("newListener",e,t);const n=this._getListeners(e).concat(t);if(this.events.set(e,n),this.maxListeners>0&&this.listenerCount(e)>this.maxListeners&&!this.hasWarnedAboutPotentialMemoryLeak){this.hasWarnedAboutPotentialMemoryLeak=!0;const r=new jl(this,e,this.listenerCount(e));console.warn(r)}return this}on(e,t){return this.addListener(e,t)}once(e,t){return this.addListener(e,this._wrapOnceListener(e,t))}prependListener(e,t){const n=this._getListeners(e);if(n.length>0){const r=[t].concat(n);this.events.set(e,r)}else this.events.set(e,n.concat(t));return this}prependOnceListener(e,t){return this.prependListener(e,this._wrapOnceListener(e,t))}removeListener(e,t){const n=this._getListeners(e);return n.length>0&&(this._removeListener(n,t),this.events.set(e,n),this._emitInternalEvent("removeListener",e,t)),this}off(e,t){return this.removeListener(e,t)}removeAllListeners(e){return e?this.events.delete(e):this.events.clear(),this}listeners(e){return Array.from(this._getListeners(e))}listenerCount(e){return this._getListeners(e).length}rawListeners(e){return this.listeners(e)}},Wi=zi;Wi.defaultMaxListeners=10;const vn=new Wi;let yn;const Ol=new Uint8Array(16);function Rl(){if(!yn&&(yn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!yn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return yn(Ol)}const te=[];for(let e=0;e<256;++e)te.push((e+256).toString(16).slice(1));function Dl(e,t=0){return te[e[t+0]]+te[e[t+1]]+te[e[t+2]]+te[e[t+3]]+"-"+te[e[t+4]]+te[e[t+5]]+"-"+te[e[t+6]]+te[e[t+7]]+"-"+te[e[t+8]]+te[e[t+9]]+"-"+te[e[t+10]]+te[e[t+11]]+te[e[t+12]]+te[e[t+13]]+te[e[t+14]]+te[e[t+15]]}const Gi={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _n(e,t,n){if(Gi.randomUUID&&!t&&!e)return Gi.randomUUID();e=e||{};const r=e.random||(e.rng||Rl)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return Dl(r)}var ye=(e=>(e.Video="video",e.Audio="audio",e.Screen="screen",e))(ye||{}),re=(e=>(e.PermissionStatus="permission.status",e.AvPermission="av.permission",e.ScreenPermission="screen.permission",e.BeginRecording="begin.recording",e.StartTask="start.task",e.FinishTask="finish.task",e))(re||{}),fe=(e=>(e.Abandoned="abandoned",e.GivenUp="given.up",e.Completed="completed",e))(fe||{}),V=(e=>(e.ScreenPermissionRequested="screen.permission.requested",e.PermissionDescriptors="permission.descriptors",e.PermissionStatusCallback="permission.status.callback",e.StreamReadyCallback="stream.ready.callback",e.StreamCanceledCallback="stream.canceled.callback",e.TaskCompleteCallback="task.complete.callback",e.TaskResponse="task.response",e.TaskStatus="task.status",e.RecordingMediaTypes="recording.media.types",e.StartRecordingCallback="start.recording.callback",e.PassthroughData="passthrough.data",e.CurrentIndex="current.index",e.UploadCallback="upload.callback",e.ProgressCallback="progress.callback",e.BeginCallback="begin.callback",e))(V||{});const Zi=()=>{try{return window.parent.Intercom}catch(e){return console.error(e),null}},Yi=[Object.freeze(Object.defineProperty({__proto__:null,disable:()=>{const e=Zi();e&&(e.ul_wasVisible=!!document.querySelector("iframe.intercom-launcher-frame"),e.ul_wasVisible&&e("update",{hide_default_launcher:!0}))},enable:()=>{const e=Zi();e&&(e.ul_wasVisible&&e("update",{hide_default_launcher:!1}),delete e.ul_wasVisible)}},Symbol.toStringTag,{value:"Module"}))];class Qi{static disable(){Yi.forEach(t=>t.disable())}static enable(){Yi.forEach(t=>t.enable())}}const Al=1,Ll=(e,t,n)=>{const r=e.createElement("style");n&&(r.nonce=n),r.textContent=t,r.id=j.CustomStyle,e.head.appendChild(r)},Ji=()=>{try{return window.parent.innerWidth}catch{return window.innerWidth}},Nl=e=>{const t=e.querySelector(`.${j.CardContainer}`);let n=600,r=360;if(t){n=t.scrollHeight;const o=getComputedStyle(t),i=parseFloat(o.marginTop)+parseFloat(o.marginBottom),s=parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth);n+=i+s,r=t.scrollWidth;const a=parseFloat(o.marginLeft)+parseFloat(o.marginRight),l=parseFloat(o.borderLeftWidth)+parseFloat(o.borderRightWidth);r+=a+l}return[n+Al,Math.min(r,Ji())]},Ml=e=>{const t=e.querySelector(`.${j.CardContainer}`);t&&(t.scrollTop=0)};var Xi={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(sl,function(){var n=function(i,s){if(s=s||{},typeof i!="function")throw new o("fetch must be a function");if(typeof s!="object")throw new o("defaults must be an object");if(s.retries!==void 0&&!r(s.retries))throw new o("retries must be a positive integer");if(s.retryDelay!==void 0&&!r(s.retryDelay)&&typeof s.retryDelay!="function")throw new o("retryDelay must be a positive integer or a function returning a positive integer");if(s.retryOn!==void 0&&!Array.isArray(s.retryOn)&&typeof s.retryOn!="function")throw new o("retryOn property expects an array or function");var a={retries:3,retryDelay:1e3,retryOn:[]};return s=Object.assign(a,s),function(u,d){var c=s.retries,h=s.retryDelay,p=s.retryOn;if(d&&d.retries!==void 0)if(r(d.retries))c=d.retries;else throw new o("retries must be a positive integer");if(d&&d.retryDelay!==void 0)if(r(d.retryDelay)||typeof d.retryDelay=="function")h=d.retryDelay;else throw new o("retryDelay must be a positive integer or a function returning a positive integer");if(d&&d.retryOn)if(Array.isArray(d.retryOn)||typeof d.retryOn=="function")p=d.retryOn;else throw new o("retryOn property expects an array or function");return new Promise(function(y,f){var _=function(v){var w=typeof Request<"u"&&u instanceof Request?u.clone():u;i(w,d).then(function(k){if(Array.isArray(p)&&p.indexOf(k.status)===-1)y(k);else if(typeof p=="function")try{return Promise.resolve(p(v,null,k)).then(function(b){b?m(v,null,k):y(k)}).catch(f)}catch(b){f(b)}else v=0}function o(i){this.name="ArgumentError",this.message=i}return n})})(Xi);var $l=Xi.exports;const es=Mi($l),Bl=es(fetch),vr={Error:1,Warn:2,Info:3,Debug:4};let Ul=1e3,Vl=vr.Debug,bn=[];const Fl=e=>e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3}),Hl=(e,t)=>`${Fl(t)}:${e}`,ql=()=>{bn.length>Ul&&bn.shift()},ts=(e,t)=>{e>Vl||(bn.push({level:e,line:Hl(t,new Date)}),ql())},kt=e=>{ts(vr.Info,e)},Kl=e=>{ts(vr.Error,e)},zl=()=>bn.map(e=>e.line),Wl=()=>new TextEncoder().encode(zl().join(` +`)),Gl=async e=>{if(!e)return;const t=Wl();return Bl(e,{body:t,method:"PUT",retries:3,retryDelay:n=>Math.pow(2,n)*1e3})};class Zl{constructor(t){he(this,"payload");he(this,"promise");he(this,"reject",()=>{});he(this,"resolve",()=>{});this.payload=t,this.promise=new Promise((n,r)=>{this.reject=r,this.resolve=n})}resolveRequest(t){this.resolve(t)}}const Yl={RATELIMIT_RESET_DEFAULT:10};let ns=!1,rs="",xn=!1,Ql=!1,wn=[];const Jl=e=>e._config&&e._config.installationMethod?e._config.installationMethod:e._gtm?bt.Gtm:e._segment?bt.Segment:bt.Snippet,Xl=(e="")=>{ns=!0,rs=e};function ec(e={}){const t={"Content-Type":"application/json","userleap-platform":_t.Web,"x-ul-sdk-version":"2.26.2",[nt.InstallationMethod]:Jl(e)};if(e.envId&&(t[nt.EnvironmentID]=e.envId),e.token&&(t.Authorization="Bearer "+e.token),e.userId&&(t[nt.UserID]=e.userId),e.visitorId&&(t[nt.VisitorID]=e.visitorId),e.partnerAnonymousId&&(t[nt.PartnerAnonymousId]=e.partnerAnonymousId),e.mobileHeadersJSON){const n=JSON.parse(e.mobileHeadersJSON);Object.assign(t,n)}return e.locale&&(t["accept-language"]=e.locale),window.previewMode&&(t[nt.PreviewMode]="1"),t}const os=async(e,t,n)=>{if(e)return{status:429};{const r=new Zl(n);return wn.push(r),r.promise}},Ct=async(e,t,n=0,r=!1,o=!1)=>{const i={url:e,options:t,attempt:n,shouldDropOnRateLimit:r};if(xn&&!o)return os(r,o,i);const s={ok:!1,reportError:!1};if(ns)return console.info(`UserLeap - ${rs}`),s;try{t.headers=Object.assign(ec(),t.headers);const a=await fetch(e,t);if(a.status===429)if(!xn&&!r||o){xn=!0;const u=a.headers.has("ratelimit-reset")?Number(a.headers.get("ratelimit-reset")):Yl.RATELIMIT_RESET_DEFAULT;return await Ai(u*1e3),Ct(e,t,0,r,!0)}else return os(r,!1,i);if(xn=!1,wn.length&&(wn.map(l=>{const{url:u,options:d,attempt:c,shouldDropOnRateLimit:h}=l.payload;Ct(u,d,c,h).then(p=>{l.resolveRequest(p)})}),wn=[]),a.ok){if(a.status===249)return Xl(),s;const l=await a.text();try{return l&&l!=="OK"&&(a.json=JSON.parse(l)),a}catch{return{ok:!1,reportError:!1,error:new Error(`failed parsing response json for ${e} - ${l}`)}}}return a}catch(a){const l=n+1;return l>5||Ql?{ok:!1,reportError:!1,error:a}:(await Ai(Math.pow(2,n)*1e3),Ct(e,t,l))}};es(fetch);const K=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Y=Object.keys,oe=Array.isArray;function se(e,t){return typeof t!="object"||Y(t).forEach(function(n){e[n]=t[n]}),e}typeof Promise>"u"||K.Promise||(K.Promise=Promise);const Ft=Object.getPrototypeOf,tc={}.hasOwnProperty;function ue(e,t){return tc.call(e,t)}function St(e,t){typeof t=="function"&&(t=t(Ft(e))),(typeof Reflect>"u"?Y:Reflect.ownKeys)(t).forEach(n=>{De(e,n,t[n])})}const is=Object.defineProperty;function De(e,t,n,r){is(e,t,se(n&&ue(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function Et(e){return{from:function(t){return e.prototype=Object.create(t.prototype),De(e.prototype,"constructor",e),{extend:St.bind(null,e.prototype)}}}}const nc=Object.getOwnPropertyDescriptor;function yr(e,t){let n;return nc(e,t)||(n=Ft(e))&&yr(n,t)}const rc=[].slice;function kn(e,t,n){return rc.call(e,t,n)}function ss(e,t){return t(e)}function Ht(e){if(!e)throw new Error("Assertion Failed")}function as(e){K.setImmediate?setImmediate(e):setTimeout(e,0)}function ls(e,t){return e.reduce((n,r,o)=>{var i=t(r,o);return i&&(n[i[0]]=i[1]),n},{})}function Ae(e,t){if(ue(e,t))return e[t];if(!t)return e;if(typeof t!="string"){for(var n=[],r=0,o=t.length;r["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>K[e]),ic=ds.map(e=>K[e]);ls(ds,e=>[e,!0]);let qe=null;function qt(e){qe=typeof WeakMap<"u"&&new WeakMap;const t=_r(e);return qe=null,t}function _r(e){if(!e||typeof e!="object")return e;let t=qe&&qe.get(e);if(t)return t;if(oe(e)){t=[],qe&&qe.set(e,t);for(var n=0,r=e.length;n=0)t=e;else{const i=Ft(e);for(var o in t=i===Object.prototype?{}:Object.create(i),qe&&qe.set(e,t),e)ue(e,o)&&(t[o]=_r(e[o]))}return t}const{toString:sc}={};function br(e){return sc.call(e).slice(8,-1)}const xr=typeof Symbol<"u"?Symbol.iterator:"@@iterator",ac=typeof xr=="symbol"?function(e){var t;return e!=null&&(t=e[xr])&&t.apply(e)}:function(){return null},Pt={};function Le(e){var t,n,r,o;if(arguments.length===1){if(oe(e))return e.slice();if(this===Pt&&typeof e=="string")return[e];if(o=ac(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(e==null)return[e];if(typeof(t=e.length)=="number"){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const wr=typeof Symbol<"u"?e=>e[Symbol.toStringTag]==="AsyncFunction":()=>!1;var Ee=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function hs(e,t){Ee=e,ps=t}var ps=()=>!0;const lc=!new Error("").stack;function rt(){if(lc)try{throw rt.arguments,new Error}catch(e){return e}return new Error}function kr(e,t){var n=e.stack;return n?(t=t||0,n.indexOf(e.name)===0&&(t+=(e.name+e.message).split(` `).length),n.split(` -`).slice(t).filter(fa).map(function(r){return` -`+r}).join("")):""}var Ql=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"],pa=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],kr=Ql.concat(pa),Xl={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Rt(e,t){this._e=lt(),this.name=e,this.message=t}Pt(Rt).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Cr(this._e,2))}},toString:function(){return this.name+": "+this.message}});function ha(e,t){return e+". Errors: "+Object.keys(t).map(function(n){return t[n].toString()}).filter(function(n,r,i){return i.indexOf(n)===r}).join(` -`)}function En(e,t,n,r){this._e=lt(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=ha(e,t)}Pt(En).from(Rt);function Wt(e,t){this._e=lt(),this.name="BulkError",this.failures=Object.keys(t).map(function(n){return t[n]}),this.failuresByPos=t,this.message=ha(e,t)}Pt(Wt).from(Rt);var Er=kr.reduce(function(e,t){return e[t]=t+"Error",e},{}),Jl=Rt,U=kr.reduce(function(e,t){var n=t+"Error";function r(i,o){this._e=lt(),this.name=n,i?typeof i=="string"?(this.message=""+i+(o?` - `+o:""),this.inner=o||null):typeof i=="object"&&(this.message=i.name+" "+i.message,this.inner=i):(this.message=Xl[t]||n,this.inner=null)}return Pt(r).from(Jl),e[t]=r,e},{});U.Syntax=SyntaxError,U.Type=TypeError,U.Range=RangeError;var va=pa.reduce(function(e,t){return e[t+"Error"]=U[t],e},{});function eu(e,t){if(!e||e instanceof Rt||e instanceof TypeError||e instanceof SyntaxError||!e.name||!va[e.name])return e;var n=new va[e.name](t||e.message,e);return"stack"in e&&Be(n,"stack",{get:function(){return this.inner.stack}}),n}var Sn=kr.reduce(function(e,t){return["Syntax","Type","Range"].indexOf(t)===-1&&(e[t+"Error"]=U[t]),e},{});Sn.ModifyError=En,Sn.DexieError=Rt,Sn.BulkError=Wt;function K(){}function Gt(e){return e}function tu(e,t){return e==null||e===Gt?t:function(n){return t(e(n))}}function ut(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function nu(e,t){return e===K?t:function(){var n=e.apply(this,arguments);n!==void 0&&(arguments[0]=n);var r=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?ut(r,this.onsuccess):r),i&&(this.onerror=this.onerror?ut(i,this.onerror):i),o!==void 0?o:n}}function ru(e,t){return e===K?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?ut(n,this.onsuccess):n),r&&(this.onerror=this.onerror?ut(r,this.onerror):r)}}function iu(e,t){return e===K?t:function(n){var r=e.apply(this,arguments);ae(n,r);var i=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?ut(i,this.onsuccess):i),o&&(this.onerror=this.onerror?ut(o,this.onerror):o),r===void 0?a===void 0?void 0:a:ae(r,a)}}function ou(e,t){return e===K?t:function(){return t.apply(this,arguments)===!1?!1:e.apply(this,arguments)}}function Sr(e,t){return e===K?t:function(){var n=e.apply(this,arguments);if(n&&typeof n.then=="function"){for(var r=this,i=arguments.length,o=new Array(i);i--;)o[i]=arguments[i];return n.then(function(){return t.apply(r,o)})}return t.apply(this,arguments)}}var Zt={},au=100,su=20,ma=100,Tr=typeof Promise>"u"?[]:function(){var e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,Kt(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,Kt(t),e]}(),Pr=Tr[0],Tn=Tr[1],Ir=Tr[2],ga=Tn&&Tn.then,Pn=Pr&&Pr.constructor,Rr=!!Ir,Ar=!1,lu=Ir?function(){Ir.then(Dn)}:q.setImmediate?setImmediate.bind(null,Dn):q.MutationObserver?function(){var e=document.createElement("div");new MutationObserver(function(){Dn(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(Dn,0)},Yt=function(e,t){Qt.push([e,t]),In&&(lu(),In=!1)},Dr=!0,In=!0,ct=[],Rn=[],Or=null,jr=Gt,At={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ta,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(function(e){try{Ta(e[0],e[1])}catch{}})}},B=At,Qt=[],dt=0,An=[];function I(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=K,this._lib=!1;var t=this._PSD=B;if(Pe&&(this._stackHolder=lt(),this._prev=null,this._numPrev=0),typeof e!="function"){if(e!==Zt)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Mr(this,this._value);return}this._state=null,this._value=null,++t.ref,_a(this,e)}var Lr={get:function(){var e=B,t=Ln;function n(r,i){var o=this,a=!e.global&&(e!==B||t!==Ln),s=a&&!Ve(),l=new I(function(c,u){Br(o,new ya(Bn(r,e,a,s),Bn(i,e,a,s),c,u,e))});return Pe&&wa(l,this),l}return n.prototype=Zt,n},set:function(e){Be(this,"then",e&&e.prototype===Zt?Lr:{get:function(){return e},set:Lr.set})}};Tt(I.prototype,{then:Lr,_then:function(e,t){Br(this,new ya(null,null,e,t,B))},catch:function(e){if(arguments.length===1)return this.then(null,e);var t=arguments[0],n=arguments[1];return typeof t=="function"?this.then(null,function(r){return r instanceof t?n(r):On(r)}):this.then(null,function(r){return r&&r.name===t?n(r):On(r)})},finally:function(e){return this.then(function(t){return e(),t},function(t){return e(),On(t)})},stack:{get:function(){if(this._stack)return this._stack;try{Ar=!0;var e=xa(this,[],su),t=e.join(` -From previous: `);return this._state!==null&&(this._stack=t),t}finally{Ar=!1}}},timeout:function(e,t){var n=this;return e<1/0?new I(function(r,i){var o=setTimeout(function(){return i(new U.Timeout(t))},e);n.then(r,i).finally(clearTimeout.bind(null,o))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&Be(I.prototype,Symbol.toStringTag,"Dexie.Promise"),At.env=Ca();function ya(e,t,n,r,i){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=n,this.reject=r,this.psd=i}Tt(I,{all:function(){var e=Ue.apply(null,arguments).map(Mn);return new I(function(t,n){e.length===0&&t([]);var r=e.length;e.forEach(function(i,o){return I.resolve(i).then(function(a){e[o]=a,--r||t(e)},n)})})},resolve:function(e){if(e instanceof I)return e;if(e&&typeof e.then=="function")return new I(function(n,r){e.then(n,r)});var t=new I(Zt,!0,e);return wa(t,Or),t},reject:On,race:function(){var e=Ue.apply(null,arguments).map(Mn);return new I(function(t,n){e.map(function(r){return I.resolve(r).then(t,n)})})},PSD:{get:function(){return B},set:function(e){return B=e}},totalEchoes:{get:function(){return Ln}},newPSD:Ze,usePSD:Ot,scheduler:{get:function(){return Yt},set:function(e){Yt=e}},rejectionMapper:{get:function(){return jr},set:function(e){jr=e}},follow:function(e,t){return new I(function(n,r){return Ze(function(i,o){var a=B;a.unhandleds=[],a.onunhandled=o,a.finalize=ut(function(){var s=this;cu(function(){s.unhandleds.length===0?i():o(s.unhandleds[0])})},a.finalize),e()},t,n,r)})}}),Pn&&(Pn.allSettled&&Be(I,"allSettled",function(){var e=Ue.apply(null,arguments).map(Mn);return new I(function(t){e.length===0&&t([]);var n=e.length,r=new Array(n);e.forEach(function(i,o){return I.resolve(i).then(function(a){return r[o]={status:"fulfilled",value:a}},function(a){return r[o]={status:"rejected",reason:a}}).then(function(){return--n||t(r)})})})}),Pn.any&&typeof AggregateError<"u"&&Be(I,"any",function(){var e=Ue.apply(null,arguments).map(Mn);return new I(function(t,n){e.length===0&&n(new AggregateError([]));var r=e.length,i=new Array(r);e.forEach(function(o,a){return I.resolve(o).then(function(s){return t(s)},function(s){i[a]=s,--r||n(new AggregateError(i))})})})}));function _a(e,t){try{t(function(n){if(e._state===null){if(n===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&Xt();n&&typeof n.then=="function"?_a(e,function(i,o){n instanceof I?n._then(i,o):n.then(i,o)}):(e._state=!0,e._value=n,ba(e)),r&&Jt()}},Mr.bind(null,e))}catch(n){Mr(e,n)}}function Mr(e,t){if(Rn.push(t),e._state===null){var n=e._lib&&Xt();t=jr(t),e._state=!1,e._value=t,Pe&&t!==null&&typeof t=="object"&&!t._promise&&Kl(function(){var r=yr(t,"stack");t._promise=e,Be(t,"stack",{get:function(){return Ar?r&&(r.get?r.get.apply(t):r.value):e.stack}})}),du(e),ba(e),n&&Jt()}}function ba(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n0;)for(e=Qt,Qt=[],n=e.length,t=0;t0);Dr=!0,In=!0}function Nr(){var e=ct;ct=[],e.forEach(function(r){r._PSD.onunhandled.call(null,r._value,r)});for(var t=An.slice(0),n=t.length;n;)t[--n]()}function cu(e){function t(){e(),An.splice(An.indexOf(t),1)}An.push(t),++dt,Yt(function(){--dt===0&&Nr()},[])}function du(e){ct.some(function(t){return t._value===e._value})||ct.push(e)}function fu(e){for(var t=ct.length;t;)if(ct[--t]._value===e._value){ct.splice(t,1);return}}function On(e){return new I(Zt,!1,e)}function W(e,t){var n=B;return function(){var r=Xt(),i=B;try{return Ye(n,!0),e.apply(this,arguments)}catch(o){t&&t(o)}finally{Ye(i,!1),r&&Jt()}}}var oe={awaits:0,echoes:0,id:0},pu=0,jn=[],Ur=0,Ln=0,hu=0;function Ze(e,t,n,r){var i=B,o=Object.create(i);o.parent=i,o.ref=0,o.global=!1,o.id=++hu;var a=At.env;o.env=Rr?{Promise:I,PromiseProp:{value:I,configurable:!0,writable:!0},all:I.all,race:I.race,allSettled:I.allSettled,any:I.any,resolve:I.resolve,reject:I.reject,nthen:Ea(a.nthen,o),gthen:Ea(a.gthen,o)}:{},t&&ae(o,t),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=Ot(o,e,n,r);return o.ref===0&&o.finalize(),s}function Dt(){return oe.id||(oe.id=++pu),++oe.awaits,oe.echoes+=ma,oe.id}function Ve(){return oe.awaits?(--oe.awaits===0&&(oe.id=0),oe.echoes=oe.awaits*ma,!0):!1}(""+ga).indexOf("[native code]")===-1&&(Dt=Ve=K);function Mn(e){return oe.echoes&&e&&e.constructor===Pn?(Dt(),e.then(function(t){return Ve(),t},function(t){return Ve(),J(t)})):e}function vu(e){++Ln,(!oe.echoes||--oe.echoes===0)&&(oe.echoes=oe.id=0),jn.push(B),Ye(e,!0)}function mu(){var e=jn[jn.length-1];jn.pop(),Ye(e,!1)}function Ye(e,t){var n=B;if((t?oe.echoes&&(!Ur++||e!==B):Ur&&(!--Ur||e!==B))&&ka(t?vu.bind(null,e):mu),e!==B&&(B=e,n===At&&(At.env=Ca()),Rr)){var r=At.env.Promise,i=e.env;Tn.then=i.nthen,r.prototype.then=i.gthen,(n.global||e.global)&&(Object.defineProperty(q,"Promise",i.PromiseProp),r.all=i.all,r.race=i.race,r.resolve=i.resolve,r.reject=i.reject,i.allSettled&&(r.allSettled=i.allSettled),i.any&&(r.any=i.any))}}function Ca(){var e=q.Promise;return Rr?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(q,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:Tn.then,gthen:e.prototype.then}:{}}function Ot(e,t,n,r,i){var o=B;try{return Ye(e,!0),t(n,r,i)}finally{Ye(o,!1)}}function ka(e){ga.call(Pr,e)}function Bn(e,t,n,r){return typeof e!="function"?e:function(){var i=B;n&&Dt(),Ye(t,!0);try{return e.apply(this,arguments)}finally{Ye(i,!1),r&&ka(Ve)}}}function Ea(e,t){return function(n,r){return e.call(this,Bn(n,t),Bn(r,t))}}var Sa="unhandledrejection";function Ta(e,t){var n;try{n=t.onuncatched(e)}catch{}if(n!==!1)try{var r,i={promise:t,reason:e};if(q.document&&document.createEvent?(r=document.createEvent("Event"),r.initEvent(Sa,!0,!0),ae(r,i)):q.CustomEvent&&(r=new CustomEvent(Sa,{detail:i}),ae(r,i)),r&&q.dispatchEvent&&(dispatchEvent(r),!q.PromiseRejectionEvent&&q.onunhandledrejection))try{q.onunhandledrejection(r)}catch{}Pe&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: "+(e.stack||e))}catch{}}var J=I.reject;function Vr(e,t,n,r){if(!e.idbdb||!e._state.openComplete&&!B.letThrough&&!e._vip){if(e._state.openComplete)return J(new U.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return J(new U.DatabaseClosed);e.open().catch(K)}return e._state.dbReadyPromise.then(function(){return Vr(e,t,n,r)})}else{var i=e._createTransaction(t,n,e._dbSchema);try{i.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===Er.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(function(){return Vr(e,t,n,r)})):J(o)}return i._promise(t,function(o,a){return Ze(function(){return B.trans=i,r(o,a,i)})}).then(function(o){return i._completion.then(function(){return o})})}}var Pa="3.2.4",ft=String.fromCharCode(65535),Fr=-1/0,Fe="Invalid key provided. Keys must be of type string, number, Date or Array.",Ia="String expected.",en=[],Nn=typeof navigator<"u"&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),gu=Nn,yu=Nn,Ra=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)},Un="__dbnames",Hr="readonly",$r="readwrite";function pt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var Aa={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Vn(e){return typeof e=="string"&&!/\./.test(e)?function(t){return t[e]===void 0&&e in t&&(t=qt(t),delete t[e]),t}:function(t){return t}}var _u=function(){function e(){}return e.prototype._trans=function(t,n,r){var i=this._tx||B.trans,o=this.name;function a(l,c,u){if(!u.schema[o])throw new U.NotFound("Table "+o+" not part of transaction");return n(u.idbtrans,u)}var s=Xt();try{return i&&i.db===this.db?i===B.trans?i._promise(t,a,r):Ze(function(){return i._promise(t,a,r)},{trans:i,transless:B.transless||B}):Vr(this.db,t,[this.name],a)}finally{s&&Jt()}},e.prototype.get=function(t,n){var r=this;return t&&t.constructor===Object?this.where(t).first(n):this._trans("readonly",function(i){return r.core.get({trans:i,key:t}).then(function(o){return r.hook.reading.fire(o)})}).then(n)},e.prototype.where=function(t){if(typeof t=="string")return new this.db.WhereClause(this,t);if(ie(t))return new this.db.WhereClause(this,"["+t.join("+")+"]");var n=Q(t);if(n.length===1)return this.where(n[0]).equals(t[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter(function(u){return u.compound&&n.every(function(d){return u.keyPath.indexOf(d)>=0})&&u.keyPath.every(function(d){return n.indexOf(d)>=0})})[0];if(r&&this.db._maxKey!==ft)return this.where(r.name).equals(r.keyPath.map(function(u){return t[u]}));!r&&Pe&&console.warn("The query "+JSON.stringify(t)+" on "+this.name+" would benefit of a "+("compound index ["+n.join("+")+"]"));var i=this.schema.idxByName,o=this.db._deps.indexedDB;function a(u,d){try{return o.cmp(u,d)===0}catch{return!1}}var s=n.reduce(function(u,d){var f=u[0],v=u[1],p=i[d],h=t[d];return[f||p,f||!p?pt(v,p&&p.multi?function(g){var _=Ne(g,d);return ie(_)&&_.some(function(b){return a(h,b)})}:function(g){return a(h,Ne(g,d))}):v]},[null,null]),l=s[0],c=s[1];return l?this.where(l.name).equals(t[l.keyPath]).filter(c):r?this.filter(c):this.where(n).equals("")},e.prototype.filter=function(t){return this.toCollection().and(t)},e.prototype.count=function(t){return this.toCollection().count(t)},e.prototype.offset=function(t){return this.toCollection().offset(t)},e.prototype.limit=function(t){return this.toCollection().limit(t)},e.prototype.each=function(t){return this.toCollection().each(t)},e.prototype.toArray=function(t){return this.toCollection().toArray(t)},e.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},e.prototype.orderBy=function(t){return new this.db.Collection(new this.db.WhereClause(this,ie(t)?"["+t.join("+")+"]":t))},e.prototype.reverse=function(){return this.toCollection().reverse()},e.prototype.mapToClass=function(t){this.schema.mappedClass=t;var n=function(r){if(!r)return r;var i=Object.create(t.prototype);for(var o in r)if(de(r,o))try{i[o]=r[o]}catch{}return i};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=n,this.hook("reading",n),t},e.prototype.defineClass=function(){function t(n){ae(this,n)}return this.mapToClass(t)},e.prototype.add=function(t,n){var r=this,i=this.schema.primKey,o=i.auto,a=i.keyPath,s=t;return a&&o&&(s=Vn(a)(t)),this._trans("readwrite",function(l){return r.core.mutate({trans:l,type:"add",keys:n!=null?[n]:null,values:[s]})}).then(function(l){return l.numFailures?I.reject(l.failures[0]):l.lastResult}).then(function(l){if(a)try{xe(t,a,l)}catch{}return l})},e.prototype.update=function(t,n){if(typeof t=="object"&&!ie(t)){var r=Ne(t,this.schema.primKey.keyPath);if(r===void 0)return J(new U.InvalidArgument("Given object does not contain its primary key"));try{typeof n!="function"?Q(n).forEach(function(i){xe(t,i,n[i])}):n(t,{value:t,primKey:r})}catch{}return this.where(":id").equals(r).modify(n)}else return this.where(":id").equals(t).modify(n)},e.prototype.put=function(t,n){var r=this,i=this.schema.primKey,o=i.auto,a=i.keyPath,s=t;return a&&o&&(s=Vn(a)(t)),this._trans("readwrite",function(l){return r.core.mutate({trans:l,type:"put",values:[s],keys:n!=null?[n]:null})}).then(function(l){return l.numFailures?I.reject(l.failures[0]):l.lastResult}).then(function(l){if(a)try{xe(t,a,l)}catch{}return l})},e.prototype.delete=function(t){var n=this;return this._trans("readwrite",function(r){return n.core.mutate({trans:r,type:"delete",keys:[t]})}).then(function(r){return r.numFailures?I.reject(r.failures[0]):void 0})},e.prototype.clear=function(){var t=this;return this._trans("readwrite",function(n){return t.core.mutate({trans:n,type:"deleteRange",range:Aa})}).then(function(n){return n.numFailures?I.reject(n.failures[0]):void 0})},e.prototype.bulkGet=function(t){var n=this;return this._trans("readonly",function(r){return n.core.getMany({keys:t,trans:r}).then(function(i){return i.map(function(o){return n.hook.reading.fire(o)})})})},e.prototype.bulkAdd=function(t,n,r){var i=this,o=Array.isArray(n)?n:void 0;r=r||(o?void 0:n);var a=r?r.allKeys:void 0;return this._trans("readwrite",function(s){var l=i.schema.primKey,c=l.auto,u=l.keyPath;if(u&&o)throw new U.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new U.InvalidArgument("Arguments objects and keys must have the same length");var d=t.length,f=u&&c?t.map(Vn(u)):t;return i.core.mutate({trans:s,type:"add",keys:o,values:f,wantResults:a}).then(function(v){var p=v.numFailures,h=v.results,g=v.lastResult,_=v.failures,b=a?h:g;if(p===0)return b;throw new Wt(i.name+".bulkAdd(): "+p+" of "+d+" operations failed",_)})})},e.prototype.bulkPut=function(t,n,r){var i=this,o=Array.isArray(n)?n:void 0;r=r||(o?void 0:n);var a=r?r.allKeys:void 0;return this._trans("readwrite",function(s){var l=i.schema.primKey,c=l.auto,u=l.keyPath;if(u&&o)throw new U.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new U.InvalidArgument("Arguments objects and keys must have the same length");var d=t.length,f=u&&c?t.map(Vn(u)):t;return i.core.mutate({trans:s,type:"put",keys:o,values:f,wantResults:a}).then(function(v){var p=v.numFailures,h=v.results,g=v.lastResult,_=v.failures,b=a?h:g;if(p===0)return b;throw new Wt(i.name+".bulkPut(): "+p+" of "+d+" operations failed",_)})})},e.prototype.bulkDelete=function(t){var n=this,r=t.length;return this._trans("readwrite",function(i){return n.core.mutate({trans:i,type:"delete",keys:t})}).then(function(i){var o=i.numFailures,a=i.lastResult,s=i.failures;if(o===0)return a;throw new Wt(n.name+".bulkDelete(): "+o+" of "+r+" operations failed",s)})},e}();function tn(e){var t={},n=function(s,l){if(l){for(var c=arguments.length,u=new Array(c-1);--c;)u[c-1]=arguments[c];return t[s].subscribe.apply(null,u),e}else if(typeof s=="string")return t[s]};n.addEventType=o;for(var r=1,i=arguments.length;rt?1:ef?s:0}return this.toArray(function(c){return c.sort(l)}).then(n)},e.prototype.toArray=function(t){var n=this;return this._read(function(r){var i=n._ctx;if(i.dir==="next"&&jt(i,!0)&&i.limit>0){var o=i.valueMapper,a=Fn(i,i.table.core.schema);return i.table.core.query({trans:r,limit:i.limit,values:!0,query:{index:a,range:i.range}}).then(function(l){var c=l.result;return o?c.map(o):c})}else{var s=[];return Hn(i,function(l){return s.push(l)},r,i.table.core).then(function(){return s})}},t)},e.prototype.offset=function(t){var n=this._ctx;return t<=0?this:(n.offset+=t,jt(n)?zr(n,function(){var r=t;return function(i,o){return r===0?!0:r===1?(--r,!1):(o(function(){i.advance(r),r=0}),!1)}}):zr(n,function(){var r=t;return function(){return--r<0}}),this)},e.prototype.limit=function(t){return this._ctx.limit=Math.min(this._ctx.limit,t),zr(this._ctx,function(){var n=t;return function(r,i,o){return--n<=0&&i(o),n>=0}},!0),this},e.prototype.until=function(t,n){return Kr(this._ctx,function(r,i,o){return t(r.value)?(i(o),n):!0}),this},e.prototype.first=function(t){return this.limit(1).toArray(function(n){return n[0]}).then(t)},e.prototype.last=function(t){return this.reverse().first(t)},e.prototype.filter=function(t){return Kr(this._ctx,function(n){return t(n.value)}),xu(this._ctx,t),this},e.prototype.and=function(t){return this.filter(t)},e.prototype.or=function(t){return new this.db.WhereClause(this._ctx.table,t,this)},e.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},e.prototype.desc=function(){return this.reverse()},e.prototype.eachKey=function(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,i){t(i.key,i)})},e.prototype.eachUniqueKey=function(t){return this._ctx.unique="unique",this.eachKey(t)},e.prototype.eachPrimaryKey=function(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,i){t(i.primaryKey,i)})},e.prototype.keys=function(t){var n=this._ctx;n.keysOnly=!n.isMatch;var r=[];return this.each(function(i,o){r.push(o.key)}).then(function(){return r}).then(t)},e.prototype.primaryKeys=function(t){var n=this._ctx;if(n.dir==="next"&&jt(n,!0)&&n.limit>0)return this._read(function(i){var o=Fn(n,n.table.core.schema);return n.table.core.query({trans:i,values:!1,limit:n.limit,query:{index:o,range:n.range}})}).then(function(i){var o=i.result;return o}).then(t);n.keysOnly=!n.isMatch;var r=[];return this.each(function(i,o){r.push(o.primaryKey)}).then(function(){return r}).then(t)},e.prototype.uniqueKeys=function(t){return this._ctx.unique="unique",this.keys(t)},e.prototype.firstKey=function(t){return this.limit(1).keys(function(n){return n[0]}).then(t)},e.prototype.lastKey=function(t){return this.reverse().firstKey(t)},e.prototype.distinct=function(){var t=this._ctx,n=t.index&&t.table.schema.idxByName[t.index];if(!n||!n.multi)return this;var r={};return Kr(this._ctx,function(i){var o=i.primaryKey.toString(),a=de(r,o);return r[o]=!0,!a}),this},e.prototype.modify=function(t){var n=this,r=this._ctx;return this._write(function(i){var o;if(typeof t=="function")o=t;else{var a=Q(t),s=a.length;o=function(_){for(var b=!1,x=0;x0&&l.mutate({trans:i,type:"add",values:C}).then(function(A){for(var j in A.failures)E.splice(parseInt(j),1);g(C.length,A)})).then(function(){return(S.length>0||M&&typeof t=="object")&&l.mutate({trans:i,type:"put",keys:k,values:S,criteria:M,changeSpec:typeof t!="function"&&t}).then(function(A){return g(S.length,A)})}).then(function(){return(E.length>0||M&&t===qr)&&l.mutate({trans:i,type:"delete",keys:E,criteria:M}).then(function(A){return g(E.length,A)})}).then(function(){return _.length>x+w&&b(x+f)})})};return b(0).then(function(){if(v.length>0)throw new En("Error modifying one or more objects",v,p,h);return _.length})})})},e.prototype.delete=function(){var t=this._ctx,n=t.range;return jt(t)&&(t.isPrimKey&&!yu||n.type===3)?this._write(function(r){var i=t.table.core.schema.primaryKey,o=n;return t.table.core.count({trans:r,query:{index:i,range:o}}).then(function(a){return t.table.core.mutate({trans:r,type:"deleteRange",range:o}).then(function(s){var l=s.failures;s.lastResult,s.results;var c=s.numFailures;if(c)throw new En("Could not delete some values",Object.keys(l).map(function(u){return l[u]}),a-c);return a-c})})}):this.modify(qr)},e}(),qr=function(e,t){return t.value=null};function Eu(e){return nn(ku.prototype,function(n,r){this.db=e;var i=Aa,o=null;if(r)try{i=r()}catch(c){o=c}var a=n._ctx,s=a.table,l=s.hook.reading.fire;this._ctx={table:s,index:a.index,isPrimKey:!a.index||s.schema.primKey.keyPath&&a.index===s.schema.primKey.name,range:i,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:o,or:a.or,valueMapper:l!==Gt?l:null}})}function Su(e,t){return et?-1:e===t?0:1}function fe(e,t,n){var r=e instanceof Ba?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function Lt(e){return new e.Collection(e,function(){return Ma("")}).limit(0)}function Pu(e){return e==="next"?function(t){return t.toUpperCase()}:function(t){return t.toLowerCase()}}function Iu(e){return e==="next"?function(t){return t.toLowerCase()}:function(t){return t.toUpperCase()}}function Ru(e,t,n,r,i,o){for(var a=Math.min(e.length,r.length),s=-1,l=0;l=0?e.substr(0,s)+t[s]+n.substr(s+1):null;i(e[l],c)<0&&(s=l)}return a0)&&(w=C)}return g(w!==null?function(){h.continue(w+u)}:_),!1}),v}function Qe(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Ma(e){return{type:1,lower:e,upper:e}}var Ba=function(){function e(){}return Object.defineProperty(e.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),e.prototype.between=function(t,n,r,i){r=r!==!1,i=i===!0;try{return this._cmp(t,n)>0||this._cmp(t,n)===0&&(r||i)&&!(r&&i)?Lt(this):new this.Collection(this,function(){return Qe(t,n,!r,!i)})}catch{return fe(this,Fe)}},e.prototype.equals=function(t){return t==null?fe(this,Fe):new this.Collection(this,function(){return Ma(t)})},e.prototype.above=function(t){return t==null?fe(this,Fe):new this.Collection(this,function(){return Qe(t,void 0,!0)})},e.prototype.aboveOrEqual=function(t){return t==null?fe(this,Fe):new this.Collection(this,function(){return Qe(t,void 0,!1)})},e.prototype.below=function(t){return t==null?fe(this,Fe):new this.Collection(this,function(){return Qe(void 0,t,!1,!0)})},e.prototype.belowOrEqual=function(t){return t==null?fe(this,Fe):new this.Collection(this,function(){return Qe(void 0,t)})},e.prototype.startsWith=function(t){return typeof t!="string"?fe(this,Ia):this.between(t,t+ft,!0,!0)},e.prototype.startsWithIgnoreCase=function(t){return t===""?this.startsWith(t):$n(this,function(n,r){return n.indexOf(r[0])===0},[t],ft)},e.prototype.equalsIgnoreCase=function(t){return $n(this,function(n,r){return n===r[0]},[t],"")},e.prototype.anyOfIgnoreCase=function(){var t=Ue.apply(It,arguments);return t.length===0?Lt(this):$n(this,function(n,r){return r.indexOf(n)!==-1},t,"")},e.prototype.startsWithAnyOfIgnoreCase=function(){var t=Ue.apply(It,arguments);return t.length===0?Lt(this):$n(this,function(n,r){return r.some(function(i){return n.indexOf(i)===0})},t,ft)},e.prototype.anyOf=function(){var t=this,n=Ue.apply(It,arguments),r=this._cmp;try{n.sort(r)}catch{return fe(this,Fe)}if(n.length===0)return Lt(this);var i=new this.Collection(this,function(){return Qe(n[0],n[n.length-1])});i._ondirectionchange=function(a){r=a==="next"?t._ascending:t._descending,n.sort(r)};var o=0;return i._addAlgorithm(function(a,s,l){for(var c=a.key;r(c,n[o])>0;)if(++o,o===n.length)return s(l),!1;return r(c,n[o])===0?!0:(s(function(){a.continue(n[o])}),!1)}),i},e.prototype.notEqual=function(t){return this.inAnyRange([[Fr,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},e.prototype.noneOf=function(){var t=Ue.apply(It,arguments);if(t.length===0)return new this.Collection(this);try{t.sort(this._ascending)}catch{return fe(this,Fe)}var n=t.reduce(function(r,i){return r?r.concat([[r[r.length-1][1],i]]):[[Fr,i]]},null);return n.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(n,{includeLowers:!1,includeUppers:!1})},e.prototype.inAnyRange=function(t,n){var r=this,i=this._cmp,o=this._ascending,a=this._descending,s=this._min,l=this._max;if(t.length===0)return Lt(this);if(!t.every(function(m){return m[0]!==void 0&&m[1]!==void 0&&o(m[0],m[1])<=0}))return fe(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",U.InvalidArgument);var c=!n||n.includeLowers!==!1,u=n&&n.includeUppers===!0;function d(m,C){for(var S=0,k=m.length;S0){E[0]=s(E[0],C[0]),E[1]=l(E[1],C[1]);break}}return S===k&&m.push(C),m}var f=o;function v(m,C){return f(m[0],C[0])}var p;try{p=t.reduce(d,[]),p.sort(v)}catch{return fe(this,Fe)}var h=0,g=u?function(m){return o(m,p[h][1])>0}:function(m){return o(m,p[h][1])>=0},_=c?function(m){return a(m,p[h][0])>0}:function(m){return a(m,p[h][0])>=0};function b(m){return!g(m)&&!_(m)}var x=g,w=new this.Collection(this,function(){return Qe(p[0][0],p[p.length-1][1],!c,!u)});return w._ondirectionchange=function(m){m==="next"?(x=g,f=o):(x=_,f=a),p.sort(v)},w._addAlgorithm(function(m,C,S){for(var k=m.key;x(k);)if(++h,h===p.length)return C(S),!1;return b(k)?!0:(r._cmp(k,p[h][1])===0||r._cmp(k,p[h][0])===0||C(function(){f===o?m.continue(p[h][0]):m.continue(p[h][1])}),!1)}),w},e.prototype.startsWithAnyOf=function(){var t=Ue.apply(It,arguments);return t.every(function(n){return typeof n=="string"})?t.length===0?Lt(this):this.inAnyRange(t.map(function(n){return[n,n+ft]})):fe(this,"startsWithAnyOf() only works with strings")},e}();function Au(e){return nn(Ba.prototype,function(n,r,i){this.db=e,this._ctx={table:n,index:r===":id"?null:r,or:i};var o=e._deps.indexedDB;if(!o)throw new U.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=function(a,s){return o.cmp(s,a)},this._max=function(a,s){return o.cmp(a,s)>0?a:s},this._min=function(a,s){return o.cmp(a,s)<0?a:s},this._IDBKeyRange=e._deps.IDBKeyRange})}function Ie(e){return W(function(t){return rn(t),e(t.target.error),!1})}function rn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var on="storagemutated",Xe="x-storagemutated-1",Je=tn(null,on),Du=function(){function e(){}return e.prototype._lock=function(){return zt(!B.global),++this._reculock,this._reculock===1&&!B.global&&(B.lockOwnerFor=this),this},e.prototype._unlock=function(){if(zt(!B.global),--this._reculock===0)for(B.global||(B.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{Ot(t[1],t[0])}catch{}}return this},e.prototype._locked=function(){return this._reculock&&B.lockOwnerFor!==this},e.prototype.create=function(t){var n=this;if(!this.mode)return this;var r=this.db.idbdb,i=this.db._state.dbOpenError;if(zt(!this.idbtrans),!t&&!r)switch(i&&i.name){case"DatabaseClosedError":throw new U.DatabaseClosed(i);case"MissingAPIError":throw new U.MissingAPI(i.message,i);default:throw new U.OpenFailed(i)}if(!this.active)throw new U.TransactionInactive;return zt(this._completion._state===null),t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):r.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})),t.onerror=W(function(o){rn(o),n._reject(t.error)}),t.onabort=W(function(o){rn(o),n.active&&n._reject(new U.Abort(t.error)),n.active=!1,n.on("abort").fire(o)}),t.oncomplete=W(function(){n.active=!1,n._resolve(),"mutatedParts"in t&&Je.storagemutated.fire(t.mutatedParts)}),this},e.prototype._promise=function(t,n,r){var i=this;if(t==="readwrite"&&this.mode!=="readwrite")return J(new U.ReadOnly("Transaction is readonly"));if(!this.active)return J(new U.TransactionInactive);if(this._locked())return new I(function(a,s){i._blockedFuncs.push([function(){i._promise(t,n,r).then(a,s)},B])});if(r)return Ze(function(){var a=new I(function(s,l){i._lock();var c=n(s,l,i);c&&c.then&&c.then(s,l)});return a.finally(function(){return i._unlock()}),a._lib=!0,a});var o=new I(function(a,s){var l=n(a,s,i);l&&l.then&&l.then(a,s)});return o._lib=!0,o},e.prototype._root=function(){return this.parent?this.parent._root():this},e.prototype.waitFor=function(t){var n=this._root(),r=I.resolve(t);if(n._waitingFor)n._waitingFor=n._waitingFor.then(function(){return r});else{n._waitingFor=r,n._waitingQueue=[];var i=n.idbtrans.objectStore(n.storeNames[0]);(function a(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(i.get(-1/0).onsuccess=a)})()}var o=n._waitingFor;return new I(function(a,s){r.then(function(l){return n._waitingQueue.push(W(a.bind(null,l)))},function(l){return n._waitingQueue.push(W(s.bind(null,l)))}).finally(function(){n._waitingFor===o&&(n._waitingFor=null)})})},e.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new U.Abort))},e.prototype.table=function(t){var n=this._memoizedTables||(this._memoizedTables={});if(de(n,t))return n[t];var r=this.schema[t];if(!r)throw new U.NotFound("Table "+t+" not part of transaction");var i=new this.db.Table(t,r,this);return i.core=this.db.core.table(t),n[t]=i,i},e}();function Ou(e){return nn(Du.prototype,function(n,r,i,o,a){var s=this;this.db=e,this.mode=n,this.storeNames=r,this.schema=i,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=tn(this,"complete","error","abort"),this.parent=a||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new I(function(l,c){s._resolve=l,s._reject=c}),this._completion.then(function(){s.active=!1,s.on.complete.fire()},function(l){var c=s.active;return s.active=!1,s.on.error.fire(l),s.parent?s.parent._reject(l):c&&s.idbtrans&&s.idbtrans.abort(),J(l)})})}function Wr(e,t,n,r,i,o,a){return{name:e,keyPath:t,unique:n,multi:r,auto:i,compound:o,src:(n&&!a?"&":"")+(r?"*":"")+(i?"++":"")+Na(t)}}function Na(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function Ua(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:sa(n,function(r){return[r.name,r]})}}function ju(e){return e.length===1?e[0]:e}var an=function(e){try{return e.only([[]]),an=function(){return[[]]},[[]]}catch{return an=function(){return ft},ft}};function Gr(e){return e==null?function(){}:typeof e=="string"?Lu(e):function(t){return Ne(t,e)}}function Lu(e){var t=e.split(".");return t.length===1?function(n){return n[e]}:function(n){return Ne(n,e)}}function Va(e){return[].slice.call(e)}var Mu=0;function sn(e){return e==null?":id":typeof e=="string"?e:"["+e.join("+")+"]"}function Bu(e,t,n){function r(d,f){var v=Va(d.objectStoreNames);return{schema:{name:d.name,tables:v.map(function(p){return f.objectStore(p)}).map(function(p){var h=p.keyPath,g=p.autoIncrement,_=ie(h),b=h==null,x={},w={name:p.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:b,compound:_,keyPath:h,autoIncrement:g,unique:!0,extractKey:Gr(h)},indexes:Va(p.indexNames).map(function(m){return p.index(m)}).map(function(m){var C=m.name,S=m.unique,k=m.multiEntry,E=m.keyPath,R=ie(E),L={name:C,compound:R,keyPath:E,unique:S,multiEntry:k,extractKey:Gr(E)};return x[sn(E)]=L,L}),getIndexByKeyPath:function(m){return x[sn(m)]}};return x[":id"]=w.primaryKey,h!=null&&(x[sn(h)]=w.primaryKey),w})},hasGetAll:v.length>0&&"getAll"in f.objectStore(v[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}function i(d){if(d.type===3)return null;if(d.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var f=d.lower,v=d.upper,p=d.lowerOpen,h=d.upperOpen,g=f===void 0?v===void 0?null:t.upperBound(v,!!h):v===void 0?t.lowerBound(f,!!p):t.bound(f,v,!!p,!!h);return g}function o(d){var f=d.name;function v(g){var _=g.trans,b=g.type,x=g.keys,w=g.values,m=g.range;return new Promise(function(C,S){C=W(C);var k=_.objectStore(f),E=k.keyPath==null,R=b==="put"||b==="add";if(!R&&b!=="delete"&&b!=="deleteRange")throw new Error("Invalid operation type: "+b);var L=(x||w||{length:1}).length;if(x&&w&&x.length!==w.length)throw new Error("Given keys array must have same length as given values array.");if(L===0)return C({numFailures:0,failures:{},results:[],lastResult:void 0});var P,M=[],A=[],j=0,Z=function(Oe){++j,rn(Oe)};if(b==="deleteRange"){if(m.type===4)return C({numFailures:j,failures:A,results:[],lastResult:void 0});m.type===3?M.push(P=k.clear()):M.push(P=k.delete(i(m)))}else{var le=R?E?[w,x]:[w,null]:[x,null],Ce=le[0],ue=le[1];if(R)for(var ye=0;ye=t});c.forEach(function(d){o.push(function(){var f=s,v=d._cfg.dbschema;ei(i,f,r),ei(i,v,r),s=i._dbSchema=v;var p=Fa(f,v);p.add.forEach(function(w){Qr(r,w[0],w[1].primKey,w[1].indexes)}),p.change.forEach(function(w){if(w.recreate)throw new U.Upgrade("Not yet support for changing primary key");var m=r.objectStore(w.name);w.add.forEach(function(C){return Xr(m,C)}),w.change.forEach(function(C){m.deleteIndex(C.name),Xr(m,C)}),w.del.forEach(function(C){return m.deleteIndex(C)})});var h=d._cfg.contentUpgrade;if(h&&d._cfg.version>t){Zr(i,r),n._memoizedTables={},l=!0;var g=la(v);p.del.forEach(function(w){g[w]=f[w]}),Yr(i,[i.Transaction.prototype]),Kn(i,[i.Transaction.prototype],Q(g),g),n.schema=g;var _=wr(h);_&&Dt();var b,x=I.follow(function(){if(b=h(n),b&&_){var w=Ve.bind(null,null);b.then(w,w)}});return b&&typeof b.then=="function"?I.resolve(b):x.then(function(){return b})}}),o.push(function(f){if(!l||!gu){var v=d._cfg.dbschema;Ku(v,f)}Yr(i,[i.Transaction.prototype]),Kn(i,[i.Transaction.prototype],i._storeNames,i._dbSchema),n.schema=i._dbSchema})});function u(){return o.length?I.resolve(o.shift()(n.idbtrans)).then(u):I.resolve()}return u().then(function(){$u(s,r)})}function Fa(e,t){var n={del:[],add:[],change:[]},r;for(r in e)t[r]||n.del.push(r);for(r in t){var i=e[r],o=t[r];if(!i)n.add.push([r,o]);else{var a={name:r,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||i.primKey.auto!==o.primKey.auto&&!Nn)a.recreate=!0,n.change.push(a);else{var s=i.idxByName,l=o.idxByName,c=void 0;for(c in s)l[c]||a.del.push(c);for(c in l){var u=s[c],d=l[c];u?u.src!==d.src&&a.change.push(d):a.add.push(d)}(a.del.length>0||a.add.length>0||a.change.length>0)&&n.change.push(a)}}}return n}function Qr(e,t,n,r){var i=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach(function(o){return Xr(i,o)}),i}function $u(e,t){Q(e).forEach(function(n){t.db.objectStoreNames.contains(n)||Qr(t,n,e[n].primKey,e[n].indexes)})}function Ku(e,t){[].slice.call(t.db.objectStoreNames).forEach(function(n){return e[n]==null&&t.db.deleteObjectStore(n)})}function Xr(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Jr(e,t,n){var r={},i=kn(t.objectStoreNames,0);return i.forEach(function(o){for(var a=n.objectStore(o),s=a.keyPath,l=Wr(Na(s),s||"",!1,!1,!!a.autoIncrement,s&&typeof s!="string",!0),c=[],u=0;u"u"?I.resolve():Ju()).then(function(){return new I(function(l,c){if(i(),!n)throw new U.MissingAPI;var u=e.name,d=t.autoSchema?n.open(u):n.open(u,Math.round(e.verno*10));if(!d)throw new U.MissingAPI;d.onerror=Ie(c),d.onblocked=W(e._fireOnBlocked),d.onupgradeneeded=W(function(f){if(a=d.transaction,t.autoSchema&&!e._options.allowEmptyDB){d.onerror=rn,a.abort(),d.result.close();var v=n.deleteDatabase(u);v.onsuccess=v.onerror=W(function(){c(new U.NoSuchDatabase("Database "+u+" doesnt exist"))})}else{a.onerror=Ie(c);var p=f.oldVersion>Math.pow(2,62)?0:f.oldVersion;s=p<1,e._novip.idbdb=d.result,Fu(e,p/10,a,c)}},c),d.onsuccess=W(function(){a=null;var f=e._novip.idbdb=d.result,v=kn(f.objectStoreNames);if(v.length>0)try{var p=f.transaction(ju(v),"readonly");t.autoSchema?zu(e,f,p):(ei(e,e._dbSchema,p),qu(e,p)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Zr(e,p)}catch{}en.push(e),f.onversionchange=W(function(h){t.vcFired=!0,e.on("versionchange").fire(h)}),f.onclose=W(function(h){e.on("close").fire(h)}),s&&Qu(e._deps,u),l()},c)})})]).then(function(){return i(),t.onReadyBeingFired=[],I.resolve(ri(function(){return e.on.ready.fire(e.vip)})).then(function l(){if(t.onReadyBeingFired.length>0){var c=t.onReadyBeingFired.reduce(Sr,K);return t.onReadyBeingFired=[],I.resolve(ri(function(){return c(e.vip)})).then(l)}})}).finally(function(){t.onReadyBeingFired=null,t.isBeingOpened=!1}).then(function(){return e}).catch(function(l){t.dbOpenError=l;try{a&&a.abort()}catch{}return r===t.openCanceller&&e._close(),J(l)}).finally(function(){t.openComplete=!0,o()})}function ii(e){var t=function(a){return e.next(a)},n=function(a){return e.throw(a)},r=o(t),i=o(n);function o(a){return function(s){var l=a(s),c=l.value;return l.done?c:!c||typeof c.then!="function"?ie(c)?Promise.all(c).then(r,i):r(c):c.then(r,i)}}return o(t)()}function tc(e,t,n){var r=arguments.length;if(r<2)throw new U.InvalidArgument("Too few arguments");for(var i=new Array(r-1);--r;)i[r-1]=arguments[r];n=i.pop();var o=ua(i);return[e,o,n]}function Ha(e,t,n,r,i){return I.resolve().then(function(){var o=B.transless||B,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:o};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(d){return d.name===Er.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(function(){return Ha(e,t,n,null,i)})):J(d)}var l=wr(i);l&&Dt();var c,u=I.follow(function(){if(c=i.call(a,a),c)if(l){var d=Ve.bind(null,null);c.then(d,d)}else typeof c.next=="function"&&typeof c.throw=="function"&&(c=ii(c))},s);return(c&&typeof c.then=="function"?I.resolve(c).then(function(d){return a.active?d:J(new U.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):u.then(function(){return c})).then(function(d){return r&&a._resolve(),a._completion.then(function(){return d})}).catch(function(d){return a._reject(d),J(d)})})}function zn(e,t,n){for(var r=ie(e)?e.slice():[e],i=0;i0,C=H(H({},_),{isVirtual:m,keyTail:g,keyLength:w,extractKey:Gr(h),unique:!m&&_.unique});if(x.push(C),C.isPrimaryKey||o.push(C),w>1){var S=w===2?h[0]:h.slice(0,w-1);a(S,g+1,_)}return x.sort(function(k,E){return k.keyTail-E.keyTail}),C}var s=a(r.primaryKey.keyPath,0,r.primaryKey);i[":id"]=[s];for(var l=0,c=r.indexes;l0?Promise.reject(x.failures[0]):b.length1?t:e}:{d:0});else{var n=new He;return e&&"d"in e&&ae(n,e),n}};Tt(He.prototype,(ai={add:function(e){return qn(this,e),this},addKey:function(e){return ln(this,e,e),this},addKeys:function(e){var t=this;return e.forEach(function(n){return ln(t,n,n)}),this}},ai[xr]=function(){return li(this)},ai));function ln(e,t,n){var r=se(t,n);if(!isNaN(r)){if(r>0)throw RangeError();if(si(e))return ae(e,{from:t,to:n,d:1});var i=e.l,o=e.r;if(se(n,e.from)<0)return i?ln(i,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Ka(e);if(se(t,e.to)>0)return o?ln(o,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Ka(e);se(t,e.from)<0&&(e.from=t,e.l=null,e.d=o?o.d+1:1),se(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;i&&!e.l&&qn(e,i),o&&a&&qn(e,o)}}function qn(e,t){function n(r,i){var o=i.from,a=i.to,s=i.l,l=i.r;ln(r,o,a),s&&n(r,s),l&&n(r,l)}si(t)||n(e,t)}function lc(e,t){var n=li(t),r=n.next();if(r.done)return!1;for(var i=r.value,o=li(e),a=o.next(i.from),s=a.value;!r.done&&!a.done;){if(se(s.from,i.to)<=0&&se(s.to,i.from)>=0)return!0;se(i.from,s.from)<0?i=(r=n.next(s.from)).value:s=(a=o.next(i.from)).value}return!1}function li(e){var t=si(e)?null:{s:0,n:e};return{next:function(n){for(var r=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&se(n,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||se(n,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Ka(e){var t,n,r=(((t=e.r)===null||t===void 0?void 0:t.d)||0)-(((n=e.l)===null||n===void 0?void 0:n.d)||0),i=r>1?"r":r<-1?"l":"";if(i){var o=i==="r"?"l":"r",a=H({},e),s=e[i];e.from=s.from,e.to=s.to,e[i]=s[i],a[i]=s[o],e[o]=a,a.d=za(a)}e.d=za(e)}function za(e){var t=e.r,n=e.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1}var uc={stack:"dbcore",level:0,create:function(e){var t=e.schema.name,n=new He(e.MIN_KEY,e.MAX_KEY);return H(H({},e),{table:function(r){var i=e.table(r),o=i.schema,a=o.primaryKey,s=a.extractKey,l=a.outbound,c=H(H({},i),{mutate:function(f){var v=f.trans,p=v.mutatedParts||(v.mutatedParts={}),h=function(S){var k="idb://"+t+"/"+r+"/"+S;return p[k]||(p[k]=new He)},g=h(""),_=h(":dels"),b=f.type,x=f.type==="deleteRange"?[f.range]:f.type==="delete"?[f.keys]:f.values.length<50?[[],f.values]:[],w=x[0],m=x[1],C=f.trans._cache;return i.mutate(f).then(function(S){if(ie(w)){b!=="delete"&&(w=S.results),g.addKeys(w);var k=$a(w,C);!k&&b!=="add"&&_.addKeys(w),(k||m)&&cc(h,o,k,m)}else if(w){var E={from:w.lower,to:w.upper};_.add(E),g.add(E)}else g.add(n),_.add(n),o.indexes.forEach(function(R){return h(R.name).add(n)});return S})}}),u=function(f){var v,p,h=f.query,g=h.index,_=h.range;return[g,new He((v=_.lower)!==null&&v!==void 0?v:e.MIN_KEY,(p=_.upper)!==null&&p!==void 0?p:e.MAX_KEY)]},d={get:function(f){return[a,new He(f.key)]},getMany:function(f){return[a,new He().addKeys(f.keys)]},count:u,query:u,openCursor:u};return Q(d).forEach(function(f){c[f]=function(v){var p=B.subscr;if(p){var h=function(C){var S="idb://"+t+"/"+r+"/"+C;return p[S]||(p[S]=new He)},g=h(""),_=h(":dels"),b=d[f](v),x=b[0],w=b[1];if(h(x.name||"").add(w),!x.isPrimaryKey)if(f==="count")_.add(n);else{var m=f==="query"&&l&&v.values&&i.query(H(H({},v),{values:!1}));return i[f].apply(this,arguments).then(function(C){if(f==="query"){if(l&&v.values)return m.then(function(R){var L=R.result;return g.addKeys(L),C});var S=v.values?C.result.map(s):C.result;v.values?g.addKeys(S):_.addKeys(S)}else if(f==="openCursor"){var k=C,E=v.values;return k&&Object.create(k,{key:{get:function(){return _.addKey(k.primaryKey),k.key}},primaryKey:{get:function(){var R=k.primaryKey;return _.addKey(R),R}},value:{get:function(){return E&&g.addKey(k.primaryKey),k.value}}})}return C})}}return i[f].apply(this,arguments)}}),c}})}};function cc(e,t,n,r){function i(o){var a=e(o.name||"");function s(c){return c!=null?o.extractKey(c):null}var l=function(c){return o.multiEntry&&ie(c)?c.forEach(function(u){return a.addKey(u)}):a.addKey(c)};(n||r).forEach(function(c,u){var d=n&&s(n[u]),f=r&&s(r[u]);se(d,f)!==0&&(d!=null&&l(d),f!=null&&l(f))})}t.indexes.forEach(i)}var ui=function(){function e(t,n){var r=this;this._middlewares={},this.verno=0;var i=e.dependencies;this._options=n=H({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var o=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:K,dbReadyPromise:null,cancelOpen:K,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};a.dbReadyPromise=new I(function(s){a.dbReadyResolve=s}),a.openCanceller=new I(function(s,l){a.cancelOpen=l}),this._state=a,this.name=t,this.on=tn(this,"populate","blocked","versionchange","close",{ready:[Sr,K]}),this.on.ready.subscribe=oa(this.on.ready.subscribe,function(s){return function(l,c){e.vip(function(){var u=r._state;if(u.openComplete)u.dbOpenError||I.resolve().then(l),c&&s(l);else if(u.onReadyBeingFired)u.onReadyBeingFired.push(l),c&&s(l);else{s(l);var d=r;c||s(function f(){d.on.ready.unsubscribe(l),d.on.ready.unsubscribe(f)})}})}}),this.Collection=Eu(this),this.Table=bu(this),this.Transaction=Ou(this),this.Version=Zu(this),this.WhereClause=Au(this),this.on("versionchange",function(s){s.newVersion>0?console.warn("Another connection wants to upgrade database '"+r.name+"'. Closing db now to resume the upgrade."):console.warn("Another connection wants to delete database '"+r.name+"'. Closing db now to resume the delete request."),r.close()}),this.on("blocked",function(s){!s.newVersion||s.newVersion=0&&en.splice(n,1),this.idbdb){try{this.idbdb.close()}catch{}this._novip.idbdb=null}t.dbReadyPromise=new I(function(r){t.dbReadyResolve=r}),t.openCanceller=new I(function(r,i){t.cancelOpen=i})},e.prototype.close=function(){this._close();var t=this._state;this._options.autoOpen=!1,t.dbOpenError=new U.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)},e.prototype.delete=function(){var t=this,n=arguments.length>0,r=this._state;return new I(function(i,o){var a=function(){t.close();var s=t._deps.indexedDB.deleteDatabase(t.name);s.onsuccess=W(function(){Xu(t._deps,t.name),i()}),s.onerror=Ie(o),s.onblocked=t._fireOnBlocked};if(n)throw new U.InvalidArgument("Arguments not allowed in db.delete()");r.isBeingOpened?r.dbReadyPromise.then(a):a()})},e.prototype.backendDB=function(){return this.idbdb},e.prototype.isOpen=function(){return this.idbdb!==null},e.prototype.hasBeenClosed=function(){var t=this._state.dbOpenError;return t&&t.name==="DatabaseClosed"},e.prototype.hasFailed=function(){return this._state.dbOpenError!==null},e.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(e.prototype,"tables",{get:function(){var t=this;return Q(this._allTables).map(function(n){return t._allTables[n]})},enumerable:!1,configurable:!0}),e.prototype.transaction=function(){var t=tc.apply(this,arguments);return this._transaction.apply(this,t)},e.prototype._transaction=function(t,n,r){var i=this,o=B.trans;(!o||o.db!==this||t.indexOf("!")!==-1)&&(o=null);var a=t.indexOf("?")!==-1;t=t.replace("!","").replace("?","");var s,l;try{if(l=n.map(function(u){var d=u instanceof i.Table?u.name:u;if(typeof d!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return d}),t=="r"||t===Hr)s=Hr;else if(t=="rw"||t==$r)s=$r;else throw new U.InvalidArgument("Invalid transaction mode: "+t);if(o){if(o.mode===Hr&&s===$r)if(a)o=null;else throw new U.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o&&l.forEach(function(u){if(o&&o.storeNames.indexOf(u)===-1)if(a)o=null;else throw new U.SubTransaction("Table "+u+" not included in parent transaction.")}),a&&o&&!o.active&&(o=null)}}catch(u){return o?o._promise(null,function(d,f){f(u)}):J(u)}var c=Ha.bind(null,this,s,l,o,r);return o?o._promise(s,c,"lock"):B.trans?Ot(B.transless,function(){return i._whenReady(c)}):this._whenReady(c)},e.prototype.table=function(t){if(!de(this._allTables,t))throw new U.InvalidTable("Table "+t+" does not exist");return this._allTables[t]},e}(),dc=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",fc=function(){function e(t){this._subscribe=t}return e.prototype.subscribe=function(t,n,r){return this._subscribe(!t||typeof t=="function"?{next:t,error:n,complete:r}:t)},e.prototype[dc]=function(){return this},e}();function qa(e,t){return Q(t).forEach(function(n){var r=e[n]||(e[n]=new He);qn(r,t[n])}),e}function pc(e){var t=!1,n=void 0,r=new fc(function(i){var o=wr(e);function a(g){o&&Dt();var _=function(){return Ze(e,{subscr:g,trans:null})},b=B.trans?Ot(B.transless,_):_();return o&&b.then(Ve,Ve),b}var s=!1,l={},c={},u={get closed(){return s},unsubscribe:function(){s=!0,Je.storagemutated.unsubscribe(p)}};i.start&&i.start(u);var d=!1,f=!1;function v(){return Q(c).some(function(g){return l[g]&&lc(l[g],c[g])})}var p=function(g){qa(l,g),v()&&h()},h=function(){if(!(d||s)){l={};var g={},_=a(g);f||(Je(on,p),f=!0),d=!0,Promise.resolve(_).then(function(b){t=!0,n=b,d=!1,!s&&(v()?h():(l={},c=g,i.next&&i.next(b)))},function(b){d=!1,t=!1,i.error&&i.error(b),u.unsubscribe()})}};return h(),u});return r.hasValue=function(){return t},r.getValue=function(){return n},r}var ci;try{ci={indexedDB:q.indexedDB||q.mozIndexedDB||q.webkitIndexedDB||q.msIndexedDB,IDBKeyRange:q.IDBKeyRange||q.webkitIDBKeyRange}}catch{ci={indexedDB:null,IDBKeyRange:null}}var ht=ui;Tt(ht,H(H({},Sn),{delete:function(e){var t=new ht(e,{addons:[]});return t.delete()},exists:function(e){return new ht(e,{addons:[]}).open().then(function(t){return t.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(e){try{return Yu(ht.dependencies).then(e)}catch{return J(new U.MissingAPI)}},defineClass:function(){function e(t){ae(this,t)}return e},ignoreTransaction:function(e){return B.trans?Ot(B.transless,e):e()},vip:ri,async:function(e){return function(){try{var t=ii(e.apply(this,arguments));return!t||typeof t.then!="function"?I.resolve(t):t}catch(n){return J(n)}}},spawn:function(e,t,n){try{var r=ii(e.apply(n,t||[]));return!r||typeof r.then!="function"?I.resolve(r):r}catch(i){return J(i)}},currentTransaction:{get:function(){return B.trans||null}},waitFor:function(e,t){var n=I.resolve(typeof e=="function"?ht.ignoreTransaction(e):e).timeout(t||6e4);return B.trans?B.trans.waitFor(n):n},Promise:I,debug:{get:function(){return Pe},set:function(e){da(e,e==="dexie"?function(){return!0}:Ra)}},derive:Pt,extend:ae,props:Tt,override:oa,Events:tn,on:Je,liveQuery:pc,extendObservabilitySet:qa,getByKeyPath:Ne,setByKeyPath:xe,delByKeyPath:zl,shallowClone:la,deepClone:qt,getObjectDiff:oi,cmp:se,asap:aa,minKey:Fr,addons:[],connections:en,errnames:Er,dependencies:ci,semVer:Pa,version:Pa.split(".").map(function(e){return parseInt(e)}).reduce(function(e,t,n){return e+t/Math.pow(10,n*2)})})),ht.maxKey=an(ht.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Je(on,function(e){if(!$e){var t;Nn?(t=document.createEvent("CustomEvent"),t.initCustomEvent(Xe,!0,!0,e)):t=new CustomEvent(Xe,{detail:e}),$e=!0,dispatchEvent(t),$e=!1}}),addEventListener(Xe,function(e){var t=e.detail;$e||Wn(t)}));function Wn(e){var t=$e;try{$e=!0,Je.storagemutated.fire(e)}finally{$e=t}}var $e=!1;if(typeof BroadcastChannel<"u"){var Gn=new BroadcastChannel(Xe);typeof Gn.unref=="function"&&Gn.unref(),Je(on,function(e){$e||Gn.postMessage(e)}),Gn.onmessage=function(e){e.data&&Wn(e.data)}}else if(typeof self<"u"&&typeof navigator<"u"){Je(on,function(e){try{$e||(typeof localStorage<"u"&&localStorage.setItem(Xe,JSON.stringify({trig:Math.random(),changedParts:e})),typeof self.clients=="object"&&gr([],self.clients.matchAll({includeUncontrolled:!0}),!0).forEach(function(t){return t.postMessage({type:Xe,changedParts:e})}))}catch{}}),typeof addEventListener<"u"&&addEventListener("storage",function(e){if(e.key===Xe){var t=JSON.parse(e.newValue);t&&Wn(t.changedParts)}});var Wa=self.document&&navigator.serviceWorker;Wa&&Wa.addEventListener("message",hc)}function hc(e){var t=e.data;t&&t.type===Xe&&Wn(t.changedParts)}I.rejectionMapper=eu,da(Pe,Ra);const di="sprig.sessionId",vc="sprig.disableReplayRecording",mc=()=>{Ft.setItem(vc,"disabled")},gc=(()=>{const e=Ft.getItem(di);return e?(Ft.removeItem(di),e):mn()})();window.addEventListener("beforeunload",()=>{Ft.setItem(di,gc)});class yc extends ui{constructor(){super("replayStorage",{autoOpen:!1});Ee(this,"events");Ee(this,"chunkUploads");Ee(this,"pendingCaptures")}}const Ga=new yc;Ga.version(1).stores({events:"uuid, timestamp, [sessionId+timestamp]",chunkUploads:"uuid, timestamp, [sessionId+status], [uploadId+status], [sessionId+status+uploadId]",pendingCaptures:"uuid, timestamp, [sessionId+targetTimestamp]"}),Ga.open().catch(()=>{mc()});const _c="sprig.pendingCount";Ft.getItem(_c);const bc=e=>{};var fi=(e=>(e[e.And=1]="And",e[e.Or=2]="Or",e))(fi||{});const Za=1,pi={eq(e,t){return e==t},neq(e,t){return!this.eq(e,t)},gt(e,t){return e>t},gte(e,t){return e>=t},lt(e,t){return ee.indexOf(n)===-1)},list_alo(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.some(i=>r.has(i))},list_dni(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.every(i=>!r.has(i))},contains(e,t){const n=e.toLowerCase(),r=t.toLowerCase();return n.includes(r)},notcontains(e,t){return!this.contains(e,t)}},xc=(e,t,n)=>{switch(t){case T.VideoVoice:return Boolean(e&&e.value);case T.Open:return!!n;case T.MultipleSelect:return Boolean(n&&!!Object.keys(n).length);case T.RecordedTask:return(n==null?void 0:n.taskStatus)===me.Completed;case T.TextUrlPrompt:return!e.value;case T.ConsentLegal:return n!==null;case T.MultipleChoice:return n!==void 0;case T.NPS:return n!==null;case T.Likert:return n!==null;default:return!0}},Ya=({cards:e,index:t,hasEndCard:n,allResponses:r,uploadProgress:i={}})=>{if(t>=e.length||t<0)return null;const o=e[t];let a=t+1;const s=o.props.routingOptions||[];for(let u=0;ur.length)continue;let p=Qa({comparator:v.comparator,response:r[v.questionIndex],type:o.type,value:v.value});for(let h=1;hu.type===T.Uploading);let c;return l>0?c=n?e.length-3:e.length-2:c=e.length-1,t>=c||a===-1||a!==null&&a>c?l>0&&Object.values(i).some(d=>d.isSubmitted&&!d.isComplete)?l:n?e.length-1:null:a===-1?null:a},Qa=({comparator:e,response:t,type:n,value:r})=>{if(e===Me.Answered)switch(n){case T.TextUrlPrompt:return t===void 0;case T.ConsentLegal:return t&&t.submitted===!0;case T.RecordedTask:return"taskStatus"in t&&t.taskStatus===me.Completed;case T.Likert:return Number.isInteger(t);case T.Open:return t&&t.length>0;case T.MultipleChoice:case T.MultipleSelect:return Object.keys(t).length>0;case T.NPS:return Number.isInteger(t);case T.VideoVoice:return!!(t!=null&&t.mediaRecordingUid);default:return!1}if(e===Me.Skipped)switch(n){case T.TextUrlPrompt:return t==null?void 0:t.skipped;case T.ConsentLegal:return t===null;case T.RecordedTask:return"taskStatus"in t&&t.taskStatus===me.Abandoned;case T.Likert:return t===null;case T.Open:return(t==null?void 0:t.length)===0;case T.MultipleChoice:return t===void 0;case T.MultipleSelect:return(t==null?void 0:t.length)===0;case T.NPS:return t===null;case T.VideoVoice:return t===null;default:return!1}return e===Me.GivenUp?n===T.RecordedTask?"taskStatus"in t&&t.taskStatus===me.GivenUp:!0:pi[e](t,r)},wc=13,Cc=(e,t)=>e.reduce((n,r)=>n.concat(n.map(i=>[...i,r])),[[]]).filter(n=>t||n.length>0),kc=e=>{var t,n;switch(e.type){case T.MultipleSelect:return!e||!e.props||!e.props.options?null:e.props.options.length>wc?e.props.options.map(r=>[r.value]):Cc(e.props.options.map(r=>r.value),!e.props.properties.required);case T.MultipleChoice:{if(!e||!e.props||!e.props.options)return null;const r=e.props.options.map(i=>i.value);return e.props.properties.required||r.push(void 0),r}case T.Likert:{const r=Number((n=(t=e.props)==null?void 0:t.properties)==null?void 0:n.range)||5;return[...Array.from(Array(r).keys()).map(o=>o+1),...e.props.properties.required?[]:[null]]}case T.NPS:return[0,1,2,3,4,5,6,7,8,9,10,...e.props.properties.required?[]:[null]];case T.VideoVoice:case T.Open:return["1",...e.props.properties.required?[]:[""]];case T.RecordedTask:return[{taskStatus:me.Completed},{taskStatus:me.GivenUp},...e.props.properties.required?[]:[{taskStatus:me.Abandoned}]];case T.TextUrlPrompt:return[void 0,...e.props.properties.required?[]:[{skipped:!0}]];case T.ConsentLegal:return[Za,...e.props.properties.required?[]:[null]];default:return[Za]}},Ec=e=>e in pi,Sc=e=>typeof e=="object"&&e!==null&&"taskStatus"in e,Tc=(e,t=[])=>t.reduce((n,r)=>{const{group:i,target:o}=r;if(!(i!=null&&i.length))return[...n];const a=i.filter(s=>Number(s)?!0:typeof s=="object"?s.questionIndex===e:!1).map(s=>{const{comparator:l,value:c}=s;return{comparator:l,target:o,value:c}});return[...n,...a]},[]),Pc=(e,t)=>{const n=new Set([T.Thanks,T.Uploading]);if(t>=e.length||t<0||n.has(e[t].type))return 0;const r=e.filter(o=>!n.has(o.type));if(t===r.length-1)return 1;const i={[r.length-1]:1,[-1]:0};for(let o=r.length-2;o>=t;o--){const a=r[o],s=Tc(o,a.props.routingOptions);if(s.length===0){i[o]=i[o+1]+1;continue}let l=0,c=kc(a);if(c===null)return r.length-1-t;for(let u=0;u{const g=xc({value:h},a.type,h);return!(g&&d===Me.Answered||!g&&d===Me.Skipped||d===Me.GivenUp&&Sc(h)&&h.taskStatus===me.GivenUp||g&&a.type===T.Open&&(d===Me.Contains||d===Me.DoesNotContain)||g&&Ec(d)&&pi[d](h,v))});if(p.length=r.length)return r.length-1-t;l=Math.max(i[h]+1,l)}c=p}c.length>0&&(l=Math.max(i[o+1]+1,l)),i[o]=l}return i[t]},Ic=e=>!(e.type===T.Thanks||e.type===T.Uploading),G=Yo()((e,t)=>({allResponses:[],answers:void 0,apiURL:"",border:"#000000",cards:[],close:async(n=_t)=>{const r=t(),{fadeout:i,remove:o,trackHistory:a}=r;await i(n),hi(r)||a({event:"closed"}),Jo.enable(),o({initiator:or.Closed})},configureExitOnOverlayClick:()=>{},customMetadata:{},destroy:async n=>{const{eventEmitFn:r,fadeout:i,remove:o}=t();r(Te.SurveyComplete),await i(n),Jo.enable(),o({initiator:or.Complete})},endCard:{headline:""},envId:"",eventEmitFn:hn.emit.bind(hn),fadeout:async n=>{const{eventEmitFn:r,headers:i,viewDocument:o}=t();return Vt(i)?Promise.resolve():(r(Se.SurveyFadingOut),new Promise(a=>{const s=o.getElementById(n);s?(s.addEventListener("transitionend",()=>{a()}),s.classList.remove("ul-app--visible")):a()}))},forceBrandedLogo:!1,frame:document.createElement("iframe"),handleClickEmbedButton:n=>{const{cards:r,eventEmitFn:i,index:o}=t();i(n,{[yt.QuestionId]:r[o].name,[yt.Props]:r[o].props}),e(()=>({hasViewedEmbed:!0}))},handleUploadUpdate:({mediaRecordingUid:n,isComplete:r,progressPct:i,isSubmitted:o})=>{var f,v,p;const{cards:a,destroy:s,index:l,uploadProgress:c}=t(),u={...c,[n]:{progressPct:i||i===0?i:(f=c[n])==null?void 0:f.progressPct,isComplete:r||((v=c[n])==null?void 0:v.isComplete),isSubmitted:o||((p=c[n])==null?void 0:p.isSubmitted)}};if(a[l].type!==T.Uploading){e({uploadProgress:u});return}const d=Object.entries(c).every(([h,g])=>!g.isSubmitted||g.isComplete||n==h&&r);if(d&&l>=a.length-1){s(_t);return}e({index:d?l+1:l,uploadingCardViewed:!0,uploadProgress:u})},hasViewedEmbed:!1,headers:{Authorization:"","Content-Type":"","userleap-platform":bt.Web,"x-ul-environment-id":"","x-ul-installation-method":xt.Snippet,"x-ul-sdk-version":"","x-ul-visitor-id":""},index:0,isPreview:!1,marketingUrl:"https://sprig.com",meta:{ch:0,cw:0,l:"",mode:null,p:"",sh:0,sw:0},mode:void 0,next:n=>{const{allResponses:r,cards:i,eventEmitFn:o,index:a,responseGroupUid:s,submit:l,trackHistory:c,uploadProgress:u,viewedCardCount:d}=t(),f=Date.now(),v=[...i],p=v[a],{type:h}=n.data,g={...n.data},_=g.value;Ic(p)&&(p.value=_),g.answeredAt=f,delete g.type;const b={response:g,responseGroupUid:s,questionIndex:a};let x=h===T.MultipleChoice?Object.values(_).find(k=>k!==!1):_;h===T.MultipleSelect&&(x=v[a].props.options.reduce((k,E)=>(_[E.id]&&k.push(E.value),k),[]));const w=r.slice(0);w[a]=x,e({allResponses:w});const m=Ya({cards:v,index:a,hasEndCard:!!n.endCard,uploadProgress:u,allResponses:w});if(m===null){b.completedAt=f,l(b),n.completeSurvey();return}else[T.Thanks,T.Uploading].includes(v[m].type)&&(b.completedAt=f);const C=l(b);[T.Thanks,T.Uploading].includes(v[m].type)||C.finally(()=>{c({event:"seen",index:m})});const S=v[m];v[m]&&o&&o(Te.CurrentQuestion,{[yt.QuestionId]:S.name,[yt.Props]:S.props}),e({cards:v,hasViewedEmbed:!1,index:m,viewedCardCount:d+1})},previewKey:null,recorder:()=>{},recorderEventEmitter:hn,responseGroupUid:"",remove:({initiator:n})=>{const{frame:r,headers:i,eventEmitFn:o}=t();["ios","android"].includes(i["userleap-platform"])&&o(Se.SurveyWillClose,{name:Se.SurveyWillClose,initiator:n}),!Vt(i)&&(o(Se.SurveyWillClose,{name:Se.SurveyWillClose,initiator:n}),r.remove())},seen:async()=>{const{trackHistory:n}=t();return n({event:"seen",isNew:!0})},slugName:null,showStripes:!1,showSurveyBrand:!1,styleNonce:"",submit:async({completedAt:n,questionIndex:r,response:i,responseGroupUid:o})=>{const a=t();if(!o||hi(a))return;const s={responseGroupUid:o,meta:a.meta,customMetadata:a.customMetadata,responses:[i],completedAt:n,previewKey:a.previewKey};n&&bc({id:a.surveyId});const l=await St(`${a.apiURL}/sdk/1/environments/${a.envId}/visitors/${a.userId}/responses/submit`,{body:JSON.stringify(s),headers:a.headers,method:"POST"});if(!l.ok){l.reportError&&(console.warn("[Sprig] (ERR-427) Failed to submit response",l.error),await Xa(a,"submitResponse",l.error));return}a.eventEmitFn(Se.QuestionAnswered,{...i,questionIndex:r})},surveyId:0,tabTitle:"",trackHistory:async({event:n,index:r,isNew:i=!1})=>{const o=t();if(hi(o))return;const{cards:a,index:s}=o,l=r!==void 0?a[r]:a[s],c={sid:o.surveyId,qid:l.name,action:n,vid:o.userId,eid:o.envId,isNew:i,responseGroupUid:o.responseGroupUid,previewKey:o.previewKey},u=await St(`${o.apiURL}/sdk/1/visitors/${o.userId}/surveys/${o.surveyId}/history`,{body:JSON.stringify(c),headers:o.headers,method:"POST"});!u.ok&&u.reportError&&(console.warn("[Sprig] (ERR-428) Failed to track survey event",u.error),await Xa(o,"trackHistory",u.error))},update:()=>{const{headers:n,eventEmitFn:r,frame:i,viewDocument:o}=t();setTimeout(()=>{var s;const a=Fs(o);Vt(n)?r(Se.SurveyHeight,{name:Se.SurveyHeight,contentFrameHeight:a}):(s=i.setHeight)==null||s.call(i,a)},100)},uploadingCardViewed:!1,uploadProgress:{},useDesktopPrototype:void 0,useMobileStyling:!1,userId:"",viewDocument:window.document,viewedCardCount:0})),hi=e=>!e.userId||e.meta&&e.meta.mode==="test"||e.isPreview,Xa=async(e,t,n)=>{const{mode:r,userId:i,envId:o,apiURL:a,headers:s,viewDocument:l}=e,c=l.documentElement,u={mode:r,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:c.clientWidth,clientHeight:c.clientHeight,location:window.location.href,language:window.navigator.language},d={action:t,err:{message:n==null?void 0:n.message,stack:n==null?void 0:n.stack},meta:u,vid:i,envId:o};(await St(`${a}/sdk/1/errors`,{method:"POST",headers:Object.assign({"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},s),body:JSON.stringify(d)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",n)},Rc=async(e,t)=>{var r;const n=await fetch(t,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(n.ok){const i=await n.json();return(r=i==null?void 0:i.upload)==null?void 0:r.url}else return null},Ja=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",es=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:Ja()};return new MediaRecorder(e,t)},ts=(e,t,n)=>{n[t]=[],e.ondataavailable=function(r){n[t].push(r.data)},e.currentMediaRecordingUid=t,e.start()};function ns(e,t,n,r,i,o){if(e&&e.state!=="inactive"){const{[F.BeginCallback]:a}=r,s=e.currentMediaRecordingUid;if(!s)return;a&&a(s),e.onstop=()=>Ac(t,e,n,r,s,i,o),e.stop()}}async function Ac(e,t,n,r,i,o,a){const s=G.getState().viewDocument,{[F.UploadCallback]:l,[F.ProgressCallback]:c}=r,u={mediaType:n,updatedAt:new Date().toISOString(),mediaRecordingUid:i,...r[F.PassthroughData]},d=await Rc(u,e);if(!d){l&&l(null,{message:"failed to get upload url"});return}const f=new Blob(a,{type:Ja()});if(!s.defaultView)return;const v=new s.defaultView.File([f],`recording video ${Date.now()}`),p=o.createUpload({endpoint:d,file:v,chunkSize:5120});p.on("error",h=>{l&&l(null,h)}),p.on("progress",h=>{c&&c(i,h)}),p.on("success",()=>{l&&l(i,!0)})}const Dc={state:{...{chunks:{}}},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:n,screenRecorder:r,UpChunk:i}=this.state,o=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?be.Video:be.Audio;this.state.chunks&&t&&i&&(n!=null&&n.currentMediaRecordingUid&&ns(n,t,o,e,i,this.state.chunks[n==null?void 0:n.currentMediaRecordingUid]),r!=null&&r.currentMediaRecordingUid&&ns(r,t,be.Screen,e,i,this.state.chunks[r==null?void 0:r.currentMediaRecordingUid]))},handleCancelledStream(e){const t=e.getVideoTracks(),n=e.getAudioTracks();let r=t.length&&t[0];r=r||n.length&&n[0],r&&r.addEventListener("ended",()=>{[this.state.avRecorder,this.state.screenRecorder].map(i=>{i&&(i.state==="recording"&&i.stop(),i.stream.getTracks().map(o=>{o.readyState==="live"&&o.stop()}))}),Object.assign(this.state,{avStream:null,captureStream:null,avRecorder:null,screenRecorder:null})})},taskDurationMillisecond(){return this.state.startTime?new Date().getTime()-this.state.startTime.getTime():0},setUpChunk(e){this.state.UpChunk=e},configure(e,t){Object.assign(this.state,t),this.state.uploadApiEndpoint=`${t.apiURL}/2/environments/integrations/upload`,this.state.chunks={},e.on(re.PermissionStatus,this.permissionStatusCallback.bind(this)),e.on(re.AvPermission,async n=>{this.avPermissionCallback(n)}),e.on(re.BeginRecording,this.beginRecordingCallback.bind(this)),e.on(re.StartTask,this.startTaskCallback.bind(this)),e.on(re.ScreenPermission,async n=>{this.screenPermissionCallback(n)}),e.on(re.FinishTask,async n=>{this.finishTaskCallback(n)})},async avPermissionCallback(e){var r,i,o;const{[F.StreamReadyCallback]:t,[F.PermissionDescriptors]:n}=e;try{(r=this.state.avStream)!=null&&r.active&&(this.state.avStream.getTracks().map(a=>a.readyState==="live"&&a.stop()),((i=this.state.captureStream)==null?void 0:i.getAudioTracks().length)===1&&this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])),this.state.avStream=await navigator.mediaDevices.getUserMedia({video:n.includes(wt.Camera),audio:!0}),((o=this.state.captureStream)==null?void 0:o.getAudioTracks().length)===0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.avStream)}catch(a){console.warn("Error: failed to get permissions: "+a),t&&t(null,null);return}t&&t(this.state.avStream,this.state.captureStream)},async screenPermissionCallback(e){const{[F.ScreenPermissionRequested]:t,[F.StreamReadyCallback]:n}=e;t==null||t(!0);try{this.state.captureStream=await navigator.mediaDevices.getDisplayMedia({video:!0,cursor:"always",displaySurface:"browser",preferCurrentTab:!0})}catch(r){t==null||t(!1),console.warn("Error: failed to get permissions: "+r),n&&n(null,null);return}t==null||t(!1),this.state.avStream&&this.state.avStream.getAudioTracks().length>0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.captureStream),n&&n(this.state.avStream||null,this.state.captureStream)},beginRecordingCallback(e){const{[F.RecordingMediaTypes]:t,[F.StartRecordingCallback]:n}=e;if(!t)return;const r=[];if(t.includes(be.Video)&&this.state.avStream){this.state.avRecorder=es(this.state.avStream);const i=mn();ts(this.state.avRecorder,i,this.state.chunks),r.push(i)}if(t.includes(be.Screen)&&this.state.captureStream){this.state.screenRecorder=es(this.state.captureStream);const i=mn();ts(this.state.screenRecorder,i,this.state.chunks),r.push(i)}r&&n&&n(r)},async finishTaskCallback(e){const{[F.CurrentIndex]:t,[F.TaskResponse]:n,[F.TaskCompleteCallback]:r}=e;await this.stopRecording(e),r&&r(this.taskDurationMillisecond()),this.state.cards&&this.state.hasEndCard!==void 0&&this.lookAheadAndStopStream(t,n,this.state.cards,this.state.hasEndCard)},startTaskCallback(){this.state.startTime=new Date},permissionStatusCallback(e){var r;const{[F.PermissionStatusCallback]:t}=e,n=this.state.avStream;t&&t(n,n?(n==null?void 0:n.getVideoTracks().length)>0:!1,!!((r=this.state.captureStream)!=null&&r.active),this.state.captureStream)},lookAheadAndStopStream(e,t,n,r){const{avRecorder:i,screenRecorder:o}=this.state,{allResponses:a}=G.getState(),s=Ya({cards:n,index:e,hasEndCard:r,allResponses:a});s!==null&&n[s].type===T.RecordedTask||[i,o].map(l=>{l&&(l.state==="recording"&&l.stop(),l.stream.getTracks().map(c=>{c.readyState==="live"&&c.stop()}))})}},Zn=Object.create(Dc);Object.freeze(Zn);function rs(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ty("button",{...e,className:$("ul-card-text__button",e.className),id:"ul-card-text__button"}),Re=({message:e,properties:t})=>{const n=t==null?void 0:t.captionText;return y(he,{children:[e&&y("h1",{className:O.QuestionHeader,id:O.QuestionHeader,...n?{}:{style:{marginBottom:"15px"}},children:e}),n&&y("p",{className:O.Caption,id:O.Caption,children:n})]})},is=({buttonText:e="View Prototype",handleClick:t})=>y("button",{className:"prototype-button",onClick:t,children:e},"prototype-btn"),et=({defaultBody:e,embeddedType:t="prototype",properties:n})=>{var d;const{handleClickEmbedButton:r,hasViewedEmbed:i,headers:o,useDesktopPrototype:a}=G(f=>({handleClickEmbedButton:f.handleClickEmbedButton,hasViewedEmbed:f.hasViewedEmbed,headers:f.headers,useDesktopPrototype:f.useDesktopPrototype})),s=(n==null?void 0:n.conceptUrl)||((d=n==null?void 0:n.consentDocument)==null?void 0:d.url),l=window.innerWidth{f.preventDefault(),r(v)};if(!a&&l&&!i&&s&&["email","link"].includes(c)){if(t==="prototype")return y(is,{handleClick:f=>{u(f,Te.ViewPrototypeClick)}});if(t==="pdf")return y(is,{buttonText:(n==null?void 0:n.viewDocumentText)||"View Document",handleClick:f=>{u(f,Te.ViewAgreementClick)}})}return e()},os=(e,t)=>{const n=We(0),r=()=>{if(e.current){const i=e.current;i.style.height="1px";const o=i.scrollHeight,a=i.offsetHeight-i.clientHeight,s=o+a,l=parseInt(window.getComputedStyle(i).getPropertyValue("max-height")),c=s<=l?s:l;n.current!==c&&t(),n.current=c,i.style.height=`${c}px`}};return ge(r,[]),r},as=({border:e,label:t,isSelected:n,value:r,text:i,id:o,isRadio:a,useMobileStyling:s,error:l,allowTextEntry:c,promptText:u,onUserInputChanged:d})=>{const{styleNonce:f,viewDocument:v}=G(E=>({styleNonce:E.styleNonce,viewDocument:E.viewDocument})),[p,h]=ne(!1);Mc(v,e,f);const g=({isSelected:E,userText:R})=>{d&&d({id:o||"",selected:E,value:r,userText:R})},_=E=>{E.stopPropagation(),g({isSelected:a||!n,userText:i}),h(!1)},b=()=>{p||h(!0)},x=()=>{p&&h(!1)},w=E=>{(E.key==="Enter"||E.key===" ")&&_(E)},m={onClick:E=>_(E),onKeyPress:E=>w(E)};"ontouchstart"in v.documentElement?(m.onTouchStart=x,m.onTouchCancel=x,m.onTouchEnd=x):(m.onMouseDown=b,m.onMouseLeave=x);const C=a?`radio-${o}`:`checkbox-${o}`,S=n||p?[Yn]:[],k=[...l?[ls]:[],...S];return y("div",{className:$([...X(O.Choice,s),...k]),id:`choice-div-${o}`,style:l?{borderColor:Ut}:{},...m,children:[y("div",{className:$([O.ChoiceLabelContainer]),children:[a?y("div",{"aria-labelledby":`label-${o}`,className:$([O.ChoiceRadio,...S]),id:C,role:"radio",tabIndex:0}):y("div",{"aria-checked":n,"aria-labelledby":`label-${o}`,className:O.ChoiceCheckbox,id:C,role:"checkbox",style:n?{backgroundColor:e,borderColor:e,boxShadow:"none"}:{},tabIndex:0,children:n&&y("svg",{fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg",children:y("path",{d:"M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",stroke:"white",strokeLinecap:"round",strokeWidth:"2"})})}),y("label",{className:$(X(O.ChoiceLabel,s)),htmlFor:C,id:`label-${o}`,children:t})]}),c&&n&&y("div",{className:$([O.ChoiceTextEntryContainer,...S]),children:y(jc,{onTextChange:E=>g({isSelected:n,userText:E}),promptText:u||"Please specify",textValue:i,useMobileStyling:s})})]})},jc=({promptText:e,textValue:t,onTextChange:n,useMobileStyling:r})=>{const i=We(null),{update:o}=G(s=>({update:s.update})),a=os(i,()=>o());return ge(()=>{i.current&&i.current.focus()},[]),y("textarea",{"aria-label":e,"aria-multiline":"true","aria-placeholder":e,className:$(X(O.ChoiceTextInput,r)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:s=>{a(),s.stopPropagation(),n(s.currentTarget.value)},onClick:s=>{s.stopPropagation()},onKeyPress:s=>{s.stopPropagation()},placeholder:e,ref:i,role:"textbox",rows:1,value:t})},ss="ul-select-style-element",Yn="ul-select-active-dynamic-style",ls="ul-select-error-dynamic-style",Lc=e=>e.tagName.toLowerCase()==="style",Mc=(e,t,n)=>{let r=e.getElementById(ss),i=!1;r||(r=e.createElement("style"),i=!0),Lc(r)&&(r.id=ss,n&&(r.nonce=n),r.textContent=Bc(t),i&&e.head.appendChild(r))},Bc=e=>` - .${Yn} { +`).slice(t).filter(ps).map(r=>` +`+r).join("")):""}var fs=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Cr=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(fs),cc={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Tt(e,t){this._e=rt(),this.name=e,this.message=t}function ms(e,t){return e+". Errors: "+Object.keys(t).map(n=>t[n].toString()).filter((n,r,o)=>o.indexOf(n)===r).join(` +`)}function Cn(e,t,n,r){this._e=rt(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=ms(e,t)}function Kt(e,t){this._e=rt(),this.name="BulkError",this.failures=Object.keys(t).map(n=>t[n]),this.failuresByPos=t,this.message=ms(e,t)}Et(Tt).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+kr(this._e,2))}},toString:function(){return this.name+": "+this.message}}),Et(Cn).from(Tt),Et(Kt).from(Tt);var Sr=Cr.reduce((e,t)=>(e[t]=t+"Error",e),{});const uc=Tt;var $=Cr.reduce((e,t)=>{var n=t+"Error";function r(o,i){this._e=rt(),this.name=n,o?typeof o=="string"?(this.message=`${o}${i?` + `+i:""}`,this.inner=i||null):typeof o=="object"&&(this.message=`${o.name} ${o.message}`,this.inner=o):(this.message=cc[t]||n,this.inner=null)}return Et(r).from(uc),e[t]=r,e},{});$.Syntax=SyntaxError,$.Type=TypeError,$.Range=RangeError;var gs=fs.reduce((e,t)=>(e[t+"Error"]=$[t],e),{}),Sn=Cr.reduce((e,t)=>(["Syntax","Type","Range"].indexOf(t)===-1&&(e[t+"Error"]=$[t]),e),{});function q(){}function zt(e){return e}function dc(e,t){return e==null||e===zt?t:function(n){return t(e(n))}}function ot(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function hc(e,t){return e===q?t:function(){var n=e.apply(this,arguments);n!==void 0&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?ot(r,this.onsuccess):r),o&&(this.onerror=this.onerror?ot(o,this.onerror):o),i!==void 0?i:n}}function pc(e,t){return e===q?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?ot(n,this.onsuccess):n),r&&(this.onerror=this.onerror?ot(r,this.onerror):r)}}function fc(e,t){return e===q?t:function(n){var r=e.apply(this,arguments);se(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var s=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?ot(o,this.onsuccess):o),i&&(this.onerror=this.onerror?ot(i,this.onerror):i),r===void 0?s===void 0?void 0:s:se(r,s)}}function mc(e,t){return e===q?t:function(){return t.apply(this,arguments)!==!1&&e.apply(this,arguments)}}function Er(e,t){return e===q?t:function(){var n=e.apply(this,arguments);if(n&&typeof n.then=="function"){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then(function(){return t.apply(r,i)})}return t.apply(this,arguments)}}Sn.ModifyError=Cn,Sn.DexieError=Tt,Sn.BulkError=Kt;var Wt={};const vs=100,[Pr,En,Tr]=typeof Promise>"u"?[]:(()=>{let e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,Ft(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,Ft(t),e]})(),ys=En&&En.then,Pn=Pr&&Pr.constructor,Ir=!!Tr;var jr=!1,gc=Tr?()=>{Tr.then(On)}:K.setImmediate?setImmediate.bind(null,On):K.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{On(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(On,0)},Gt=function(e,t){Zt.push([e,t]),Tn&&(gc(),Tn=!1)},Or=!0,Tn=!0,it=[],In=[],Rr=null,Dr=zt,It={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ts,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{Ts(e[0],e[1])}catch{}})}},N=It,Zt=[],st=0,jn=[];function I(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=q,this._lib=!1;var t=this._PSD=N;if(Ee&&(this._stackHolder=rt(),this._prev=null,this._numPrev=0),typeof e!="function"){if(e!==Wt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Lr(this,this._value))}this._state=null,this._value=null,++t.ref,bs(this,e)}const Ar={get:function(){var e=N,t=An;function n(r,o){var i=!e.global&&(e!==N||t!==An);const s=i&&!Ne();var a=new I((l,u)=>{Nr(this,new _s(Nn(r,e,i,s),Nn(o,e,i,s),l,u,e))});return Ee&&ks(a,this),a}return n.prototype=Wt,n},set:function(e){De(this,"then",e&&e.prototype===Wt?Ar:{get:function(){return e},set:Ar.set})}};function _s(e,t,n,r,o){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=n,this.reject=r,this.psd=o}function bs(e,t){try{t(n=>{if(e._state===null){if(n===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&Yt();n&&typeof n.then=="function"?bs(e,(o,i)=>{n instanceof I?n._then(o,i):n.then(o,i)}):(e._state=!0,e._value=n,xs(e)),r&&Qt()}},Lr.bind(null,e))}catch(n){Lr(e,n)}}function Lr(e,t){if(In.push(t),e._state===null){var n=e._lib&&Yt();t=Dr(t),e._state=!1,e._value=t,Ee&&t!==null&&typeof t=="object"&&!t._promise&&function(r,o,i){try{r.apply(null,i)}catch(s){o&&o(s)}}(()=>{var r=yr(t,"stack");t._promise=e,De(t,"stack",{get:()=>jr?r&&(r.get?r.get.apply(t):r.value):e.stack})}),function(r){it.some(o=>o._value===r._value)||it.push(r)}(e),xs(e),n&&Qt()}}function xs(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n{--st==0&&Mr()},[]))}function Nr(e,t){if(e._state!==null){var n=e._state?t.onFulfilled:t.onRejected;if(n===null)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++st,Gt(vc,[n,e,t])}else e._listeners.push(t)}function vc(e,t,n){try{Rr=t;var r,o=t._value;t._state?r=e(o):(In.length&&(In=[]),r=e(o),In.indexOf(o)===-1&&function(i){for(var s=it.length;s;)if(it[--s]._value===i._value)return void it.splice(s,1)}(t)),n.resolve(r)}catch(i){n.reject(i)}finally{Rr=null,--st==0&&Mr(),--n.psd.ref||n.psd.finalize()}}function ws(e,t,n){if(t.length===n)return t;var r="";if(e._state===!1){var o,i,s=e._value;s!=null?(o=s.name||"Error",i=s.message||s,r=kr(s,0)):(o=s,i=""),t.push(o+(i?": "+i:"")+r)}return Ee&&((r=kr(e._stackHolder,2))&&t.indexOf(r)===-1&&t.push(r),e._prev&&ws(e._prev,t,n)),t}function ks(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function On(){Yt()&&Qt()}function Yt(){var e=Or;return Or=!1,Tn=!1,e}function Qt(){var e,t,n;do for(;Zt.length>0;)for(e=Zt,Zt=[],n=e.length,t=0;t0);Or=!0,Tn=!0}function Mr(){var e=it;it=[],e.forEach(r=>{r._PSD.onunhandled.call(null,r._value,r)});for(var t=jn.slice(0),n=t.length;n;)t[--n]()}function Rn(e){return new I(Wt,!1,e)}function W(e,t){var n=N;return function(){var r=Yt(),o=N;try{return ze(n,!0),e.apply(this,arguments)}catch(i){t&&t(i)}finally{ze(o,!1),r&&Qt()}}}St(I.prototype,{then:Ar,_then:function(e,t){Nr(this,new _s(null,null,e,t,N))},catch:function(e){if(arguments.length===1)return this.then(null,e);var t=arguments[0],n=arguments[1];return typeof t=="function"?this.then(null,r=>r instanceof t?n(r):Rn(r)):this.then(null,r=>r&&r.name===t?n(r):Rn(r))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),Rn(t)))},stack:{get:function(){if(this._stack)return this._stack;try{jr=!0;var e=ws(this,[],20).join(` +From previous: `);return this._state!==null&&(this._stack=e),e}finally{jr=!1}}},timeout:function(e,t){return e<1/0?new I((n,r)=>{var o=setTimeout(()=>r(new $.Timeout(t)),e);this.then(n,r).finally(clearTimeout.bind(null,o))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&De(I.prototype,Symbol.toStringTag,"Dexie.Promise"),It.env=Cs(),St(I,{all:function(){var e=Le.apply(null,arguments).map(Ln);return new I(function(t,n){e.length===0&&t([]);var r=e.length;e.forEach((o,i)=>I.resolve(o).then(s=>{e[i]=s,--r||t(e)},n))})},resolve:e=>{if(e instanceof I)return e;if(e&&typeof e.then=="function")return new I((n,r)=>{e.then(n,r)});var t=new I(Wt,!0,e);return ks(t,Rr),t},reject:Rn,race:function(){var e=Le.apply(null,arguments).map(Ln);return new I((t,n)=>{e.map(r=>I.resolve(r).then(t,n))})},PSD:{get:()=>N,set:e=>N=e},totalEchoes:{get:()=>An},newPSD:Ke,usePSD:Ot,scheduler:{get:()=>Gt,set:e=>{Gt=e}},rejectionMapper:{get:()=>Dr,set:e=>{Dr=e}},follow:(e,t)=>new I((n,r)=>Ke((o,i)=>{var s=N;s.unhandleds=[],s.onunhandled=i,s.finalize=ot(function(){(function(a){function l(){a(),jn.splice(jn.indexOf(l),1)}jn.push(l),++st,Gt(()=>{--st==0&&Mr()},[])})(()=>{this.unhandleds.length===0?o():i(this.unhandleds[0])})},s.finalize),e()},t,n,r))}),Pn&&(Pn.allSettled&&De(I,"allSettled",function(){const e=Le.apply(null,arguments).map(Ln);return new I(t=>{e.length===0&&t([]);let n=e.length;const r=new Array(n);e.forEach((o,i)=>I.resolve(o).then(s=>r[i]={status:"fulfilled",value:s},s=>r[i]={status:"rejected",reason:s}).then(()=>--n||t(r)))})}),Pn.any&&typeof AggregateError<"u"&&De(I,"any",function(){const e=Le.apply(null,arguments).map(Ln);return new I((t,n)=>{e.length===0&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach((i,s)=>I.resolve(i).then(a=>t(a),a=>{o[s]=a,--r||n(new AggregateError(o))}))})}));const ie={awaits:0,echoes:0,id:0};var yc=0,Dn=[],$r=0,An=0,_c=0;function Ke(e,t,n,r){var o=N,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++_c;var s=It.env;i.env=Ir?{Promise:I,PromiseProp:{value:I,configurable:!0,writable:!0},all:I.all,race:I.race,allSettled:I.allSettled,any:I.any,resolve:I.resolve,reject:I.reject,nthen:Es(s.nthen,i),gthen:Es(s.gthen,i)}:{},t&&se(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=Ot(i,e,n,r);return i.ref===0&&i.finalize(),a}function jt(){return ie.id||(ie.id=++yc),++ie.awaits,ie.echoes+=vs,ie.id}function Ne(){return!!ie.awaits&&(--ie.awaits==0&&(ie.id=0),ie.echoes=ie.awaits*vs,!0)}function Ln(e){return ie.echoes&&e&&e.constructor===Pn?(jt(),e.then(t=>(Ne(),t),t=>(Ne(),J(t)))):e}function bc(e){++An,ie.echoes&&--ie.echoes!=0||(ie.echoes=ie.id=0),Dn.push(N),ze(e,!0)}function xc(){var e=Dn[Dn.length-1];Dn.pop(),ze(e,!1)}function ze(e,t){var n=N;if((t?!ie.echoes||$r++&&e===N:!$r||--$r&&e===N)||Ss(t?bc.bind(null,e):xc),e!==N&&(N=e,n===It&&(It.env=Cs()),Ir)){var r=It.env.Promise,o=e.env;En.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(K,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function Cs(){var e=K.Promise;return Ir?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(K,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:En.then,gthen:e.prototype.then}:{}}function Ot(e,t,n,r,o){var i=N;try{return ze(e,!0),t(n,r,o)}finally{ze(i,!1)}}function Ss(e){ys.call(Pr,e)}function Nn(e,t,n,r){return typeof e!="function"?e:function(){var o=N;n&&jt(),ze(t,!0);try{return e.apply(this,arguments)}finally{ze(o,!1),r&&Ss(Ne)}}}function Es(e,t){return function(n,r){return e.call(this,Nn(n,t),Nn(r,t))}}(""+ys).indexOf("[native code]")===-1&&(jt=Ne=q);const Ps="unhandledrejection";function Ts(e,t){var n;try{n=t.onuncatched(e)}catch{}if(n!==!1)try{var r,o={promise:t,reason:e};if(K.document&&document.createEvent?((r=document.createEvent("Event")).initEvent(Ps,!0,!0),se(r,o)):K.CustomEvent&&se(r=new CustomEvent(Ps,{detail:o}),o),r&&K.dispatchEvent&&(dispatchEvent(r),!K.PromiseRejectionEvent&&K.onunhandledrejection))try{K.onunhandledrejection(r)}catch{}Ee&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch{}}var J=I.reject;function Br(e,t,n,r){if(e.idbdb&&(e._state.openComplete||N.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(i){return i.name===Sr.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(()=>Br(e,t,n,r))):J(i)}return o._promise(t,(i,s)=>Ke(()=>(N.trans=o,r(i,s,o)))).then(i=>o._completion.then(()=>i))}if(e._state.openComplete)return J(new $.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return J(new $.DatabaseClosed);e.open().catch(q)}return e._state.dbReadyPromise.then(()=>Br(e,t,n,r))}const Is="3.2.4",at="ï¿¿",Ur=-1/0,Me="Invalid key provided. Keys must be of type string, number, Date or Array.",js="String expected.",Jt=[],Mn=typeof navigator<"u"&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),wc=Mn,kc=Mn,Os=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),$n="__dbnames",Vr="readonly",Fr="readwrite";function lt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const Rs={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Bn(e){return typeof e!="string"||/\./.test(e)?t=>t:t=>(t[e]===void 0&&e in t&&delete(t=qt(t))[e],t)}class Cc{_trans(t,n,r){const o=this._tx||N.trans,i=this.name;function s(l,u,d){if(!d.schema[i])throw new $.NotFound("Table "+i+" not part of transaction");return n(d.idbtrans,d)}const a=Yt();try{return o&&o.db===this.db?o===N.trans?o._promise(t,s,r):Ke(()=>o._promise(t,s,r),{trans:o,transless:N.transless||N}):Br(this.db,t,[this.name],s)}finally{a&&Qt()}}get(t,n){return t&&t.constructor===Object?this.where(t).first(n):this._trans("readonly",r=>this.core.get({trans:r,key:t}).then(o=>this.hook.reading.fire(o))).then(n)}where(t){if(typeof t=="string")return new this.db.WhereClause(this,t);if(oe(t))return new this.db.WhereClause(this,`[${t.join("+")}]`);const n=Y(t);if(n.length===1)return this.where(n[0]).equals(t[n[0]]);const r=this.schema.indexes.concat(this.schema.primKey).filter(u=>u.compound&&n.every(d=>u.keyPath.indexOf(d)>=0)&&u.keyPath.every(d=>n.indexOf(d)>=0))[0];if(r&&this.db._maxKey!==at)return this.where(r.name).equals(r.keyPath.map(u=>t[u]));!r&&Ee&&console.warn(`The query ${JSON.stringify(t)} on ${this.name} would benefit of a compound index [${n.join("+")}]`);const{idxByName:o}=this.schema,i=this.db._deps.indexedDB;function s(u,d){try{return i.cmp(u,d)===0}catch{return!1}}const[a,l]=n.reduce(([u,d],c)=>{const h=o[c],p=t[c];return[u||h,u||!h?lt(d,h&&h.multi?y=>{const f=Ae(y,c);return oe(f)&&f.some(_=>s(p,_))}:y=>s(p,Ae(y,c))):d]},[null,null]);return a?this.where(a.name).equals(t[a.keyPath]).filter(l):r?this.filter(l):this.where(n).equals("")}filter(t){return this.toCollection().and(t)}count(t){return this.toCollection().count(t)}offset(t){return this.toCollection().offset(t)}limit(t){return this.toCollection().limit(t)}each(t){return this.toCollection().each(t)}toArray(t){return this.toCollection().toArray(t)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(t){return new this.db.Collection(new this.db.WhereClause(this,oe(t)?`[${t.join("+")}]`:t))}reverse(){return this.toCollection().reverse()}mapToClass(t){this.schema.mappedClass=t;const n=r=>{if(!r)return r;const o=Object.create(t.prototype);for(var i in r)if(ue(r,i))try{o[i]=r[i]}catch{}return o};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=n,this.hook("reading",n),t}defineClass(){return this.mapToClass(function(t){se(this,t)})}add(t,n){const{auto:r,keyPath:o}=this.schema.primKey;let i=t;return o&&r&&(i=Bn(o)(t)),this._trans("readwrite",s=>this.core.mutate({trans:s,type:"add",keys:n!=null?[n]:null,values:[i]})).then(s=>s.numFailures?I.reject(s.failures[0]):s.lastResult).then(s=>{if(o)try{_e(t,o,s)}catch{}return s})}update(t,n){if(typeof t!="object"||oe(t))return this.where(":id").equals(t).modify(n);{const r=Ae(t,this.schema.primKey.keyPath);if(r===void 0)return J(new $.InvalidArgument("Given object does not contain its primary key"));try{typeof n!="function"?Y(n).forEach(o=>{_e(t,o,n[o])}):n(t,{value:t,primKey:r})}catch{}return this.where(":id").equals(r).modify(n)}}put(t,n){const{auto:r,keyPath:o}=this.schema.primKey;let i=t;return o&&r&&(i=Bn(o)(t)),this._trans("readwrite",s=>this.core.mutate({trans:s,type:"put",values:[i],keys:n!=null?[n]:null})).then(s=>s.numFailures?I.reject(s.failures[0]):s.lastResult).then(s=>{if(o)try{_e(t,o,s)}catch{}return s})}delete(t){return this._trans("readwrite",n=>this.core.mutate({trans:n,type:"delete",keys:[t]})).then(n=>n.numFailures?I.reject(n.failures[0]):void 0)}clear(){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"deleteRange",range:Rs})).then(t=>t.numFailures?I.reject(t.failures[0]):void 0)}bulkGet(t){return this._trans("readonly",n=>this.core.getMany({keys:t,trans:n}).then(r=>r.map(o=>this.hook.reading.fire(o))))}bulkAdd(t,n,r){const o=Array.isArray(n)?n:void 0,i=(r=r||(o?void 0:n))?r.allKeys:void 0;return this._trans("readwrite",s=>{const{auto:a,keyPath:l}=this.schema.primKey;if(l&&o)throw new $.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new $.InvalidArgument("Arguments objects and keys must have the same length");const u=t.length;let d=l&&a?t.map(Bn(l)):t;return this.core.mutate({trans:s,type:"add",keys:o,values:d,wantResults:i}).then(({numFailures:c,results:h,lastResult:p,failures:y})=>{if(c===0)return i?h:p;throw new Kt(`${this.name}.bulkAdd(): ${c} of ${u} operations failed`,y)})})}bulkPut(t,n,r){const o=Array.isArray(n)?n:void 0,i=(r=r||(o?void 0:n))?r.allKeys:void 0;return this._trans("readwrite",s=>{const{auto:a,keyPath:l}=this.schema.primKey;if(l&&o)throw new $.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new $.InvalidArgument("Arguments objects and keys must have the same length");const u=t.length;let d=l&&a?t.map(Bn(l)):t;return this.core.mutate({trans:s,type:"put",keys:o,values:d,wantResults:i}).then(({numFailures:c,results:h,lastResult:p,failures:y})=>{if(c===0)return i?h:p;throw new Kt(`${this.name}.bulkPut(): ${c} of ${u} operations failed`,y)})})}bulkDelete(t){const n=t.length;return this._trans("readwrite",r=>this.core.mutate({trans:r,type:"delete",keys:t})).then(({numFailures:r,lastResult:o,failures:i})=>{if(r===0)return o;throw new Kt(`${this.name}.bulkDelete(): ${r} of ${n} operations failed`,i)})}}function Xt(e){var t={},n=function(s,a){if(a){for(var l=arguments.length,u=new Array(l-1);--l;)u[l-1]=arguments[l];return t[s].subscribe.apply(null,u),e}if(typeof s=="string")return t[s]};n.addEventType=i;for(var r=1,o=arguments.length;rlt(r(),t()):t,e.justLimit=n&&!r}function Un(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new $.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Ds(e,t,n){const r=Un(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:e.dir==="prev",unique:!!e.unique,query:{index:r,range:e.range}})}function Vn(e,t,n,r){const o=e.replayFilter?lt(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},s=(a,l,u)=>{if(!o||o(l,u,h=>l.stop(h),h=>l.fail(h))){var d=l.primaryKey,c=""+d;c==="[object ArrayBuffer]"&&(c=""+new Uint8Array(d)),ue(i,c)||(i[c]=!0,t(a,l,u))}};return Promise.all([e.or._iterate(s,n),As(Ds(e,r,n),e.algorithm,s,!e.keysOnly&&e.valueMapper)])}return As(Ds(e,r,n),lt(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function As(e,t,n,r){var o=W(r?(i,s,a)=>n(r(i),s,a):n);return e.then(i=>{if(i)return i.start(()=>{var s=()=>i.continue();t&&!t(i,a=>s=a,a=>{i.stop(a),s=q},a=>{i.fail(a),s=q})||o(i.value,i,a=>s=a),s()})})}function ae(e,t){try{const n=Ls(e),r=Ls(t);if(n!==r)return n==="Array"?1:r==="Array"?-1:n==="binary"?1:r==="binary"?-1:n==="string"?1:r==="string"?-1:n==="Date"?1:r!=="Date"?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:eVn(n,t,r,n.table.core))}count(t){return this._read(n=>{const r=this._ctx,o=r.table.core;if(Rt(r,!0))return o.count({trans:n,query:{index:Un(r,o.schema),range:r.range}}).then(s=>Math.min(s,r.limit));var i=0;return Vn(r,()=>(++i,!1),n,o).then(()=>i)}).then(t)}sortBy(t,n){const r=t.split(".").reverse(),o=r[0],i=r.length-1;function s(u,d){return d?s(u[r[d]],d-1):u[o]}var a=this._ctx.dir==="next"?1:-1;function l(u,d){var c=s(u,i),h=s(d,i);return ch?a:0}return this.toArray(function(u){return u.sort(l)}).then(n)}toArray(t){return this._read(n=>{var r=this._ctx;if(r.dir==="next"&&Rt(r,!0)&&r.limit>0){const{valueMapper:o}=r,i=Un(r,r.table.core.schema);return r.table.core.query({trans:n,limit:r.limit,values:!0,query:{index:i,range:r.range}}).then(({result:s})=>o?s.map(o):s)}{const o=[];return Vn(r,i=>o.push(i),n,r.table.core).then(()=>o)}},t)}offset(t){var n=this._ctx;return t<=0||(n.offset+=t,Rt(n)?qr(n,()=>{var r=t;return(o,i)=>r===0||(r===1?(--r,!1):(i(()=>{o.advance(r),r=0}),!1))}):qr(n,()=>{var r=t;return()=>--r<0})),this}limit(t){return this._ctx.limit=Math.min(this._ctx.limit,t),qr(this._ctx,()=>{var n=t;return function(r,o,i){return--n<=0&&o(i),n>=0}},!0),this}until(t,n){return Hr(this._ctx,function(r,o,i){return!t(r.value)||(o(i),n)}),this}first(t){return this.limit(1).toArray(function(n){return n[0]}).then(t)}last(t){return this.reverse().first(t)}filter(t){var n,r;return Hr(this._ctx,function(o){return t(o.value)}),n=this._ctx,r=t,n.isMatch=lt(n.isMatch,r),this}and(t){return this.filter(t)}or(t){return new this.db.WhereClause(this._ctx.table,t,this)}reverse(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,o){t(o.key,o)})}eachUniqueKey(t){return this._ctx.unique="unique",this.eachKey(t)}eachPrimaryKey(t){var n=this._ctx;return n.keysOnly=!n.isMatch,this.each(function(r,o){t(o.primaryKey,o)})}keys(t){var n=this._ctx;n.keysOnly=!n.isMatch;var r=[];return this.each(function(o,i){r.push(i.key)}).then(function(){return r}).then(t)}primaryKeys(t){var n=this._ctx;if(n.dir==="next"&&Rt(n,!0)&&n.limit>0)return this._read(o=>{var i=Un(n,n.table.core.schema);return n.table.core.query({trans:o,values:!1,limit:n.limit,query:{index:i,range:n.range}})}).then(({result:o})=>o).then(t);n.keysOnly=!n.isMatch;var r=[];return this.each(function(o,i){r.push(i.primaryKey)}).then(function(){return r}).then(t)}uniqueKeys(t){return this._ctx.unique="unique",this.keys(t)}firstKey(t){return this.limit(1).keys(function(n){return n[0]}).then(t)}lastKey(t){return this.reverse().firstKey(t)}distinct(){var t=this._ctx,n=t.index&&t.table.schema.idxByName[t.index];if(!n||!n.multi)return this;var r={};return Hr(this._ctx,function(o){var i=o.primaryKey.toString(),s=ue(r,i);return r[i]=!0,!s}),this}modify(t){var n=this._ctx;return this._write(r=>{var o;if(typeof t=="function")o=t;else{var i=Y(t),s=i.length;o=function(f){for(var _=!1,m=0;m{const{failures:m,numFailures:v}=_;h+=f-v;for(let w of Y(m))c.push(m[w])};return this.clone().primaryKeys().then(f=>{const _=m=>{const v=Math.min(d,f.length-m);return a.getMany({trans:r,keys:f.slice(m,m+v),cache:"immutable"}).then(w=>{const k=[],b=[],x=l?[]:null,S=[];for(let C=0;C0&&a.mutate({trans:r,type:"add",values:k}).then(C=>{for(let A in C.failures)S.splice(parseInt(A),1);y(k.length,C)})).then(()=>(b.length>0||E&&typeof t=="object")&&a.mutate({trans:r,type:"put",keys:x,values:b,criteria:E,changeSpec:typeof t!="function"&&t}).then(C=>y(b.length,C))).then(()=>(S.length>0||E&&t===Kr)&&a.mutate({trans:r,type:"delete",keys:S,criteria:E}).then(C=>y(S.length,C))).then(()=>f.length>m+v&&_(m+d))})};return _(0).then(()=>{if(c.length>0)throw new Cn("Error modifying one or more objects",c,h,p);return f.length})})})}delete(){var t=this._ctx,n=t.range;return Rt(t)&&(t.isPrimKey&&!kc||n.type===3)?this._write(r=>{const{primaryKey:o}=t.table.core.schema,i=n;return t.table.core.count({trans:r,query:{index:o,range:i}}).then(s=>t.table.core.mutate({trans:r,type:"deleteRange",range:i}).then(({failures:a,lastResult:l,results:u,numFailures:d})=>{if(d)throw new Cn("Could not delete some values",Object.keys(a).map(c=>a[c]),s-d);return s-d}))}):this.modify(Kr)}}const Kr=(e,t)=>t.value=null;function Ec(e,t){return et?-1:e===t?0:1}function de(e,t,n){var r=e instanceof $s?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function Dt(e){return new e.Collection(e,()=>Ms("")).limit(0)}function Tc(e,t,n,r,o,i){for(var s=Math.min(e.length,r.length),a=-1,l=0;l=0?e.substr(0,a)+t[a]+n.substr(a+1):null;o(e[l],u)<0&&(a=l)}return stypeof f=="string"))return de(e,js);function h(f){o=function(m){return m==="next"?v=>v.toUpperCase():v=>v.toLowerCase()}(f),i=function(m){return m==="next"?v=>v.toLowerCase():v=>v.toUpperCase()}(f),s=f==="next"?Ec:Pc;var _=n.map(function(m){return{lower:i(m),upper:o(m)}}).sort(function(m,v){return s(m.lower,v.lower)});a=_.map(function(m){return m.upper}),l=_.map(function(m){return m.lower}),u=f,d=f==="next"?"":r}h("next");var p=new e.Collection(e,()=>We(a[0],l[c-1]+r));p._ondirectionchange=function(f){h(f)};var y=0;return p._addAlgorithm(function(f,_,m){var v=f.key;if(typeof v!="string")return!1;var w=i(v);if(t(w,l,y))return!0;for(var k=null,b=y;b0)&&(k=x)}return _(k!==null?function(){f.continue(k+d)}:m),!1}),p}function We(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Ms(e){return{type:1,lower:e,upper:e}}class $s{get Collection(){return this._ctx.table.db.Collection}between(t,n,r,o){r=r!==!1,o=o===!0;try{return this._cmp(t,n)>0||this._cmp(t,n)===0&&(r||o)&&(!r||!o)?Dt(this):new this.Collection(this,()=>We(t,n,!r,!o))}catch{return de(this,Me)}}equals(t){return t==null?de(this,Me):new this.Collection(this,()=>Ms(t))}above(t){return t==null?de(this,Me):new this.Collection(this,()=>We(t,void 0,!0))}aboveOrEqual(t){return t==null?de(this,Me):new this.Collection(this,()=>We(t,void 0,!1))}below(t){return t==null?de(this,Me):new this.Collection(this,()=>We(void 0,t,!1,!0))}belowOrEqual(t){return t==null?de(this,Me):new this.Collection(this,()=>We(void 0,t))}startsWith(t){return typeof t!="string"?de(this,js):this.between(t,t+at,!0,!0)}startsWithIgnoreCase(t){return t===""?this.startsWith(t):Fn(this,(n,r)=>n.indexOf(r[0])===0,[t],at)}equalsIgnoreCase(t){return Fn(this,(n,r)=>n===r[0],[t],"")}anyOfIgnoreCase(){var t=Le.apply(Pt,arguments);return t.length===0?Dt(this):Fn(this,(n,r)=>r.indexOf(n)!==-1,t,"")}startsWithAnyOfIgnoreCase(){var t=Le.apply(Pt,arguments);return t.length===0?Dt(this):Fn(this,(n,r)=>r.some(o=>n.indexOf(o)===0),t,at)}anyOf(){const t=Le.apply(Pt,arguments);let n=this._cmp;try{t.sort(n)}catch{return de(this,Me)}if(t.length===0)return Dt(this);const r=new this.Collection(this,()=>We(t[0],t[t.length-1]));r._ondirectionchange=i=>{n=i==="next"?this._ascending:this._descending,t.sort(n)};let o=0;return r._addAlgorithm((i,s,a)=>{const l=i.key;for(;n(l,t[o])>0;)if(++o,o===t.length)return s(a),!1;return n(l,t[o])===0||(s(()=>{i.continue(t[o])}),!1)}),r}notEqual(t){return this.inAnyRange([[Ur,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const t=Le.apply(Pt,arguments);if(t.length===0)return new this.Collection(this);try{t.sort(this._ascending)}catch{return de(this,Me)}const n=t.reduce((r,o)=>r?r.concat([[r[r.length-1][1],o]]):[[Ur,o]],null);return n.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(n,{includeLowers:!1,includeUppers:!1})}inAnyRange(t,n){const r=this._cmp,o=this._ascending,i=this._descending,s=this._min,a=this._max;if(t.length===0)return Dt(this);if(!t.every(v=>v[0]!==void 0&&v[1]!==void 0&&o(v[0],v[1])<=0))return de(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",$.InvalidArgument);const l=!n||n.includeLowers!==!1,u=n&&n.includeUppers===!0;let d,c=o;function h(v,w){return c(v[0],w[0])}try{d=t.reduce(function(v,w){let k=0,b=v.length;for(;k0){x[0]=s(x[0],w[0]),x[1]=a(x[1],w[1]);break}}return k===b&&v.push(w),v},[]),d.sort(h)}catch{return de(this,Me)}let p=0;const y=u?v=>o(v,d[p][1])>0:v=>o(v,d[p][1])>=0,f=l?v=>i(v,d[p][0])>0:v=>i(v,d[p][0])>=0;let _=y;const m=new this.Collection(this,()=>We(d[0][0],d[d.length-1][1],!l,!u));return m._ondirectionchange=v=>{v==="next"?(_=y,c=o):(_=f,c=i),d.sort(h)},m._addAlgorithm((v,w,k)=>{for(var b=v.key;_(b);)if(++p,p===d.length)return w(k),!1;return!!function(x){return!y(x)&&!f(x)}(b)||(this._cmp(b,d[p][1])===0||this._cmp(b,d[p][0])===0||w(()=>{c===o?v.continue(d[p][0]):v.continue(d[p][1])}),!1)}),m}startsWithAnyOf(){const t=Le.apply(Pt,arguments);return t.every(n=>typeof n=="string")?t.length===0?Dt(this):this.inAnyRange(t.map(n=>[n,n+at])):de(this,"startsWithAnyOf() only works with strings")}}function Pe(e){return W(function(t){return tn(t),e(t.target.error),!1})}function tn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const nn="storagemutated",Ge="x-storagemutated-1",Ze=Xt(null,nn);class Ic{_lock(){return Ht(!N.global),++this._reculock,this._reculock!==1||N.global||(N.lockOwnerFor=this),this}_unlock(){if(Ht(!N.global),--this._reculock==0)for(N.global||(N.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{Ot(t[1],t[0])}catch{}}return this}_locked(){return this._reculock&&N.lockOwnerFor!==this}create(t){if(!this.mode)return this;const n=this.db.idbdb,r=this.db._state.dbOpenError;if(Ht(!this.idbtrans),!t&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new $.DatabaseClosed(r);case"MissingAPIError":throw new $.MissingAPI(r.message,r);default:throw new $.OpenFailed(r)}if(!this.active)throw new $.TransactionInactive;return Ht(this._completion._state===null),(t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=W(o=>{tn(o),this._reject(t.error)}),t.onabort=W(o=>{tn(o),this.active&&this._reject(new $.Abort(t.error)),this.active=!1,this.on("abort").fire(o)}),t.oncomplete=W(()=>{this.active=!1,this._resolve(),"mutatedParts"in t&&Ze.storagemutated.fire(t.mutatedParts)}),this}_promise(t,n,r){if(t==="readwrite"&&this.mode!=="readwrite")return J(new $.ReadOnly("Transaction is readonly"));if(!this.active)return J(new $.TransactionInactive);if(this._locked())return new I((i,s)=>{this._blockedFuncs.push([()=>{this._promise(t,n,r).then(i,s)},N])});if(r)return Ke(()=>{var i=new I((s,a)=>{this._lock();const l=n(s,a,this);l&&l.then&&l.then(s,a)});return i.finally(()=>this._unlock()),i._lib=!0,i});var o=new I((i,s)=>{var a=n(i,s,this);a&&a.then&&a.then(i,s)});return o._lib=!0,o}_root(){return this.parent?this.parent._root():this}waitFor(t){var n=this._root();const r=I.resolve(t);if(n._waitingFor)n._waitingFor=n._waitingFor.then(()=>r);else{n._waitingFor=r,n._waitingQueue=[];var o=n.idbtrans.objectStore(n.storeNames[0]);(function s(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(o.get(-1/0).onsuccess=s)})()}var i=n._waitingFor;return new I((s,a)=>{r.then(l=>n._waitingQueue.push(W(s.bind(null,l))),l=>n._waitingQueue.push(W(a.bind(null,l)))).finally(()=>{n._waitingFor===i&&(n._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new $.Abort))}table(t){const n=this._memoizedTables||(this._memoizedTables={});if(ue(n,t))return n[t];const r=this.schema[t];if(!r)throw new $.NotFound("Table "+t+" not part of transaction");const o=new this.db.Table(t,r,this);return o.core=this.db.core.table(t),n[t]=o,o}}function zr(e,t,n,r,o,i,s){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!s?"&":"")+(r?"*":"")+(o?"++":"")+Bs(t)}}function Bs(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function Us(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:ls(n,r=>[r.name,r])}}let rn=e=>{try{return e.only([[]]),rn=()=>[[]],[[]]}catch{return rn=()=>at,at}};function Wr(e){return e==null?()=>{}:typeof e=="string"?function(t){return t.split(".").length===1?r=>r[t]:r=>Ae(r,t)}(e):t=>Ae(t,e)}function Vs(e){return[].slice.call(e)}let jc=0;function on(e){return e==null?":id":typeof e=="string"?e:`[${e.join("+")}]`}function Oc(e,t,n){function r(l){if(l.type===3)return null;if(l.type===4)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:u,upper:d,lowerOpen:c,upperOpen:h}=l;return u===void 0?d===void 0?null:t.upperBound(d,!!h):d===void 0?t.lowerBound(u,!!c):t.bound(u,d,!!c,!!h)}const{schema:o,hasGetAll:i}=function(l,u){const d=Vs(l.objectStoreNames);return{schema:{name:l.name,tables:d.map(c=>u.objectStore(c)).map(c=>{const{keyPath:h,autoIncrement:p}=c,y=oe(h),f=h==null,_={},m={name:c.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:f,compound:y,keyPath:h,autoIncrement:p,unique:!0,extractKey:Wr(h)},indexes:Vs(c.indexNames).map(v=>c.index(v)).map(v=>{const{name:w,unique:k,multiEntry:b,keyPath:x}=v,S={name:w,compound:oe(x),keyPath:x,unique:k,multiEntry:b,extractKey:Wr(x)};return _[on(x)]=S,S}),getIndexByKeyPath:v=>_[on(v)]};return _[":id"]=m.primaryKey,h!=null&&(_[on(h)]=m.primaryKey),m})},hasGetAll:d.length>0&&"getAll"in u.objectStore(d[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),s=o.tables.map(l=>function(u){const d=u.name;return{name:d,schema:u,mutate:function({trans:c,type:h,keys:p,values:y,range:f}){return new Promise((_,m)=>{_=W(_);const v=c.objectStore(d),w=v.keyPath==null,k=h==="put"||h==="add";if(!k&&h!=="delete"&&h!=="deleteRange")throw new Error("Invalid operation type: "+h);const{length:b}=p||y||{length:1};if(p&&y&&p.length!==y.length)throw new Error("Given keys array must have same length as given values array.");if(b===0)return _({numFailures:0,failures:{},results:[],lastResult:void 0});let x;const S=[],E=[];let C=0;const A=R=>{++C,tn(R)};if(h==="deleteRange"){if(f.type===4)return _({numFailures:C,failures:E,results:[],lastResult:void 0});f.type===3?S.push(x=v.clear()):S.push(x=v.delete(r(f)))}else{const[R,L]=k?w?[y,p]:[y,null]:[p,null];if(k)for(let F=0;F{const L=R.target.result;S.forEach((F,D)=>F.error!=null&&(E[D]=F.error)),_({numFailures:C,failures:E,results:h==="delete"?p:S.map(F=>F.result),lastResult:L})};x.onerror=R=>{A(R),O(R)},x.onsuccess=O})},getMany:({trans:c,keys:h})=>new Promise((p,y)=>{p=W(p);const f=c.objectStore(d),_=h.length,m=new Array(_);let v,w=0,k=0;const b=S=>{const E=S.target;m[E._pos]=E.result,++k===w&&p(m)},x=Pe(y);for(let S=0;S<_;++S)h[S]!=null&&(v=f.get(h[S]),v._pos=S,v.onsuccess=b,v.onerror=x,++w);w===0&&p(m)}),get:({trans:c,key:h})=>new Promise((p,y)=>{p=W(p);const f=c.objectStore(d).get(h);f.onsuccess=_=>p(_.target.result),f.onerror=Pe(y)}),query:function(c){return h=>new Promise((p,y)=>{p=W(p);const{trans:f,values:_,limit:m,query:v}=h,w=m===1/0?void 0:m,{index:k,range:b}=v,x=f.objectStore(d),S=k.isPrimaryKey?x:x.index(k.name),E=r(b);if(m===0)return p({result:[]});if(c){const C=_?S.getAll(E,w):S.getAllKeys(E,w);C.onsuccess=A=>p({result:A.target.result}),C.onerror=Pe(y)}else{let C=0;const A=_||!("openKeyCursor"in S)?S.openCursor(E):S.openKeyCursor(E),O=[];A.onsuccess=R=>{const L=A.result;return L?(O.push(_?L.value:L.primaryKey),++C===m?p({result:O}):void L.continue()):p({result:O})},A.onerror=Pe(y)}})}(i),openCursor:function({trans:c,values:h,query:p,reverse:y,unique:f}){return new Promise((_,m)=>{_=W(_);const{index:v,range:w}=p,k=c.objectStore(d),b=v.isPrimaryKey?k:k.index(v.name),x=y?f?"prevunique":"prev":f?"nextunique":"next",S=h||!("openKeyCursor"in b)?b.openCursor(r(w),x):b.openKeyCursor(r(w),x);S.onerror=Pe(m),S.onsuccess=W(E=>{const C=S.result;if(!C)return void _(null);C.___id=++jc,C.done=!1;const A=C.continue.bind(C);let O=C.continuePrimaryKey;O&&(O=O.bind(C));const R=C.advance.bind(C),L=()=>{throw new Error("Cursor not stopped")};C.trans=c,C.stop=C.continue=C.continuePrimaryKey=C.advance=()=>{throw new Error("Cursor not started")},C.fail=W(m),C.next=function(){let F=1;return this.start(()=>F--?this.continue():this.stop()).then(()=>this)},C.start=F=>{const D=new Promise((Z,ke)=>{Z=W(Z),S.onerror=Pe(ke),C.fail=ke,C.stop=Je=>{C.stop=C.continue=C.continuePrimaryKey=C.advance=L,Z(Je)}}),ne=()=>{if(S.result)try{F()}catch(Z){C.fail(Z)}else C.done=!0,C.start=()=>{throw new Error("Cursor behind last entry")},C.stop()};return S.onsuccess=W(Z=>{S.onsuccess=ne,ne()}),C.continue=A,C.continuePrimaryKey=O,C.advance=R,ne(),D},_(C)},m)})},count({query:c,trans:h}){const{index:p,range:y}=c;return new Promise((f,_)=>{const m=h.objectStore(d),v=p.isPrimaryKey?m:m.index(p.name),w=r(y),k=w?v.count(w):v.count();k.onsuccess=W(b=>f(b.target.result)),k.onerror=Pe(_)})}}}(l)),a={};return s.forEach(l=>a[l.name]=l),{stack:"dbcore",transaction:e.transaction.bind(e),table(l){if(!a[l])throw new Error(`Table '${l}' not found`);return a[l]},MIN_KEY:-1/0,MAX_KEY:rn(t),schema:o}}function Gr({_novip:e},t){const n=t.db,r=function(o,i,{IDBKeyRange:s,indexedDB:a},l){return{dbcore:function(d,c){return c.reduce((h,{create:p})=>({...h,...p(h)}),d)}(Oc(i,s,l),o.dbcore)}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach(o=>{const i=o.name;e.core.schema.tables.some(s=>s.name===i)&&(o.core=e.core.table(i),e[i]instanceof e.Table&&(e[i].core=o.core))})}function Hn({_novip:e},t,n,r){n.forEach(o=>{const i=r[o];t.forEach(s=>{const a=yr(s,o);(!a||"value"in a&&a.value===void 0)&&(s===e.Transaction.prototype||s instanceof e.Transaction?De(s,o,{get(){return this.table(o)},set(l){is(this,o,{value:l,writable:!0,configurable:!0,enumerable:!0})}}):s[o]=new e.Table(o,i))})})}function Zr({_novip:e},t){t.forEach(n=>{for(let r in n)n[r]instanceof e.Table&&delete n[r]})}function Rc(e,t){return e._cfg.version-t._cfg.version}function Dc(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const s=i._reject.bind(i),a=N.transless||N;Ke(()=>{N.trans=i,N.transless=a,t===0?(Y(o).forEach(l=>{Yr(n,l,o[l].primKey,o[l].indexes)}),Gr(e,n),I.follow(()=>e.on.populate.fire(i)).catch(s)):function({_novip:l},u,d,c){const h=[],p=l._versions;let y=l._dbSchema=Jr(l,l.idbdb,c),f=!1;const _=p.filter(v=>v._cfg.version>=u);function m(){return h.length?I.resolve(h.shift()(d.idbtrans)).then(m):I.resolve()}return _.forEach(v=>{h.push(()=>{const w=y,k=v._cfg.dbschema;Xr(l,w,c),Xr(l,k,c),y=l._dbSchema=k;const b=Fs(w,k);b.add.forEach(S=>{Yr(c,S[0],S[1].primKey,S[1].indexes)}),b.change.forEach(S=>{if(S.recreate)throw new $.Upgrade("Not yet support for changing primary key");{const E=c.objectStore(S.name);S.add.forEach(C=>Qr(E,C)),S.change.forEach(C=>{E.deleteIndex(C.name),Qr(E,C)}),S.del.forEach(C=>E.deleteIndex(C))}});const x=v._cfg.contentUpgrade;if(x&&v._cfg.version>u){Gr(l,c),d._memoizedTables={},f=!0;let S=cs(k);b.del.forEach(O=>{S[O]=w[O]}),Zr(l,[l.Transaction.prototype]),Hn(l,[l.Transaction.prototype],Y(S),S),d.schema=S;const E=wr(x);let C;E&&jt();const A=I.follow(()=>{if(C=x(d),C&&E){var O=Ne.bind(null,null);C.then(O,O)}});return C&&typeof C.then=="function"?I.resolve(C):A.then(()=>C)}}),h.push(w=>{(!f||!wc)&&function(k,b){[].slice.call(b.db.objectStoreNames).forEach(x=>k[x]==null&&b.db.deleteObjectStore(x))}(v._cfg.dbschema,w),Zr(l,[l.Transaction.prototype]),Hn(l,[l.Transaction.prototype],l._storeNames,l._dbSchema),d.schema=l._dbSchema})}),m().then(()=>{var v,w;w=c,Y(v=y).forEach(k=>{w.db.objectStoreNames.contains(k)||Yr(w,k,v[k].primKey,v[k].indexes)})})}(e,t,i,n).catch(s)})}function Fs(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const s={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!Mn)s.recreate=!0,n.change.push(s);else{const a=o.idxByName,l=i.idxByName;let u;for(u in a)l[u]||s.del.push(u);for(u in l){const d=a[u],c=l[u];d?d.src!==c.src&&s.change.push(c):s.add.push(c)}(s.del.length>0||s.add.length>0||s.change.length>0)&&n.change.push(s)}}else n.add.push([r,i])}return n}function Yr(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach(i=>Qr(o,i)),o}function Qr(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Jr(e,t,n){const r={};return kn(t.objectStoreNames,0).forEach(o=>{const i=n.objectStore(o);let s=i.keyPath;const a=zr(Bs(s),s||"",!1,!1,!!i.autoIncrement,s&&typeof s!="string",!0),l=[];for(let d=0;d{if(t[r]!==null){var o=t[r].split(",").map((s,a)=>{const l=(s=s.trim()).replace(/([&*]|\+\+)/g,""),u=/^\[/.test(l)?l.match(/^\[(.*)\]$/)[1].split("+"):l;return zr(l,u||null,/\&/.test(s),/\*/.test(s),/\+\+/.test(s),oe(u),a===0)}),i=o.shift();if(i.multi)throw new $.Schema("Primary key cannot be multi-valued");o.forEach(s=>{if(s.auto)throw new $.Schema("Only primary key can be marked as autoIncrement (++)");if(!s.keyPath)throw new $.Schema("Index must have a name and cannot be an empty string")}),n[r]=Us(r,i,o)}})}stores(t){const n=this.db;this._cfg.storesSource=this._cfg.storesSource?se(this._cfg.storesSource,t):t;const r=n._versions,o={};let i={};return r.forEach(s=>{se(o,s._cfg.storesSource),i=s._cfg.dbschema={},s._parseStoresSpec(o,i)}),n._dbSchema=i,Zr(n,[n._allTables,n,n.Transaction.prototype]),Hn(n,[n._allTables,n,n.Transaction.prototype,this._cfg.tables],Y(i),i),n._storeNames=Y(i),this}upgrade(t){return this._cfg.contentUpgrade=Er(this._cfg.contentUpgrade||q,t),this}}function eo(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new ct($n,{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function to(e){return e&&typeof e.databases=="function"}function no(e){return Ke(function(){return N.letThrough=!0,e()})}function Lc(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()}).finally(function(){return clearInterval(e)}):Promise.resolve()}function Nc(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(()=>t.dbOpenError?J(t.dbOpenError):e);Ee&&(t.openCanceller._stackHolder=rt()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new $.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,s=null,a=!1;return I.race([r,(typeof navigator>"u"?I.resolve():Lc()).then(()=>new I((l,u)=>{if(o(),!n)throw new $.MissingAPI;const d=e.name,c=t.autoSchema?n.open(d):n.open(d,Math.round(10*e.verno));if(!c)throw new $.MissingAPI;c.onerror=Pe(u),c.onblocked=W(e._fireOnBlocked),c.onupgradeneeded=W(h=>{if(s=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=tn,s.abort(),c.result.close();const y=n.deleteDatabase(d);y.onsuccess=y.onerror=W(()=>{u(new $.NoSuchDatabase(`Database ${d} doesnt exist`))})}else{s.onerror=Pe(u);var p=h.oldVersion>Math.pow(2,62)?0:h.oldVersion;a=p<1,e._novip.idbdb=c.result,Dc(e,p/10,s,u)}},u),c.onsuccess=W(()=>{s=null;const h=e._novip.idbdb=c.result,p=kn(h.objectStoreNames);if(p.length>0)try{const f=h.transaction((y=p).length===1?y[0]:y,"readonly");t.autoSchema?function({_novip:_},m,v){_.verno=m.version/10;const w=_._dbSchema=Jr(0,m,v);_._storeNames=kn(m.objectStoreNames,0),Hn(_,[_._allTables],Y(w),w)}(e,h,f):(Xr(e,e._dbSchema,f),function(_,m){const v=Fs(Jr(0,_.idbdb,m),_._dbSchema);return!(v.add.length||v.change.some(w=>w.add.length||w.change.length))}(e,f)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Gr(e,f)}catch{}var y;Jt.push(e),h.onversionchange=W(f=>{t.vcFired=!0,e.on("versionchange").fire(f)}),h.onclose=W(f=>{e.on("close").fire(f)}),a&&function({indexedDB:f,IDBKeyRange:_},m){!to(f)&&m!==$n&&eo(f,_).put({name:m}).catch(q)}(e._deps,d),l()},u)}))]).then(()=>(o(),t.onReadyBeingFired=[],I.resolve(no(()=>e.on.ready.fire(e.vip))).then(function l(){if(t.onReadyBeingFired.length>0){let u=t.onReadyBeingFired.reduce(Er,q);return t.onReadyBeingFired=[],I.resolve(no(()=>u(e.vip))).then(l)}}))).finally(()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1}).then(()=>e).catch(l=>{t.dbOpenError=l;try{s&&s.abort()}catch{}return r===t.openCanceller&&e._close(),J(l)}).finally(()=>{t.openComplete=!0,i()})}function ro(e){var t=i=>e.next(i),n=o(t),r=o(i=>e.throw(i));function o(i){return s=>{var a=i(s),l=a.value;return a.done?l:l&&typeof l.then=="function"?l.then(n,r):oe(l)?Promise.all(l).then(n,r):n(l)}}return o(t)()}function Mc(e,t,n){var r=arguments.length;if(r<2)throw new $.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,us(o),n]}function Hs(e,t,n,r,o){return I.resolve().then(()=>{const i=N.transless||N,s=e._createTransaction(t,n,e._dbSchema,r),a={trans:s,transless:i};if(r)s.idbtrans=r.idbtrans;else try{s.create(),e._state.PR1398_maxLoop=3}catch(c){return c.name===Sr.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(()=>Hs(e,t,n,null,o))):J(c)}const l=wr(o);let u;l&&jt();const d=I.follow(()=>{if(u=o.call(s,s),u)if(l){var c=Ne.bind(null,null);u.then(c,c)}else typeof u.next=="function"&&typeof u.throw=="function"&&(u=ro(u))},a);return(u&&typeof u.then=="function"?I.resolve(u).then(c=>s.active?c:J(new $.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):d.then(()=>u)).then(c=>(r&&s._resolve(),s._completion.then(()=>c))).catch(c=>(s._reject(c),J(c)))})}function qn(e,t,n){const r=oe(e)?e.slice():[e];for(let o=0;o0,m={...h,isVirtual:_,keyTail:c,keyLength:f,extractKey:Wr(d),unique:!_&&h.unique};return y.push(m),m.isPrimaryKey||i.push(m),f>1&&s(f===2?d[0]:d.slice(0,f-1),c+1,h),y.sort((v,w)=>v.keyTail-w.keyTail),m}const a=s(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[a];for(const d of r.indexes)s(d.keyPath,0,d);function l(d){const c=d.query.index;return c.isVirtual?{...d,query:{index:c,range:(h=d.query.range,p=c.keyTail,{type:h.type===1?2:h.type,lower:qn(h.lower,h.lowerOpen?e.MAX_KEY:e.MIN_KEY,p),lowerOpen:!0,upper:qn(h.upper,h.upperOpen?e.MIN_KEY:e.MAX_KEY,p),upperOpen:!0})}}:d;var h,p}return{...n,schema:{...r,primaryKey:a,indexes:i,getIndexByKeyPath:function(d){const c=o[on(d)];return c&&c[0]}},count:d=>n.count(l(d)),query:d=>n.query(l(d)),openCursor(d){const{keyTail:c,isVirtual:h,keyLength:p}=d.query.index;return h?n.openCursor(l(d)).then(y=>y&&function(f){return Object.create(f,{continue:{value:function(m){m!=null?f.continue(qn(m,d.reverse?e.MAX_KEY:e.MIN_KEY,c)):d.unique?f.continue(f.key.slice(0,p).concat(d.reverse?e.MIN_KEY:e.MAX_KEY,c)):f.continue()}},continuePrimaryKey:{value(m,v){f.continuePrimaryKey(qn(m,e.MAX_KEY,c),v)}},primaryKey:{get:()=>f.primaryKey},key:{get(){const m=f.key;return p===1?m[0]:m.slice(0,p)}},value:{get:()=>f.value}})}(y)):n.openCursor(d)}}}}}};function oo(e,t,n,r){return n=n||{},r=r||"",Y(e).forEach(o=>{if(ue(t,o)){var i=e[o],s=t[o];if(typeof i=="object"&&typeof s=="object"&&i&&s){const a=br(i);a!==br(s)?n[r+o]=t[o]:a==="Object"?oo(i,s,n,r+o+"."):i!==s&&(n[r+o]=t[o])}else i!==s&&(n[r+o]=t[o])}else n[r+o]=void 0}),Y(t).forEach(o=>{ue(e,o)||(n[r+o]=t[o])}),n}const Bc={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema;return{...n,mutate(i){const s=N.trans,{deleting:a,creating:l,updating:u}=s.table(t).hook;switch(i.type){case"add":if(l.fire===q)break;return s._promise("readwrite",()=>d(i),!0);case"put":if(l.fire===q&&u.fire===q)break;return s._promise("readwrite",()=>d(i),!0);case"delete":if(a.fire===q)break;return s._promise("readwrite",()=>d(i),!0);case"deleteRange":if(a.fire===q)break;return s._promise("readwrite",()=>function(h){return c(h.trans,h.range,1e4)}(i),!0)}return n.mutate(i);function d(h){const p=N.trans,y=h.keys||function(f,_){return _.type==="delete"?_.keys:_.keys||_.values.map(f.extractKey)}(r,h);if(!y)throw new Error("Keys missing");return(h=h.type==="add"||h.type==="put"?{...h,keys:y}:{...h}).type!=="delete"&&(h.values=[...h.values]),h.keys&&(h.keys=[...h.keys]),function(f,_,m){return _.type==="add"?Promise.resolve([]):f.getMany({trans:_.trans,keys:m,cache:"immutable"})}(n,h,y).then(f=>{const _=y.map((m,v)=>{const w=f[v],k={onerror:null,onsuccess:null};if(h.type==="delete")a.fire.call(k,m,w,p);else if(h.type==="add"||w===void 0){const b=l.fire.call(k,m,h.values[v],p);m==null&&b!=null&&(m=b,h.keys[v]=m,r.outbound||_e(h.values[v],r.keyPath,m))}else{const b=oo(w,h.values[v]),x=u.fire.call(k,b,m,w,p);if(x){const S=h.values[v];Object.keys(x).forEach(E=>{ue(S,E)?S[E]=x[E]:_e(S,E,x[E])})}}return k});return n.mutate(h).then(({failures:m,results:v,numFailures:w,lastResult:k})=>{for(let b=0;b(_.forEach(v=>v.onerror&&v.onerror(m)),Promise.reject(m)))})}function c(h,p,y){return n.query({trans:h,values:!1,query:{index:r,range:p},limit:y}).then(({result:f})=>d({type:"delete",keys:f,trans:h}).then(_=>_.numFailures>0?Promise.reject(_.failures[0]):f.length({table:t=>{const n=e.table(t);return{...n,getMany:r=>{if(!r.cache)return n.getMany(r);const o=qs(r.keys,r.trans._cache,r.cache==="clone");return o?I.resolve(o):n.getMany(r).then(i=>(r.trans._cache={keys:r.keys,values:r.cache==="clone"?qt(i):i},i))},mutate:r=>(r.type!=="add"&&(r.trans._cache=null),n.mutate(r))}}})};function io(e){return!("from"in e)}const $e=function(e,t){if(!this){const n=new $e;return e&&"d"in e&&se(n,e),n}se(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function sn(e,t,n){const r=ae(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(io(e))return se(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(ae(n,e.from)<0)return o?sn(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Ks(e);if(ae(t,e.to)>0)return i?sn(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Ks(e);ae(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),ae(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const s=!e.r;o&&!e.l&&Kn(e,o),i&&s&&Kn(e,i)}function Kn(e,t){io(t)||function n(r,{from:o,to:i,l:s,r:a}){sn(r,o,i),s&&n(r,s),a&&n(r,a)}(e,t)}function Vc(e,t){const n=so(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=so(e);let s=i.next(o.from),a=s.value;for(;!r.done&&!s.done;){if(ae(a.from,o.to)<=0&&ae(a.to,o.from)>=0)return!0;ae(o.from,a.from)<0?o=(r=n.next(a.from)).value:a=(s=i.next(o.from)).value}return!1}function so(e){let t=io(e)?null:{s:0,n:e};return{next(n){const r=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&ae(n,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||ae(n,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Ks(e){var t,n;const r=(((t=e.r)===null||t===void 0?void 0:t.d)||0)-(((n=e.l)===null||n===void 0?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const i=o==="r"?"l":"r",s={...e},a=e[o];e.from=a.from,e.to=a.to,e[o]=a[o],s[o]=a[i],e[i]=s,s.d=zs(s)}e.d=zs(e)}function zs({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}St($e.prototype,{add(e){return Kn(this,e),this},addKey(e){return sn(this,e,e),this},addKeys(e){return e.forEach(t=>sn(this,t,t)),this},[xr](){return so(this)}});const Fc={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new $e(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:s}=i,{extractKey:a,outbound:l}=s,u={...o,mutate:h=>{const p=h.trans,y=p.mutatedParts||(p.mutatedParts={}),f=x=>{const S=`idb://${t}/${r}/${x}`;return y[S]||(y[S]=new $e)},_=f(""),m=f(":dels"),{type:v}=h;let[w,k]=h.type==="deleteRange"?[h.range]:h.type==="delete"?[h.keys]:h.values.length<50?[[],h.values]:[];const b=h.trans._cache;return o.mutate(h).then(x=>{if(oe(w)){v!=="delete"&&(w=x.results),_.addKeys(w);const S=qs(w,b);S||v==="add"||m.addKeys(w),(S||k)&&function(E,C,A,O){function R(L){const F=E(L.name||"");function D(Z){return Z!=null?L.extractKey(Z):null}const ne=Z=>L.multiEntry&&oe(Z)?Z.forEach(ke=>F.addKey(ke)):F.addKey(Z);(A||O).forEach((Z,ke)=>{const Je=A&&D(A[ke]),Xe=O&&D(O[ke]);ae(Je,Xe)!==0&&(Je!=null&&ne(Je),Xe!=null&&ne(Xe))})}C.indexes.forEach(R)}(f,i,S,k)}else if(w){const S={from:w.lower,to:w.upper};m.add(S),_.add(S)}else _.add(n),m.add(n),i.indexes.forEach(S=>f(S.name).add(n));return x})}},d=({query:{index:h,range:p}})=>{var y,f;return[h,new $e((y=p.lower)!==null&&y!==void 0?y:e.MIN_KEY,(f=p.upper)!==null&&f!==void 0?f:e.MAX_KEY)]},c={get:h=>[s,new $e(h.key)],getMany:h=>[s,new $e().addKeys(h.keys)],count:d,query:d,openCursor:d};return Y(c).forEach(h=>{u[h]=function(p){const{subscr:y}=N;if(y){const f=k=>{const b=`idb://${t}/${r}/${k}`;return y[b]||(y[b]=new $e)},_=f(""),m=f(":dels"),[v,w]=c[h](p);if(f(v.name||"").add(w),!v.isPrimaryKey){if(h!=="count"){const k=h==="query"&&l&&p.values&&o.query({...p,values:!1});return o[h].apply(this,arguments).then(b=>{if(h==="query"){if(l&&p.values)return k.then(({result:S})=>(_.addKeys(S),b));const x=p.values?b.result.map(a):b.result;p.values?_.addKeys(x):m.addKeys(x)}else if(h==="openCursor"){const x=b,S=p.values;return x&&Object.create(x,{key:{get:()=>(m.addKey(x.primaryKey),x.key)},primaryKey:{get(){const E=x.primaryKey;return m.addKey(E),E}},value:{get:()=>(S&&_.addKey(x.primaryKey),x.value)}})}return b})}m.add(n)}}return o[h].apply(this,arguments)}}),u}}}};class ct{constructor(t,n){this._middlewares={},this.verno=0;const r=ct.dependencies;this._options=n={addons:ct.addons,autoOpen:!0,indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange,...n},this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};const{addons:o}=n;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const i={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:q,dbReadyPromise:null,cancelOpen:q,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var s;i.dbReadyPromise=new I(a=>{i.dbReadyResolve=a}),i.openCanceller=new I((a,l)=>{i.cancelOpen=l}),this._state=i,this.name=t,this.on=Xt(this,"populate","blocked","versionchange","close",{ready:[Er,q]}),this.on.ready.subscribe=ss(this.on.ready.subscribe,a=>(l,u)=>{ct.vip(()=>{const d=this._state;if(d.openComplete)d.dbOpenError||I.resolve().then(l),u&&a(l);else if(d.onReadyBeingFired)d.onReadyBeingFired.push(l),u&&a(l);else{a(l);const c=this;u||a(function h(){c.on.ready.unsubscribe(l),c.on.ready.unsubscribe(h)})}})}),this.Collection=(s=this,en(Sc.prototype,function(a,l){this.db=s;let u=Rs,d=null;if(l)try{u=l()}catch(y){d=y}const c=a._ctx,h=c.table,p=h.hook.reading.fire;this._ctx={table:h,index:c.index,isPrimKey:!c.index||h.schema.primKey.keyPath&&c.index===h.schema.primKey.name,range:u,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:d,or:c.or,valueMapper:p!==zt?p:null}})),this.Table=function(a){return en(Cc.prototype,function(l,u,d){this.db=a,this._tx=d,this.name=l,this.schema=u,this.hook=a._allTables[l]?a._allTables[l].hook:Xt(null,{creating:[hc,q],reading:[dc,zt],updating:[fc,q],deleting:[pc,q]})})}(this),this.Transaction=function(a){return en(Ic.prototype,function(l,u,d,c,h){this.db=a,this.mode=l,this.storeNames=u,this.schema=d,this.chromeTransactionDurability=c,this.idbtrans=null,this.on=Xt(this,"complete","error","abort"),this.parent=h||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new I((p,y)=>{this._resolve=p,this._reject=y}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},p=>{var y=this.active;return this.active=!1,this.on.error.fire(p),this.parent?this.parent._reject(p):y&&this.idbtrans&&this.idbtrans.abort(),J(p)})})}(this),this.Version=function(a){return en(Ac.prototype,function(l){this.db=a,this._cfg={version:l,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(a){return en($s.prototype,function(l,u,d){this.db=a,this._ctx={table:l,index:u===":id"?null:u,or:d};const c=a._deps.indexedDB;if(!c)throw new $.MissingAPI;this._cmp=this._ascending=c.cmp.bind(c),this._descending=(h,p)=>c.cmp(p,h),this._max=(h,p)=>c.cmp(h,p)>0?h:p,this._min=(h,p)=>c.cmp(h,p)<0?h:p,this._IDBKeyRange=a._deps.IDBKeyRange})}(this),this.on("versionchange",a=>{a.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",a=>{!a.newVersion||a.newVersionnew this.Transaction(a,l,u,this._options.chromeTransactionDurability,d),this._fireOnBlocked=a=>{this.on("blocked").fire(a),Jt.filter(l=>l.name===this.name&&l!==this&&!l._state.vcFired).map(l=>l.on("versionchange").fire(a))},this.use($c),this.use(Bc),this.use(Fc),this.use(Uc),this.vip=Object.create(this,{_vip:{value:!0}}),o.forEach(a=>a(this))}version(t){if(isNaN(t)||t<.1)throw new $.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new $.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);const n=this._versions;var r=n.filter(o=>o._cfg.version===t)[0];return r||(r=new this.Version(t),n.push(r),n.sort(Rc),r.stores({}),this._state.autoSchema=!1,r)}_whenReady(t){return this.idbdb&&(this._state.openComplete||N.letThrough||this._vip)?t():new I((n,r)=>{if(this._state.openComplete)return r(new $.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void r(new $.DatabaseClosed);this.open().catch(q)}this._state.dbReadyPromise.then(n,r)}).then(t)}use({stack:t,create:n,level:r,name:o}){o&&this.unuse({stack:t,name:o});const i=this._middlewares[t]||(this._middlewares[t]=[]);return i.push({stack:t,create:n,level:r??10,name:o}),i.sort((s,a)=>s.level-a.level),this}unuse({stack:t,name:n,create:r}){return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter(o=>r?o.create!==r:!!n&&o.name!==n)),this}open(){return Nc(this)}_close(){const t=this._state,n=Jt.indexOf(this);if(n>=0&&Jt.splice(n,1),this.idbdb){try{this.idbdb.close()}catch{}this._novip.idbdb=null}t.dbReadyPromise=new I(r=>{t.dbReadyResolve=r}),t.openCanceller=new I((r,o)=>{t.cancelOpen=o})}close(){this._close();const t=this._state;this._options.autoOpen=!1,t.dbOpenError=new $.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)}delete(){const t=arguments.length>0,n=this._state;return new I((r,o)=>{const i=()=>{this.close();var s=this._deps.indexedDB.deleteDatabase(this.name);s.onsuccess=W(()=>{(function({indexedDB:a,IDBKeyRange:l},u){!to(a)&&u!==$n&&eo(a,l).delete(u).catch(q)})(this._deps,this.name),r()}),s.onerror=Pe(o),s.onblocked=this._fireOnBlocked};if(t)throw new $.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(i):i()})}backendDB(){return this.idbdb}isOpen(){return this.idbdb!==null}hasBeenClosed(){const t=this._state.dbOpenError;return t&&t.name==="DatabaseClosed"}hasFailed(){return this._state.dbOpenError!==null}dynamicallyOpened(){return this._state.autoSchema}get tables(){return Y(this._allTables).map(t=>this._allTables[t])}transaction(){const t=Mc.apply(this,arguments);return this._transaction.apply(this,t)}_transaction(t,n,r){let o=N.trans;o&&o.db===this&&t.indexOf("!")===-1||(o=null);const i=t.indexOf("?")!==-1;let s,a;t=t.replace("!","").replace("?","");try{if(a=n.map(u=>{var d=u instanceof this.Table?u.name:u;if(typeof d!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return d}),t=="r"||t===Vr)s=Vr;else{if(t!="rw"&&t!=Fr)throw new $.InvalidArgument("Invalid transaction mode: "+t);s=Fr}if(o){if(o.mode===Vr&&s===Fr){if(!i)throw new $.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&a.forEach(u=>{if(o&&o.storeNames.indexOf(u)===-1){if(!i)throw new $.SubTransaction("Table "+u+" not included in parent transaction.");o=null}}),i&&o&&!o.active&&(o=null)}}catch(u){return o?o._promise(null,(d,c)=>{c(u)}):J(u)}const l=Hs.bind(null,this,s,a,o,r);return o?o._promise(s,l,"lock"):N.trans?Ot(N.transless,()=>this._whenReady(l)):this._whenReady(l)}table(t){if(!ue(this._allTables,t))throw new $.InvalidTable(`Table ${t} does not exist`);return this._allTables[t]}}const Hc=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable";class qc{constructor(t){this._subscribe=t}subscribe(t,n,r){return this._subscribe(t&&typeof t!="function"?t:{next:t,error:n,complete:r})}[Hc](){return this}}function Ws(e,t){return Y(t).forEach(n=>{Kn(e[n]||(e[n]=new $e),t[n])}),e}function Kc(e){let t,n=!1;const r=new qc(o=>{const i=wr(e);let s=!1,a={},l={};const u={get closed(){return s},unsubscribe:()=>{s=!0,Ze.storagemutated.unsubscribe(p)}};o.start&&o.start(u);let d=!1,c=!1;function h(){return Y(l).some(f=>a[f]&&Vc(a[f],l[f]))}const p=f=>{Ws(a,f),h()&&y()},y=()=>{if(d||s)return;a={};const f={},_=function(m){i&&jt();const v=()=>Ke(e,{subscr:m,trans:null}),w=N.trans?Ot(N.transless,v):v();return i&&w.then(Ne,Ne),w}(f);c||(Ze(nn,p),c=!0),d=!0,Promise.resolve(_).then(m=>{n=!0,t=m,d=!1,s||(h()?y():(a={},l=f,o.next&&o.next(m)))},m=>{d=!1,n=!1,o.error&&o.error(m),u.unsubscribe()})};return y(),u});return r.hasValue=()=>n,r.getValue=()=>t,r}let ao;try{ao={indexedDB:K.indexedDB||K.mozIndexedDB||K.webkitIndexedDB||K.msIndexedDB,IDBKeyRange:K.IDBKeyRange||K.webkitIDBKeyRange}}catch{ao={indexedDB:null,IDBKeyRange:null}}const ut=ct;function zn(e){let t=Be;try{Be=!0,Ze.storagemutated.fire(e)}finally{Be=t}}St(ut,{...Sn,delete:e=>new ut(e,{addons:[]}).delete(),exists:e=>new ut(e,{addons:[]}).open().then(t=>(t.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return function({indexedDB:t,IDBKeyRange:n}){return to(t)?Promise.resolve(t.databases()).then(r=>r.map(o=>o.name).filter(o=>o!==$n)):eo(t,n).toCollection().primaryKeys()}(ut.dependencies).then(e)}catch{return J(new $.MissingAPI)}},defineClass:()=>function(e){se(this,e)},ignoreTransaction:e=>N.trans?Ot(N.transless,e):e(),vip:no,async:function(e){return function(){try{var t=ro(e.apply(this,arguments));return t&&typeof t.then=="function"?t:I.resolve(t)}catch(n){return J(n)}}},spawn:function(e,t,n){try{var r=ro(e.apply(n,t||[]));return r&&typeof r.then=="function"?r:I.resolve(r)}catch(o){return J(o)}},currentTransaction:{get:()=>N.trans||null},waitFor:function(e,t){const n=I.resolve(typeof e=="function"?ut.ignoreTransaction(e):e).timeout(t||6e4);return N.trans?N.trans.waitFor(n):n},Promise:I,debug:{get:()=>Ee,set:e=>{hs(e,e==="dexie"?()=>!0:Os)}},derive:Et,extend:se,props:St,override:ss,Events:Xt,on:Ze,liveQuery:Kc,extendObservabilitySet:Ws,getByKeyPath:Ae,setByKeyPath:_e,delByKeyPath:function(e,t){typeof t=="string"?_e(e,t,void 0):"length"in t&&[].map.call(t,function(n){_e(e,n,void 0)})},shallowClone:cs,deepClone:qt,getObjectDiff:oo,cmp:ae,asap:as,minKey:Ur,addons:[],connections:Jt,errnames:Sr,dependencies:ao,semVer:Is,version:Is.split(".").map(e=>parseInt(e)).reduce((e,t,n)=>e+t/Math.pow(10,2*n))}),ut.maxKey=rn(ut.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Ze(nn,e=>{if(!Be){let t;Mn?(t=document.createEvent("CustomEvent"),t.initCustomEvent(Ge,!0,!0,e)):t=new CustomEvent(Ge,{detail:e}),Be=!0,dispatchEvent(t),Be=!1}}),addEventListener(Ge,({detail:e})=>{Be||zn(e)}));let Be=!1;if(typeof BroadcastChannel<"u"){const e=new BroadcastChannel(Ge);typeof e.unref=="function"&&e.unref(),Ze(nn,t=>{Be||e.postMessage(t)}),e.onmessage=t=>{t.data&&zn(t.data)}}else if(typeof self<"u"&&typeof navigator<"u"){Ze(nn,t=>{try{Be||(typeof localStorage<"u"&&localStorage.setItem(Ge,JSON.stringify({trig:Math.random(),changedParts:t})),typeof self.clients=="object"&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(n=>n.postMessage({type:Ge,changedParts:t})))}catch{}}),typeof addEventListener<"u"&&addEventListener("storage",t=>{if(t.key===Ge){const n=JSON.parse(t.newValue);n&&zn(n.changedParts)}});const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:t}){t&&t.type===Ge&&zn(t.changedParts)})}I.rejectionMapper=function(e,t){if(!e||e instanceof Tt||e instanceof TypeError||e instanceof SyntaxError||!e.name||!gs[e.name])return e;var n=new gs[e.name](t||e.message,e);return"stack"in e&&De(n,"stack",{get:function(){return this.inner.stack}}),n},hs(Ee,Os);const lo="sprig.sessionId",zc="sprig.disableReplayRecording",Wc=()=>{Vt.setItem(zc,"disabled")},Gs=(()=>{const e=Vt.getItem(lo);if(e)return kt(`Found saved session id: ${e}`),Vt.removeItem(lo),e;const t=_n();return kt(`Generating new uuid: ${t}`),t})();window.addEventListener("beforeunload",()=>{kt(`Before page unload saving session id: ${Gs}`),Vt.setItem(lo,Gs)});class Gc extends ct{constructor(){super("replayStorage",{autoOpen:!1});he(this,"events");he(this,"chunkUploads");he(this,"pendingCaptures")}}const Zs=new Gc;Zs.version(1).stores({events:"uuid, timestamp, [sessionId+timestamp]",chunkUploads:"uuid, timestamp, [sessionId+status], [uploadId+status], [sessionId+status+uploadId]",pendingCaptures:"uuid, timestamp, [sessionId+targetTimestamp]"}),Zs.open().catch(e=>{Kl(`Error opening replay storage: ${JSON.stringify(e)}`),Wc()}),Vt.getItem("sprig.pendingCount");const Zc=e=>{};var P=(e=>(e.ConsentLegal="consentlegal",e.Likert="likert",e.Matrix="matrix",e.MultipleChoice="multiplechoice",e.MultipleSelect="multipleselect",e.NPS="nps",e.Open="open",e.RecordedTask="recordedtask",e.TextUrlPrompt="texturlprompt",e.Thanks="thanks",e.Uploading="uploading",e.VideoVoice="videovoice",e))(P||{}),be=(e=>(e.Answered="answered",e.Contains="contains",e.DoesNotContain="notcontains",e.DoesNotInclude="list_dni",e.Equal="eq",e.GivenUp="given_up",e.GreaterThan="gt",e.GreaterThanOrEqual="gte",e.LessThan="lt",e.LessThanOrEqual="lte",e.ListAll="list_all",e.ListAtLeastOne="list_alo",e.ListExact="list_exact",e.NotEqual="neq",e.Partial="partial",e.Skipped="skipped",e))(be||{}),At=(e=>(e.Camera="camera",e.Microphone="microphone",e.Screen="screen",e))(At||{}),me=(e=>(e.AvPermission="av_permission",e.ScreenPermission="screen_permission",e.StartTask="start_task",e.CompleteTask="complete_task",e))(me||{}),dt=(e=>(e.Number="number",e.Smiley="smiley",e.Star="star",e))(dt||{});const Yc="!launch_darkly_";class Qc{constructor(){he(this,"_ldData",{})}getAllLaunchDarklyVariations(){return this._ldData}setLDFlagsVariations(t){try{return!t||typeof t!="object"||Array.isArray(t)?!1:(Object.keys(this._ldData).forEach(n=>{delete this._ldData[n]}),Object.keys(t).forEach(n=>this._ldData[`${Yc}${n}`]=(t[n]??0)+1),!0)}catch(n){return n instanceof Error&&window.UserLeap.reportError("setAllLDFlagsVariations",n),console.warn("[Sprig] An issue had occured when setting LaunchDarkly flags and variations."),!1}}}const Jc=new Qc;Object.freeze(Jc);const Xc="!optimizely_experiments_";class eu{constructor(){he(this,"_optimizelyData",{})}setOptimizelyExperiment(t,n=!0){if(!t||typeof t!="object")return!1;const{experiments:r}=t;try{return n&&Object.keys(this._optimizelyData).map(o=>{delete this._optimizelyData[o]}),r&&r.map(o=>{const{id:i,variation:s}=o,a=this.transformExperimentId(i);s&&typeof s=="string"&&(this._optimizelyData[a]=s)}),!0}catch(o){return o instanceof Error&&window.UserLeap.reportError("setOptimizelyExperiment",o),!1}}getAllOptimizelyExperiments(){return this._optimizelyData}getOptimizelyVariationName(t){return this._optimizelyData[this.transformExperimentId(t)]}transformExperimentId(t){return Xc+t}getAndSetWebOptimizelyExperiments(){var t;try{if(window&&window.optimizely&&typeof window.optimizely.get=="function"){const n=(t=window.optimizely.get("state"))==null?void 0:t.getExperimentStates({isActive:!0});if(n){const r=Object.keys(n).map(o=>{var i,s;return(i=n[o].variation)!=null&&i.name?{id:o,variation:(s=n[o].variation)==null?void 0:s.name}:{id:o,variation:"Original"}});return this.setOptimizelyExperiment({experiments:r},!1),!0}return!1}return!1}catch(n){return n instanceof Error&&window.UserLeap.reportError("getAndSetWebOptimizely",n),!1}}}const tu=new eu;Object.freeze(tu),window.UserLeap&&window.Sprig&&(window.Sprig._gtm?window.Sprig=window.UserLeap:window.UserLeap=window.Sprig),window.UserLeap||(window.UserLeap=window.Sprig),window.Sprig||(window.Sprig=window.UserLeap);const nu="360px";Ce.SurveyFadingOut+"";var co=(e=>(e[e.And=1]="And",e[e.Or=2]="Or",e))(co||{});const Ys=1,uo={eq(e,t){return e==t},neq(e,t){return!this.eq(e,t)},gt(e,t){return e>t},gte(e,t){return e>=t},lt(e,t){return ee.indexOf(n)===-1)},list_alo(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.some(o=>r.has(o))},list_dni(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.every(o=>!r.has(o))},contains(e,t){const n=e.toLowerCase(),r=t.toLowerCase();return n.includes(r)},notcontains(e,t){return!this.contains(e,t)}},ru=(e,t,n)=>{switch(t){case P.VideoVoice:return!!(e&&e.value);case P.Open:return!!n;case P.MultipleSelect:return!!(n&&Object.keys(n).length);case P.RecordedTask:return(n==null?void 0:n.taskStatus)===fe.Completed;case P.TextUrlPrompt:return!e.value;case P.ConsentLegal:return n!==null;case P.MultipleChoice:return n!==void 0;case P.Matrix:return!!(n&&Object.values(n).every(r=>r!==null));case P.NPS:return n!==null;case P.Likert:return n!==null;default:return!0}},Qs=(e,t)=>{if(t===P.Matrix){const n=Object.keys(e).length,r=Object.values(e).filter(o=>o!==null).length;return r>0&&r{if(t>=e.length||t<0)return null;const i=e[t];let s=t+1;const a=i.props.routingOptions||[];for(let d=0;dr.length)continue;let y=Xs({comparator:p.comparator,response:r[p.questionIndex],type:i.type,value:p.value});for(let f=1;fd.type===P.Uploading);let u;return l>0?u=n?e.length-3:e.length-2:u=e.length-1,t>=u||s===-1||s!==null&&s>u?l>0&&Object.values(o).some(c=>c.isSubmitted&&!c.isComplete)?l:n?e.length-1:null:s===-1?null:s},Xs=({comparator:e,response:t,type:n,value:r})=>{if(e===be.Answered)switch(n){case P.TextUrlPrompt:return t===void 0;case P.ConsentLegal:return t&&t.submitted===!0;case P.RecordedTask:return"taskStatus"in t&&t.taskStatus===fe.Completed;case P.Likert:return Number.isInteger(t);case P.Open:return t&&t.length>0;case P.MultipleChoice:case P.MultipleSelect:return Object.keys(t).length>0;case P.Matrix:return Object.values(t).every(o=>o!==null);case P.NPS:return Number.isInteger(t);case P.VideoVoice:return!!(t!=null&&t.mediaRecordingUid);default:return!1}if(e===be.GivenUp)return n===P.RecordedTask?"taskStatus"in t&&t.taskStatus===fe.GivenUp:!0;if(e===be.Partial)return n===P.Matrix?Qs(t,n):!1;if(e===be.Skipped)switch(n){case P.TextUrlPrompt:return t==null?void 0:t.skipped;case P.ConsentLegal:return t===null;case P.RecordedTask:return"taskStatus"in t&&t.taskStatus===fe.Abandoned;case P.Likert:return t===null;case P.Open:return(t==null?void 0:t.length)===0;case P.MultipleChoice:return t===void 0;case P.MultipleSelect:return(t==null?void 0:t.length)===0;case P.Matrix:return Object.values(t).every(o=>o===null);case P.NPS:return t===null;case P.VideoVoice:return t===null;default:return!1}return uo[e](t,r)},ou=13,iu=(e,t)=>e.reduce((n,r)=>n.concat(n.map(o=>[...o,r])),[[]]).filter(n=>t||n.length>0),su=e=>{var t,n,r;switch(e.type){case P.MultipleSelect:return!e||!e.props||!e.props.options?null:e.props.options.length>ou?e.props.options.map(o=>[o.value]):iu(e.props.options.map(o=>o.value),!e.props.properties.required);case P.MultipleChoice:{if(!e||!e.props||!e.props.options)return null;const o=e.props.options.map(i=>i.value);return e.props.properties.required||o.push(void 0),o}case P.Matrix:{if(!((t=e==null?void 0:e.props)!=null&&t.options))return null;const o=e.props.properties.matrixColumn,i=e.props.options,s=i.reduce((d,c)=>(d[c.id]=null,d),{}),a={...s,[i[0].id]:o[0].value},l=i.reduce((d,c)=>(d[c.id]=o[0].value,d),{}),u=[a,l];return e.props.properties.required||u.push(s),u}case P.Likert:{const o=Number((r=(n=e.props)==null?void 0:n.properties)==null?void 0:r.range)||5;return[...Array.from(Array(o).keys()).map(s=>s+1),...e.props.properties.required?[]:[null]]}case P.NPS:return[0,1,2,3,4,5,6,7,8,9,10,...e.props.properties.required?[]:[null]];case P.VideoVoice:case P.Open:return["1",...e.props.properties.required?[]:[""]];case P.RecordedTask:return[{taskStatus:fe.Completed},{taskStatus:fe.GivenUp},...e.props.properties.required?[]:[{taskStatus:fe.Abandoned}]];case P.TextUrlPrompt:return[void 0,...e.props.properties.required?[]:[{skipped:!0}]];case P.ConsentLegal:return[Ys,...e.props.properties.required?[]:[null]];default:return[Ys]}},au=e=>e in uo,lu=e=>typeof e=="object"&&e!==null&&"taskStatus"in e,cu=(e,t=[])=>t.reduce((n,r)=>{const{group:o,target:i}=r;if(!(o!=null&&o.length))return[...n];const s=o.filter(a=>Number(a)?!0:typeof a=="object"?a.questionIndex===e:!1).map(a=>{const{comparator:l,value:u}=a;return{comparator:l,target:i,value:u}});return[...n,...s]},[]),uu=(e,t)=>{const n=new Set([P.Thanks,P.Uploading]);if(t>=e.length||t<0||n.has(e[t].type))return 0;const r=e.filter(i=>!n.has(i.type));if(t===r.length-1)return 1;const o={[r.length-1]:1,[-1]:0};for(let i=r.length-2;i>=t;i--){const s=r[i],a=cu(i,s.props.routingOptions);if(a.length===0){o[i]=o[i+1]+1;continue}let l=0,u=su(s);if(u===null)return r.length-1-t;for(let d=0;d{const _=ru({value:f},s.type,f),m=Qs(f,s.type);return!(_&&c===be.Answered||m&&c===be.Partial||!_&&!m&&c===be.Skipped||c===be.GivenUp&&lu(f)&&f.taskStatus===fe.GivenUp||_&&s.type===P.Open&&(c===be.Contains||c===be.DoesNotContain)||_&&au(c)&&uo[c](f,p))});if(y.length=r.length)return r.length-1-t;l=Math.max(o[f]+1,l)}u=y}u.length>0&&(l=Math.max(o[i+1]+1,l)),o[i]=l}return o[t]},du=e=>!(e.type===P.Thanks||e.type===P.Uploading),z=qi()((e,t)=>({allResponses:[],answers:void 0,apiURL:"",border:"#000000",cards:[],close:async(n=yt)=>{const r=t(),{fadeout:o,remove:i,trackHistory:s}=r;await o(n),ho(r)||s({event:"closed"}),kt(`Closing survey: ${r.surveyId}`),Qi.enable(),i({initiator:gr.Closed})},configureExitOnOverlayClick:()=>{},customMetadata:{},destroy:async n=>{const{eventEmitFn:r,fadeout:o,remove:i}=t();r(Se.SurveyComplete),await o(n),Qi.enable(),i({initiator:gr.Complete})},endCard:{headline:""},envId:"",eventEmitFn:vn.emit.bind(vn),fadeout:async n=>{const{eventEmitFn:r,headers:o,viewDocument:i}=t();return mn(o)?Promise.resolve():(r(Ce.SurveyFadingOut),new Promise(s=>{const a=i.getElementById(n);a?(a.addEventListener("transitionend",()=>{s()}),a.classList.remove("ul-app--visible")):s()}))},forceBrandedLogo:!1,frame:document.createElement("iframe"),handleClickEmbedButton:n=>{const{cards:r,eventEmitFn:o,index:i}=t();o(n,{[wt.QuestionId]:r[i].name,[wt.Props]:r[i].props}),e(()=>({hasViewedEmbed:!0}))},handleUploadUpdate:({mediaRecordingUid:n,isComplete:r,progressPct:o,isSubmitted:i})=>{var p,y,f;const{cards:s,destroy:a,index:l,uploadProgress:u}=t(),d=r||((p=u[n])==null?void 0:p.isComplete),c={...u,[n]:{progressPct:d?100:o||((y=u[n])==null?void 0:y.progressPct),isComplete:d,isSubmitted:i||((f=u[n])==null?void 0:f.isSubmitted)}};if(e({uploadProgress:c}),s[l].type!==P.Uploading)return;const h=Object.entries(u).every(([_,m])=>!m.isSubmitted||m.isComplete||n==_&&r);if(h&&l>=s.length-1)return a(yt);e({index:h?l+1:l,uploadingCardViewed:!0})},hasViewedEmbed:!1,headers:{Authorization:"","Content-Type":"","userleap-platform":_t.Web,"x-ul-environment-id":"","x-ul-installation-method":bt.Snippet,"x-ul-sdk-version":"","x-ul-visitor-id":""},index:0,isPreview:!1,marketingUrl:"https://sprig.com",meta:{ch:0,cw:0,l:"",mode:null,p:"",sh:0,sw:0},mode:void 0,next:n=>{const{allResponses:r,cards:o,eventEmitFn:i,index:s,responseGroupUid:a,submit:l,trackHistory:u,uploadProgress:d,viewedCardCount:c}=t(),h=Date.now(),p=[...o],y=p[s],{type:f}=n.data,_={...n.data},m=_.value;du(y)&&(y.value=m),_.answeredAt=h,delete _.type;const v={response:_,responseGroupUid:a,questionIndex:s};let w=f===P.MultipleChoice?Object.values(m).find(E=>E!==!1):m;f===P.MultipleSelect&&(w=p[s].props.options.reduce((E,C)=>(m[C.id]&&E.push(C.value),E),[]));const k=r.slice(0);k[s]=w,e({allResponses:k});const b=Js({cards:p,index:s,hasEndCard:!!n.endCard,uploadProgress:d,allResponses:k});if(b===null){v.completedAt=h,l(v),n.completeSurvey();return}else[P.Thanks,P.Uploading].includes(p[b].type)&&(v.completedAt=h);const x=l(v);[P.Thanks,P.Uploading].includes(p[b].type)||x.finally(()=>{u({event:"seen",index:b})});const S=p[b];p[b]&&i&&i(Se.CurrentQuestion,{[wt.QuestionId]:S.name,[wt.Props]:S.props}),e({cards:p,hasViewedEmbed:!1,index:b,viewedCardCount:c+1})},pendingRemoveIframeReason:null,previewKey:null,recorder:()=>{},recorderEventEmitter:vn,resolveTrackedPromise:()=>{const{removeIframeIfReady:n}=t();e(r=>({unresolvedRequestCount:r.unresolvedRequestCount-1})),n()},responseGroupUid:"",remove:({initiator:n})=>{const{removeIframeIfReady:r}=t();e({pendingRemoveIframeReason:n}),r()},removeIframeIfReady:()=>{const{eventEmitFn:n,pendingRemoveIframeReason:r,unresolvedRequestCount:o}=t();r&&o===0&&(n(Ce.SurveyWillClose,{name:Ce.SurveyWillClose,initiator:r}),e({pendingRemoveIframeReason:null}))},seen:async()=>{const{trackHistory:n}=t();return n({event:"seen",isNew:!0})},slugName:null,showStripes:!1,showSurveyBrand:!1,styleNonce:"",submit:async({completedAt:n,questionIndex:r,response:o,responseGroupUid:i})=>{const s=t();if(!i||ho(s))return;const a={responseGroupUid:i,meta:s.meta,customMetadata:s.customMetadata,responses:[o],completedAt:n,previewKey:s.previewKey};kt(`Submitting response: ${JSON.stringify(o.value,null,2)} for survey: ${s.surveyId}`),n&&(kt("Survey complete"),Zc({id:s.surveyId}));const l=await s.trackPromise(Ct(`${s.apiURL}/sdk/1/environments/${s.envId}/visitors/${s.userId}/responses/submit`,{body:JSON.stringify(a),headers:s.headers,method:"POST"}));if(!l.ok){l.reportError&&(console.warn("[Sprig] (ERR-427) Failed to submit response",l.error),await s.trackPromise(ea(s,"submitResponse",l.error)));return}s.eventEmitFn(Ce.QuestionAnswered,{...o,questionIndex:r})},surveyId:0,tabTitle:"",trackHistory:async({event:n,index:r,isNew:o=!1})=>{const i=t();if(ho(i))return;const{cards:s,index:a}=i,l=r!==void 0?s[r]:s[a],u={sid:i.surveyId,qid:l.name,action:n,vid:i.userId,eid:i.envId,isNew:o,responseGroupUid:i.responseGroupUid,previewKey:i.previewKey},d=await i.trackPromise(Ct(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`,{body:JSON.stringify(u),headers:i.headers,method:"POST"}));!d.ok&&d.reportError&&(console.warn("[Sprig] (ERR-428) Failed to track survey event",d.error),await i.trackPromise(ea(i,"trackHistory",d.error)))},trackPromise:async n=>{let{resolveTrackedPromise:r}=t();return e(o=>({unresolvedRequestCount:o.unresolvedRequestCount+1})),n.then(o=>(r(),o)).catch(o=>{throw r(),o})},unresolvedRequestCount:0,update:()=>{const{cards:n,index:r,headers:o,eventEmitFn:i,frame:s,useMobileStyling:a,viewDocument:l}=t(),d=n[r].type===P.Matrix;setTimeout(()=>{var p,y;const[c,h]=Nl(l);mn(o)?i(Ce.SurveyHeight,{name:Ce.SurveyHeight,contentFrameHeight:c}):((p=s.setHeight)==null||p.call(s,c),a||(y=s.setWidth)==null||y.call(s,d?h:parseInt(nu)))},100)},uploadingCardViewed:!1,uploadProgress:{},useDesktopPrototype:void 0,useMobileStyling:!1,userId:"",viewDocument:window.document,viewedCardCount:0})),ho=e=>!e.userId||e.meta&&e.meta.mode==="test"||e.isPreview,ea=async(e,t,n)=>{const{mode:r,userId:o,envId:i,apiURL:s,headers:a,viewDocument:l}=e,u=l.documentElement,d={mode:r,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:u.clientWidth,clientHeight:u.clientHeight,location:window.location.href,language:window.navigator.language},c={action:t,err:{message:n==null?void 0:n.message,stack:n==null?void 0:n.stack},meta:d,vid:o,envId:i},h=await Ct(`${s}/sdk/1/errors`,{method:"POST",headers:Object.assign({"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},a),body:JSON.stringify(c)});if(!h.ok)console.warn("[Sprig] (ERR-444) Failed to report error to API",n);else{const{presignedUrl:p}=h.json;Gl(p)}};var hu=0;function g(e,t,n,r,o,i){var s,a,l={};for(a in t)a=="ref"?s=t[a]:l[a]=t[a];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--hu,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return T.vnode&&T.vnode(u),u}const ce=e=>g("button",{...e,className:B("ul-card-text__button",e.className),id:"ul-card-text__button"}),xe=({message:e,properties:t})=>{const n=t==null?void 0:t.captionText;return g(le,{children:[e&&g("h1",{className:j.QuestionHeader,id:j.QuestionHeader,...n?{}:{style:{marginBottom:"15px"}},children:e}),n&&g("p",{className:j.Caption,id:j.Caption,children:n})]})},ta=({buttonText:e="View Prototype",handleClick:t})=>g("button",{className:"prototype-button",onClick:t,children:e},"prototype-btn"),Ue=({defaultBody:e,embeddedType:t="prototype",properties:n})=>{var c;const{handleClickEmbedButton:r,hasViewedEmbed:o,headers:i,useDesktopPrototype:s}=z(h=>({handleClickEmbedButton:h.handleClickEmbedButton,hasViewedEmbed:h.hasViewedEmbed,headers:h.headers,useDesktopPrototype:h.useDesktopPrototype})),a=(n==null?void 0:n.conceptUrl)||((c=n==null?void 0:n.consentDocument)==null?void 0:c.url),l=window.innerWidth{h.preventDefault(),r(p)};if(!s&&l&&!o&&a&&["email","link"].includes(u)){if(t==="prototype")return g(ta,{handleClick:h=>{d(h,Se.ViewPrototypeClick)}});if(t==="pdf")return g(ta,{buttonText:(n==null?void 0:n.viewDocumentText)||"View Document",handleClick:h=>{d(h,Se.ViewAgreementClick)}})}return e()},na=(e,t)=>{const n=He(0),r=()=>{if(e.current){const o=e.current;o.style.height="1px";const i=o.scrollHeight,s=o.offsetHeight-o.clientHeight,a=i+s,l=parseInt(window.getComputedStyle(o).getPropertyValue("max-height")),u=a<=l?a:l;n.current!==u&&t(),n.current=u,o.style.height=`${u}px`}};return pe(r,[]),r},po=({ariaLabel:e,border:t,choiceStyle:n={},label:r,isSelected:o,value:i,text:s,id:a,isRadio:l,useMobileStyling:u,error:d,allowTextEntry:c,noneOfTheAbove:h,promptText:p,onUserInputChanged:y})=>{const{styleNonce:f,viewDocument:_}=z(L=>({styleNonce:L.styleNonce,viewDocument:L.viewDocument})),[m,v]=X(!1);mu(_,t,f);const w=({isSelected:L,userText:F})=>{y&&y({id:a||"",selected:L,value:i,userText:F,noneOfTheAbove:h})},k=L=>{L.stopPropagation(),w({isSelected:l||!o,userText:s}),v(!1)},b=()=>{m||v(!0)},x=()=>{m&&v(!1)},S=L=>{(L.key==="Enter"||L.key===" ")&&k(L)},E={onClick:L=>k(L),onKeyPress:L=>S(L)};"ontouchstart"in _.documentElement?(E.onTouchStart=x,E.onTouchCancel=x,E.onTouchEnd=x):(E.onMouseDown=b,E.onMouseLeave=x);const C=l?`radio-${a}`:`checkbox-${a}`,A=o||m?[Wn]:[],O=[...d?[oa]:[],...A],R=r?{"aria-labelledby":`label-${a}`}:{"aria-label":e};return g("div",{className:B([...Q(j.Choice,u),...O]),id:`choice-div-${a}`,style:{...n,...d?{borderColor:Ut}:{}},...E,children:[g("div",{className:B([j.ChoiceLabelContainer]),children:[l?g("div",{...R,className:B([j.ChoiceRadio,...A]),id:C,role:"radio",tabIndex:0}):g("div",{"aria-checked":o,"aria-labelledby":`label-${a}`,className:j.ChoiceCheckbox,id:C,role:"checkbox",style:o?{backgroundColor:t,borderColor:t,boxShadow:"none"}:{},tabIndex:0,children:o&&g("svg",{fill:"none",height:"10",viewBox:"0 0 10 10",width:"10",xmlns:"http://www.w3.org/2000/svg",children:g("path",{d:"M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",stroke:"white",strokeLinecap:"round",strokeWidth:"2"})})}),r&&g("label",{className:B(Q(j.ChoiceLabel,u)),htmlFor:C,id:`label-${a}`,children:r})]}),c&&o&&g("div",{className:B([j.ChoiceTextEntryContainer,...A]),children:g(pu,{onTextChange:L=>w({isSelected:o,userText:L}),promptText:p||"Please specify",textValue:s,useMobileStyling:u})})]})},pu=({promptText:e,textValue:t,onTextChange:n,useMobileStyling:r})=>{const o=He(null),{update:i}=z(a=>({update:a.update})),s=na(o,()=>i());return pe(()=>{o.current&&o.current.focus()},[]),g("textarea",{"aria-label":e,"aria-multiline":"true","aria-placeholder":e,className:B(Q(j.ChoiceTextInput,r)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:a=>{s(),a.stopPropagation(),n(a.currentTarget.value)},onClick:a=>{a.stopPropagation()},onKeyPress:a=>{a.stopPropagation()},placeholder:e,ref:o,role:"textbox",rows:1,value:t})},ra="ul-select-style-element",Wn="ul-select-active-dynamic-style",oa="ul-select-error-dynamic-style",fu=e=>e.tagName.toLowerCase()==="style",mu=(e,t,n)=>{let r=e.getElementById(ra),o=!1;r||(r=e.createElement("style"),o=!0),fu(r)&&(r.id=ra,n&&(r.nonce=n),r.textContent=gu(t),o&&e.head.appendChild(r))},gu=e=>` + .${Wn} { border-color: ${e}; } - .${Yn} .${O.ChoiceRadio}, .${Yn}.${O.ChoiceRadio} { + .${Wn} .${j.ChoiceRadio}, .${Wn}.${j.ChoiceRadio} { border: 6px solid ${e}; box-shadow: none; } - .${ls} { + .${oa} { border-color: ${Ut}; } - `,Mt=e=>(e==null?void 0:e.buttonText)||"Next",vi=e=>(e==null?void 0:e.skipButtonText)||"Skip",Nc=({className:e,message:t,next:n,properties:r,questionId:i,type:o})=>{const{useMobileStyling:a,border:s}=G(E=>({useMobileStyling:E.useMobileStyling,border:E.border})),[l,c]=ne(!1),[u,d]=ne(""),[f,v]=ne(!1),p=r==null?void 0:r.collectName,h=(r==null?void 0:r.nameLabelText)||"Full Name",g=(r==null?void 0:r.consentText)||"I agree to the stated conditions",_=(r==null?void 0:r.submitButtonText)||"Submit",b=!!u.trim(),x=l&&(!p||b),w=(E,R=!1)=>{E.preventDefault(),E.stopPropagation();let L=null;if(!R){if(!x){v(!0);return}L={submitted:!0},p&&(L.name=u)}n({value:L,questionId:i,type:o})},m=E=>{E.preventDefault(),E.stopPropagation(),d(E.currentTarget.value)},C=E=>{E.currentTarget.style.borderColor=f&&!b?Ut:s},S=E=>{E.currentTarget.style.borderColor=f&&!b?Ut:ar},k=()=>y("div",{children:[y(as,{allowTextEntry:!1,border:s,error:f&&!l,index:0,isRadio:!1,isSelected:l,label:g,onUserInputChanged:({selected:E})=>{E!==l&&c(!l)},useMobileStyling:a}),p&&y("input",{"aria-label":h,"aria-placeholder":h,className:$(X(O.ConsentLegalNameInput,a)),"data-gramm":"false",maxLength:250,name:"name",onBlur:S,onFocus:C,onInput:m,placeholder:h,style:f&&!b?{borderColor:Ut}:{},tabIndex:0,value:u}),y("div",{className:"ul-card__button-wrapper ul-card-vertical__button-wrapper",children:[y(pe,{className:x?"":O.ButtonDisabled,onClick:w,children:_}),r.required===!1&&y("button",{className:O.SkipButton,onClick:E=>w(E,!0),children:vi(r)})]})]});return y("div",{className:$([e,"ul-card__consent-legal",O.FadeInTransition]),children:[y(Re,{message:t}),y("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:r&&r.richTextBody?{__html:r&&r.richTextBody}:void 0,id:"ul-card__consent-legal-body-container"}),y(et,{properties:r,defaultBody:k,embeddedType:"pdf"})]},i)},Uc=({activeValue:e,border:t,icon:n,isPressed:r,onSubmit:i,range:o,scaleLabelType:a,setActiveValue:s,setIsPressed:l,useMobileStyling:c,value:u})=>{const d=`option-${u}`,f=a===at.Number,v=a===at.Star,p=f&&u===e,[h,g]=(()=>u<=e&&v||u===e?r?[t,1]:[t,.3]:["",1])(),_=()=>{switch(a){case at.Star:return $([...X(O.LikertStar,c),...X(`${O.LikertStar}-${u}`,c)]);case at.Smiley:return $([...X(O.LikertSmiley,c),...X(`${O.LikertSmiley}-${u}`,c)]);default:return $(u===o?[...X(O.LikertNumber,c),...X(`${O.LikertNumber}-${u}`,c),...X("likert-last-option",c)]:[...X(O.LikertNumber,c),...X(`${O.LikertNumber}-${u}`,c)])}},b=()=>{s(-1),l(!1)};return y("div",{"aria-label":f?void 0:String(u),className:_(),dangerouslySetInnerHTML:{__html:n},id:d,onClick:()=>i(),onPointerDown:()=>l(!0),onPointerEnter:()=>s(u),onPointerLeave:b,role:"radio",style:{color:f?"":h,borderColor:p?h:"",fillOpacity:p?"":g,zIndex:p?3:"auto"},tabIndex:0})},Vc=({className:e,labels:t,message:n,next:r,properties:i,questionId:o,type:a})=>{const{border:s,useMobileStyling:l}=G(k=>({border:k.border,useMobileStyling:k.useMobileStyling})),[c,u]=ne(-1),[d,f]=ne(!1),v=t&&t.left,p=t&&t.right;let h;const{range:g,scaleLabelType:_,ratingIcons:b}=i;g&&(h=Number(g));const x=h||5,w=k=>{var E,R;switch(_){case at.Star:return(E=b[0])==null?void 0:E.svg;case at.Smiley:return(R=b[k])==null?void 0:R.svg;default:return String(k+1)}},m=[...Array(x)].map((k,E)=>{const R=E+1;return y(Uc,{activeValue:c,border:s,icon:w(E),isPressed:d,onSubmit:()=>r({value:R,questionId:o,type:a}),range:x,scaleLabelType:_,setActiveValue:u,setIsPressed:f,useMobileStyling:l,value:R},E)}),C=k=>{k.preventDefault(),k.stopPropagation(),r({value:null,questionId:o,type:a})},S=()=>y(he,{children:[y("div",{"aria-label":`Rating (1 - ${x})`,className:"ul-card--likert__numbers",role:"radiogroup",children:m}),y("div",{className:"ul-card--likert__labels",children:[y("span",{children:v}),y("span",{children:p})]}),!i.required&&y("div",{className:"ul-vertical-centered-container",children:y(pe,{onClick:C,children:Mt(i)})})]});return y("form",{className:$([e,"ul-card--likert",O.FadeInTransition]),children:[y(Re,{message:n,properties:i}),y(et,{properties:i,defaultBody:S})]},o)},us=({className:e,message:t,onSubmit:n,options:r=[],properties:i,questionId:o,type:a})=>{const{border:s,useMobileStyling:l}=G(m=>({border:m.border,useMobileStyling:m.useMobileStyling})),c=r.reduce((m,C)=>(m[C.id]={isSelected:!1},m),{}),[u,d]=ne(c),f=a===T.MultipleChoice,v=i.required,p=Object.entries(u).some(([m,C])=>{var E;const S=r.find(R=>`${R.id}`===m),k=C.userText===void 0||C.userText.trim()==="";return((E=S==null?void 0:S.optionProperties)==null?void 0:E.allowsTextEntry)&&k&&C.isSelected}),h=Object.values(u).some(m=>m.isSelected),g=p||v&&!h,_=r.map(({id:m,label:C,value:S,optionProperties:k},E)=>{var P,M;const R=`${m}`,{allowsTextEntry:L}=k||{allowsTextEntry:!1};return y(as,{allowTextEntry:L,border:s,error:!1,id:R,index:E,isRadio:f,isSelected:!!((P=u[R])!=null&&P.isSelected),label:C,onUserInputChanged:A=>x(A.id,A.selected,A.userText),promptText:"Please specify",text:(M=u[m])==null?void 0:M.userText,useMobileStyling:l,value:S},R)}),b=m=>{m.preventDefault(),m.stopPropagation(),n(u)},x=(m,C,S)=>{const k=Object.assign({},u);if(f&&C)for(const E of Object.values(k))E.isSelected=!1,delete E.userText;k[m]={isSelected:C,userText:S},d(k)},w=()=>y("div",{children:[y("div",{className:$(X(O.ChoiceGroup,l)),role:f?"radiogroup":"group",children:_}),y("div",{className:"ul-card__button-wrapper",children:y(pe,{disabled:g,onClick:b,children:Mt(i)})})]});return y("form",{className:$([e,"ul-card--multiple",O.FadeInTransition]),id:"text-form",onSubmit:b,children:[y(Re,{message:t,properties:i}),y(et,{properties:i,defaultBody:w})]},o)},Fc=e=>{const{questionId:t,type:n,next:r,options:i}=e;return y(us,{...e,onSubmit:a=>{const s=Object.entries(a).find(([,f])=>f.isSelected)||[void 0,void 0],[l,c]=s,u=i.find(f=>`${f.id}`===l),d=c!=null&&c.userText?{[l]:{userText:c.userText}}:null;r({value:u&&l?{[l]:u.value}:{},secondaryValue:d,questionId:t,type:n})}})},Hc=e=>{const{questionId:t,type:n,next:r}=e;return y(us,{...e,onSubmit:o=>{const a={},s=Object.entries(o).reduce((c,[u,d])=>(c[u]=d.isSelected,c),a),l=Object.entries(o).reduce((c,[u,d])=>{if(!d.userText)return c;const f=c||{};return f[u]={userText:d.userText},f},null);r({value:s,secondaryValue:l,questionId:t,type:n})}})},$c=({className:e,props:{labels:t,message:n,properties:r},next:i,questionId:o,type:a})=>{const{border:s,useMobileStyling:l}=G(p=>({border:p.border,useMobileStyling:p.useMobileStyling})),c=t&&t.left,u=t&&t.right,d=[...Array(11)].map((p,h)=>y("div",{className:$([...X(O.NPSNumber,l),...X(`${O.NPSNumber}-${h}`,l)]),id:`option-${h}`,onClick:()=>i({value:h,questionId:o,type:a}),onKeyPress:g=>{g.preventDefault(),(g.key==="Enter"||g.key===" ")&&i({value:h,questionId:o,type:a})},onPointerDown:g=>{g.currentTarget.style.zIndex="2",g.currentTarget.style.borderColor=s},onPointerLeave:g=>{g.currentTarget.style.zIndex="auto",g.currentTarget.style.borderColor=ar},role:"radio",tabIndex:0,children:h},h)),f=p=>{p.preventDefault(),p.stopPropagation(),i({value:null,questionId:o,type:a})},v=()=>y("div",{children:[y("div",{className:"ul-card--nps__numbers",children:d}),y("div",{className:"ul-card--nps__labels",children:[y("span",{children:c}),y("span",{children:u})]}),!r.required&&y("div",{className:"ul-vertical-centered-container",children:y(pe,{onClick:f,children:Mt(r)})})]});return y("form",{className:$([e,"ul-card--nps",O.FadeInTransition]),children:[y(Re,{message:n,properties:r}),y(et,{properties:r,defaultBody:v})]},o)},Kc=({className:e,message:t,next:n,properties:r,questionId:i,type:o})=>{const{border:a,useMobileStyling:s,update:l}=G(m=>({border:m.border,useMobileStyling:m.useMobileStyling,update:m.update})),[c,u]=ne(""),d=We(null),f=c.trim(),v=r.required===!0&&!f,p=os(d,()=>l()),h=m=>{p(),m.preventDefault(),m.stopPropagation(),u(m.currentTarget.value)},g=m=>{m.preventDefault(),m.stopPropagation(),n({value:c,questionId:i,type:o})},_=r&&r.openTextPlaceholder?r.openTextPlaceholder:"",b=m=>{m.currentTarget.style.borderColor=a},x=m=>{m.currentTarget.style.borderColor=ar},w=()=>y("div",{className:"ul-card-text",children:[y("div",{className:"ul-card-text__container",children:y("textarea",{"aria-label":_,"aria-labelledby":O.QuestionHeader,"aria-multiline":"true","aria-placeholder":_,className:$(X(O.OpenTextInput,s)),"data-gramm":"false",maxLength:5e3,name:"text",onBlur:x,onChange:h,onFocus:b,placeholder:_,ref:d,role:"textbox",tabIndex:0})}),y(pe,{disabled:v,onClick:g,style:{backgroundColor:v?"":a},children:Mt(r)})]});return y("form",{className:$([e,"ul-card--text",O.FadeInTransition]),id:"text-form",children:[y(Re,{message:t,properties:r}),y(et,{defaultBody:w,properties:r})]},i)};var tt=(e=>(e[e.RequestNeeded=1]="RequestNeeded",e[e.TryAgain=2]="TryAgain",e[e.Ready=3]="Ready",e))(tt||{});const Qn=e=>e.type===ve.AvPermission,cs=e=>e.type===ve.ScreenPermission,zc=(e,t)=>!(Qn(t)?t.permissionDescriptors:[]).includes(wt.Camera)||e.getVideoTracks().length>0,ds=(e,t)=>{if(e===void 0)return tt.RequestNeeded;if(e){if(!zc(e,t))return tt.RequestNeeded}else return tt.TryAgain;return tt.Ready},fs={avStream:null,currentPage:null,mediaRecordingUids:null,nextQuestion:()=>{},passthroughData:void 0,recordingMediaTypes:void 0,screenPermissionRequested:!1,type:void 0},Ae=Yo(e=>({...fs,reset:()=>{e(fs)},updatePage:t=>{e(t)}}));function mi({currentPage:e,pages:t}){const{avStream:n,recordingMediaTypes:r,updatePage:i}=Ae.getState(),{recorderEventEmitter:o}=G.getState();o.emit(re.AvPermission,{[F.PermissionDescriptors]:e.permissionDescriptors,[F.StreamReadyCallback]:(a,s)=>{if(n===a)return;let l=e;if(a&&!e.permissionDescriptors.includes(wt.Camera)){const c=t.indexOf(e),u=s!=null&&s.active?c+2:c+1;(s==null?void 0:s.active)&&r&&o.emit(re.BeginRecording,{[F.RecordingMediaTypes]:r,[F.StartRecordingCallback]:d=>i({mediaRecordingUids:d})}),l=t[u]}i({currentPage:l,avStream:a})}})}function qc({pages:e,userId:t,responseGroupUid:n,surveyId:r,questionId:i,next:o}){const{updatePage:a}=Ae.getState(),{eventEmitFn:s,recorderEventEmitter:l}=G.getState(),c={questionId:i,surveyId:r,visitorId:t,responseGroupUid:n};let u=0;l.emit(Te.RecordedTaskPermissionScreen),s(Te.RecordedTaskPermissionScreen),l.emit(re.PermissionStatus,{[F.PermissionStatusCallback]:(f,v,p,h)=>{const g=e[u],{type:_}=g,b=[be.Screen];if(Qn(g)){const{permissionDescriptors:x}=g,w=x==null?void 0:x.includes(wt.Microphone),m=x==null?void 0:x.includes(wt.Camera);w&&b.push(be.Audio),m&&b.push(be.Video);const C=(f==null?void 0:f.active)&&!m,S=(f==null?void 0:f.active)&&v;(C||S)&&u++}cs(e[u])&&p&&(u++,l.emit(re.BeginRecording,{[F.RecordingMediaTypes]:b,[F.StartRecordingCallback]:x=>a({mediaRecordingUids:x})})),a({currentPage:e[u],avStream:f,screenPermissionRequested:p,nextQuestion:o,type:_,passthroughData:c,recordingMediaTypes:b,captureStream:h})}});const d=e[u];return d.type===ve.AvPermission&&mi({currentPage:d,pages:e}),d}function gi({status:e}){const{nextQuestion:t,passthroughData:n,mediaRecordingUids:r,reset:i}=Ae.getState(),{recorderEventEmitter:o,handleUploadUpdate:a,index:s}=G.getState(),l={value:{taskStatus:e},type:T.RecordedTask,questionId:(n==null?void 0:n.questionId)||1};!n||o.emit(re.FinishTask,{[F.BeginCallback]:c=>{a({mediaRecordingUid:c,isSubmitted:!0,progressPct:0,isComplete:!1})},[F.ProgressCallback]:(c,u)=>{a({mediaRecordingUid:c,progressPct:u.detail,isSubmitted:!1,isComplete:!1})},[F.UploadCallback]:c=>{c&&a({mediaRecordingUid:c,isComplete:!0,isSubmitted:!0,progressPct:100})},[F.PassthroughData]:n,[F.CurrentIndex]:s,[F.TaskResponse]:l,[F.TaskCompleteCallback]:c=>{l.value.taskDurationMillisecond=c,r&&(l.value.mediaRecordingUids=r),i(),t(l)}})}function yi({pages:e,setIsRequestingPermission:t}){const{recorderEventEmitter:n,eventEmitFn:r}=G.getState(),{updatePage:i,currentPage:o,recordingMediaTypes:a,screenPermissionRequested:s}=Ae.getState();if(!o)return;const l=e.indexOf(o);switch(o.type){case ve.AvPermission:{const c=s?l+2:l+1;s&&a&&n.emit(re.BeginRecording,{[F.RecordingMediaTypes]:a,[F.StartRecordingCallback]:u=>{i({mediaRecordingUids:u})}}),i({currentPage:e[c]});return}case ve.ScreenPermission:n.emit(re.ScreenPermission,{[F.ScreenPermissionRequested]:t,[F.StreamReadyCallback]:(c,u)=>{const d=u?e[l+1]:o;u&&a&&n.emit(re.BeginRecording,{[F.RecordingMediaTypes]:a,[F.StartRecordingCallback]:f=>{i({captureStream:u,mediaRecordingUids:f})}}),i({currentPage:d,screenPermissionRequested:!0,captureStream:u})}});return;case ve.StartTask:r(Te.RecordedTaskStart),n.emit(Te.RecordedTaskStart),n.emit(re.StartTask),i({currentPage:e[l+1],screenPermissionRequested:!0});return;case ve.CompleteTask:return}}const ps="ul-permission-graphics-container",hs="ul-permission-body",vs=$([ps,"ul_recorded-task-inset-spacing"]),Xn=$(["ul-horizontal-button-container","ul-horizontal-button-container-left"]),ms=({richTextBody:e})=>y("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:e},id:"ul-task-detail-container"}),Jn=({required:e,skipButtonText:t,bottom:n=!1})=>e?null:y(pe,{className:$([n&&"ul-skip-button-below",O.InactiveButton]),onClick:gi.bind(null,{status:me.Abandoned}),children:t||"Skip"}),_i=e=>{const{avStream:t,captureStream:n,recordingMediaTypes:r,updatePage:i}=Ae.getState(),o=(r==null?void 0:r.includes(be.Audio))||(r==null?void 0:r.includes(be.Video));ge(()=>{const a=setInterval(()=>{o&&t&&!t.active?i({avStream:null,currentPage:e[0]}):(!n||!n.active)&&i({captureStream:void 0,currentPage:e[o?1:0]})},1e3);return()=>clearInterval(a)},[t,n,o,e,r,i])},Wc=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:i,taskDetail:o}=e;return _i(t),y("div",{className:"ul-task-page",children:[y(ms,{richTextBody:o}),y("div",{className:Xn,children:[y(pe,{onClick:yi.bind(null,{pages:t}),children:r}),y(Jn,{required:n,skipButtonText:i})]})]},"start-task")},Gc=({content:e,pages:t,properties:n})=>{const{buttonText:r,skipButtonText:i}=e;_i(t);const a=y(et,{properties:n,defaultBody:()=>y("div",{className:Xn,children:[y(pe,{className:"ul-complete-task-button",onClick:gi.bind(null,{status:me.Completed}),children:r}),y(pe,{className:$([O.InactiveButton]),onClick:gi.bind(null,{status:me.GivenUp}),children:i})]})});return y("div",{className:"ul-task-page",children:[y(ms,{richTextBody:e.taskDetail}),a]},"complete-task")},Zc=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:i}=e,[o]=G(l=>[l.tabTitle]),[a,s]=ne(!1);return y("div",{children:[y("div",{className:vs,children:[y("p",{style:{marginTop:"auto"},children:e.selectTabText}),y("div",{className:"ul-select-tab-container",children:y("p",{className:hs,children:o})})]}),y("div",{className:n?"":Xn,children:[y(pe,{disabled:a,onClick:yi.bind(null,{pages:t,setIsRequestingPermission:s}),children:r}),y(Jn,{required:n,skipButtonText:i})]})]})},Yc=({content:e})=>y("div",{className:$([ps,"ul_permission_svg_container","ul_recorded-task-inset-spacing","ul-center-horizontally"]),dangerouslySetInnerHTML:{__html:e.svg}},"ul-permission-request-graphic"),Qc=({content:e,pages:t,required:n})=>{const{permissionDeniedHeadline:r,permissionDeniedBody:i,skipButtonText:o,tryAgainButtonText:a}=e,s=Qn(t[0])?t[0]:null;return ge(()=>{const l=setInterval(()=>{s!==null&&mi({currentPage:s,pages:t})},1e3);return()=>clearInterval(l)},[s,t]),s?y("div",{children:[y("div",{className:vs,children:y("p",{className:"ul-av-permission-denied-paragraph",children:[y("span",{className:"ul-av-permission-denied-headline",children:r}),y("span",{className:hs,children:i})]})}),y("div",{className:Xn,children:[y(pe,{onClick:mi.bind(null,{currentPage:s,pages:t}),children:a}),y(Jn,{required:n,skipButtonText:o})]})]}):null},Xc=({stream:e})=>y("video",{autoPlay:!0,className:$(["ul_recorded-task-inset-spacing"]),id:"ul-record-task-video-preview",muted:!0,ref:t=>{t&&(t.srcObject=e||null)}}),Jc=({content:e,pages:t,required:n})=>{const{skipButtonText:r}=e,{avStream:i}=Ae.getState();return _i(t),y("div",{children:[y(Xc,{stream:i}),y("div",{className:"ul-vertical-button-container-center",children:[y(pe,{onClick:yi.bind(null,{pages:t}),children:e.buttonText}),y(Jn,{bottom:!0,required:n,skipButtonText:r})]})]})},ed=({properties:e})=>{const{pages:t,required:n}=e,{avStream:r,currentPage:i}=Ae.getState();if(i===void 0)return null;switch(i==null?void 0:i.type){case ve.AvPermission:{const o=ds(r,i);return o===tt.RequestNeeded?y(Yc,{content:i}):o===tt.TryAgain?y(Qc,{content:i,pages:t,required:n}):y(Jc,{content:i,pages:t,required:n})}case ve.ScreenPermission:return y(Zc,{content:i,pages:t,required:n});case ve.StartTask:return y(Wc,{content:i,pages:t,required:n});case ve.CompleteTask:return y(Gc,{content:i,pages:t,properties:e});default:return null}},td=({className:e,properties:t,next:n,questionId:r})=>{const i=G(),{surveyId:o,responseGroupUid:a,userId:s}=i,l=Ae(),{screenPermissionRequested:c}=l,u=Ae(h=>h.avStream);let d=Ae(h=>h.currentPage);d||(d=qc({questionId:r,surveyId:o,next:h=>{n(h)},pages:t.pages,responseGroupUid:a,userId:s}));let f=d.headline,v=d.captionText;const p=ds(u,d);return cs(d)&&c&&(f=d.permissionDeniedHeadline,v=d.permissionDeniedCaptionText),Qn(d)&&p===tt.Ready&&(f=d.permissionGrantedHeadline,v=d.permissionGrantedCaptionText),y("div",{className:$([e,"ul-center-horizontally",O.FadeInTransition]),children:[y(Re,{message:f,properties:{captionText:v}}),y(ed,{properties:t})]})},nd={"{{user_id}}":"externalUserId","{{email}}":"email"},rd=(e=void 0,t={})=>{if(!e)return e;let n=e;const r=[];for(const[l,c]of Object.entries(nd))if(n.toLowerCase().includes(l))if(t[c]){const u=new RegExp(l,"gi");n=n.replace(u,t[c])}else r.push(l);if(r.length===0||!n.includes("?"))return n;const i=n.slice(0,n.indexOf("?")),a=n.slice(n.indexOf("?")+1).split("&").map(l=>l.split("=")).filter(l=>!r.includes(l[1]));if(a.length===0)return i;const s=a.map(l=>l.join("=")).join("&");return`${i}?${s}`},id=({className:e,message:t,next:n,properties:r,questionId:i,type:o})=>{const{visitorAttributes:a}=G(d=>({visitorAttributes:d.visitorAttributes})),s=(d,f=!1)=>{n({value:f?{skipped:!0}:void 0,questionId:i,type:o})},l=d=>{(d.key==="Enter"||d.key===" ")&&n({value:void 0,questionId:i,type:o})},c=()=>{const d=rd(r&&r.buttonUrl,a);return y("div",{className:"ul-card-button-group",children:[y("a",{className:"ul-card-text__button ul-card__text-url-prompt-button",href:d,id:"ul-card-text__button",onClick:s,onKeyPress:l,rel:"noreferrer",role:d?"link":"button",tabIndex:0,target:"_blank",children:Mt(r)}),r.required===!1&&y("button",{className:O.SkipButton,onClick:f=>s(f,!0),children:vi(r)})]})},u=(d,f)=>d?y("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:d},id:"ul-card__text-url-body-container"}):y("div",{className:"ul-rich-text-body",id:"ul-card__text-url-body-container",children:(f?f.split(/\n\s*\n/g):[]).map((v,p)=>y("p",{children:v},p))});return y("div",{className:$([e,"ul-card__text-url-prompt",O.FadeInTransition]),children:[y(Re,{message:t}),u(r&&r.richTextBody,r&&r.body),y(et,{defaultBody:c,properties:r})]},i)},od=({className:e,questionId:t})=>{const{border:n,destroy:r,endCard:i,forceBrandedLogo:o}=G(l=>({border:l.border,destroy:l.destroy,endCard:l.endCard,forceBrandedLogo:l.forceBrandedLogo}));ge(()=>{setTimeout(()=>{r(_t)},o?4e3:2e3)},[r,o]);const a=i&&i.subheader?y("p",{className:O.Caption,children:i.subheader}):null,s=i&&i.headline?i.headline:"";return y("div",{className:$([e,"ul-card--thanks",O.FadeInTransition]),children:y("div",{children:y("div",{className:"ul-card--thanks-content",children:[y("div",{className:"ul-thanks-check",children:y("svg",{"aria-labelledby":"title",fill:"none",height:"99",viewBox:"0 0 81 99",width:"81",xmlns:"http://www.w3.org/2000/svg",children:[y("path",{clipRule:"evenodd",d:"M40.5 77C60.9345 77 77.5 60.4345 77.5 40C77.5 19.5655 60.9345 3 40.5 3C20.0655 3 3.5 19.5655 3.5 40C3.5 60.4345 20.0655 77 40.5 77ZM80.5 40C80.5 62.0914 62.5914 80 40.5 80C18.4086 80 0.5 62.0914 0.5 40C0.5 17.9086 18.4086 0 40.5 0C62.5914 0 80.5 17.9086 80.5 40Z",fill:n,fillRule:"evenodd"}),y("path",{clipRule:"evenodd",d:"M55.025 22.9046C55.6299 23.4705 55.6616 24.4198 55.0956 25.0247C54.8724 25.2634 54.6109 25.5285 54.3157 25.8277C52.2547 27.9168 48.5549 31.667 44.8135 39.6658C43.2818 42.9406 42.0864 45.8386 41.0823 48.2729C40.6539 49.3116 40.2603 50.2659 39.8902 51.129C39.287 52.5359 38.7248 53.7508 38.1744 54.625C37.8997 55.0613 37.5806 55.4905 37.2017 55.8245C36.8201 56.1607 36.2613 56.5 35.5457 56.5C34.6742 56.5 34.0892 55.9692 33.7774 55.6083C33.4502 55.2296 33.1752 54.7511 32.9396 54.301C32.7305 53.9013 32.5088 53.4367 32.2797 52.9565C32.2429 52.8794 32.2059 52.8019 32.1688 52.7243C31.8942 52.1499 31.5959 51.534 31.2537 50.8868C29.8886 48.305 27.8539 45.2878 24.2343 43.1382C23.522 42.7152 23.2875 41.7949 23.7105 41.0826C24.1335 40.3703 25.0539 40.1358 25.7662 40.5588C30.0556 43.1062 32.4149 46.6647 33.9058 49.4845C34.2776 50.1876 34.5973 50.8487 34.8753 51.4302C34.9147 51.5124 34.9529 51.5926 34.9902 51.6707C35.2222 52.1567 35.4164 52.5637 35.5978 52.9102C35.6151 52.9434 35.6321 52.9754 35.6485 53.0061C36.0565 52.3531 36.5341 51.3434 37.133 49.9468C37.4781 49.1418 37.8572 48.2229 38.2761 47.2074C39.2886 44.7532 40.5339 41.7347 42.0961 38.3948C46.0591 29.9221 50.0641 25.8648 52.1535 23.7482C52.4423 23.4556 52.6944 23.2002 52.9048 22.9753C53.4708 22.3703 54.42 22.3387 55.025 22.9046ZM35.1994 53.5892C35.1994 53.5892 35.2 53.5888 35.2012 53.5879C35.2 53.5889 35.1994 53.5893 35.1994 53.5892ZM36.0666 53.6682C36.0732 53.674 36.0765 53.6775 36.0765 53.6777C36.0765 53.678 36.0732 53.6751 36.0666 53.6682Z",fill:n,fillRule:"evenodd"}),y("path",{d:"M69.5 97C69.5 98.1046 56.2924 99 40 99C23.7076 99 10.5 98.1046 10.5 97C10.5 95.8954 23.7076 95 40 95C56.2924 95 69.5 95.8954 69.5 97Z",fill:"black",fillOpacity:"0.2"})]})}),y(Re,{message:s}),a]})})},t)},vt="https://cdn.sprig.com",N={document:void 0,videojs:void 0},ad=`/* progress control styles */ + `,ht=e=>(e==null?void 0:e.buttonText)||"Next",fo=e=>(e==null?void 0:e.skipButtonText)||"Skip",vu=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{useMobileStyling:s,border:a}=z(C=>({useMobileStyling:C.useMobileStyling,border:C.border})),[l,u]=X(!1),[d,c]=X(""),[h,p]=X(!1),y=r==null?void 0:r.collectName,f=(r==null?void 0:r.nameLabelText)||"Full Name",_=(r==null?void 0:r.consentText)||"I agree to the stated conditions",m=(r==null?void 0:r.submitButtonText)||"Submit",v=!!d.trim(),w=l&&(!y||v),k=(C,A=!1)=>{C.preventDefault(),C.stopPropagation();let O=null;if(!A){if(!w){p(!0);return}O={submitted:!0},y&&(O.name=d)}n({value:O,questionId:o,type:i})},b=C=>{C.preventDefault(),C.stopPropagation(),c(C.currentTarget.value)},x=C=>{C.currentTarget.style.borderColor=h&&!v?Ut:a},S=C=>{C.currentTarget.style.borderColor=h&&!v?Ut:fr},E=()=>g("div",{children:[g(po,{allowTextEntry:!1,border:a,error:h&&!l,isRadio:!1,isSelected:l,label:_,onUserInputChanged:({selected:C})=>{C!==l&&u(!l)},useMobileStyling:s}),y&&g("input",{"aria-label":f,"aria-placeholder":f,className:B(Q(j.ConsentLegalNameInput,s)),"data-gramm":"false",maxLength:250,name:"name",onBlur:S,onFocus:x,onInput:b,placeholder:f,style:h&&!v?{borderColor:Ut}:{},tabIndex:0,value:d}),g("div",{className:"ul-card__button-wrapper ul-card-vertical__button-wrapper",children:[g(ce,{className:w?"":j.ButtonDisabled,onClick:k,children:m}),r.required===!1&&g("button",{className:j.SkipButton,onClick:C=>k(C,!0),children:fo(r)})]})]});return g("div",{className:B([e,"ul-card__consent-legal",j.FadeInTransition]),children:[g(xe,{message:t}),g("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:r!=null&&r.richTextBody?{__html:r.richTextBody}:void 0,id:"ul-card__consent-legal-body-container"}),g(Ue,{properties:r,defaultBody:E,embeddedType:"pdf"})]},o)},yu=({activeValue:e,border:t,icon:n,isPressed:r,onSubmit:o,range:i,scaleLabelType:s,setActiveValue:a,setIsPressed:l,useMobileStyling:u,value:d})=>{const c=`option-${d}`,h=s===dt.Number,p=s===dt.Star,y=h&&d===e,[f,_]=d<=e&&p||d===e?r?[t,1]:[t,.3]:["",1],m=()=>{switch(s){case dt.Star:return B([...Q(j.LikertStar,u),...Q(`${j.LikertStar}-${d}`,u)]);case dt.Smiley:return B([...Q(j.LikertSmiley,u),...Q(`${j.LikertSmiley}-${d}`,u)]);default:return B(d===i?[...Q(j.LikertNumber,u),...Q(`${j.LikertNumber}-${d}`,u),...Q("likert-last-option",u)]:[...Q(j.LikertNumber,u),...Q(`${j.LikertNumber}-${d}`,u)])}},v=()=>{a(-1),l(!1)};return g("div",{"aria-label":h?void 0:String(d),className:m(),dangerouslySetInnerHTML:{__html:n},id:c,onClick:()=>o(),onPointerDown:()=>l(!0),onPointerEnter:()=>a(d),onPointerLeave:v,role:"radio",style:{color:h?"":f,borderColor:y?f:"",fillOpacity:y?"":_,zIndex:y?3:"auto"},tabIndex:0})},_u=({className:e,labels:t,message:n,next:r,properties:o,questionId:i,type:s})=>{const{border:a,useMobileStyling:l}=z(E=>({border:E.border,useMobileStyling:E.useMobileStyling})),[u,d]=X(-1),[c,h]=X(!1),p=t&&t.left,y=t&&t.right;let f;const{range:_,scaleLabelType:m,ratingIcons:v}=o;_&&(f=Number(_));const w=f||5,k=E=>{var C,A;switch(m){case dt.Star:return(C=v[0])==null?void 0:C.svg;case dt.Smiley:return(A=v[E])==null?void 0:A.svg;default:return String(E+1)}},b=[...Array(w)].map((E,C)=>{const A=C+1;return g(yu,{activeValue:u,border:a,icon:k(C),isPressed:c,onSubmit:()=>r({value:A,questionId:i,type:s}),range:w,scaleLabelType:m,setActiveValue:d,setIsPressed:h,useMobileStyling:l,value:A},C)}),x=E=>{E.preventDefault(),E.stopPropagation(),r({value:null,questionId:i,type:s})},S=()=>g(le,{children:[g("div",{"aria-label":`Rating (1 - ${w})`,className:"ul-card--likert__numbers",role:"radiogroup",children:b}),g("div",{className:"ul-card--likert__labels",children:[g("span",{children:p}),g("span",{children:y})]}),!o.required&&g("div",{className:"ul-vertical-centered-container",children:g(ce,{onClick:x,children:ht(o)})})]});return g("form",{className:B([e,"ul-card--likert",j.FadeInTransition]),children:[g(xe,{message:n,properties:o}),g(Ue,{properties:o,defaultBody:S})]},i)},bu=({className:e,message:t,next:n,options:r,properties:o,questionId:i,type:s})=>{const{border:a,useMobileStyling:l}=z(b=>({border:b.border,useMobileStyling:b.useMobileStyling})),u=o.matrixColumn,d=r.length,c=u.length,h=o.required,p=b=>{b.preventDefault(),b.stopPropagation(),n({value:f,questionId:i,type:s})},y=r.reduce((b,x)=>(b[x.id]=null,b),{}),[f,_]=X(y),m=(b,x)=>{_(S=>({...S,[b]:x}))},v=h&&Object.values(f).every(b=>b==null),w=r.map(b=>g(le,{children:[g("div",{"aria-label":b.label,className:"ul-matrix-row-label",children:b.label},b.label),g("div",{className:"ul-matrix-row-options",role:"radiogroup",children:u.map((x,S)=>{const E=S===c-1;return g("div",{className:B("ul-matrix-option-wrapper",E&&"ul-matrix-last-option"),children:g(po,{allowTextEntry:!1,ariaLabel:`${b.label}-${x.label}`,border:a,choiceStyle:{background:"transparent",border:"none",marginBottom:"0",padding:"0"},error:!1,id:`${b.id}-${x.value}`,isRadio:!0,isSelected:f[b.id]===x.value,onUserInputChanged:()=>m(b.id,x.value),useMobileStyling:l})},x.value)})})]})),k=()=>g("div",{children:[g("div",{className:"ul-card--matrix_container",style:`--maxWidth: ${Ji()-74}px`,children:g("div",{className:"ul-card--matrix_grid",style:`--numColumns: ${c}; --numRows: ${d+1}`,children:[g("div",{})," ",u.map(b=>g("div",{className:"ul-matrix-column-label",children:b.label},b.label)),w]})}),g("div",{className:"ul-card__button-wrapper",children:g(ce,{disabled:v,children:ht(o)})})]});return g("form",{className:B([e,j.FadeInTransition,"ul-card__matrix"]),id:"text-form",onSubmit:p,children:[g(xe,{message:t,properties:o}),g(Ue,{properties:o,defaultBody:k})]},i)},ia=({className:e,message:t,onSubmit:n,options:r=[],properties:o,questionId:i,type:s})=>{const{border:a,useMobileStyling:l}=z(x=>({border:x.border,useMobileStyling:x.useMobileStyling})),u=r.reduce((x,S)=>(x[S.id]={isSelected:!1},x),{}),[d,c]=X(u),h=s===P.MultipleChoice,p=o.required,y=r.find(x=>{var S;return(S=x.optionProperties)==null?void 0:S.noneOfTheAbove}),f=Object.entries(d).some(([x,S])=>{var A;const E=r.find(O=>`${O.id}`===x),C=S.userText===void 0||S.userText.trim()==="";return((A=E==null?void 0:E.optionProperties)==null?void 0:A.allowsTextEntry)&&C&&S.isSelected}),_=Object.values(d).some(x=>x.isSelected),m=f||p&&!_,v=r.map(({id:x,label:S,value:E,optionProperties:C})=>{var L,F;const A=`${x}`,{allowsTextEntry:O,noneOfTheAbove:R}={allowsTextEntry:!1,noneOfTheAbove:!1,...C};return g(po,{allowTextEntry:O,border:a,error:!1,id:A,isRadio:h,noneOfTheAbove:R,isSelected:!!((L=d[A])!=null&&L.isSelected),label:S,onUserInputChanged:D=>k(D.id,D.selected,D.userText,D.noneOfTheAbove),promptText:"Please specify",text:(F=d[x])==null?void 0:F.userText,useMobileStyling:l,value:E},A)}),w=x=>{x.preventDefault(),x.stopPropagation(),n(d)},k=(x,S,E,C)=>{const A=Object.assign({},d);if((h||C)&&S)for(const O of Object.values(A))O.isSelected=!1,delete O.userText;else y&&!C&&d[y.id].isSelected&&(A[y.id].isSelected=!1);A[x]={isSelected:S,userText:E},c(A)},b=()=>g("div",{children:[g("div",{className:B(Q(j.ChoiceGroup,l)),role:h?"radiogroup":"group",children:v}),g("div",{className:"ul-card__button-wrapper",children:g(ce,{disabled:m,onClick:w,children:ht(o)})})]});return g("form",{className:B([e,"ul-card--multiple",j.FadeInTransition]),id:"text-form",onSubmit:w,children:[g(xe,{message:t,properties:o}),g(Ue,{properties:o,defaultBody:b})]},i)},xu=e=>{const{questionId:t,type:n,next:r,options:o}=e;return g(ia,{...e,onSubmit:s=>{const a=Object.entries(s).find(([,h])=>h.isSelected)||[void 0,void 0],[l,u]=a,d=o.find(h=>`${h.id}`===l),c=u!=null&&u.userText?{[l]:{userText:u.userText}}:null;r({value:d&&l?{[l]:d.value}:{},secondaryValue:c,questionId:t,type:n})}})},wu=e=>{const{questionId:t,type:n,next:r}=e;return g(ia,{...e,onSubmit:i=>{const s={},a=Object.entries(i).reduce((u,[d,c])=>(u[d]=c.isSelected,u),s),l=Object.entries(i).reduce((u,[d,c])=>{if(!c.userText)return u;const h=u||{};return h[d]={userText:c.userText},h},null);r({value:a,secondaryValue:l,questionId:t,type:n})}})},ku=({className:e,props:{labels:t,message:n,properties:r},next:o,questionId:i,type:s})=>{const{border:a,useMobileStyling:l}=z(y=>({border:y.border,useMobileStyling:y.useMobileStyling})),u=t&&t.left,d=t&&t.right,c=[...Array(11)].map((y,f)=>g("div",{className:B([...Q(j.NPSNumber,l),...Q(`${j.NPSNumber}-${f}`,l)]),id:`option-${f}`,onClick:()=>o({value:f,questionId:i,type:s}),onKeyPress:_=>{_.preventDefault(),(_.key==="Enter"||_.key===" ")&&o({value:f,questionId:i,type:s})},onPointerDown:_=>{_.currentTarget.style.zIndex="2",_.currentTarget.style.borderColor=a},onPointerLeave:_=>{_.currentTarget.style.zIndex="auto",_.currentTarget.style.borderColor=fr},role:"radio",tabIndex:0,children:f},f)),h=y=>{y.preventDefault(),y.stopPropagation(),o({value:null,questionId:i,type:s})},p=()=>g("div",{children:[g("div",{className:"ul-card--nps__numbers",children:c}),g("div",{className:"ul-card--nps__labels",children:[g("span",{children:u}),g("span",{children:d})]}),!r.required&&g("div",{className:"ul-vertical-centered-container",children:g(ce,{onClick:h,children:ht(r)})})]});return g("form",{className:B([e,"ul-card--nps",j.FadeInTransition]),children:[g(xe,{message:n,properties:r}),g(Ue,{properties:r,defaultBody:p})]},i)},Cu=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{border:s,useMobileStyling:a,update:l}=z(b=>({border:b.border,useMobileStyling:b.useMobileStyling,update:b.update})),[u,d]=X(""),c=He(null),h=u.trim(),p=r.required===!0&&!h,y=na(c,()=>l()),f=b=>{y(),b.preventDefault(),b.stopPropagation(),d(b.currentTarget.value)},_=b=>{b.preventDefault(),b.stopPropagation(),n({value:u,questionId:o,type:i})},m=r&&r.openTextPlaceholder?r.openTextPlaceholder:"",v=b=>{b.currentTarget.style.borderColor=s},w=b=>{b.currentTarget.style.borderColor=fr},k=()=>g("div",{className:"ul-card-text",children:[g("div",{className:"ul-card-text__container",children:g("textarea",{"aria-label":m,"aria-labelledby":j.QuestionHeader,"aria-multiline":"true","aria-placeholder":m,className:B(Q(j.OpenTextInput,a)),"data-gramm":"false",maxLength:5e3,name:"text",onBlur:w,onChange:f,onFocus:v,placeholder:m,ref:c,role:"textbox",tabIndex:0})}),g(ce,{disabled:p,onClick:_,style:{backgroundColor:p?"":s},children:ht(r)})]});return g("form",{className:B([e,"ul-card--text",j.FadeInTransition]),id:"text-form",children:[g(xe,{message:t,properties:r}),g(Ue,{defaultBody:k,properties:r})]},o)};var Ye=(e=>(e[e.RequestNeeded=1]="RequestNeeded",e[e.TryAgain=2]="TryAgain",e[e.Ready=3]="Ready",e))(Ye||{});const Gn=e=>e.type===me.AvPermission,sa=e=>e.type===me.ScreenPermission,Su=(e,t)=>!(Gn(t)?t.permissionDescriptors:[]).includes(At.Camera)||e.getVideoTracks().length>0,aa=(e,t)=>{if(e===void 0)return Ye.RequestNeeded;if(e){if(!Su(e,t))return Ye.RequestNeeded}else return Ye.TryAgain;return Ye.Ready},la={avStream:null,currentPage:null,mediaRecordingUids:null,nextQuestion:()=>{},passthroughData:void 0,recordingMediaTypes:void 0,screenPermissionRequested:!1,type:void 0},Te=qi(e=>({...la,reset:()=>{e(la)},updatePage:t=>{e(t)}}));function mo({currentPage:e,pages:t}){const{avStream:n,recordingMediaTypes:r,updatePage:o}=Te.getState(),{recorderEventEmitter:i}=z.getState();i.emit(re.AvPermission,{[V.PermissionDescriptors]:e.permissionDescriptors,[V.StreamReadyCallback]:(s,a)=>{if(n===s)return;let l=e;if(s&&!e.permissionDescriptors.includes(At.Camera)){const u=t.indexOf(e),d=a!=null&&a.active?u+2:u+1;a!=null&&a.active&&r&&i.emit(re.BeginRecording,{[V.RecordingMediaTypes]:r,[V.StartRecordingCallback]:c=>o({mediaRecordingUids:c})}),l=t[d]}o({currentPage:l,avStream:s})}})}function Eu({pages:e,userId:t,responseGroupUid:n,surveyId:r,questionId:o,next:i}){const{updatePage:s}=Te.getState(),{eventEmitFn:a,recorderEventEmitter:l}=z.getState(),u={questionId:o,surveyId:r,visitorId:t,responseGroupUid:n};let d=0;l.emit(Se.RecordedTaskPermissionScreen),a(Se.RecordedTaskPermissionScreen),l.emit(re.PermissionStatus,{[V.PermissionStatusCallback]:(h,p,y,f)=>{const _=e[d],{type:m}=_,v=[ye.Screen];if(Gn(_)){const{permissionDescriptors:w}=_,k=w==null?void 0:w.includes(At.Microphone),b=w==null?void 0:w.includes(At.Camera);k&&v.push(ye.Audio),b&&v.push(ye.Video);const x=(h==null?void 0:h.active)&&!b,S=(h==null?void 0:h.active)&&p;(x||S)&&d++}sa(e[d])&&y&&(d++,l.emit(re.BeginRecording,{[V.RecordingMediaTypes]:v,[V.StartRecordingCallback]:w=>s({mediaRecordingUids:w})})),s({currentPage:e[d],avStream:h,screenPermissionRequested:y,nextQuestion:i,type:m,passthroughData:u,recordingMediaTypes:v,captureStream:f})}});const c=e[d];return c.type===me.AvPermission&&mo({currentPage:c,pages:e}),c}function go({status:e}){const{nextQuestion:t,passthroughData:n,mediaRecordingUids:r,reset:o}=Te.getState(),{recorderEventEmitter:i,handleUploadUpdate:s,index:a}=z.getState(),l={value:{taskStatus:e},type:P.RecordedTask,questionId:(n==null?void 0:n.questionId)||1};n&&i.emit(re.FinishTask,{[V.BeginCallback]:u=>{s({mediaRecordingUid:u,isSubmitted:!0,progressPct:0,isComplete:!1})},[V.ProgressCallback]:(u,d)=>{s({mediaRecordingUid:u,progressPct:d.detail,isSubmitted:!1,isComplete:!1})},[V.UploadCallback]:u=>{u&&s({mediaRecordingUid:u,isComplete:!0,isSubmitted:!0,progressPct:100})},[V.PassthroughData]:n,[V.CurrentIndex]:a,[V.TaskResponse]:l,[V.TaskCompleteCallback]:u=>{l.value.taskDurationMillisecond=u,r&&(l.value.mediaRecordingUids=r),o(),t(l)}})}function vo({pages:e,setIsRequestingPermission:t}){const{recorderEventEmitter:n,eventEmitFn:r}=z.getState(),{updatePage:o,currentPage:i,recordingMediaTypes:s,screenPermissionRequested:a}=Te.getState();if(!i)return;const l=e.indexOf(i);switch(i.type){case me.AvPermission:{const u=a?l+2:l+1;a&&s&&n.emit(re.BeginRecording,{[V.RecordingMediaTypes]:s,[V.StartRecordingCallback]:d=>{o({mediaRecordingUids:d})}}),o({currentPage:e[u]});return}case me.ScreenPermission:n.emit(re.ScreenPermission,{[V.ScreenPermissionRequested]:t,[V.StreamReadyCallback]:(u,d)=>{const c=d?e[l+1]:i;d&&s&&n.emit(re.BeginRecording,{[V.RecordingMediaTypes]:s,[V.StartRecordingCallback]:h=>{o({captureStream:d,mediaRecordingUids:h})}}),o({currentPage:c,screenPermissionRequested:!0,captureStream:d})}});return;case me.StartTask:r(Se.RecordedTaskStart),n.emit(Se.RecordedTaskStart),n.emit(re.StartTask),o({currentPage:e[l+1],screenPermissionRequested:!0});return;case me.CompleteTask:return}}const ca="ul-permission-graphics-container",ua="ul-permission-body",da=B([ca,"ul_recorded-task-inset-spacing"]),Zn=B(["ul-horizontal-button-container","ul-horizontal-button-container-left"]),ha=({richTextBody:e})=>g("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:e},id:"ul-task-detail-container"}),Yn=({required:e,skipButtonText:t,bottom:n=!1})=>e?null:g(ce,{className:B([n&&"ul-skip-button-below",j.InactiveButton]),onClick:go.bind(null,{status:fe.Abandoned}),children:t||"Skip"}),yo=e=>{const{avStream:t,captureStream:n,recordingMediaTypes:r,updatePage:o}=Te.getState(),i=(r==null?void 0:r.includes(ye.Audio))||(r==null?void 0:r.includes(ye.Video));pe(()=>{const s=setInterval(()=>{i&&t&&!t.active?o({avStream:null,currentPage:e[0]}):(!n||!n.active)&&o({captureStream:void 0,currentPage:e[i?1:0]})},1e3);return()=>clearInterval(s)},[t,n,i,e,r,o])},Pu=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:o,taskDetail:i}=e;return yo(t),g("div",{className:"ul-task-page",children:[g(ha,{richTextBody:i}),g("div",{className:Zn,children:[g(ce,{onClick:vo.bind(null,{pages:t}),children:r}),g(Yn,{required:n,skipButtonText:o})]})]},"start-task")},Tu=({content:e,pages:t,properties:n})=>{const{buttonText:r,skipButtonText:o}=e;yo(t);const s=g(Ue,{properties:n,defaultBody:()=>g("div",{className:Zn,children:[g(ce,{className:"ul-complete-task-button",onClick:go.bind(null,{status:fe.Completed}),children:r}),g(ce,{className:B([j.InactiveButton]),onClick:go.bind(null,{status:fe.GivenUp}),children:o})]})});return g("div",{className:"ul-task-page",children:[g(ha,{richTextBody:e.taskDetail}),s]},"complete-task")},Iu=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:o}=e,[i]=z(l=>[l.tabTitle]),[s,a]=X(!1);return g("div",{children:[g("div",{className:da,children:[g("p",{style:{marginTop:"auto"},children:e.selectTabText}),g("div",{className:"ul-select-tab-container",children:g("p",{className:ua,children:i})})]}),g("div",{className:n?"":Zn,children:[g(ce,{disabled:s,onClick:vo.bind(null,{pages:t,setIsRequestingPermission:a}),children:r}),g(Yn,{required:n,skipButtonText:o})]})]})},ju=({content:e})=>g("div",{className:B([ca,"ul_permission_svg_container","ul_recorded-task-inset-spacing","ul-center-horizontally"]),dangerouslySetInnerHTML:{__html:e.svg}},"ul-permission-request-graphic"),Ou=({content:e,pages:t,required:n})=>{const{permissionDeniedHeadline:r,permissionDeniedBody:o,skipButtonText:i,tryAgainButtonText:s}=e,a=Gn(t[0])?t[0]:null;return pe(()=>{const l=setInterval(()=>{a!==null&&mo({currentPage:a,pages:t})},1e3);return()=>clearInterval(l)},[a,t]),a?g("div",{children:[g("div",{className:da,children:g("p",{className:"ul-av-permission-denied-paragraph",children:[g("span",{className:"ul-av-permission-denied-headline",children:r}),g("span",{className:ua,children:o})]})}),g("div",{className:Zn,children:[g(ce,{onClick:mo.bind(null,{currentPage:a,pages:t}),children:s}),g(Yn,{required:n,skipButtonText:i})]})]}):null},Ru=({stream:e})=>g("video",{autoPlay:!0,className:B(["ul_recorded-task-inset-spacing"]),id:"ul-record-task-video-preview",muted:!0,ref:t=>{t&&(t.srcObject=e||null)}}),Du=({content:e,pages:t,required:n})=>{const{skipButtonText:r}=e,{avStream:o}=Te.getState();return yo(t),g("div",{children:[g(Ru,{stream:o}),g("div",{className:"ul-vertical-button-container-center",children:[g(ce,{onClick:vo.bind(null,{pages:t}),children:e.buttonText}),g(Yn,{bottom:!0,required:n,skipButtonText:r})]})]})},Au=({properties:e})=>{const{pages:t,required:n}=e,{avStream:r,currentPage:o}=Te.getState();if(o===void 0)return null;switch(o==null?void 0:o.type){case me.AvPermission:{const i=aa(r,o);return i===Ye.RequestNeeded?g(ju,{content:o}):i===Ye.TryAgain?g(Ou,{content:o,pages:t,required:n}):g(Du,{content:o,pages:t,required:n})}case me.ScreenPermission:return g(Iu,{content:o,pages:t,required:n});case me.StartTask:return g(Pu,{content:o,pages:t,required:n});case me.CompleteTask:return g(Tu,{content:o,pages:t,properties:e});default:return null}},Lu=({className:e,properties:t,next:n,questionId:r})=>{const o=z(),{surveyId:i,responseGroupUid:s,userId:a}=o,l=Te(),{screenPermissionRequested:u}=l,d=Te(f=>f.avStream);let c=Te(f=>f.currentPage);c||(c=Eu({questionId:r,surveyId:i,next:f=>{n(f)},pages:t.pages,responseGroupUid:s,userId:a}));let h=c.headline,p=c.captionText;const y=aa(d,c);return sa(c)&&u&&(h=c.permissionDeniedHeadline,p=c.permissionDeniedCaptionText),Gn(c)&&y===Ye.Ready&&(h=c.permissionGrantedHeadline,p=c.permissionGrantedCaptionText),g("div",{className:B([e,"ul-center-horizontally",j.FadeInTransition]),children:[g(xe,{message:h,properties:{captionText:p}}),g(Au,{properties:t})]})},Nu={"{{user_id}}":"externalUserId","{{email}}":"email"},Mu=(e=void 0,t={})=>{if(!e)return e;let n=e;const r=[];for(const[l,u]of Object.entries(Nu))if(n.toLowerCase().includes(l))if(t[u]){const d=new RegExp(l,"gi");n=n.replace(d,t[u])}else r.push(l);if(r.length===0||!n.includes("?"))return n;const o=n.slice(0,n.indexOf("?")),s=n.slice(n.indexOf("?")+1).split("&").map(l=>l.split("=")).filter(l=>!r.includes(l[1]));if(s.length===0)return o;const a=s.map(l=>l.join("=")).join("&");return`${o}?${a}`},$u=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{visitorAttributes:s}=z(c=>({visitorAttributes:c.visitorAttributes})),a=(c,h=!1)=>{n({value:h?{skipped:!0}:void 0,questionId:o,type:i})},l=c=>{(c.key==="Enter"||c.key===" ")&&n({value:void 0,questionId:o,type:i})},u=()=>{const c=Mu(r&&r.buttonUrl,s);return g("div",{className:"ul-card-button-group",children:[g("a",{className:"ul-card-text__button ul-card__text-url-prompt-button",href:c,id:"ul-card-text__button",onClick:a,onKeyPress:l,rel:"noreferrer",role:c?"link":"button",tabIndex:0,target:"_blank",children:ht(r)}),r.required===!1&&g("button",{className:j.SkipButton,onClick:h=>a(h,!0),children:fo(r)})]})},d=(c,h)=>c?g("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:c},id:"ul-card__text-url-body-container"}):g("div",{className:"ul-rich-text-body",id:"ul-card__text-url-body-container",children:(h?h.split(/\n\s*\n/g):[]).map((p,y)=>g("p",{children:p},y))});return g("div",{className:B([e,"ul-card__text-url-prompt",j.FadeInTransition]),children:[g(xe,{message:t}),d(r==null?void 0:r.richTextBody,r==null?void 0:r.body),g(Ue,{defaultBody:u,properties:r})]},o)},Bu=({className:e,questionId:t})=>{const{border:n,destroy:r,endCard:o,forceBrandedLogo:i}=z(l=>({border:l.border,destroy:l.destroy,endCard:l.endCard,forceBrandedLogo:l.forceBrandedLogo}));pe(()=>{setTimeout(()=>{r(yt)},i?4e3:2e3)},[r,i]);const s=o&&o.subheader?g("p",{className:j.Caption,children:o.subheader}):null,a=o&&o.headline?o.headline:"";return g("div",{className:B([e,"ul-card--thanks",j.FadeInTransition]),children:g("div",{children:g("div",{className:"ul-card--thanks-content",children:[g("div",{className:"ul-thanks-check",children:g("svg",{"aria-labelledby":"title",fill:"none",height:"99",viewBox:"0 0 81 99",width:"81",xmlns:"http://www.w3.org/2000/svg",children:[g("path",{clipRule:"evenodd",d:"M40.5 77C60.9345 77 77.5 60.4345 77.5 40C77.5 19.5655 60.9345 3 40.5 3C20.0655 3 3.5 19.5655 3.5 40C3.5 60.4345 20.0655 77 40.5 77ZM80.5 40C80.5 62.0914 62.5914 80 40.5 80C18.4086 80 0.5 62.0914 0.5 40C0.5 17.9086 18.4086 0 40.5 0C62.5914 0 80.5 17.9086 80.5 40Z",fill:n,fillRule:"evenodd"}),g("path",{clipRule:"evenodd",d:"M55.025 22.9046C55.6299 23.4705 55.6616 24.4198 55.0956 25.0247C54.8724 25.2634 54.6109 25.5285 54.3157 25.8277C52.2547 27.9168 48.5549 31.667 44.8135 39.6658C43.2818 42.9406 42.0864 45.8386 41.0823 48.2729C40.6539 49.3116 40.2603 50.2659 39.8902 51.129C39.287 52.5359 38.7248 53.7508 38.1744 54.625C37.8997 55.0613 37.5806 55.4905 37.2017 55.8245C36.8201 56.1607 36.2613 56.5 35.5457 56.5C34.6742 56.5 34.0892 55.9692 33.7774 55.6083C33.4502 55.2296 33.1752 54.7511 32.9396 54.301C32.7305 53.9013 32.5088 53.4367 32.2797 52.9565C32.2429 52.8794 32.2059 52.8019 32.1688 52.7243C31.8942 52.1499 31.5959 51.534 31.2537 50.8868C29.8886 48.305 27.8539 45.2878 24.2343 43.1382C23.522 42.7152 23.2875 41.7949 23.7105 41.0826C24.1335 40.3703 25.0539 40.1358 25.7662 40.5588C30.0556 43.1062 32.4149 46.6647 33.9058 49.4845C34.2776 50.1876 34.5973 50.8487 34.8753 51.4302C34.9147 51.5124 34.9529 51.5926 34.9902 51.6707C35.2222 52.1567 35.4164 52.5637 35.5978 52.9102C35.6151 52.9434 35.6321 52.9754 35.6485 53.0061C36.0565 52.3531 36.5341 51.3434 37.133 49.9468C37.4781 49.1418 37.8572 48.2229 38.2761 47.2074C39.2886 44.7532 40.5339 41.7347 42.0961 38.3948C46.0591 29.9221 50.0641 25.8648 52.1535 23.7482C52.4423 23.4556 52.6944 23.2002 52.9048 22.9753C53.4708 22.3703 54.42 22.3387 55.025 22.9046ZM35.1994 53.5892C35.1994 53.5892 35.2 53.5888 35.2012 53.5879C35.2 53.5889 35.1994 53.5893 35.1994 53.5892ZM36.0666 53.6682C36.0732 53.674 36.0765 53.6775 36.0765 53.6777C36.0765 53.678 36.0732 53.6751 36.0666 53.6682Z",fill:n,fillRule:"evenodd"}),g("path",{d:"M69.5 97C69.5 98.1046 56.2924 99 40 99C23.7076 99 10.5 98.1046 10.5 97C10.5 95.8954 23.7076 95 40 95C56.2924 95 69.5 95.8954 69.5 97Z",fill:"black",fillOpacity:"0.2"})]})}),g(xe,{message:a}),s]})})},t)},pt="https://cdn.sprig.com",M={document:void 0,videojs:void 0},Uu=`/* progress control styles */ .video-js .vjs-control { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; } @@ -699,6 +689,5 @@ span.ul-button-text { .vjs-poster { background-size: cover; } -`,sd=e=>{const t=N.document.createElement("div");return t.className="ul-video-player-loading",t.id=bi(e),["first","second","third","fourth"].map(n=>{const r=N.document.createElement("div");r.className=n,t.appendChild(r)}),t},bi=e=>e+"-loading-spiner",ee="hidden",gs=".m3u8",xi="questionId",wi="ul-video-recorder-camera-off-button",Ci="ul-recording-in-session",ld=[{type:"link",content:`${vt}/dependencies/videojs-record-4.5.0.min.css`},{type:"script",content:`${vt}/dependencies/RecordRTC-5.6.2.js`},{type:"script",content:`${vt}/dependencies/adapter.8.0.0.min.js`},{type:"script",content:`${vt}/dependencies/videojs-record-4.5.0.min.js`},{type:"script",content:`${vt}/userleap-web-upchunk-v2.2.2.js`}],ys=[{type:"link",content:`${vt}/dependencies/video-js-7.18.0.min.css`},{type:"script",content:`${vt}/dependencies/video-js-7.18.0.min.js`},{type:"style",content:ad}],_s="-video-player",bs="-secondary-video-player",xs="-video-recorder";let De,ws;const nt=async({event:e,apiBase:t,headers:n,visitorId:r,envId:i,metadata:o})=>{const a=N.document.documentElement;if(!r||!i)return;const s={event:`SDK - ${e}`,visitorId:r,environmentId:i,metadata:{...o||{},screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:a.clientWidth,clientHeight:a.clientHeight,location:window.location.href,language:navigator.language}};(await fetch(`${t}/sdk/1/visitors/${r}/analytics`,{method:"POST",cache:"no-cache",headers:n,body:JSON.stringify(s)})).ok||console.warn("[Sprig] (ERR-444) Failed to track analytics",e)},Ke=async(e,t,n,r,i,o)=>{nt({event:`Video Error ${t}`,apiBase:n,headers:r,visitorId:i,envId:o,metadata:{errorMessage:e.message}});const a=N.document.documentElement,s={screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:a.clientWidth,clientHeight:a.clientHeight,location:window.location.href,language:navigator.language},l={action:t,err:{message:e.message,stack:e.stack},meta:s,vid:i,envId:o};(await fetch(`${n}/sdk/1/errors`,{method:"POST",cache:"no-cache",headers:{...r,"userleap-platform":"video_recorder","x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(l)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",e)},ud=(e,{type:t,content:n})=>new Promise(function(r,i){let o;t==="script"?(o=N.document.createElement("script"),o.src=n):t==="link"?(o=N.document.createElement("link"),o.rel="stylesheet",o.href=n,o.type="text/css"):(o=N.document.createElement("style"),o.innerHTML=n),o.onload=function(){r(n)},o.onerror=function(){i(n)},o.async=!1,o.id=btoa(n),e.appendChild(o)}),Cs=(e,t)=>{if(e.length===0)return t&&t();Promise.all(e.reduce((n,r)=>(n.push(ud(N.document.head,r)),n),[])).then(()=>{N.videojs=N.document.defaultView.videojs,t&&t()}).catch(function(n){console.log(n+" failed to load")})},ks=(e,t,n)=>{if(t==="start"&&(e.style.visibility="visible"),t==="none")e.style.visibility=ee;else if(t==="success")e.style.visibility=ee,e.innerHTML="Upload succeeded!";else{const r=Math.round(parseFloat(n));e.innerHTML=`Uploading ${r}%`,e.style.background=`linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${r}%, #FCFCFD ${r}%, #FCFCFD 100%)`}},ki=(e,t)=>{const n=N.videojs(e.id());return n==null?void 0:n.payload[t]},cd=(e,t,n,r,i)=>{const{surveyId:o,responseGroupUid:a,visitorId:s,envId:l}=e.payload;e.on("deviceError",function(){console.warn("device error: ",e.deviceErrorCode),e.deviceErrorCode.message==="Permission denied"?(e.deviceButton.addClass("permission-denied"),n&&n(V.ERROR,{type:V.PERMISSION_DENIED}),nt({event:"Video Permission Denied",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{questionId:ki(e,xi),responseGroupUid:a,surveyId:o}})):(n&&n(V.ERROR,{type:V.OTHER}),Ke(new Error(e.deviceErrorCode.message),"recorderDeviceError",t,i,s,l))}),e.on("error",function(c,u){Ke(u||e.error(),"recorderError",t,i,s,l)}),e.on("startRecord",function(c,u){r(e.uploadProgressLabel,"none"),nt({event:"Video Record Start",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{questionId:ki(e,xi),responseGroupUid:a,surveyId:o}})}),e.on("finishRecord",async function(){r(e.uploadProgressLabel,"start",0);const c=ki(e,xi);if(!o){const h="internal error: missing fields in payload";return n&&n(V.ERROR,{type:V.OTHER}),Ke(new Error(h),"finishRecord",t,i,s,l),null}e.record().stopDevice();const u=e.cameraOff?V.MEDIA_TYPE_AUDIO:V.MEDIA_TYPE_VIDEO,d=mn();nt({event:"Video Record Finish",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{mediaRecordingUid:d,questionId:c,responseGroupUid:a,surveyId:o,mediaType:u}});const f={surveyId:o,updatedAt:new Date().toISOString(),mediaType:u,mediaRecordingUid:d};c&&(f.questionId=c),a&&(f.responseGroupUid=a),s&&(f.visitorId=s);const p=await(async()=>{const h=await fetch(`${t}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});if(h.ok){const g=await h.json();return n&&n(V.UPLOAD_STARTED,{[V.UPLOAD_ID]:g.upload.id,[V.MEDIA_TYPE]:u,[V.MEDIA_RECORDING_UID]:d}),g.upload.url}else return n&&n(V.ERROR,{type:V.OTHER,response:h}),Ke(new Error("failed to get upload response with url"),"finishRecord",t,i,s,l),null})();!p||(De=N.document.defaultView.UpChunk.createUpload({endpoint:p,file:new N.document.defaultView.File([e.recordedData],`recording ${u} ${Date.now()}`),chunkSize:5120}),De.startTime=Date.now(),nt({event:"Video Upload Start",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{mediaRecordingUid:d,questionId:c,responseGroupUid:a,surveyId:o,mediaType:u,url:p}}),De.on("error",h=>{r(e.uploadProgressLabel,"none"),n&&n(V.UPLOAD_FINISHED,{[V.MEDIA_RECORDING_UID]:d}),Ke(h,"finishRecord",t,i,s,l)}),De.on("progress",h=>{n&&n(V.UPLOAD_PROGRESS,{[V.MEDIA_RECORDING_UID]:d,[V.UPLOAD_PROGRESS_PCT]:h.detail}),r(e.uploadProgressLabel,"progress",h.detail)}),De.on("success",()=>{r(e.uploadProgressLabel,"success"),n&&n(V.UPLOAD_FINISHED,{[V.MEDIA_RECORDING_UID]:d}),nt({event:"Video Upload Success",apiBase:t,headers:i,visitorId:s,envId:l,metadata:{mediaRecordingUid:d,questionId:c,responseGroupUid:a,surveyId:o,mediaType:u,url:p,elapsedMs:De.startTime&&Date.now()-De.startTime}})}))})},Es=(e,t)=>{const n=new(N.videojs.getComponent("Component"))(e);return n.addClass("ul-buttons-panel"),t.map(r=>{n.addChild(r)}),dd(n),n},dd=e=>{e.children().forEach(t=>{if(we[t.name_]){const n=er(we[t.name_],`ul-${we[t.name_]}`);t.el_.appendChild(n)}})},er=(e,t="")=>{const n=N.document.createElement("span");return n.className="ul-button-text",n.innerHTML=e,n.id=t,n},Ss=(e,t,n,r,i=!1,o)=>{e.addClass("ul-video-player");const a=new(N.videojs.getComponent("Component"))(e);a.addClass("ul-control-panel"),e.progressBar=a.addChild("ProgressControl"),n&&e.src(n),e.audioPlayerPlaceholder=new(N.videojs.getComponent("Component"))(e),e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const s=n&&n.src?_d(n.src):null;n&&(i||!s)?(e.children()[0].classList.add("vjs-hidden"),N.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.audioPlayerPlaceholder.hide(),N.document.getElementById(`${e.id()}_html5_api`).style.height="100%",s&&e.poster(s)),e.on("play",()=>{!i&&n&&!s&&hd(e,!1),o==null||o.play()}),e.on("pause",()=>{o==null||o.pause()}),e.on("seeked",()=>{o==null||o.currentTime(e.currentTime())}),e.on("ratechange",()=>{o==null||o.playbackRate(e.playbackRate())}),e.addChild(e.audioPlayerPlaceholder,{},1),a.addChild(t),e.addChild(a),r&&r(e)},fd=(e,t,n)=>{e.addClass(`ul${bs}`);const r=new(N.videojs.getComponent("Component"))(e);t&&e.src(t),e.addChild(r),n&&n(e)},pd=(e,t,n,r,i,o,a,s=!1)=>{ws=Date.now();const c=tr(t,{controls:!1,bigPlayButton:!1,fluid:!1,width:1280,height:720,playsinline:!0,plugins:{record:{audio:!0,video:{mandatory:{minWidth:1280,minHeight:720}},frameWidth:1280,frameHeight:720,maxLength:600,autoMuteDevice:!0}}});if(!c)return;c.payload=n;const{surveyId:u,questionId:d,responseGroupUid:f,visitorId:v,envId:p}=n;let h;const g=L=>{const P=wi,M=wi+"-audio-only";ks(c.uploadProgressLabel,"none"),De&&De.startTime>=ws&&De.abort();const A=N.document.getElementById("ul-camera-button");L?(c.children()[0].classList.add("vjs-hidden"),w.removeClass(P),w.addClass(M),A.innerHTML=we.TurnOnCamera,c.audioPlayerPlaceholder.removeClass("vjs-hidden"),h==null||h.getTracks().forEach(j=>{j.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then(j=>{h=j,j.getVideoTracks().forEach(Z=>{Z.enabled=!1}),c.record().onDeviceReady(j)}).catch(c.record().onDeviceError.bind(c.record()))):(h==null||h.getVideoTracks().forEach(j=>{j.enabled=!0}),c.children()[0].classList.remove("vjs-hidden"),c.record().getDevice(),w.removeClass(M),w.addClass(P),A.innerHTML=we.TurnOffCamera,c.audioPlayerPlaceholder.addClass("vjs-hidden"))},_=new(N.videojs.getComponent("Button"))(c,{clickHandler:()=>{_.hasClass(ee)||(nt({event:"Video Delete Button Clicked",apiBase:r,headers:a,visitorId:v,envId:p,metadata:{questionId:d,responseGroupUid:f,surveyId:u}}),g(c.cameraOff),i(V.DELETE,{}),w.removeClass(ee),_.addClass(ee))}});_.addClass("ul-video-recorder-delete-button"),_.el_.appendChild(er(we.DeleteButton,"ul-delete-button"));const b=N.document.getElementById(t),x=()=>{b.classList.contains("vjs-fullscreen")&&c.cameraOff?b.style.display="table":b.style.display="flex"};x();const w=new(N.videojs.getComponent("Button"))(c,{clickHandler:()=>{c.record().isRecording()||(c.cameraOff=!c.cameraOff,nt({event:"Video Camera Button Clicked",apiBase:r,headers:a,visitorId:n.visitorId,envId:n.envId,metadata:{questionId:d,responseGroupUid:f,surveyId:u,cameraOff:c.cameraOff}}),g(c.cameraOff),!_.hasClass(ee)&&_.addClass(ee),i(V.DELETE,{}),x())}});w.addClass(wi),w.el_.appendChild(er(we.TurnOffCamera,"ul-camera-button"));const m=new(N.videojs.getComponent("Button"))(c,{clickHandler:()=>{const L=N.document.getElementById("ul-recorder-toggle");if(c.record().isRecording())c.record().stop(),L&&(L.innerHTML=we.RecordButton),m.removeClass(Ci),_.removeClass(ee);else{const P=N.document.getElementById("ul-recording-countdown-screen");if(P)P.remove(),L&&(L.innerHTML=we.RecordButton),g(c.cameraOff),i(V.DELETE,{}),w.removeClass(ee),_.addClass(ee),m.removeClass(Ci),k.show();else{m.addClass(Ci),k.hide(),w.addClass(ee),_.addClass(ee),L&&(L.innerHTML=we.StopButton);const M=N.document.createElement("div");M.id="ul-recording-countdown-screen",b.insertBefore(M,b.children[1]),M.style.height=`${b.offsetHeight}px`,Ts(c,3)}}}});m.addClass("ul-video-recorder-toggle-button"),m.el_.appendChild(er(we.RecordButton,"ul-recorder-toggle"));const C=N.document.createElement("p");C.style.visibility="hidden",C.className="ul-upload-progress-label",e.appendChild(C),c.uploadProgressLabel=C;const S=Es(c,[_,w,"PlayToggle",m,"FullscreenToggle"]),k=S.children().find(L=>L.name_==="FullscreenToggle");k.hasClass("vjs-disabled")&&k.hide();const E=S.children().find(L=>L.name_==="PlayToggle");E.hide(),o&&w.addClass(ee),!o&&_.addClass(ee),Ss(c,S,o,!1,s),c.on("stopRecord",()=>{m.hide(),E.show(),k.show(),_.removeClass(ee)}),c.on("deviceReady",()=>{m.show(),E.hide(),_.addClass(ee)}),cd(c,r,i,ks,a),o&&(c.deviceButton&&c.deviceButton.hide(),c.src(o),E.show(),m.hide(),_.removeClass(ee));const R=[{name:"microphone"}];!c.cameraOff&&R.push({name:"camera"}),Promise.all(R.map(L=>{var P;return(P=navigator==null?void 0:navigator.permissions)==null?void 0:P.query(L)})).then(L=>{L.reduce((M,A)=>M&A.state==="granted",!0)&&c&&(c.deviceButton&&c.deviceButton.hide(),!o&&c.record().getDevice())}).catch(L=>{})},Ts=(e,t=3)=>{const n=N.document.getElementById("ul-recording-countdown-screen");n&&t===0?(n.remove(),e.record().start()):n&&(n.innerHTML=`Recording in... ${t}`,setTimeout(()=>{Ts(e,t-1)},1e3))},Ps=e=>{const t=N.document.createElement("div");return t.className="ul-video-container",t.appendChild(sd(e)),t},Ei=(e,t)=>{const n=N.document.createElement("video");n.id=e,n.className="video-js vjs-default-skin ul-video-player-video";const r=N.document.createElement("p");r.className="vjs-no-js",r.innerHTML="To view this video please enable JavaScript, and consider upgrading to a web browser that";const i=N.document.createElement("a");return i.href="https://videojs.com/html5-video-support/",i.target="_blank",i.innerHTML="supports HTML5 video",r.appendChild(i),n.appendChild(r),t.appendChild(n),t},hd=(e,t)=>{t?(e.children()[0].classList.add("vjs-hidden"),e.audioPlayerPlaceholder.show(),N.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),N.document.getElementById(`${e.id()}_html5_api`).style.height="100%")},tr=(e,t)=>N.document.getElementById(e)?t?N.videojs(e,t):N.videojs(e):(console.error(`Error in finding player element with ID, ${e}`),null),vd=(e,t,n,r=!1,i="https://api.sprig.com",o=document,a=null,s=null)=>{N.document=o;const l=e+_s,c=Ps(l);return N.document.addEventListener("securitypolicyviolation",u=>{Ke(new Error(`Voice & Video feature violates ${u.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",i,{})}),Cs(ys,()=>{N.document.getElementById(bi(l)).remove(),Ei(l,c);const u={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const d=e+bs;Ei(d,c);const f=tr(l,u),v=tr(d,{muted:!0,...u});if(!f||!v)return;fd(v,a,s),a||v.addClass(ee);const p=Es(f,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),h=p.children().find(g=>g.name_==="FullscreenToggle");h.hasClass("vjs-disabled")&&h.hide(),Ss(f,p,t,n,r,v)}catch(d){Ke(new Error(`Error when creating video player object ${d}`),"playerDeviceError",i,{});return}}),c},md=(e,t={},n="https://api.userleap.com",r,i,o,a=!1,s=document)=>{N.document=s;const l=e+xs,c=Ps(l);return N.document.addEventListener("securitypolicyviolation",u=>{Ke(new Error(`Voice & Video feature violates ${u.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",n,o,t.visitorId,t.envId)}),Cs(ys.concat(ld),()=>{Ei(l,c),N.document.getElementById(bi(l)).remove();try{pd(c,l,t,n,r,i,o,a)}catch(u){Ke(new Error(`Error when creating video recorder player object ${u}`),"recorderDeviceError",n,o,t.visitorId,t.envId);return}}),c},gd=e=>{const t=e+xs;if(!!N.document.getElementById(t)&&!!N.videojs){try{if(!N.videojs(t).record().stream)return}catch{return}N.videojs(t).record().stop(),N.videojs(t).record().stopDevice()}},yd=e=>{const t=tr(e+_s);t==null||t.pause()},_d=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let n=t?t[1]:null;return n.includes(gs)&&(n=n.replace(gs,"")),n?`https://image.mux.com/${n}/thumbnail.jpg?time=0`:null},V={UPLOAD_STARTED:"upload.started",UPLOAD_PROGRESS:"upload.progress",UPLOAD_FINISHED:"upload.finished",DELETE:"delete",ERROR:"error",MEDIA_TYPE:"media.type",PERMISSION_DENIED:"permission_denied",OTHER:"other",UPLOAD_ID:"upload.id",UPLOAD_PROGRESS_PCT:"upload.progress.pct",MEDIA_RECORDING_UID:"media.recording.uid",MEDIA_TYPE_VIDEO:"video",MEDIA_TYPE_AUDIO:"audio"},we={PlaybackRateMenuButton:"Speed",PlayToggle:"Play",FullscreenToggle:"Expand",TurnOnCamera:"Turn on",TurnOffCamera:"Turn off",DeleteButton:"Delete",RecordButton:"Record",StopButton:"Stop",PauseButton:"Pause"},un="ul-card-video__player_recorder",bd="ul-card-video__skip_button",xd="ul-video-interview-form",Is="ul-video-btn",wd=({className:e,message:t,next:n,properties:r,questionId:i,type:o})=>{const{apiURL:a,envId:s,handleUploadUpdate:l,headers:c,responseGroupUid:u,surveyId:d,viewDocument:f,visitorId:v}=G(P=>({apiURL:P.apiURL,envId:P.envId,handleUploadUpdate:P.handleUploadUpdate,headers:P.headers,responseGroupUid:P.responseGroupUid,surveyId:P.surveyId,viewDocument:P.viewDocument,visitorId:P.userId})),[p,h]=ne(!1),[g,_]=ne(null),[b,x]=ne(null),[w,m]=ne(0),C=r&&r.videoUrl,S=(P,M)=>{P===V.UPLOAD_STARTED?(_(M[V.UPLOAD_ID]),x(M[V.MEDIA_RECORDING_UID]),h(!0)):P===V.DELETE?(_(null),x(null),h(!1)):P===V.UPLOAD_PROGRESS?isNaN(M[V.UPLOAD_PROGRESS_PCT])?l({mediaRecordingUid:M[V.MEDIA_RECORDING_UID],isComplete:!0}):l({mediaRecordingUid:M[V.MEDIA_RECORDING_UID],progressPct:M[V.UPLOAD_PROGRESS_PCT]}):P===V.UPLOAD_FINISHED&&l({mediaRecordingUid:M[V.MEDIA_RECORDING_UID],isComplete:!0})},k=P=>{if(P&&P.children.length===0){const M=vd(un,{src:C,type:"application/x-mpegURL"},void 0,r.mediaType===V.MEDIA_TYPE_AUDIO,a,f);P.appendChild(M)}},E=P=>{if(P&&P.children.length===0){const M=md(un,{surveyId:d,responseGroupUid:u,questionId:i,visitorId:v,envId:s},a,S,void 0,{...c,"x-ul-video-recorder-origin":"sdk"},r.mediaType===V.MEDIA_TYPE_AUDIO,f);P.appendChild(M)}},R=P=>{P.preventDefault(),P.stopPropagation(),gd(un),g&&b?(l({mediaRecordingUid:b,isSubmitted:!0}),n({value:{mediaRecordingUid:b},questionId:i,type:o})):n({value:null,questionId:i,type:o})},L=()=>y(et,{defaultBody:()=>y("button",{className:`${Is} ul-record-response-btn`,onClick:P=>{P.preventDefault(),P.stopPropagation(),yd(un),m(1)}}),properties:r});return y("form",{className:$([e,O.VideoCard,O.FadeInTransition]),id:xd,children:[y(Re,{message:t,properties:r}),y("div",{id:"ul-card-voice__video",children:[y("div",{children:[y("div",{id:"ul-question-player-container",style:{display:w===0?"":"none"},children:[y("div",{id:un,ref:k}),L()]}),y("div",{style:{display:w===1?"block":"none"},children:[y("button",{className:`${Is} ul-back-question-btn`,onClick:P=>{P.preventDefault(),P.stopPropagation(),m(0)}}),y("div",{id:"ul-recorder-player-container",ref:E})]})]}),y(pe,{disabled:!p,onClick:R,children:Mt(r)}),y("button",{className:`ul-card-text__button ${O.InactiveButton} ${O.SkipButton}`,id:bd,onClick:R,style:{display:r.required?"none":"block",...p?{display:"none"}:{}},children:vi(r)})]})]})},Cd=({className:e})=>{const{uploadProgress:t}=G(o=>({uploadProgress:o.uploadProgress}));let n,r;Object.values(t).filter(o=>o.isSubmitted).length>1?(n="Your responses are processing",r="Please keep this tab open until your responses are fully processed."):(n="Your response is processing",r="Please keep this tab open until your response is fully processed.");const i=Math.round(Math.min(99,...Object.values(t).filter(o=>o.isSubmitted).map(o=>o.progressPct)));return y("div",{className:$([e,"ul-card--uploading",O.FadeInTransition]),children:[y("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:O.LoadingSpinnerContainer,role:"progressbar",children:y("div",{className:O.LoadingSpinner,children:[y("div",{className:O.LoadingSpinnerFirst}),y("div",{className:O.LoadingSpinnerSecond}),y("div",{className:O.LoadingSpinnerThird}),y("div",{className:O.LoadingSpinnerFourth})]})}),y(Re,{message:`${n} (${i}% complete)`}),y("p",{className:O.Caption,children:r})]})},Rs=({logoOnly:e=!1,style:t={}})=>y("svg",{alt:`${e?"Powered by ":""}Sprig`,width:e?"35":"112",height:"15",viewBox:e?"79 0 31 15":"0 0 112 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",...t},children:[!e&&y("path",{d:"M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.7812 4.99121 44.9619 6.38135 44.9619 8.45068V8.93311H40.0742C40.0996 10.2534 40.8232 11.0215 41.9595 11.0215C42.8418 11.0215 43.3687 10.5835 43.5337 10.228L43.5591 10.1772L44.8857 10.1709L44.873 10.228C44.6445 11.1357 43.6924 12.1514 41.9277 12.1514ZM41.8643 6.12109C40.9248 6.12109 40.2139 6.76221 40.0933 7.94922H43.5972C43.4893 6.71777 42.7974 6.12109 41.8643 6.12109ZM49.1133 12.1323C47.3804 12.1323 46.2568 10.7422 46.2568 8.57764V8.56494C46.2568 6.38135 47.3613 5.00391 49.1133 5.00391C50.0591 5.00391 50.8652 5.47363 51.2334 6.21631H51.3413V2.42041H52.7124V12.0181H51.3413V10.9326H51.2334C50.8335 11.688 50.0781 12.1323 49.1133 12.1323ZM49.5068 10.958C50.6558 10.958 51.3604 10.0503 51.3604 8.57764V8.56494C51.3604 7.09229 50.6494 6.18457 49.5068 6.18457C48.3516 6.18457 47.6597 7.08594 47.6597 8.56494V8.57764C47.6597 10.0566 48.3516 10.958 49.5068 10.958ZM61.98 12.1323C61.0151 12.1323 60.2598 11.688 59.8599 10.9326H59.7583V12.0181H58.3809V2.42041H59.7583V6.21631H59.8599C60.228 5.47363 61.0342 5.00391 61.98 5.00391C63.7319 5.00391 64.8364 6.38135 64.8364 8.56494V8.57764C64.8364 10.7422 63.7192 12.1323 61.98 12.1323ZM61.5928 10.958C62.7417 10.958 63.4336 10.0566 63.4336 8.57764V8.56494C63.4336 7.08594 62.7417 6.18457 61.5928 6.18457C60.4438 6.18457 59.7329 7.09229 59.7329 8.56494V8.57764C59.7329 10.0503 60.4438 10.958 61.5928 10.958ZM66.8867 14.4429C66.7153 14.4429 66.5122 14.4302 66.3345 14.4111V13.3257C66.4678 13.3447 66.6392 13.3511 66.7979 13.3511C67.439 13.3511 67.8262 13.0781 68.0293 12.3799L68.1309 12.0244L65.6299 5.12451H67.1152L68.8418 10.6343H68.9624L70.6826 5.12451H72.1299L69.5654 12.2847C68.9814 13.9287 68.2832 14.4429 66.8867 14.4429Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M81.1088 6.63629C79.6878 6.32154 78.9672 5.76865 78.9672 4.99369C78.9672 4.19299 79.736 3.5886 80.7556 3.5886C81.8066 3.5886 82.5995 4.25285 82.5995 5.13336V5.20352H84.0518V5.13336C84.0518 3.52424 82.6405 2.30774 80.7693 2.30774C79.8676 2.30774 79.0414 2.58451 78.4433 3.08655C78.1463 3.33144 77.9077 3.63818 77.7448 3.98479C77.5818 4.33141 77.4984 4.70934 77.5005 5.09153C77.4946 5.44197 77.5675 5.78934 77.714 6.10857C77.8605 6.42779 78.0769 6.71092 78.3475 6.93752C78.8512 7.37584 79.5659 7.70024 80.4709 7.90299C81.9949 8.23898 82.7676 8.81054 82.7676 9.60094C82.7676 10.4576 81.9258 11.1032 80.813 11.1032C79.6571 11.1032 78.7854 10.3856 78.7854 9.43424V9.36408H77.3318V9.43424C77.3318 11.1167 78.8219 12.3847 80.7973 12.3847C81.7421 12.3847 82.6093 12.0983 83.2393 11.5769C83.5519 11.3237 83.8034 11.0048 83.9753 10.6433C84.1472 10.2818 84.2352 9.88702 84.2329 9.48766C84.2329 8.05875 83.1833 7.09907 81.1088 6.63629Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M89.2394 4.68276C88.6963 4.67605 88.1596 4.79915 87.6751 5.04156C87.1905 5.28397 86.7725 5.63851 86.4566 6.07497V4.85204H85.0747V14.8479H86.4566V11.0356C86.7725 11.472 87.1906 11.8265 87.6751 12.0688C88.1596 12.3111 88.6963 12.434 89.2394 12.4272C91.3836 12.4272 93 10.7627 93 8.55495C93 6.34723 91.3836 4.68276 89.2394 4.68276ZM91.5608 8.84202C91.5057 9.41605 91.2512 9.95356 90.8406 10.3633C90.4299 10.773 89.8883 11.0296 89.3078 11.0896C88.5363 11.1669 87.8177 10.9461 87.2841 10.4692C86.7505 9.99222 86.4566 9.3106 86.4566 8.55495C86.4566 7.10159 87.5538 6.00546 89.0087 6.00546C89.7619 6.00546 90.4421 6.29124 90.9171 6.81002C91.407 7.34232 91.6357 8.06385 91.5608 8.84202Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M109.95 4.85407V6.06349C109.298 5.18298 108.292 4.68286 107.153 4.68286C105.017 4.68286 103.406 6.31709 103.406 8.48426C103.406 10.6514 105.017 12.285 107.153 12.285C108.296 12.285 109.303 11.79 109.95 10.9185V11.1046C109.95 12.6101 108.993 13.5826 107.513 13.5826C106.513 13.5826 105.68 13.1494 105.284 12.424L105.264 12.3867H103.838L103.871 12.48C104.112 13.1892 104.583 13.8001 105.211 14.2179C105.841 14.6324 106.637 14.8512 107.513 14.8512C108.637 14.8512 109.594 14.4972 110.28 13.8285C110.967 13.1597 111.332 12.2194 111.332 11.1213V4.85407H109.95ZM109.175 10.3502C108.588 10.905 107.752 11.138 106.879 10.9887C106.361 10.8984 105.886 10.6475 105.523 10.2725C105.16 9.89751 104.927 9.41787 104.859 8.90328C104.736 8.03757 104.999 7.21756 105.581 6.655C106.069 6.19093 106.723 5.93643 107.401 5.94699C107.565 5.94713 107.729 5.96026 107.891 5.98625C108.946 6.15489 109.781 7.01609 109.921 8.0852C110.039 8.96507 109.766 9.78958 109.175 10.3502Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M101.89 2.12378C101.63 2.06766 101.358 2.11486 101.133 2.25518C100.908 2.39551 100.747 2.61769 100.687 2.87371C100.626 3.12973 100.67 3.39902 100.809 3.62339C100.947 3.84775 101.17 4.00917 101.428 4.07275C101.503 4.08936 101.58 4.09778 101.657 4.09786C101.906 4.09824 102.146 4.0083 102.331 3.84518C102.517 3.68206 102.636 3.45714 102.664 3.21327C102.693 2.9694 102.63 2.72361 102.487 2.5227C102.344 2.32179 102.132 2.17981 101.89 2.12378Z",fill:"black",fillOpacity:"0.7"}),y("path",{d:"M100.967 10.934H99.7755C98.9285 10.934 98.4196 10.3644 98.4196 9.40982C98.4196 8.4791 98.8757 7.36945 99.8054 6.01778L99.8178 5.99976V5.61807L95.8571 5.06453C95.8585 4.90331 95.8162 4.74466 95.7346 4.60501C95.653 4.46536 95.5352 4.34979 95.3932 4.27027C95.0381 4.07718 94.6498 4.07717 94.3279 4.26383C94.1667 4.35799 94.035 4.4945 93.9476 4.65816C93.8602 4.82182 93.8205 5.00623 93.8328 5.19087C93.8452 5.37552 93.9092 5.55315 94.0176 5.70402C94.1261 5.85489 94.2748 5.97309 94.4472 6.04546L93.2151 12.258H94.5833L95.7196 6.35891L97.8593 6.7155C97.284 7.73439 96.9921 8.68442 96.9921 9.53919C96.9921 11.1168 97.9577 12.1498 99.5187 12.2496V12.258H102.346V4.87723H100.967V10.934Z",fill:"black",fillOpacity:"0.7"})]}),kd=()=>{const{border:e,cards:t,forceBrandedLogo:n,headers:r,index:i,marketingUrl:o,showSurveyBrand:a,slugName:s,surveyId:l,viewedCardCount:c}=G(x=>({border:x.border,cards:x.cards,forceBrandedLogo:x.forceBrandedLogo,headers:x.headers,index:x.index,marketingUrl:x.marketingUrl,showSurveyBrand:x.showSurveyBrand,slugName:x.slugName,surveyId:x.surveyId,viewedCardCount:x.viewedCardCount})),u=We(null),d=t.filter(x=>x.type!==T.Uploading&&x.type!==T.Thanks),f=Pc(t,i),v=c+1,p=v/(v+f),h=`${o}?utm_source=survey_branding&utm_medium=website&utm_campaign=${s}&utm_content=${l}${n&&"&utm_term=poweredby_pill"}`;ge(()=>{u.current&&(u.current.style.width=`${p*100}%`)},[p]);const g=()=>y(he,{children:[d.length>1&&y("div",{id:"ul-progress-bar-container",children:y("div",{id:"ul-progress-bar-current",ref:u,style:{border:`1px solid ${e||"#000"}`}})}),a?y("div",{className:n?"yellow-footer-logo":"",style:{marginTop:"4px"},children:y("a",{href:h,rel:"noreferrer",target:"_blank",children:y("div",{style:{display:"flex"},children:[y(Rs,{logoOnly:!1}),n&&y(As,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}):null]}),_=()=>y("a",{dir:"ltr",href:h,rel:"noreferrer",target:"_blank",children:y("div",{className:"thank-you-card-link",children:[y("div",{className:"sprig-box-logo",children:y(Rs,{logoOnly:!0,style:{margin:"auto"}})}),y("div",{children:y("p",{children:["Capture insights about your own product",y(As,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}),b=t[i].type===T.Thanks;return y("footer",{className:`ul-footer ${r["userleap-platform"]==="link"?"ul-footer__link":""}`,style:a?{}:{marginBottom:"10px"},children:b&&n?_():g()})},As=({style:e})=>y("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[y("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),y("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),Ed=()=>{const{answers:e,border:t,cards:n,close:r,configureExitOnOverlayClick:i,destroy:o,endCard:a,eventEmitFn:s,fontFamily:l,headers:c,index:u,next:d,showStripes:f,update:v,useMobileStyling:p,viewDocument:h}=G(A=>({answers:A.answers,border:A.border,cards:A.cards,close:A.close,configureExitOnOverlayClick:A.configureExitOnOverlayClick,destroy:A.destroy,endCard:A.endCard,eventEmitFn:A.eventEmitFn,fontFamily:A.fontFamily,headers:A.headers,index:A.index,next:A.next,showStripes:A.showStripes,update:A.update,useMobileStyling:A.useMobileStyling,viewDocument:A.viewDocument})),g=We(null),_=We(!1),b=c["userleap-platform"],{props:x,type:w,name:m}=n[u],C=n.length;ge(()=>{g.current&&(g.current.classList.contains("ul-app--visible")||g.current.classList.add("ul-app--visible"),!_.current&&s&&(_.current=!0,s(Se.SurveyAppeared)))},[s]),ge(()=>{v()},[u,v]),ge(()=>{i(()=>r())},[r,i]);const S=()=>r(_t),k=A=>{A.key==="Enter"&&S()},E=async function(A){d({data:A,completeSurvey:()=>{o(_t)},endCard:a}),Hs(h)};if(e){for(const A of e)if(A.questionId===m){let j;if(w===T.MultipleChoice){const Z=x.options.find(({value:le})=>le===A.value);if(!Z)break;j={[Z.id]:Z.value}}else j=A.value;E({value:j,type:w,questionId:A.questionId});break}}const R=()=>[bt.Email,bt.Link].includes(c["userleap-platform"])?!1:!a||u+1!==C,L=()=>p?{borderColor:t}:{borderColor:t,margin:"15px"},P=()=>{const A={className:"ul-card",next:E,questionId:m,type:w};switch(w){case T.ConsentLegal:return Y(Nc,{...A,...x,key:m});case T.Likert:return Y(Vc,{...A,...x,key:m});case T.MultipleChoice:return Y(Fc,{...A,...x,key:m});case T.MultipleSelect:return Y(Hc,{...A,...x,key:m});case T.NPS:return Y($c,{...A,key:m,props:x});case T.Open:return Y(Kc,{...A,...x,key:m});case T.RecordedTask:return Y(td,{...A,...x,key:m});case T.TextUrlPrompt:return Y(id,{...A,...x,key:m});case T.Thanks:return Y(od,{...A,...x,key:m});case T.Uploading:return Y(Cd,{...A,...x,key:m});case T.VideoVoice:return Y(wd,{...A,...x,key:m});default:return null}},M=A=>{var Ce;const j=window.sprigAPI,Z=A.target;if(!j||!Z)return;const le=[Z,Z.parentElement];for(const ue of le)if(((Ce=ue==null?void 0:ue.tagName)==null?void 0:Ce.toLowerCase())==="a"){A.preventDefault(),j==null||j.openUrl(ue.href);return}};return y("div",{className:$("ul-app",Vt(c)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:_t,onClick:M,ref:g,style:{"--theme":t,...l?{fontFamily:l.replace(";","")}:{}},children:y("div",{className:"ul-app__container",children:y("div",{className:$(X(O.CardContainer,p)),style:L(),children:[R()&&y("div",{className:$(X(O.CloseContainer,p)),children:y("div",{"aria-label":"Close button",className:O.CloseButton,onClick:S,onKeyPress:k,role:"button",tabIndex:0,children:y("svg",{fill:"none",height:"18px",viewBox:"0 0 13 13",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:y("path",{d:"M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z",fill:"#262136"})})})}),f&&y("div",{className:"ul-header__container",dir:"ltr",children:y("div",{className:"ul-header",children:"For development purposes only"})}),y("div",{className:$(Ks(O.CardMainContent,b)),children:P()}),y(kd,{})]})})})},Sd=`html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;margin:auto}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.ul-card__container{background:#ffffff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;overflow:auto;padding:20px 20px 5px;position:relative;text-align:center;word-break:break-word}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;margin-bottom:3px;display:flex;gap:16px;justify-content:center}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email{flex-grow:55;display:flex}.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{margin-bottom:5px}.ul-question{color:#343442;display:block;font-size:20px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-caption{flex:1 0 auto;margin-top:8px;margin-bottom:15px;font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.select-checkbox{height:16px;width:16px;border-radius:3px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 3px 3px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.fade-in-transition{animation:fadeIn .4s ease-in;-webkit-animation:fadeIn .4s ease-in;-moz-animation:fadeIn .4s ease-in;-o-animation:fadeIn .4s ease-in;-ms-animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-ms-keyframes fadeIn{0%{opacity:0}to{opacity:1}}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{box-shadow:unset;border-radius:unset;border:none!important;position:unset}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:rgba(0,0,0,.01);box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:white}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-text{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:rgba(0,0,0,.01);box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:white}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}#ul-card-voice__video{align-items:center;display:flex;flex-direction:column}#ul-card-voice__video>div{margin-bottom:10px;width:100%}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#ffffff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:30px;justify-content:center}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;left:0;position:absolute;top:0;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:auto;flex-grow:1;width:100%}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:rgba(0,0,0,.01);border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:rgba(0,0,0,.03)}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:rgba(249,198,0,1);border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%}.close-btn{cursor:pointer;height:18px;margin-inline-end:-10px;position:relative;top:-10px;width:18px;z-index:1}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}#ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px;max-width:250px;margin:25px 0}#ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{width:100%;background:rgba(0,0,0,.01);border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:1;margin:0;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer} -`,Td=(e,t)=>{const n=[...e],r=new Set([T.VideoVoice,T.RecordedTask]);return e.some(i=>r.has(i.type))&&n.push({name:-2,props:{routingOptions:[]},type:T.Uploading}),t&&n.push({name:-1,props:{routingOptions:[]},type:T.Thanks}),n},Pd=({mode:e=null,viewWindow:t,viewDocument:n})=>{const r=n.documentElement;return{mode:e,sw:t.screen.width,sh:t.screen.height,cw:r.clientWidth,ch:r.clientHeight,p:t.location.href,l:t.navigator.language}};function Id(e,t=!0){var m;const{answers:n,apiURL:r,customStyles:i,endCard:o,eventEmitFn:a,fontFamilyURL:s,frame:l,previewKey:c,viewDocument:u,viewWindow:d}=e,f=Vt(e.headers)?e.frame:u.body,v=e.UpChunk||window.UpChunk,p=hn,h=Td(e.cards,!!o);Zn.configure(p,{cards:h,hasEndCard:!!o,apiURL:r,UpChunk:v}),G.setState({apiURL:r,answers:n,border:e.border,index:e.startingQuestionIdx||0,cards:h,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:a,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:l,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:Pd({mode:e.mode,viewWindow:d,viewDocument:u}),mode:e.mode,previewKey:c,recorder:Zn,recorderEventEmitter:p,responseGroupUid:e.responseGroupUid,showStripes:e.showStripes,showSurveyBrand:e.showSurveyBrand,slugName:e.slugName,styleNonce:e.styleNonce,surveyId:e.surveyId,tabTitle:e.tabTitle,uploadingCardViewed:!1,uploadProgress:{},useMobileStyling:e.useMobileStyling,useDesktopPrototype:e.useDesktopPrototype,userId:e.userId,viewDocument:e.viewDocument,visitorAttributes:e.visitorAttributes,viewedCardCount:e.startingQuestionIdx||0});const{seen:g}=G.getState();g();const{head:_}=u,b=u.createElement("style");if(b.id="sprig-style",b.textContent=Sd,b.nonce=e.styleNonce,_.appendChild(b),e.fontFamily&&s&&parent){const C=u.createElement("link");C.rel="stylesheet",C.href=s,_.appendChild(C)}if(e.customStyles&&Vs(u,i,e.styleNonce),!v)if(e.installationMethod!==xt.Npm){const C=u.createElement("script");C.src="https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js",C.onload=()=>{Zn.setUpChunk(d.UpChunk)},C.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},_.appendChild(C)}else console.warn("[Sprig] - recording functionality not configured due to missing UpChunk dependency");const x="2.24.12-beta.0",w=a||((m=l.eventEmitter)==null?void 0:m.emit);w==null||w(Te.VerifyViewVersion,{[yt.ViewVersion]:x}),f&&t&>(y(Ed,{}),f)}({configure:Id}).configure(window.__cfg)}); -//# sourceMappingURL=sprig-web-view-sdk-v2.24.12-beta.0.js.map +`,Vu=e=>{const t=M.document.createElement("div");return t.className="ul-video-player-loading",t.id=_o(e),["first","second","third","fourth"].map(n=>{const r=M.document.createElement("div");r.className=n,t.appendChild(r)}),t},_o=e=>e+"-loading-spiner",ee="hidden",pa=".m3u8",bo="questionId",xo="ul-video-recorder-camera-off-button",wo="ul-recording-in-session",Fu=[{type:"link",content:`${pt}/dependencies/videojs-record-4.5.0.min.css`},{type:"script",content:`${pt}/dependencies/RecordRTC-5.6.2.js`},{type:"script",content:`${pt}/dependencies/adapter.8.0.0.min.js`},{type:"script",content:`${pt}/dependencies/videojs-record-4.5.0.min.js`},{type:"script",content:`${pt}/userleap-web-upchunk-v2.2.2.js`}],fa=[{type:"link",content:`${pt}/dependencies/video-js-7.18.0.min.css`},{type:"script",content:`${pt}/dependencies/video-js-7.18.0.min.js`},{type:"style",content:Uu}],ma="-video-player",ga="-secondary-video-player",va="-video-recorder";let Ie,ya;const Qe=async({event:e,apiBase:t,headers:n,visitorId:r,envId:o,metadata:i})=>{const s=M.document.documentElement;if(!r||!o)return;const a={event:`SDK - ${e}`,visitorId:r,environmentId:o,metadata:{...i||{},screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:s.clientWidth,clientHeight:s.clientHeight,location:window.location.href,language:navigator.language}};(await fetch(`${t}/sdk/1/visitors/${r}/analytics`,{method:"POST",cache:"no-cache",headers:n,body:JSON.stringify(a)})).ok||console.warn("[Sprig] (ERR-444) Failed to track analytics",e)},Ve=async(e,t,n,r,o,i)=>{Qe({event:`Video Error ${t}`,apiBase:n,headers:r,visitorId:o,envId:i,metadata:{errorMessage:e.message}});const s=M.document.documentElement,a={screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:s.clientWidth,clientHeight:s.clientHeight,location:window.location.href,language:navigator.language},l={action:t,err:{message:e.message,stack:e.stack},meta:a,vid:o,envId:i};(await fetch(`${n}/sdk/1/errors`,{method:"POST",cache:"no-cache",headers:{...r,"userleap-platform":"video_recorder","x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(l)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",e)},Hu=(e,{type:t,content:n})=>new Promise(function(r,o){let i;t==="script"?(i=M.document.createElement("script"),i.src=n):t==="link"?(i=M.document.createElement("link"),i.rel="stylesheet",i.href=n,i.type="text/css"):(i=M.document.createElement("style"),i.innerHTML=n),i.onload=function(){r(n)},i.onerror=function(){o(n)},i.async=!1,i.id=btoa(n),e.appendChild(i)}),_a=(e,t)=>{if(e.length===0)return t&&t();Promise.all(e.reduce((n,r)=>(n.push(Hu(M.document.head,r)),n),[])).then(()=>{M.videojs=M.document.defaultView.videojs,t&&t()}).catch(function(n){console.log(n+" failed to load")})},ba=(e,t,n)=>{if(t==="start"&&(e.style.visibility="visible"),t==="none")e.style.visibility=ee;else if(t==="success")e.style.visibility=ee,e.innerHTML="Upload succeeded!";else{const r=Math.round(parseFloat(n));e.innerHTML=`Uploading ${r}%`,e.style.background=`linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${r}%, #FCFCFD ${r}%, #FCFCFD 100%)`}},ko=(e,t)=>{const n=M.videojs(e.id());return n==null?void 0:n.payload[t]},qu=(e,t,n,r,o)=>{const{surveyId:i,responseGroupUid:s,visitorId:a,envId:l}=e.payload;e.on("deviceError",function(){console.warn("device error: ",e.deviceErrorCode),e.deviceErrorCode.message==="Permission denied"?(e.deviceButton.addClass("permission-denied"),n&&n(U.ERROR,{type:U.PERMISSION_DENIED}),Qe({event:"Video Permission Denied",apiBase:t,headers:o,visitorId:a,envId:l,metadata:{questionId:ko(e,bo),responseGroupUid:s,surveyId:i}})):(n&&n(U.ERROR,{type:U.OTHER}),Ve(new Error(e.deviceErrorCode.message),"recorderDeviceError",t,o,a,l))}),e.on("error",function(u,d){Ve(d||e.error(),"recorderError",t,o,a,l)}),e.on("startRecord",function(u,d){r(e.uploadProgressLabel,"none"),Qe({event:"Video Record Start",apiBase:t,headers:o,visitorId:a,envId:l,metadata:{questionId:ko(e,bo),responseGroupUid:s,surveyId:i}})}),e.on("finishRecord",async function(){r(e.uploadProgressLabel,"start",0);const u=ko(e,bo);if(!i){const f="internal error: missing fields in payload";return n&&n(U.ERROR,{type:U.OTHER}),Ve(new Error(f),"finishRecord",t,o,a,l),null}e.record().stopDevice();const d=e.cameraOff?U.MEDIA_TYPE_AUDIO:U.MEDIA_TYPE_VIDEO,c=_n();Qe({event:"Video Record Finish",apiBase:t,headers:o,visitorId:a,envId:l,metadata:{mediaRecordingUid:c,questionId:u,responseGroupUid:s,surveyId:i,mediaType:d}});const h={surveyId:i,updatedAt:new Date().toISOString(),mediaType:d,mediaRecordingUid:c};u&&(h.questionId=u),s&&(h.responseGroupUid=s),a&&(h.visitorId=a);const y=await(async()=>{const f=await fetch(`${t}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)});if(f.ok){const _=await f.json();return n&&n(U.UPLOAD_STARTED,{[U.UPLOAD_ID]:_.upload.id,[U.MEDIA_TYPE]:d,[U.MEDIA_RECORDING_UID]:c}),_.upload.url}else return n&&n(U.ERROR,{type:U.OTHER,response:f}),Ve(new Error("failed to get upload response with url"),"finishRecord",t,o,a,l),null})();y&&(Ie=M.document.defaultView.UpChunk.createUpload({endpoint:y,file:new M.document.defaultView.File([e.recordedData],`recording ${d} ${Date.now()}`),chunkSize:5120}),Ie.startTime=Date.now(),Qe({event:"Video Upload Start",apiBase:t,headers:o,visitorId:a,envId:l,metadata:{mediaRecordingUid:c,questionId:u,responseGroupUid:s,surveyId:i,mediaType:d,url:y}}),Ie.on("error",f=>{r(e.uploadProgressLabel,"none"),n&&n(U.UPLOAD_FINISHED,{[U.MEDIA_RECORDING_UID]:c}),Ve(f,"finishRecord",t,o,a,l)}),Ie.on("progress",f=>{n&&n(U.UPLOAD_PROGRESS,{[U.MEDIA_RECORDING_UID]:c,[U.UPLOAD_PROGRESS_PCT]:f.detail}),r(e.uploadProgressLabel,"progress",f.detail)}),Ie.on("success",()=>{r(e.uploadProgressLabel,"success"),n&&n(U.UPLOAD_FINISHED,{[U.MEDIA_RECORDING_UID]:c}),Qe({event:"Video Upload Success",apiBase:t,headers:o,visitorId:a,envId:l,metadata:{mediaRecordingUid:c,questionId:u,responseGroupUid:s,surveyId:i,mediaType:d,url:y,elapsedMs:Ie.startTime&&Date.now()-Ie.startTime}})}))})},xa=(e,t)=>{const n=new(M.videojs.getComponent("Component"))(e);return n.addClass("ul-buttons-panel"),t.map(r=>{n.addChild(r)}),Ku(n),n},Ku=e=>{e.children().forEach(t=>{if(we[t.name_]){const n=Qn(we[t.name_],`ul-${we[t.name_]}`);t.el_.appendChild(n)}})},Qn=(e,t="")=>{const n=M.document.createElement("span");return n.className="ul-button-text",n.innerHTML=e,n.id=t,n},wa=(e,t,n,r,o=!1,i)=>{e.addClass("ul-video-player");const s=new(M.videojs.getComponent("Component"))(e);s.addClass("ul-control-panel"),e.progressBar=s.addChild("ProgressControl"),n&&e.src(n),e.audioPlayerPlaceholder=new(M.videojs.getComponent("Component"))(e),e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const a=n&&n.src?Xu(n.src):null;n&&(o||!a)?(e.children()[0].classList.add("vjs-hidden"),M.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.audioPlayerPlaceholder.hide(),M.document.getElementById(`${e.id()}_html5_api`).style.height="100%",a&&e.poster(a)),e.on("play",()=>{!o&&n&&!a&&Gu(e,!1),i==null||i.play()}),e.on("pause",()=>{i==null||i.pause()}),e.on("seeked",()=>{i==null||i.currentTime(e.currentTime())}),e.on("ratechange",()=>{i==null||i.playbackRate(e.playbackRate())}),e.addChild(e.audioPlayerPlaceholder,{},1),s.addChild(t),e.addChild(s),r&&r(e)},zu=(e,t,n)=>{e.addClass(`ul${ga}`);const r=new(M.videojs.getComponent("Component"))(e);t&&e.src(t),e.addChild(r),n&&n(e)},Wu=(e,t,n,r,o,i,s,a=!1)=>{ya=Date.now();const u=Jn(t,{controls:!1,bigPlayButton:!1,fluid:!1,width:1280,height:720,playsinline:!0,plugins:{record:{audio:!0,video:{mandatory:{minWidth:1280,minHeight:720}},frameWidth:1280,frameHeight:720,maxLength:600,autoMuteDevice:!0}}});if(!u)return;u.payload=n;const{surveyId:d,questionId:c,responseGroupUid:h,visitorId:p,envId:y}=n;let f;const _=O=>{const R=xo,L=xo+"-audio-only";ba(u.uploadProgressLabel,"none"),Ie&&Ie.startTime>=ya&&Ie.abort();const F=M.document.getElementById("ul-camera-button");O?(u.children()[0].classList.add("vjs-hidden"),k.removeClass(R),k.addClass(L),F.innerHTML=we.TurnOnCamera,u.audioPlayerPlaceholder.removeClass("vjs-hidden"),f==null||f.getTracks().forEach(D=>{D.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then(D=>{f=D,D.getVideoTracks().forEach(ne=>{ne.enabled=!1}),u.record().onDeviceReady(D)}).catch(u.record().onDeviceError.bind(u.record()))):(f==null||f.getVideoTracks().forEach(D=>{D.enabled=!0}),u.children()[0].classList.remove("vjs-hidden"),u.record().getDevice(),k.removeClass(L),k.addClass(R),F.innerHTML=we.TurnOffCamera,u.audioPlayerPlaceholder.addClass("vjs-hidden"))},m=new(M.videojs.getComponent("Button"))(u,{clickHandler:()=>{m.hasClass(ee)||(Qe({event:"Video Delete Button Clicked",apiBase:r,headers:s,visitorId:p,envId:y,metadata:{questionId:c,responseGroupUid:h,surveyId:d}}),_(u.cameraOff),o(U.DELETE,{}),k.removeClass(ee),m.addClass(ee))}});m.addClass("ul-video-recorder-delete-button"),m.el_.appendChild(Qn(we.DeleteButton,"ul-delete-button"));const v=M.document.getElementById(t),w=()=>{v.classList.contains("vjs-fullscreen")&&u.cameraOff?v.style.display="table":v.style.display="flex"};w();const k=new(M.videojs.getComponent("Button"))(u,{clickHandler:()=>{u.record().isRecording()||(u.cameraOff=!u.cameraOff,Qe({event:"Video Camera Button Clicked",apiBase:r,headers:s,visitorId:n.visitorId,envId:n.envId,metadata:{questionId:c,responseGroupUid:h,surveyId:d,cameraOff:u.cameraOff}}),_(u.cameraOff),!m.hasClass(ee)&&m.addClass(ee),o(U.DELETE,{}),w())}});k.addClass(xo),k.el_.appendChild(Qn(we.TurnOffCamera,"ul-camera-button"));const b=new(M.videojs.getComponent("Button"))(u,{clickHandler:()=>{const O=M.document.getElementById("ul-recorder-toggle");if(u.record().isRecording())u.record().stop(),O&&(O.innerHTML=we.RecordButton),b.removeClass(wo),m.removeClass(ee);else{const R=M.document.getElementById("ul-recording-countdown-screen");if(R)R.remove(),O&&(O.innerHTML=we.RecordButton),_(u.cameraOff),o(U.DELETE,{}),k.removeClass(ee),m.addClass(ee),b.removeClass(wo),E.show();else{b.addClass(wo),E.hide(),k.addClass(ee),m.addClass(ee),O&&(O.innerHTML=we.StopButton);const L=M.document.createElement("div");L.id="ul-recording-countdown-screen",v.insertBefore(L,v.children[1]),L.style.height=`${v.offsetHeight}px`,ka(u,3)}}}});b.addClass("ul-video-recorder-toggle-button"),b.el_.appendChild(Qn(we.RecordButton,"ul-recorder-toggle"));const x=M.document.createElement("p");x.style.visibility="hidden",x.className="ul-upload-progress-label",e.appendChild(x),u.uploadProgressLabel=x;const S=xa(u,[m,k,"PlayToggle",b,"FullscreenToggle"]),E=S.children().find(O=>O.name_==="FullscreenToggle");E.hasClass("vjs-disabled")&&E.hide();const C=S.children().find(O=>O.name_==="PlayToggle");C.hide(),i&&k.addClass(ee),!i&&m.addClass(ee),wa(u,S,i,!1,a),u.on("stopRecord",()=>{b.hide(),C.show(),E.show(),m.removeClass(ee)}),u.on("deviceReady",()=>{b.show(),C.hide(),m.addClass(ee)}),qu(u,r,o,ba,s),i&&(u.deviceButton&&u.deviceButton.hide(),u.src(i),C.show(),b.hide(),m.removeClass(ee));const A=[{name:"microphone"}];!u.cameraOff&&A.push({name:"camera"}),Promise.all(A.map(O=>{var R;return(R=navigator==null?void 0:navigator.permissions)==null?void 0:R.query(O)})).then(O=>{O.reduce((L,F)=>L&F.state==="granted",!0)&&u&&(u.deviceButton&&u.deviceButton.hide(),!i&&u.record().getDevice())}).catch(O=>{})},ka=(e,t=3)=>{const n=M.document.getElementById("ul-recording-countdown-screen");n&&t===0?(n.remove(),e.record().start()):n&&(n.innerHTML=`Recording in... ${t}`,setTimeout(()=>{ka(e,t-1)},1e3))},Ca=e=>{const t=M.document.createElement("div");return t.className="ul-video-container",t.appendChild(Vu(e)),t},Co=(e,t)=>{const n=M.document.createElement("video");n.id=e,n.className="video-js vjs-default-skin ul-video-player-video";const r=M.document.createElement("p");r.className="vjs-no-js",r.innerHTML="To view this video please enable JavaScript, and consider upgrading to a web browser that";const o=M.document.createElement("a");return o.href="https://videojs.com/html5-video-support/",o.target="_blank",o.innerHTML="supports HTML5 video",r.appendChild(o),n.appendChild(r),t.appendChild(n),t},Gu=(e,t)=>{t?(e.children()[0].classList.add("vjs-hidden"),e.audioPlayerPlaceholder.show(),M.document.getElementById(`${e.id()}_html5_api`).style.height="0px"):(e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),M.document.getElementById(`${e.id()}_html5_api`).style.height="100%")},Jn=(e,t)=>M.document.getElementById(e)?t?M.videojs(e,t):M.videojs(e):(console.error(`Error in finding player element with ID, ${e}`),null),Zu=(e,t,n,r=!1,o="https://api.sprig.com",i=document,s=null,a=null)=>{M.document=i;const l=e+ma,u=Ca(l);return M.document.addEventListener("securitypolicyviolation",d=>{Ve(new Error(`Voice & Video feature violates ${d.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",o,{})}),_a(fa,()=>{M.document.getElementById(_o(l)).remove(),Co(l,u);const d={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const c=e+ga;Co(c,u);const h=Jn(l,d),p=Jn(c,{muted:!0,...d});if(!h||!p)return;zu(p,s,a),s||p.addClass(ee);const y=xa(h,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),f=y.children().find(_=>_.name_==="FullscreenToggle");f.hasClass("vjs-disabled")&&f.hide(),wa(h,y,t,n,r,p)}catch(c){Ve(new Error(`Error when creating video player object ${c}`),"playerDeviceError",o,{});return}}),u},Yu=(e,t={},n="https://api.userleap.com",r,o,i,s=!1,a=document)=>{M.document=a;const l=e+va,u=Ca(l);return M.document.addEventListener("securitypolicyviolation",d=>{Ve(new Error(`Voice & Video feature violates ${d.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",n,i,t.visitorId,t.envId)}),_a(fa.concat(Fu),()=>{Co(l,u),M.document.getElementById(_o(l)).remove();try{Wu(u,l,t,n,r,o,i,s)}catch(d){Ve(new Error(`Error when creating video recorder player object ${d}`),"recorderDeviceError",n,i,t.visitorId,t.envId);return}}),u},Qu=e=>{const t=e+va;if(M.document.getElementById(t)&&M.videojs){try{if(!M.videojs(t).record().stream)return}catch{return}M.videojs(t).record().stop(),M.videojs(t).record().stopDevice()}},Ju=e=>{const t=Jn(e+ma);t==null||t.pause()},Xu=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let n=t?t[1]:null;return n.includes(pa)&&(n=n.replace(pa,"")),n?`https://image.mux.com/${n}/thumbnail.jpg?time=0`:null},U={UPLOAD_STARTED:"upload.started",UPLOAD_PROGRESS:"upload.progress",UPLOAD_FINISHED:"upload.finished",DELETE:"delete",ERROR:"error",MEDIA_TYPE:"media.type",PERMISSION_DENIED:"permission_denied",OTHER:"other",UPLOAD_ID:"upload.id",UPLOAD_PROGRESS_PCT:"upload.progress.pct",MEDIA_RECORDING_UID:"media.recording.uid",MEDIA_TYPE_VIDEO:"video",MEDIA_TYPE_AUDIO:"audio"},we={PlaybackRateMenuButton:"Speed",PlayToggle:"Play",FullscreenToggle:"Expand",TurnOnCamera:"Turn on",TurnOffCamera:"Turn off",DeleteButton:"Delete",RecordButton:"Record",StopButton:"Stop",PauseButton:"Pause"},an="ul-card-video__player_recorder",ed="ul-card-video__skip_button",td="ul-video-interview-form",Sa="ul-video-btn",nd=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{apiURL:s,envId:a,handleUploadUpdate:l,headers:u,responseGroupUid:d,surveyId:c,viewDocument:h,visitorId:p}=z(R=>({apiURL:R.apiURL,envId:R.envId,handleUploadUpdate:R.handleUploadUpdate,headers:R.headers,responseGroupUid:R.responseGroupUid,surveyId:R.surveyId,viewDocument:R.viewDocument,visitorId:R.userId})),[y,f]=X(!1),[_,m]=X(null),[v,w]=X(null),[k,b]=X(0),x=r&&r.videoUrl,S=(R,L)=>{R===U.UPLOAD_STARTED?(m(L[U.UPLOAD_ID]),w(L[U.MEDIA_RECORDING_UID]),f(!0)):R===U.DELETE?(m(null),w(null),f(!1)):R===U.UPLOAD_PROGRESS?isNaN(L[U.UPLOAD_PROGRESS_PCT])?l({mediaRecordingUid:L[U.MEDIA_RECORDING_UID],isComplete:!0}):l({mediaRecordingUid:L[U.MEDIA_RECORDING_UID],progressPct:L[U.UPLOAD_PROGRESS_PCT]}):R===U.UPLOAD_FINISHED&&l({mediaRecordingUid:L[U.MEDIA_RECORDING_UID],isComplete:!0})},E=R=>{if(R&&R.children.length===0){const L=Zu(an,{src:x,type:"application/x-mpegURL"},void 0,r.mediaType===U.MEDIA_TYPE_AUDIO,s,h);R.appendChild(L)}},C=R=>{if(R&&R.children.length===0){const L=Yu(an,{surveyId:c,responseGroupUid:d,questionId:o,visitorId:p,envId:a},s,S,void 0,{...u,"x-ul-video-recorder-origin":"sdk"},r.mediaType===U.MEDIA_TYPE_AUDIO,h);R.appendChild(L)}},A=R=>{R.preventDefault(),R.stopPropagation(),Qu(an),_&&v?(l({mediaRecordingUid:v,isSubmitted:!0}),n({value:{mediaRecordingUid:v},questionId:o,type:i})):n({value:null,questionId:o,type:i})},O=()=>g(Ue,{defaultBody:()=>g("button",{className:`${Sa} ul-record-response-btn`,onClick:R=>{R.preventDefault(),R.stopPropagation(),Ju(an),b(1)}}),properties:r});return g("form",{className:B([e,j.VideoCard,j.FadeInTransition]),id:td,children:[g(xe,{message:t,properties:r}),g("div",{id:"ul-card-voice__video",children:[g("div",{children:[g("div",{id:"ul-question-player-container",style:{display:k===0?"":"none"},children:[g("div",{id:an,ref:E}),O()]}),g("div",{style:{display:k===1?"block":"none"},children:[g("button",{className:`${Sa} ul-back-question-btn`,onClick:R=>{R.preventDefault(),R.stopPropagation(),b(0)}}),g("div",{id:"ul-recorder-player-container",ref:C})]})]}),g(ce,{disabled:!y,onClick:A,children:ht(r)}),g("button",{className:`ul-card-text__button ${j.InactiveButton} ${j.SkipButton}`,id:ed,onClick:A,style:{display:r.required?"none":"block",...y?{display:"none"}:{}},children:fo(r)})]})]})},rd=({className:e})=>{const{uploadProgress:t}=z(i=>({uploadProgress:i.uploadProgress}));let n,r;Object.values(t).filter(i=>i.isSubmitted).length>1?(n="Your responses are processing",r="Please keep this tab open until your responses are fully processed."):(n="Your response is processing",r="Please keep this tab open until your response is fully processed.");const o=Math.round(Math.min(99,...Object.values(t).filter(i=>i.isSubmitted).map(i=>i.progressPct||0)));return g("div",{className:B([e,"ul-card--uploading",j.FadeInTransition]),children:[g("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:j.LoadingSpinnerContainer,role:"progressbar",children:g("div",{className:j.LoadingSpinner,children:[g("div",{className:j.LoadingSpinnerFirst}),g("div",{className:j.LoadingSpinnerSecond}),g("div",{className:j.LoadingSpinnerThird}),g("div",{className:j.LoadingSpinnerFourth})]})}),g(xe,{message:`${n} (${o}% complete)`}),g("p",{className:j.Caption,children:r})]})},Ea=({logoOnly:e=!1,style:t={}})=>g("svg",{alt:`${e?"Powered by ":""}Sprig`,width:e?"35":"112",height:"15",viewBox:e?"79 0 31 15":"0 0 112 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",...t},children:[!e&&g("path",{d:"M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.7812 4.99121 44.9619 6.38135 44.9619 8.45068V8.93311H40.0742C40.0996 10.2534 40.8232 11.0215 41.9595 11.0215C42.8418 11.0215 43.3687 10.5835 43.5337 10.228L43.5591 10.1772L44.8857 10.1709L44.873 10.228C44.6445 11.1357 43.6924 12.1514 41.9277 12.1514ZM41.8643 6.12109C40.9248 6.12109 40.2139 6.76221 40.0933 7.94922H43.5972C43.4893 6.71777 42.7974 6.12109 41.8643 6.12109ZM49.1133 12.1323C47.3804 12.1323 46.2568 10.7422 46.2568 8.57764V8.56494C46.2568 6.38135 47.3613 5.00391 49.1133 5.00391C50.0591 5.00391 50.8652 5.47363 51.2334 6.21631H51.3413V2.42041H52.7124V12.0181H51.3413V10.9326H51.2334C50.8335 11.688 50.0781 12.1323 49.1133 12.1323ZM49.5068 10.958C50.6558 10.958 51.3604 10.0503 51.3604 8.57764V8.56494C51.3604 7.09229 50.6494 6.18457 49.5068 6.18457C48.3516 6.18457 47.6597 7.08594 47.6597 8.56494V8.57764C47.6597 10.0566 48.3516 10.958 49.5068 10.958ZM61.98 12.1323C61.0151 12.1323 60.2598 11.688 59.8599 10.9326H59.7583V12.0181H58.3809V2.42041H59.7583V6.21631H59.8599C60.228 5.47363 61.0342 5.00391 61.98 5.00391C63.7319 5.00391 64.8364 6.38135 64.8364 8.56494V8.57764C64.8364 10.7422 63.7192 12.1323 61.98 12.1323ZM61.5928 10.958C62.7417 10.958 63.4336 10.0566 63.4336 8.57764V8.56494C63.4336 7.08594 62.7417 6.18457 61.5928 6.18457C60.4438 6.18457 59.7329 7.09229 59.7329 8.56494V8.57764C59.7329 10.0503 60.4438 10.958 61.5928 10.958ZM66.8867 14.4429C66.7153 14.4429 66.5122 14.4302 66.3345 14.4111V13.3257C66.4678 13.3447 66.6392 13.3511 66.7979 13.3511C67.439 13.3511 67.8262 13.0781 68.0293 12.3799L68.1309 12.0244L65.6299 5.12451H67.1152L68.8418 10.6343H68.9624L70.6826 5.12451H72.1299L69.5654 12.2847C68.9814 13.9287 68.2832 14.4429 66.8867 14.4429Z",fill:"black",fillOpacity:"0.7"}),g("path",{d:"M81.1088 6.63629C79.6878 6.32154 78.9672 5.76865 78.9672 4.99369C78.9672 4.19299 79.736 3.5886 80.7556 3.5886C81.8066 3.5886 82.5995 4.25285 82.5995 5.13336V5.20352H84.0518V5.13336C84.0518 3.52424 82.6405 2.30774 80.7693 2.30774C79.8676 2.30774 79.0414 2.58451 78.4433 3.08655C78.1463 3.33144 77.9077 3.63818 77.7448 3.98479C77.5818 4.33141 77.4984 4.70934 77.5005 5.09153C77.4946 5.44197 77.5675 5.78934 77.714 6.10857C77.8605 6.42779 78.0769 6.71092 78.3475 6.93752C78.8512 7.37584 79.5659 7.70024 80.4709 7.90299C81.9949 8.23898 82.7676 8.81054 82.7676 9.60094C82.7676 10.4576 81.9258 11.1032 80.813 11.1032C79.6571 11.1032 78.7854 10.3856 78.7854 9.43424V9.36408H77.3318V9.43424C77.3318 11.1167 78.8219 12.3847 80.7973 12.3847C81.7421 12.3847 82.6093 12.0983 83.2393 11.5769C83.5519 11.3237 83.8034 11.0048 83.9753 10.6433C84.1472 10.2818 84.2352 9.88702 84.2329 9.48766C84.2329 8.05875 83.1833 7.09907 81.1088 6.63629Z",fill:"black",fillOpacity:"0.7"}),g("path",{d:"M89.2394 4.68276C88.6963 4.67605 88.1596 4.79915 87.6751 5.04156C87.1905 5.28397 86.7725 5.63851 86.4566 6.07497V4.85204H85.0747V14.8479H86.4566V11.0356C86.7725 11.472 87.1906 11.8265 87.6751 12.0688C88.1596 12.3111 88.6963 12.434 89.2394 12.4272C91.3836 12.4272 93 10.7627 93 8.55495C93 6.34723 91.3836 4.68276 89.2394 4.68276ZM91.5608 8.84202C91.5057 9.41605 91.2512 9.95356 90.8406 10.3633C90.4299 10.773 89.8883 11.0296 89.3078 11.0896C88.5363 11.1669 87.8177 10.9461 87.2841 10.4692C86.7505 9.99222 86.4566 9.3106 86.4566 8.55495C86.4566 7.10159 87.5538 6.00546 89.0087 6.00546C89.7619 6.00546 90.4421 6.29124 90.9171 6.81002C91.407 7.34232 91.6357 8.06385 91.5608 8.84202Z",fill:"black",fillOpacity:"0.7"}),g("path",{d:"M109.95 4.85407V6.06349C109.298 5.18298 108.292 4.68286 107.153 4.68286C105.017 4.68286 103.406 6.31709 103.406 8.48426C103.406 10.6514 105.017 12.285 107.153 12.285C108.296 12.285 109.303 11.79 109.95 10.9185V11.1046C109.95 12.6101 108.993 13.5826 107.513 13.5826C106.513 13.5826 105.68 13.1494 105.284 12.424L105.264 12.3867H103.838L103.871 12.48C104.112 13.1892 104.583 13.8001 105.211 14.2179C105.841 14.6324 106.637 14.8512 107.513 14.8512C108.637 14.8512 109.594 14.4972 110.28 13.8285C110.967 13.1597 111.332 12.2194 111.332 11.1213V4.85407H109.95ZM109.175 10.3502C108.588 10.905 107.752 11.138 106.879 10.9887C106.361 10.8984 105.886 10.6475 105.523 10.2725C105.16 9.89751 104.927 9.41787 104.859 8.90328C104.736 8.03757 104.999 7.21756 105.581 6.655C106.069 6.19093 106.723 5.93643 107.401 5.94699C107.565 5.94713 107.729 5.96026 107.891 5.98625C108.946 6.15489 109.781 7.01609 109.921 8.0852C110.039 8.96507 109.766 9.78958 109.175 10.3502Z",fill:"black",fillOpacity:"0.7"}),g("path",{d:"M101.89 2.12378C101.63 2.06766 101.358 2.11486 101.133 2.25518C100.908 2.39551 100.747 2.61769 100.687 2.87371C100.626 3.12973 100.67 3.39902 100.809 3.62339C100.947 3.84775 101.17 4.00917 101.428 4.07275C101.503 4.08936 101.58 4.09778 101.657 4.09786C101.906 4.09824 102.146 4.0083 102.331 3.84518C102.517 3.68206 102.636 3.45714 102.664 3.21327C102.693 2.9694 102.63 2.72361 102.487 2.5227C102.344 2.32179 102.132 2.17981 101.89 2.12378Z",fill:"black",fillOpacity:"0.7"}),g("path",{d:"M100.967 10.934H99.7755C98.9285 10.934 98.4196 10.3644 98.4196 9.40982C98.4196 8.4791 98.8757 7.36945 99.8054 6.01778L99.8178 5.99976V5.61807L95.8571 5.06453C95.8585 4.90331 95.8162 4.74466 95.7346 4.60501C95.653 4.46536 95.5352 4.34979 95.3932 4.27027C95.0381 4.07718 94.6498 4.07717 94.3279 4.26383C94.1667 4.35799 94.035 4.4945 93.9476 4.65816C93.8602 4.82182 93.8205 5.00623 93.8328 5.19087C93.8452 5.37552 93.9092 5.55315 94.0176 5.70402C94.1261 5.85489 94.2748 5.97309 94.4472 6.04546L93.2151 12.258H94.5833L95.7196 6.35891L97.8593 6.7155C97.284 7.73439 96.9921 8.68442 96.9921 9.53919C96.9921 11.1168 97.9577 12.1498 99.5187 12.2496V12.258H102.346V4.87723H100.967V10.934Z",fill:"black",fillOpacity:"0.7"})]}),od=()=>{const{border:e,cards:t,forceBrandedLogo:n,headers:r,index:o,marketingUrl:i,showSurveyBrand:s,slugName:a,surveyId:l,viewedCardCount:u}=z(w=>({border:w.border,cards:w.cards,forceBrandedLogo:w.forceBrandedLogo,headers:w.headers,index:w.index,marketingUrl:w.marketingUrl,showSurveyBrand:w.showSurveyBrand,slugName:w.slugName,surveyId:w.surveyId,viewedCardCount:w.viewedCardCount})),d=He(null),c=t.filter(w=>w.type!==P.Uploading&&w.type!==P.Thanks),h=uu(t,o),p=u+1,y=p/(p+h),f=`${i}?utm_source=survey_branding&utm_medium=website&utm_campaign=${a}&utm_content=${l}${n&&"&utm_term=poweredby_pill"}`;pe(()=>{d.current&&(d.current.style.width=`${y*100}%`)},[y]);const _=()=>g(le,{children:[c.length>1&&g("div",{id:"ul-progress-bar-container",children:g("div",{id:"ul-progress-bar-current",ref:d,style:{border:`1px solid ${e||"#000"}`}})}),s?g("div",{className:n?"yellow-footer-logo":"",style:{marginTop:"4px"},children:g("a",{href:f,rel:"noreferrer",target:"_blank",children:g("div",{style:{display:"flex"},children:[g(Ea,{logoOnly:!1}),n&&g(Pa,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}):null]}),m=()=>g("a",{dir:"ltr",href:f,rel:"noreferrer",target:"_blank",children:g("div",{className:"thank-you-card-link",children:[g("div",{className:"sprig-box-logo",children:g(Ea,{logoOnly:!0,style:{margin:"auto"}})}),g("div",{children:g("p",{children:["Capture insights about your own product",g(Pa,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}),v=t[o].type===P.Thanks;return g("footer",{className:`ul-footer ${r["userleap-platform"]==="link"?"ul-footer__link":""}`,style:s?{}:{marginBottom:"10px"},children:v&&n?m():_()})},Pa=({style:e})=>g("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[g("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),g("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),id=()=>{const{answers:e,border:t,cards:n,close:r,configureExitOnOverlayClick:o,destroy:i,endCard:s,eventEmitFn:a,fontFamily:l,headers:u,index:d,next:c,showStripes:h,surveyId:p,update:y,useMobileStyling:f,viewDocument:_}=z(D=>({answers:D.answers,border:D.border,cards:D.cards,close:D.close,configureExitOnOverlayClick:D.configureExitOnOverlayClick,destroy:D.destroy,endCard:D.endCard,eventEmitFn:D.eventEmitFn,fontFamily:D.fontFamily,headers:D.headers,index:D.index,next:D.next,showStripes:D.showStripes,surveyId:D.surveyId,update:D.update,useMobileStyling:D.useMobileStyling,viewDocument:D.viewDocument})),m=He(null),v=He(!1),w=u["userleap-platform"],{props:k,type:b,name:x}=n[d],S=n.length;pe(()=>{m.current&&(m.current.classList.contains("ul-app--visible")||m.current.classList.add("ul-app--visible"),!v.current&&a&&(v.current=!0,a(Ce.SurveyAppeared,{name:Ce.SurveyAppeared,[Ki.SurveyId]:p})))},[a,p]),pe(()=>{y()},[d,y]),pe(()=>{o(()=>r())},[r,o]);const E=()=>r(yt),C=D=>{D.key==="Enter"&&E()},A=async function(D){c({data:D,completeSurvey:()=>{i(yt)},endCard:s}),Ml(_)};if(e){for(const D of e)if(D.questionId===x){let ne;if(b===P.MultipleChoice){const Z=k.options.find(({value:ke})=>ke===D.value);if(!Z)break;ne={[Z.id]:Z.value}}else ne=D.value;A({value:ne,type:b,questionId:D.questionId});break}}const O=()=>[_t.Email,_t.Link].includes(u["userleap-platform"])?!1:!s||d+1!==S,R=()=>f?{borderColor:t}:{borderColor:t,margin:"15px"},L=()=>{const D={className:"ul-card",next:A,questionId:x,type:b};switch(b){case P.ConsentLegal:return G(vu,{...D,...k,key:x});case P.Likert:return G(_u,{...D,...k,key:x});case P.Matrix:return G(bu,{...D,...k,key:x});case P.MultipleChoice:return G(xu,{...D,...k,key:x});case P.MultipleSelect:return G(wu,{...D,...k,key:x});case P.NPS:return G(ku,{...D,key:x,props:k});case P.Open:return G(Cu,{...D,...k,key:x});case P.RecordedTask:return G(Lu,{...D,...k,key:x});case P.TextUrlPrompt:return G($u,{...D,...k,key:x});case P.Thanks:return G(Bu,{...D,...k,key:x});case P.Uploading:return G(rd,{...D,...k,key:x});case P.VideoVoice:return G(nd,{...D,...k,key:x});default:return null}},F=D=>{var Je;const ne=window.sprigAPI,Z=D.target;if(!ne||!Z)return;const ke=[Z,Z.parentElement];for(const Xe of ke)if(((Je=Xe==null?void 0:Xe.tagName)==null?void 0:Je.toLowerCase())==="a"){D.preventDefault(),ne==null||ne.openUrl(Xe.href);return}};return g("div",{className:B("ul-app",mn(u)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:yt,onClick:F,ref:m,style:{"--theme":t,...l?{fontFamily:l.replace(";","")}:{}},children:g("div",{className:"ul-app__container",children:g("div",{className:B(Q(j.CardContainer,f)),style:R(),children:[O()&&g("div",{className:B(Q(j.CloseContainer,f)),children:g("div",{"aria-label":"Close button",className:j.CloseButton,onClick:E,onKeyPress:C,role:"button",tabIndex:0,children:g("svg",{fill:"none",height:"18px",viewBox:"0 0 13 13",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:g("path",{d:"M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z",fill:"#262136"})})})}),h&&g("div",{className:"ul-header__container",dir:"ltr",children:g("div",{className:"ul-header",children:"For development purposes only"})}),g("div",{className:B(ol(j.CardMainContent,w)),children:L()}),g(od,{})]})})})},sd='html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;margin:auto}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.ul-card__container{background:#fff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;overflow:auto;padding:20px 20px 5px;position:relative;text-align:center;word-break:break-word}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;margin-bottom:3px;display:flex;gap:16px;justify-content:center}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email{flex-grow:55;display:flex}.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{margin-bottom:5px}.ul-question{color:#343442;display:block;font-size:20px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-caption{flex:1 0 auto;margin-top:8px;margin-bottom:15px;font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.select-checkbox{height:16px;width:16px;border-radius:3px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 3px 3px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.fade-in-transition{animation:fadeIn .4s ease-in;-webkit-animation:fadeIn .4s ease-in;-moz-animation:fadeIn .4s ease-in;-o-animation:fadeIn .4s ease-in;-ms-animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-ms-keyframes fadeIn{0%{opacity:0}to{opacity:1}}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:#fff}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(93px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;max-width:var(--maxWidth);overflow:auto}.ul-matrix-option-wrapper{align-items:center;background:#f9f9f8;display:flex;justify-content:center;padding:10px 12px}.ul-matrix-last-option{border-start-end-radius:4px;border-end-end-radius:4px}.ul-matrix-row-label{align-items:center;background:#f9f9f8;border-end-start-radius:4px;border-start-start-radius:4px;display:flex;font-size:15px;left:0;right:0;max-width:200px;min-width:100px;padding:10px 12px;position:sticky}.ul-matrix-option-selected{border:6px solid var(--border);box-shadow:none}.ul-card__matrix{min-width:min-content;padding-right:20px}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-text{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:#fff}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:-webkit-fill-available}#ul-card-voice__video{align-items:center;display:flex;flex-direction:column}#ul-card-voice__video>div{margin-bottom:10px;width:100%}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#fff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center;flex-direction:column}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;left:0;position:absolute;top:0;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:auto;flex-grow:1;width:100%}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:#00000003;border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:#00000008}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:#f9c600;border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%}.close-btn{cursor:pointer;height:18px;margin-inline-end:-10px;position:relative;top:-10px;width:18px;z-index:1}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}#ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px;max-width:250px;margin:25px 0}#ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{width:100%;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:1;margin:0;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}',ad=async(e,t)=>{var r;const n=await fetch(t,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(n.ok){const o=await n.json();return(r=o==null?void 0:o.upload)==null?void 0:r.url}else return null},Ta=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",Ia=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:Ta()};return new MediaRecorder(e,t)},ja=(e,t,n)=>{n[t]=[],e.ondataavailable=function(r){n[t].push(r.data)},e.currentMediaRecordingUid=t,e.start()};function Oa(e,t,n,r,o,i){if(e&&e.state!=="inactive"){const{[V.BeginCallback]:s}=r,a=e.currentMediaRecordingUid;if(!a)return;s&&s(a),e.onstop=()=>ld(t,e,n,r,a,o,i),e.stop()}}async function ld(e,t,n,r,o,i,s){const a=z.getState().viewDocument,{[V.UploadCallback]:l,[V.ProgressCallback]:u}=r,d={mediaType:n,updatedAt:new Date().toISOString(),mediaRecordingUid:o,...r[V.PassthroughData]},c=await ad(d,e);if(!c){l&&l(null,{message:"failed to get upload url"});return}const h=new Blob(s,{type:Ta()});if(!a.defaultView)return;const p=new a.defaultView.File([h],`recording video ${Date.now()}`),y=i.createUpload({endpoint:c,file:p,chunkSize:5120});y.on("error",f=>{l&&l(null,f)}),y.on("progress",f=>{u&&u(o,f)}),y.on("success",()=>{l&&l(o,!0)})}const cd={state:{...{chunks:{}}},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:n,screenRecorder:r,UpChunk:o}=this.state,i=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?ye.Video:ye.Audio;this.state.chunks&&t&&o&&(n!=null&&n.currentMediaRecordingUid&&Oa(n,t,i,e,o,this.state.chunks[n==null?void 0:n.currentMediaRecordingUid]),r!=null&&r.currentMediaRecordingUid&&Oa(r,t,ye.Screen,e,o,this.state.chunks[r==null?void 0:r.currentMediaRecordingUid]))},handleCancelledStream(e){const t=e.getVideoTracks(),n=e.getAudioTracks();let r=t.length&&t[0];r=r||n.length&&n[0],r&&r.addEventListener("ended",()=>{[this.state.avRecorder,this.state.screenRecorder].map(o=>{o&&(o.state==="recording"&&o.stop(),o.stream.getTracks().map(i=>{i.readyState==="live"&&i.stop()}))}),Object.assign(this.state,{avStream:null,captureStream:null,avRecorder:null,screenRecorder:null})})},taskDurationMillisecond(){return this.state.startTime?new Date().getTime()-this.state.startTime.getTime():0},setUpChunk(e){this.state.UpChunk=e},configure(e,t){Object.assign(this.state,t),this.state.uploadApiEndpoint=`${t.apiURL}/2/environments/integrations/upload`,this.state.chunks={},e.on(re.PermissionStatus,this.permissionStatusCallback.bind(this)),e.on(re.AvPermission,async n=>{this.avPermissionCallback(n)}),e.on(re.BeginRecording,this.beginRecordingCallback.bind(this)),e.on(re.StartTask,this.startTaskCallback.bind(this)),e.on(re.ScreenPermission,async n=>{this.screenPermissionCallback(n)}),e.on(re.FinishTask,async n=>{this.finishTaskCallback(n)})},async avPermissionCallback(e){var r,o,i;const{[V.StreamReadyCallback]:t,[V.PermissionDescriptors]:n}=e;try{(r=this.state.avStream)!=null&&r.active&&(this.state.avStream.getTracks().map(s=>s.readyState==="live"&&s.stop()),((o=this.state.captureStream)==null?void 0:o.getAudioTracks().length)===1&&this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])),this.state.avStream=await navigator.mediaDevices.getUserMedia({video:n.includes(At.Camera),audio:!0}),((i=this.state.captureStream)==null?void 0:i.getAudioTracks().length)===0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.avStream)}catch(s){console.warn("Error: failed to get permissions: "+s),t&&t(null,null);return}t&&t(this.state.avStream,this.state.captureStream)},async screenPermissionCallback(e){const{[V.ScreenPermissionRequested]:t,[V.StreamReadyCallback]:n}=e;t==null||t(!0);try{this.state.captureStream=await navigator.mediaDevices.getDisplayMedia({video:!0,cursor:"always",displaySurface:"browser",preferCurrentTab:!0})}catch(r){t==null||t(!1),console.warn("Error: failed to get permissions: "+r),n&&n(null,null);return}t==null||t(!1),this.state.avStream&&this.state.avStream.getAudioTracks().length>0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.captureStream),n&&n(this.state.avStream||null,this.state.captureStream)},beginRecordingCallback(e){const{[V.RecordingMediaTypes]:t,[V.StartRecordingCallback]:n}=e;if(!t)return;const r=[];if(t.includes(ye.Video)&&this.state.avStream){this.state.avRecorder=Ia(this.state.avStream);const o=_n();ja(this.state.avRecorder,o,this.state.chunks),r.push(o)}if(t.includes(ye.Screen)&&this.state.captureStream){this.state.screenRecorder=Ia(this.state.captureStream);const o=_n();ja(this.state.screenRecorder,o,this.state.chunks),r.push(o)}r&&n&&n(r)},async finishTaskCallback(e){const{[V.CurrentIndex]:t,[V.TaskResponse]:n,[V.TaskCompleteCallback]:r}=e;await this.stopRecording(e),r&&r(this.taskDurationMillisecond()),this.state.cards&&this.state.hasEndCard!==void 0&&this.lookAheadAndStopStream(t,n,this.state.cards,this.state.hasEndCard)},startTaskCallback(){this.state.startTime=new Date},permissionStatusCallback(e){var r;const{[V.PermissionStatusCallback]:t}=e,n=this.state.avStream;t&&t(n,n?(n==null?void 0:n.getVideoTracks().length)>0:!1,!!((r=this.state.captureStream)!=null&&r.active),this.state.captureStream)},lookAheadAndStopStream(e,t,n,r){const{avRecorder:o,screenRecorder:i}=this.state,{allResponses:s}=z.getState(),a=Js({cards:n,index:e,hasEndCard:r,allResponses:s});a!==null&&n[a].type===P.RecordedTask||[o,i].map(l=>{l&&(l.state==="recording"&&l.stop(),l.stream.getTracks().map(u=>{u.readyState==="live"&&u.stop()}))})}},Xn=Object.create(cd);Object.freeze(Xn);const ud=(e,t)=>{const n=[...e],r=new Set([P.VideoVoice,P.RecordedTask]);return e.some(o=>r.has(o.type))&&n.push({name:-2,props:{routingOptions:[]},type:P.Uploading}),t&&n.push({name:-1,props:{routingOptions:[]},type:P.Thanks}),n},dd=({mode:e=null,viewWindow:t,viewDocument:n})=>{const r=n.documentElement;let o;try{o=t.parent.location.href}catch{o=t.location.href}return{mode:e,sw:t.screen.width,sh:t.screen.height,cw:r.clientWidth,ch:r.clientHeight,p:o,l:t.navigator.language}};function hd(e,t=!0){var b;const{answers:n,apiURL:r,customStyles:o,endCard:i,eventEmitFn:s,fontFamilyURL:a,frame:l,previewKey:u,viewDocument:d,viewWindow:c}=e,h=mn(e.headers)?e.frame:d.body,p=e.UpChunk||window.UpChunk,y=vn,f=ud(e.cards,!!i);Xn.configure(y,{cards:f,hasEndCard:!!i,apiURL:r,UpChunk:p}),z.setState({apiURL:r,answers:n,border:e.border,index:e.startingQuestionIdx||0,cards:f,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:s,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:l,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:dd({mode:e.mode,viewWindow:c,viewDocument:d}),mode:e.mode,previewKey:u,recorder:Xn,recorderEventEmitter:y,responseGroupUid:e.responseGroupUid,showStripes:e.showStripes,showSurveyBrand:e.showSurveyBrand,slugName:e.slugName,styleNonce:e.styleNonce,surveyId:e.surveyId,tabTitle:e.tabTitle,uploadingCardViewed:!1,uploadProgress:{},useMobileStyling:e.useMobileStyling,useDesktopPrototype:e.useDesktopPrototype,userId:e.userId,viewDocument:e.viewDocument,visitorAttributes:e.visitorAttributes,viewedCardCount:e.startingQuestionIdx||0});const{seen:_}=z.getState();_();const{head:m}=d,v=d.createElement("style");if(v.id="sprig-style",v.textContent=sd,v.nonce=e.styleNonce,m.appendChild(v),e.fontFamily&&a&&parent){const x=d.createElement("link");x.rel="stylesheet",x.href=a,m.appendChild(x)}if(e.customStyles&&Ll(d,o,e.styleNonce),!p)if(e.installationMethod!==bt.Npm){const x=d.createElement("script");x.src="https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js",x.onload=()=>{Xn.setUpChunk(c.UpChunk)},x.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},m.appendChild(x)}else console.warn("[Sprig] - recording functionality not configured due to missing UpChunk dependency");const w="2.26.2",k=s||((b=l.eventEmitter)==null?void 0:b.emit);k==null||k(Se.VerifyViewVersion,{[wt.ViewVersion]:w}),h&&t&&mt(g(id,{}),h)}({configure:hd}).configure(window.__cfg)})(); +//# sourceMappingURL=sprig-web-view-sdk-v2.26.2.js.map