@sprig-technologies/sprig-bundled 2.40.0 → 2.40.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/conversational-styles-BiL7hMhj.js +4 -0
- package/dist/conversational-styles-DlhTFTL6.cjs +1 -0
- package/dist/conversational-ui-COaQs_Nu.cjs +658 -0
- package/dist/conversational-ui-D-i49ps3.js +1477 -0
- package/dist/getAttributedUrl-B0b2NdfZ.js +188 -0
- package/dist/getAttributedUrl-B2AD3-f7.cjs +12 -0
- package/dist/{index-gY11yXiE.js → index-BZjOqtTO.js} +388 -394
- package/dist/index-BlwcV11_.js +658 -0
- package/dist/index-C3Nj6aLe.cjs +1 -0
- package/dist/{index-C4jT0KTM.cjs → index-D7xIZ9_C.cjs} +21 -21
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +11 -0
- package/dist/index.js +3 -3
- package/dist/view-CRNTl40s.cjs +1 -0
- package/dist/view-JArMqSNr.js +1494 -0
- package/package.json +1 -1
- package/dist/conversational-styles-CWNea3pP.js +0 -4
- package/dist/conversational-styles-CzhxRRD3.cjs +0 -1
- package/dist/conversational-ui-B4Gz-ntg.cjs +0 -658
- package/dist/conversational-ui-B_gqybcU.js +0 -1508
- package/dist/getAttributedUrl-BQOt-2c9.js +0 -192
- package/dist/getAttributedUrl-SO6zrj5v.cjs +0 -12
- package/dist/index-B7XdLO9n.cjs +0 -1
- package/dist/index-rqy70x2s.js +0 -670
- package/dist/view-BjWfEnbU.js +0 -1482
- package/dist/view-D-Rk2_yd.cjs +0 -1
|
@@ -1,658 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./view-D-Rk2_yd.cjs"),Y=require("./index-C4jT0KTM.cjs"),E=require("./getAttributedUrl-SO6zrj5v.cjs"),se="https://cdn.sprig.com",I={document:void 0,videojs:void 0},ke=n=>n+"-loading-spiner",W="hidden",Te=".m3u8",me="questionId",ge="ul-video-recorder-camera-off-button",he="ul-recording-in-session",Ke=[{type:"link",content:`${se}/dependencies/videojs-record-4.5.0.min.css`},{type:"script",content:`${se}/dependencies/RecordRTC-5.6.2.js`},{type:"script",content:`${se}/dependencies/adapter.8.0.0.min.js`},{type:"script",content:`${se}/dependencies/videojs-record-4.5.0.min.js`},{type:"script",content:`${se}/userleap-web-upchunk-v2.2.2.js`}],Be=[{type:"link",content:`${se}/dependencies/video-js-7.18.0.min.css`},{type:"script",content:`${se}/dependencies/video-js-7.18.0.min.js`},{type:"style",content:`/* progress control styles */
|
|
2
|
-
.video-js .vjs-control {
|
|
3
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.video-js .vjs-progress-control .vjs-progress-holder {
|
|
7
|
-
margin: 0 0px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.video-js .vjs-progress-control {
|
|
11
|
-
position: absolute;
|
|
12
|
-
height: 3px;
|
|
13
|
-
width: 100%;
|
|
14
|
-
}
|
|
15
|
-
/* position and align the buttons and button texts */
|
|
16
|
-
.ul-control-panel {
|
|
17
|
-
bottom: 0;
|
|
18
|
-
width: 100%;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
background-color: white;
|
|
21
|
-
height: fit-content;
|
|
22
|
-
z-index: 2;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.ul-buttons-panel {
|
|
26
|
-
color: black;
|
|
27
|
-
display: flex;
|
|
28
|
-
gap: 20px;
|
|
29
|
-
height: 50px;
|
|
30
|
-
justify-content: center;
|
|
31
|
-
margin: 10px;
|
|
32
|
-
padding: 2px 14px 0;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.video-js .vjs-volume-panel {
|
|
36
|
-
height: 30px;
|
|
37
|
-
width: 40px;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.ul-inactive {
|
|
41
|
-
opacity: 0.3;
|
|
42
|
-
cursor: default;
|
|
43
|
-
pointer-events: none;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/* buttons */
|
|
47
|
-
.ul-buttons-panel > .vjs-button {
|
|
48
|
-
background-color: rgba(0, 0, 0, 0.05);
|
|
49
|
-
border-radius: 50%;
|
|
50
|
-
display: flex;
|
|
51
|
-
height: 3em;
|
|
52
|
-
justify-content: center;
|
|
53
|
-
width: 3em;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.vjs-button>.vjs-icon-placeholder:before {
|
|
57
|
-
align-items: center;
|
|
58
|
-
display: flex;
|
|
59
|
-
font-size: unset;
|
|
60
|
-
line-height: 0.5;
|
|
61
|
-
justify-content: center;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
span.ul-button-text {
|
|
65
|
-
align-self: flex-end;
|
|
66
|
-
position: relative;
|
|
67
|
-
top: 14px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
#ul-camera-button {
|
|
71
|
-
white-space: nowrap;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.video-js .vjs-volume-control.vjs-volume-horizontal {
|
|
75
|
-
background-color: #fff;
|
|
76
|
-
z-index: 1;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level {
|
|
80
|
-
background-color: black;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,
|
|
84
|
-
.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,
|
|
85
|
-
.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active {
|
|
86
|
-
width: 40px;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,
|
|
90
|
-
.video-js .vjs-volume-panel .vjs-volume-control:active,
|
|
91
|
-
.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control,
|
|
92
|
-
.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,
|
|
93
|
-
.video-js .vjs-volume-panel:active .vjs-volume-control,
|
|
94
|
-
.video-js .vjs-volume-panel:focus .vjs-volume-control {
|
|
95
|
-
visibility: visible;
|
|
96
|
-
left: 40px;
|
|
97
|
-
position: absolute;
|
|
98
|
-
transition: visibility 0.1s, opacity 0.1s, height 0.1s, width 0.1s, left 0s, top 0s;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/* play button customization */
|
|
102
|
-
.video-js .vjs-play-control {
|
|
103
|
-
color: black;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.video-js .vjs-play-control .vjs-icon-placeholder:before {
|
|
107
|
-
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");
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/* position and style the current timer */
|
|
111
|
-
.ul-time-panel {
|
|
112
|
-
position: absolute;
|
|
113
|
-
bottom: 80px;
|
|
114
|
-
left: 10px;
|
|
115
|
-
height: 22px;
|
|
116
|
-
color: black;
|
|
117
|
-
border: 1px solid #e0e0eb;
|
|
118
|
-
border-radius: 23px;
|
|
119
|
-
background-color: white;
|
|
120
|
-
width: fit-content;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.video-js .vjs-current-time,
|
|
124
|
-
.vjs-no-flex .vjs-current-time {
|
|
125
|
-
display: flex;
|
|
126
|
-
align-items: center;
|
|
127
|
-
text-align: center;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/* remove the dot progress indicator */
|
|
131
|
-
.video-js .vjs-play-progress:before,
|
|
132
|
-
.video-js .vjs-volume-level:before,
|
|
133
|
-
.vjs-icon-circle:before,
|
|
134
|
-
.vjs-seek-to-live-control .vjs-icon-placeholder:before {
|
|
135
|
-
content: none;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.video-js .vjs-mute-control .vjs-icon-placeholder:before {
|
|
139
|
-
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");
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before {
|
|
143
|
-
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");
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before {
|
|
147
|
-
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");
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before {
|
|
151
|
-
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");
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.video-js .vjs-volume-control:hover .vjs-mouse-display {
|
|
155
|
-
display: none !important;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.video-js .vjs-play-progress {
|
|
159
|
-
background-color: black;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/* position video player inside the container */
|
|
163
|
-
.video-js .vjs-tech {
|
|
164
|
-
position: static;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.video-js .vjs-time-tooltip {
|
|
168
|
-
padding: 0.25em 0.75em;
|
|
169
|
-
align-items: center;
|
|
170
|
-
color: #333;
|
|
171
|
-
background: #FCFCFD;
|
|
172
|
-
border-radius: 99px;
|
|
173
|
-
text-align: center;
|
|
174
|
-
border: 1px solid #E0E0EB;
|
|
175
|
-
display: flex;
|
|
176
|
-
align-items: center;
|
|
177
|
-
justify-content: center;
|
|
178
|
-
top: -25px;
|
|
179
|
-
font-size: 12px !important;
|
|
180
|
-
width: 50px !important;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.video-js .vjs-play-progress.vjs-slider-bar .vjs-time-tooltip {
|
|
184
|
-
visibility: hidden !important;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.video-js .vjs-progress-control .vjs-mouse-display {
|
|
188
|
-
z-index: 2;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.ul-video-player {
|
|
192
|
-
width: 100%;
|
|
193
|
-
display: flex;
|
|
194
|
-
flex-direction: column;
|
|
195
|
-
height: auto;
|
|
196
|
-
border: 1px solid #E6E6E6;
|
|
197
|
-
background-color: white;
|
|
198
|
-
box-sizing: border-box;
|
|
199
|
-
border-radius: 4px;
|
|
200
|
-
background-clip: border-box;
|
|
201
|
-
overflow: hidden;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.video-js.vjs-fullscreen:not(.vjs-ios-native-fs) {
|
|
205
|
-
border: none;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
#video-response-player-secondary-video-player {
|
|
209
|
-
max-width: 200px;
|
|
210
|
-
margin-right: 20px;
|
|
211
|
-
background-color: transparent;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
#ul-card-video__player_recorder-video-recorder.vjs-fullscreen {
|
|
215
|
-
display: table;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.video-js div.vjs-progress-control {
|
|
219
|
-
margin-top: -3px;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.video-js .vjs-progress-control .vjs-slider {
|
|
223
|
-
background-color: #B2BBBD;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.vjs-record.video-js .vjs-control.vjs-button.vjs-fullscreen-control {
|
|
227
|
-
position:relative;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before {
|
|
231
|
-
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");
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before {
|
|
235
|
-
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");
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before, .video-js .vjs-icon-replay:before {
|
|
239
|
-
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");
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before, .vjs-icon-pause:before {
|
|
243
|
-
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");
|
|
244
|
-
padding: 2px;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.vjs-error-display {
|
|
248
|
-
display: none;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.ul-video-player-video {
|
|
252
|
-
position: relative;
|
|
253
|
-
top: 0;
|
|
254
|
-
left: 0;
|
|
255
|
-
width: 100%;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.ul-video-container {
|
|
259
|
-
width: 100%;
|
|
260
|
-
height: auto;
|
|
261
|
-
left: 0px;
|
|
262
|
-
top: 0px;
|
|
263
|
-
|
|
264
|
-
background-color: transparent;
|
|
265
|
-
border-radius: 4px;
|
|
266
|
-
|
|
267
|
-
align-items: start;
|
|
268
|
-
display: flex;
|
|
269
|
-
flex-direction: column;
|
|
270
|
-
|
|
271
|
-
/* Inside Auto Layout */
|
|
272
|
-
|
|
273
|
-
flex: none;
|
|
274
|
-
order: 0;
|
|
275
|
-
flex-grow: 0;
|
|
276
|
-
margin: 10px 0px;
|
|
277
|
-
position: relative;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.vjs-record button.vjs-device-button.vjs-control {
|
|
281
|
-
background: rgba(255, 255, 255, 96);
|
|
282
|
-
width: 100%;
|
|
283
|
-
height: 100%;
|
|
284
|
-
left: 0;
|
|
285
|
-
top: 0;
|
|
286
|
-
margin: 0;
|
|
287
|
-
border-radius: 0;
|
|
288
|
-
line-height: 0.6;
|
|
289
|
-
padding: 10px;
|
|
290
|
-
display: flex;
|
|
291
|
-
align-items: center;
|
|
292
|
-
flex-direction: column;
|
|
293
|
-
justify-content: center;
|
|
294
|
-
z-index: 3;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.vjs-record .vjs-device-button.vjs-control:before {
|
|
298
|
-
font-size: 14px !important;
|
|
299
|
-
color: #333;
|
|
300
|
-
content: "Your browser needs to access your camera and microphone for video recording";
|
|
301
|
-
line-height: 135%;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
.vjs-record .vjs-device-button.vjs-control.permission-denied:before {
|
|
305
|
-
font-size: 16px !important;
|
|
306
|
-
color: #262136;
|
|
307
|
-
content: "Unable to access your camera and microphone";
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.vjs-record .vjs-device-button.vjs-control:after {
|
|
311
|
-
display: inline-block;
|
|
312
|
-
background: #F0F0F5;
|
|
313
|
-
font-size: 13px;
|
|
314
|
-
border-radius: 4px;
|
|
315
|
-
content: "Request Permissions";
|
|
316
|
-
padding: 1em 2em;
|
|
317
|
-
color: #333;
|
|
318
|
-
margin-top: 20px;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.vjs-record .vjs-device-button.vjs-control.permission-denied:after {
|
|
322
|
-
display: inline-block;
|
|
323
|
-
background: white;
|
|
324
|
-
font-size: 13px;
|
|
325
|
-
content: "Please go to your browser settings and update permissions to enable recording";
|
|
326
|
-
padding: 1em;
|
|
327
|
-
color: #4B575D;
|
|
328
|
-
margin: 5px;
|
|
329
|
-
line-height: 135%;
|
|
330
|
-
text-align: center;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
.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 {
|
|
334
|
-
cursor: pointer;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.ul-video-recorder-delete-button .vjs-icon-placeholder:before {
|
|
338
|
-
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");
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
.ul-video-recorder-toggle-button .vjs-icon-placeholder:before {
|
|
342
|
-
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");
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
.ul-video-recorder-toggle-button.ul-recording-in-session .vjs-icon-placeholder:before {
|
|
346
|
-
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");
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.ul-video-recorder-camera-off-button .vjs-icon-placeholder:before {
|
|
350
|
-
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");
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.ul-video-recorder-camera-off-button-audio-only .vjs-icon-placeholder:before {
|
|
354
|
-
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");
|
|
355
|
-
transform: scale(0.75);
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
.ul-upload-progress-label {
|
|
359
|
-
padding: 0.15em 0.75em;
|
|
360
|
-
align-items: center;
|
|
361
|
-
font-size: 12px;
|
|
362
|
-
color: #333;
|
|
363
|
-
background: #FCFCFD;
|
|
364
|
-
border-radius: 99px;
|
|
365
|
-
text-align: center;
|
|
366
|
-
border: 1px solid #E0E0EB;
|
|
367
|
-
display: flex;
|
|
368
|
-
align-items: center;
|
|
369
|
-
justify-content: center;
|
|
370
|
-
position: absolute;
|
|
371
|
-
bottom: 75px;
|
|
372
|
-
left: calc(50% - 65px);
|
|
373
|
-
width: 130px;
|
|
374
|
-
z-index: 5;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
.ul-upload-progress-label__time {
|
|
378
|
-
display: inline-flex;
|
|
379
|
-
margin-left: 0.8em;
|
|
380
|
-
align-items: center;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
.ul-upload-progress-label__time:before {
|
|
384
|
-
content: "";
|
|
385
|
-
display: inline-flex;
|
|
386
|
-
width: 1px;
|
|
387
|
-
height: 12px;
|
|
388
|
-
background-color: #E0E0EB;
|
|
389
|
-
margin-right: 0.8em;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
@keyframes grow {
|
|
393
|
-
0% {
|
|
394
|
-
transform: scale(1);
|
|
395
|
-
background-color: #EEECFC;
|
|
396
|
-
}
|
|
397
|
-
50% {
|
|
398
|
-
transform: scale(1.2);
|
|
399
|
-
background-color: #E1DFF4;
|
|
400
|
-
}
|
|
401
|
-
100% {
|
|
402
|
-
transform: scale(1);
|
|
403
|
-
background-color: #EEECFC;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
.ul-audio-recorder-placeholder:before {
|
|
408
|
-
width: 80px;
|
|
409
|
-
height: 80px;
|
|
410
|
-
border-radius: 120px;
|
|
411
|
-
background-color: #EEECFC;
|
|
412
|
-
content: "";
|
|
413
|
-
position: absolute;
|
|
414
|
-
left: calc(50% - 40px);
|
|
415
|
-
top: calc(50% - 40px);
|
|
416
|
-
animation: 6s infinite grow;
|
|
417
|
-
transform-origin: 50% 60%;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
.ul-audio-recorder-placeholder:after {
|
|
421
|
-
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");
|
|
422
|
-
position: absolute;
|
|
423
|
-
left: 50%;
|
|
424
|
-
top: 50%;
|
|
425
|
-
transform: translate(-50%, -50%);
|
|
426
|
-
transform: translate(-50%, -50%) scale(0.6);
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
.ul-audio-recorder-placeholder {
|
|
430
|
-
min-height: 150px;
|
|
431
|
-
width: 100%;
|
|
432
|
-
background-color: #fcfcfd;
|
|
433
|
-
display: block;
|
|
434
|
-
position: relative;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
.vjs-fullscreen .ul-audio-recorder-placeholder {
|
|
438
|
-
vertical-align: middle;
|
|
439
|
-
display: table-cell;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
.vjs-fullscreen .ul-control-panel {
|
|
443
|
-
height: 80px;
|
|
444
|
-
position: absolute;
|
|
445
|
-
bottom: 0;
|
|
446
|
-
left: 0;
|
|
447
|
-
width: 100%;
|
|
448
|
-
max-width: 100%;
|
|
449
|
-
background-color: #F8F8F8;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
.vjs-playback-rate .vjs-playback-rate-value {
|
|
453
|
-
align-items: center;
|
|
454
|
-
display: flex;
|
|
455
|
-
font-size: 12px;
|
|
456
|
-
justify-content: center;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
.vjs-playback-rate .vjs-menu {
|
|
460
|
-
left: -5px;
|
|
461
|
-
bottom: 3px;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
.vjs-menu-button-popup .vjs-menu .vjs-menu-content {
|
|
465
|
-
background-color: white;
|
|
466
|
-
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
467
|
-
box-sizing: border-box;
|
|
468
|
-
border-radius: 4px;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
.vjs-menu li {
|
|
472
|
-
font-size: 12px;
|
|
473
|
-
padding: 5px 0;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
.vjs-menu li.vjs-selected {
|
|
477
|
-
color: lightgray;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
.vjs-menu li.vjs-menu-item:hover {
|
|
481
|
-
background-color: rgba(0, 0, 0, 0.05);
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
.vjs-fullscreen .ul-buttons-panel {
|
|
485
|
-
top: calc(50% - 30px);
|
|
486
|
-
position: relative;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
.vjs-fullscreen .vjs-record-indicator.vjs-control {
|
|
490
|
-
bottom: 90px !important;
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
.vjs-record.video-js div.vjs-control.vjs-record-indicator {
|
|
494
|
-
padding: 0.3em 0.75em 0.15em 15px;
|
|
495
|
-
align-items: center;
|
|
496
|
-
font-size: 12px;
|
|
497
|
-
color: #333;
|
|
498
|
-
background: #FCFCFD;
|
|
499
|
-
border-radius: 99px;
|
|
500
|
-
text-align: center;
|
|
501
|
-
border: 1px solid #E0E0EB;
|
|
502
|
-
display: flex;
|
|
503
|
-
justify-content: center;
|
|
504
|
-
align-items: center;
|
|
505
|
-
position: absolute;
|
|
506
|
-
bottom: 75px;
|
|
507
|
-
top: auto;
|
|
508
|
-
left: calc(50% - 21px);
|
|
509
|
-
width: 43px;
|
|
510
|
-
height: 16px;
|
|
511
|
-
z-index: 4;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
.vjs-record.video-js div.vjs-control.vjs-record-indicator:after {
|
|
515
|
-
content: "";
|
|
516
|
-
background-color: #EB5757;
|
|
517
|
-
width: 6px;
|
|
518
|
-
height: 6px;
|
|
519
|
-
border-radius: 8px;
|
|
520
|
-
animation: none;
|
|
521
|
-
top: 4px;
|
|
522
|
-
left: 5px;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
.vjs-record.video-js div.vjs-control.vjs-record-indicator:before {
|
|
526
|
-
position: relative;
|
|
527
|
-
font-size: 9px;
|
|
528
|
-
animation: none;
|
|
529
|
-
opacity: 1;
|
|
530
|
-
color: #333;
|
|
531
|
-
top: auto;
|
|
532
|
-
left: auto;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
.ul-video-player-loading {
|
|
536
|
-
display: inline-block;
|
|
537
|
-
position: relative;
|
|
538
|
-
width: 6rem;
|
|
539
|
-
height: 6rem;
|
|
540
|
-
|
|
541
|
-
}
|
|
542
|
-
.ul-video-player-loading div {
|
|
543
|
-
box-sizing: border-box;
|
|
544
|
-
position: absolute;
|
|
545
|
-
display: block;
|
|
546
|
-
width: 80%;
|
|
547
|
-
height: 80%;
|
|
548
|
-
margin: 5px;
|
|
549
|
-
border: 5px solid #666;
|
|
550
|
-
border-radius: 50%;
|
|
551
|
-
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
|
552
|
-
border-color: #666 transparent transparent transparent;
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
.first {
|
|
556
|
-
animation-delay: -0.45s;
|
|
557
|
-
}
|
|
558
|
-
.second {
|
|
559
|
-
animation-delay: -0.3s;
|
|
560
|
-
}
|
|
561
|
-
.third {
|
|
562
|
-
animation-delay: -0.15s;
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
@keyframes lds-ring {
|
|
566
|
-
0% {
|
|
567
|
-
transform: rotate(0deg);
|
|
568
|
-
}
|
|
569
|
-
100% {
|
|
570
|
-
transform: rotate(360deg);
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
.ul-video-btn {
|
|
575
|
-
width: 100%;
|
|
576
|
-
border: 1px solid #E6E6E6;
|
|
577
|
-
border-radius: 4px;
|
|
578
|
-
background-color: rgba(0, 0, 0, 0.02);
|
|
579
|
-
padding: 8px;
|
|
580
|
-
font-weight: 500;
|
|
581
|
-
font-size: 15px;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
.ul-record-response-btn:before, .ul-record-response-btn:after, .ul-back-question-btn:before, .ul-back-question-btn:after {
|
|
585
|
-
margin: 0 5px;
|
|
586
|
-
vertical-align: middle;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
.ul-record-response-btn:before {
|
|
590
|
-
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");
|
|
591
|
-
display: inline-block;
|
|
592
|
-
transform: translate(0px, 2px);
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
.ul-record-response-btn:after {
|
|
596
|
-
content: 'Record your Response';
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
.ul-back-question-btn:before {
|
|
600
|
-
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");
|
|
601
|
-
display: inline-block;
|
|
602
|
-
transform: scale(0.85) translate(0, 1px);
|
|
603
|
-
-moz-transform: scale(0.85) translate(0, 2px);
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
.ul-back-question-btn:after {
|
|
607
|
-
content: 'Back to Question';
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
.hidden {
|
|
611
|
-
display: none !important;
|
|
612
|
-
opacity: 0;
|
|
613
|
-
visibility: hidden;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
.visible {
|
|
617
|
-
visibility: visible;
|
|
618
|
-
opacity: 1;
|
|
619
|
-
animation: fade 0.3s;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
@keyframes fade {
|
|
623
|
-
0% {
|
|
624
|
-
opacity: 0;
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
100% {
|
|
628
|
-
opacity: 1;
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
#ul-recording-countdown-screen {
|
|
633
|
-
width: 100%;
|
|
634
|
-
height: 100%;
|
|
635
|
-
color: black;
|
|
636
|
-
background-color: rgba(255, 255, 255, 0.8);
|
|
637
|
-
position: absolute;
|
|
638
|
-
text-align: center;
|
|
639
|
-
font-size: 15px;
|
|
640
|
-
z-index: 1;
|
|
641
|
-
display: table;
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
.ul-countdown-text {
|
|
645
|
-
vertical-align: middle;
|
|
646
|
-
display: table-cell;
|
|
647
|
-
transform: translate(0, -25px);
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
.vjs-fullscreen > #ul-recording-countdown-screen {
|
|
651
|
-
font-size: 25px;
|
|
652
|
-
transform: unset;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
.vjs-poster {
|
|
656
|
-
background-size: cover;
|
|
657
|
-
}
|
|
658
|
-
`}],Ne="-video-player",_e="-secondary-video-player",Ie="-video-recorder";let X,De;const oe=async({event:n,apiBase:r,headers:t,visitorId:o,envId:s,metadata:a})=>{const d=I.document.documentElement;if(!o||!s)return;const u={event:`SDK - ${n}`,visitorId:o,environmentId:s,metadata:{...a||{},screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:d.clientWidth,clientHeight:d.clientHeight,location:window.location.href,language:navigator.language}};(await fetch(`${r}/sdk/1/visitors/${o}/analytics`,{method:"POST",cache:"no-cache",headers:t,body:JSON.stringify(u)})).ok||console.warn("[Sprig] (ERR-444) Failed to track analytics",n)},ne=async(n,r,t,o,s,a)=>{oe({event:`Video Error ${r}`,apiBase:t,headers:o,visitorId:s,envId:a,metadata:{errorMessage:n.message}});const d=I.document.documentElement,u={screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:d.clientWidth,clientHeight:d.clientHeight,location:window.location.href,language:navigator.language},i={action:r,err:{message:n.message,stack:n.stack},meta:u,vid:s,envId:a};(await fetch(`${t}/sdk/1/errors`,{method:"POST",cache:"no-cache",headers:{...o,"userleap-platform":"video_recorder","x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(i)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",n)},Oe=(n,r)=>{if(n.length===0)return r&&r();Promise.all(n.reduce((t,o)=>(t.push(((s,{type:a,content:d})=>new Promise(function(u,i){let p;a==="script"?(p=I.document.createElement("script"),p.src=d):a==="link"?(p=I.document.createElement("link"),p.rel="stylesheet",p.href=d,p.type="text/css"):(p=I.document.createElement("style"),p.innerHTML=d),p.onload=function(){u(d)},p.onerror=function(){i(d)},p.async=!1,p.id=btoa(d),s.appendChild(p)}))(I.document.head,o)),t),[])).then(()=>{I.videojs=I.document.defaultView.videojs,r&&r()}).catch(function(t){console.log(t+" failed to load")})},Se=(n,r,t)=>{if(r==="start"&&(n.style.visibility="visible"),r==="none")n.style.visibility=W;else if(r==="success")n.style.visibility=W,n.innerHTML="Upload succeeded!";else{const o=Math.round(parseFloat(t));n.innerHTML=`Uploading <span class="ul-upload-progress-label__time">${o}%</span>`,n.style.background=`linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${o}%, #FCFCFD ${o}%, #FCFCFD 100%)`}},be=(n,r)=>{const t=I.videojs(n.id());return t==null?void 0:t.payload[r]},qe=(n,r)=>{const t=new(I.videojs.getComponent("Component"))(n);return t.addClass("ul-buttons-panel"),r.map(o=>{t.addChild(o)}),Je(t),t},Je=n=>{n.children().forEach(r=>{if(J[r.name_]){const t=de(J[r.name_],`ul-${J[r.name_]}`);r.el_.appendChild(t)}})},de=(n,r="")=>{const t=I.document.createElement("span");return t.className="ul-button-text",t.innerHTML=n,t.id=r,t},Ue=(n,r,t,o,s=!1,a)=>{n.addClass("ul-video-player");const d=new(I.videojs.getComponent("Component"))(n);d.addClass("ul-control-panel"),n.progressBar=d.addChild("ProgressControl"),t&&n.src(t),n.audioPlayerPlaceholder=new(I.videojs.getComponent("Component"))(n),n.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const u=t&&t.src?tn(t.src):null;!t||!s&&u?(n.audioPlayerPlaceholder.hide(),I.document.getElementById(`${n.id()}_html5_api`).style.height="100%",u&&n.poster(u)):(n.children()[0].classList.add("vjs-hidden"),I.document.getElementById(`${n.id()}_html5_api`).style.height="0px"),n.on("play",()=>{s||!t||u||en(n),a==null||a.play()}),n.on("pause",()=>{a==null||a.pause()}),n.on("seeked",()=>{a==null||a.currentTime(n.currentTime())}),n.on("ratechange",()=>{a==null||a.playbackRate(n.playbackRate())}),n.addChild(n.audioPlayerPlaceholder,{},1),d.addChild(r),n.addChild(d),o&&o(n)},Xe=(n,r,t,o,s,a,d,u=!1)=>{De=Date.now();const i=ce(r,{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(!i)return;i.payload=t;const{surveyId:p,questionId:y,responseGroupUid:g,visitorId:l,envId:T}=t;let j;const m=b=>{const v=ge,k=ge+"-audio-only";Se(i.uploadProgressLabel,"none"),X&&X.startTime>=De&&X.abort();const A=I.document.getElementById("ul-camera-button");b?(i.children()[0].classList.add("vjs-hidden"),h.removeClass(v),h.addClass(k),A.innerHTML=J.TurnOnCamera,i.audioPlayerPlaceholder.removeClass("vjs-hidden"),j==null||j.getTracks().forEach(f=>{f.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then(f=>{j=f,f.getVideoTracks().forEach(D=>{D.enabled=!1}),i.record().onDeviceReady(f)}).catch(i.record().onDeviceError.bind(i.record()))):(j==null||j.getVideoTracks().forEach(f=>{f.enabled=!0}),i.children()[0].classList.remove("vjs-hidden"),i.record().getDevice(),h.removeClass(k),h.addClass(v),A.innerHTML=J.TurnOffCamera,i.audioPlayerPlaceholder.addClass("vjs-hidden"))},c=new(I.videojs.getComponent("Button"))(i,{clickHandler:()=>{c.hasClass(W)||(oe({event:"Video Delete Button Clicked",apiBase:o,headers:d,visitorId:l,envId:T,metadata:{questionId:y,responseGroupUid:g,surveyId:p}}),m(i.cameraOff),s(B.DELETE,{}),h.removeClass(W),c.addClass(W))}});c.addClass("ul-video-recorder-delete-button"),c.el_.appendChild(de(J.DeleteButton,"ul-delete-button"));const P=I.document.getElementById(r),L=()=>{P.classList.contains("vjs-fullscreen")&&i.cameraOff?P.style.display="table":P.style.display="flex"};L();const h=new(I.videojs.getComponent("Button"))(i,{clickHandler:()=>{i.record().isRecording()||(i.cameraOff=!i.cameraOff,oe({event:"Video Camera Button Clicked",apiBase:o,headers:d,visitorId:t.visitorId,envId:t.envId,metadata:{questionId:y,responseGroupUid:g,surveyId:p,cameraOff:i.cameraOff}}),m(i.cameraOff),!c.hasClass(W)&&c.addClass(W),s(B.DELETE,{}),L())}});h.addClass(ge),h.el_.appendChild(de(J.TurnOffCamera,"ul-camera-button"));const _=new(I.videojs.getComponent("Button"))(i,{clickHandler:()=>{const b=I.document.getElementById("ul-recorder-toggle");if(i.record().isRecording())i.record().stop(),b&&(b.innerHTML=J.RecordButton),_.removeClass(he),c.removeClass(W);else{const v=I.document.getElementById("ul-recording-countdown-screen");if(v)v.remove(),b&&(b.innerHTML=J.RecordButton),m(i.cameraOff),s(B.DELETE,{}),h.removeClass(W),c.addClass(W),_.removeClass(he),x.show();else{_.addClass(he),x.hide(),h.addClass(W),c.addClass(W),b&&(b.innerHTML=J.StopButton);const k=I.document.createElement("div");k.id="ul-recording-countdown-screen",P.insertBefore(k,P.children[1]),k.style.height=`${P.offsetHeight}px`,Ae(i,3)}}}});_.addClass("ul-video-recorder-toggle-button"),_.el_.appendChild(de(J.RecordButton,"ul-recorder-toggle"));const w=I.document.createElement("p");w.style.visibility="hidden",w.className="ul-upload-progress-label",n.appendChild(w),i.uploadProgressLabel=w;const N=qe(i,[c,h,"PlayToggle",_,"FullscreenToggle"]),x=N.children().find(b=>b.name_==="FullscreenToggle");x.hasClass("vjs-disabled")&&x.hide();const q=N.children().find(b=>b.name_==="PlayToggle");q.hide(),c.addClass(W),Ue(i,N,a,!1,u),i.on("stopRecord",()=>{_.hide(),q.show(),x.show(),c.removeClass(W)}),i.on("deviceReady",()=>{_.show(),q.hide(),c.addClass(W)}),((b,v,k,A,f)=>{const{surveyId:D,responseGroupUid:O,visitorId:H,envId:$}=b.payload;b.on("deviceError",function(){console.warn("device error: ",b.deviceErrorCode),b.deviceErrorCode.message==="Permission denied"?(b.deviceButton.addClass("permission-denied"),k&&k(B.ERROR,{type:B.PERMISSION_DENIED}),oe({event:"Video Permission Denied",apiBase:v,headers:f,visitorId:H,envId:$,metadata:{questionId:be(b,me),responseGroupUid:O,surveyId:D}})):(k&&k(B.ERROR,{type:B.OTHER}),ne(new Error(b.deviceErrorCode.message),"recorderDeviceError",v,f,H,$))}),b.on("error",function(F,G){ne(G||b.error(),"recorderError",v,f,H,$)}),b.on("startRecord",function(F,G){A(b.uploadProgressLabel,"none"),oe({event:"Video Record Start",apiBase:v,headers:f,visitorId:H,envId:$,metadata:{questionId:be(b,me),responseGroupUid:O,surveyId:D}})}),b.on("finishRecord",async function(){A(b.uploadProgressLabel,"start",0);const F=be(b,me);if(!D){const C="internal error: missing fields in payload";return k&&k(B.ERROR,{type:B.OTHER}),ne(new Error(C),"finishRecord",v,f,H,$),null}b.record().stopDevice();const G=b.cameraOff?B.MEDIA_TYPE_AUDIO:B.MEDIA_TYPE_VIDEO,Z=Y.v4();oe({event:"Video Record Finish",apiBase:v,headers:f,visitorId:H,envId:$,metadata:{mediaRecordingUid:Z,questionId:F,responseGroupUid:O,surveyId:D,mediaType:G}});const te={surveyId:D,updatedAt:new Date().toISOString(),mediaType:G,mediaRecordingUid:Z};F&&(te.questionId=F),O&&(te.responseGroupUid=O),H&&(te.visitorId=H);const re=await(async()=>{const C=await fetch(`${v}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(te)});if(C.ok){const M=await C.json();return k&&k(B.UPLOAD_STARTED,{[B.UPLOAD_ID]:M.upload.id,[B.MEDIA_TYPE]:G,[B.MEDIA_RECORDING_UID]:Z}),M.upload.url}return k&&k(B.ERROR,{type:B.OTHER,response:C}),ne(new Error("failed to get upload response with url"),"finishRecord",v,f,H,$),null})();re&&(X=I.document.defaultView.UpChunk.createUpload({endpoint:re,file:new I.document.defaultView.File([b.recordedData],`recording ${G} ${Date.now()}`),chunkSize:5120}),X.startTime=Date.now(),oe({event:"Video Upload Start",apiBase:v,headers:f,visitorId:H,envId:$,metadata:{mediaRecordingUid:Z,questionId:F,responseGroupUid:O,surveyId:D,mediaType:G,url:re}}),X.on("error",C=>{A(b.uploadProgressLabel,"none"),k&&k(B.UPLOAD_FINISHED,{[B.MEDIA_RECORDING_UID]:Z}),ne(C,"finishRecord",v,f,H,$)}),X.on("progress",C=>{k&&k(B.UPLOAD_PROGRESS,{[B.MEDIA_RECORDING_UID]:Z,[B.UPLOAD_PROGRESS_PCT]:C.detail}),A(b.uploadProgressLabel,"progress",C.detail)}),X.on("success",()=>{A(b.uploadProgressLabel,"success"),k&&k(B.UPLOAD_FINISHED,{[B.MEDIA_RECORDING_UID]:Z}),oe({event:"Video Upload Success",apiBase:v,headers:f,visitorId:H,envId:$,metadata:{mediaRecordingUid:Z,questionId:F,responseGroupUid:O,surveyId:D,mediaType:G,url:re,elapsedMs:X.startTime&&Date.now()-X.startTime}})}))})})(i,o,s,Se,d);const S=[{name:"microphone"}];!i.cameraOff&&S.push({name:"camera"}),Promise.all(S.map(b=>{var v;return(v=navigator==null?void 0:navigator.permissions)==null?void 0:v.query(b)})).then(b=>{b.reduce((v,k)=>v&k.state==="granted",!0)&&i&&(i.deviceButton&&i.deviceButton.hide(),i.record().getDevice())}).catch(b=>{})},Ae=(n,r=3)=>{const t=I.document.getElementById("ul-recording-countdown-screen");t&&r===0?(t.remove(),n.record().start()):t&&(t.innerHTML=`<span class='ul-countdown-text'>Recording in... ${r}</span>`,setTimeout(()=>{Ae(n,r-1)},1e3))},He=n=>{const r=I.document.createElement("div");return r.className="ul-video-container",r.appendChild((t=>{const o=I.document.createElement("div");return o.className="ul-video-player-loading",o.id=ke(t),["first","second","third","fourth"].map(s=>{const a=I.document.createElement("div");a.className=s,o.appendChild(a)}),o})(n)),r},fe=(n,r)=>{const t=I.document.createElement("video");t.id=n,t.className="video-js vjs-default-skin ul-video-player-video";const o=I.document.createElement("p");o.className="vjs-no-js",o.innerHTML="To view this video please enable JavaScript, and consider upgrading to a web browser that";const s=I.document.createElement("a");return s.href="https://videojs.com/html5-video-support/",s.target="_blank",s.innerHTML="supports HTML5 video",o.appendChild(s),t.appendChild(o),r.appendChild(t),r},en=(n,r)=>{n.children()[0].classList.remove("vjs-hidden"),n.audioPlayerPlaceholder.hide(),I.document.getElementById(`${n.id()}_html5_api`).style.height="100%"},ce=(n,r)=>I.document.getElementById(n)?r?I.videojs(n,r):I.videojs(n):(console.error(`Error in finding player element with ID, ${n}`),null),nn=(n,r,t,o=!1,s="https://api.sprig.com",a=document,d=null,u=null)=>{I.document=a;const i=n+Ne,p=He(i);return I.document.addEventListener("securitypolicyviolation",y=>{ne(new Error(`Voice & Video feature violates ${y.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",s,{})}),Oe(Be,()=>{I.document.getElementById(ke(i)).remove(),fe(i,p);const y={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const g=n+_e;fe(g,p);const l=ce(i,y),T=ce(g,{muted:!0,...y});if(!l||!T)return;((c,P,L)=>{c.addClass(`ul${_e}`);const h=new(I.videojs.getComponent("Component"))(c);P&&c.src(P),c.addChild(h),L&&L(c)})(T,d,u),d||T.addClass(W);const j=qe(l,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),m=j.children().find(c=>c.name_==="FullscreenToggle");m.hasClass("vjs-disabled")&&m.hide(),Ue(l,j,r,t,o,T)}catch(g){return void ne(new Error(`Error when creating video player object ${g}`),"playerDeviceError",s,{})}}),p},tn=n=>{if(!n)return null;const r=n.match(/https:\/\/stream.mux.com\/(.*)/);let t=r?r[1]:null;return t.includes(Te)&&(t=t.replace(Te,"")),t?`https://image.mux.com/${t}/thumbnail.jpg?time=0`:null},B={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"},J={PlaybackRateMenuButton:"Speed",PlayToggle:"Play",FullscreenToggle:"Expand",TurnOnCamera:"Turn on",TurnOffCamera:"Turn off",DeleteButton:"Delete",RecordButton:"Record",StopButton:"Stop",PauseButton:"Pause"},rn=({properties:n,surveyVideoUrl:r,questionId:t})=>{const o=`ul-card-video__question_player-q${t}`,{apiURL:s,viewDocument:a}=e.useConfig(d=>({apiURL:d.apiURL,viewDocument:d.viewDocument}));return e.u("div",{id:o,ref:d=>{if(d&&d.children.length===0&&!n.properties.hideRecordedPrompt){const u=nn(o,{src:r,type:"application/x-mpegURL"},void 0,n.properties.mediaType===B.MEDIA_TYPE_AUDIO,s,a);d.appendChild(u)}}})},ie=({isDisabled:n,onClick:r,children:t})=>e.u(E.Button,{className:"ul-card__button-checkmark",disabled:n,onClick:r,type:"button",children:[e.u("svg",{fill:"none",height:"10",viewBox:"0 0 13 10",width:"13",xmlns:"http://www.w3.org/2000/svg",children:e.u("path",{d:"M11.5 1.5L4.5 8.5L1 5",stroke:"#ffffff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),t||"Ok"]}),on=({className:n,next:r,properties:t,questionId:o,type:s})=>{const{useMobileStyling:a,border:d,update:u}=e.useConfig(w=>({useMobileStyling:w.useMobileStyling,border:w.border,update:w.update})),[i,p]=e.h(!1),[y,g]=e.h(""),[l,T]=e.h(!1),j=t==null?void 0:t.collectName,m=(t==null?void 0:t.nameLabelText)||"Full Name",c=(t==null?void 0:t.consentText)||"I agree to the stated conditions",P=(t==null?void 0:t.submitButtonText)||"Submit",L=!!y.trim(),h=i&&(!j||L),_=(w,N=!1)=>{w.preventDefault(),w.stopPropagation();let x=null;if(!N){if(!h)return void T(!0);x={submitted:!0},j&&(x.name=y)}r({value:x,questionId:o,type:s},!!N||h)};return e.p(()=>{u()},[u]),e.u("div",{className:e.cc(n,"ul-card__consent-legal","fade-in-transition"),children:e.u(E.MobileEmbedView,{embeddedType:"pdf",properties:t,children:e.u(E.QuestionBodyFooterContainer,{children:[e.u("div",{className:"sprig-stretch",children:[e.u(E.Option,{allowTextEntry:!1,border:d,error:l&&!i,id:"consent",isRadio:!1,isSelected:i,label:c,onUserInputChanged:({selected:w})=>{w!==i&&p(!i)},useMobileStyling:a}),j&&e.u("input",{"aria-label":m,"aria-placeholder":m,className:e.cc(e.getClasses("ul-consent-legal__name-input",a)),"data-gramm":"false",maxLength:250,name:"name",onBlur:w=>{w.currentTarget.style.borderColor=l&&!L?Y.ERROR_BORDER_COLOR:Y.DEFAULT_BORDER_COLOR},onFocus:w=>{w.currentTarget.style.borderColor=l&&!L?Y.ERROR_BORDER_COLOR:d},onInput:w=>{w.preventDefault(),w.stopPropagation(),g(w.currentTarget.value)},placeholder:m,style:l&&!L?{borderColor:Y.ERROR_BORDER_COLOR}:{},tabIndex:0,value:y})]}),e.u("div",{className:"ul-card__button-wrapper ul-card-vertical__button-wrapper",children:[e.u(ie,{isDisabled:!h,onClick:w=>_(new SubmitEvent(w.type)),children:e.getButtonText({buttonText:P})}),t.required===!1&&e.u("button",{className:"ul-card-skip__button",onClick:w=>_(new SubmitEvent(w.type),!0),children:e.getSkipButtonText(t)})]})]})})},o)},sn=()=>{const{destroy:n,forceBrandedLogo:r}=e.useConfig(t=>({destroy:t.destroy,forceBrandedLogo:t.forceBrandedLogo}));return e.p(()=>{setTimeout(()=>{n(Y.APP_ID)},r?4e3:2e3)},[n,r]),e.u("div",{className:"end-of-survey-text",children:"End of survey"})},an=({activeValue:n,border:r,icon:t,enableCspTrustedTypes:o,isPressed:s,range:a,scaleLabelType:d,selectedValue:u,setSelectedValue:i,setActiveValue:p,setIsPressed:y,useMobileStyling:g,value:l,viewDocument:T})=>{const j=`option-${l}`,m=d==="number",c=d==="star",P=d==="smiley",L=m&&l===n||l===u,[h,_]=(()=>{const x=c&&u!==null&&l<=u;return c&&l<=n||P&&l===n||x||l===n||l===u?[r,s||x||l===u?1:.3]:["",1]})(),w=e.F(()=>{const x={borderColor:L?h:"",fillOpacity:L?"":_,zIndex:L?3:"auto",color:u===l?"#fff":""};return m?{...x,backgroundColor:u===l?h:""}:{...x,color:c||P||u===l?h:""}},[L,h,_,u,l,m,c,P]),N=e.F(()=>Y.getHtml((({icon:x,scaleLabelType:q,value:S,selectedValue:b})=>{if(q==="smiley"&&S===b){let v=0;return x.replace(/black/g,()=>++v==1?"black":"white")}return x})({icon:t,scaleLabelType:d,value:l,selectedValue:u}),o),[o,t,d,u,l]);return e.u("button",{"aria-label":m?void 0:String(l),className:(()=>{switch(d){case"star":return e.cc(e.getClasses("likert-star",g),e.getClasses(`likert-star-${l}`,g));case"smiley":return e.cc(e.getClasses("likert-smiley",g),e.getClasses(`likert-smiley-${l}`,g));default:return l===a?e.cc(e.getClasses("likert-number",g),e.getClasses(`likert-number-${l}`,g),e.getClasses("likert-last-option",g)):e.cc(e.getClasses("likert-number",g),e.getClasses(`likert-number-${l}`,g))}})(),dangerouslySetInnerHTML:{__html:N},id:j,onClick:x=>{x.preventDefault(),x.stopPropagation(),i(l)},onKeyDown:x=>{var b,v;const q=T.querySelectorAll(`.likert-${d??"number"}`),S=l-1;x.key==="ArrowRight"?(b=q[S+1])==null||b.focus():x.key==="ArrowLeft"?(v=q[S-1])==null||v.focus():x.key!=="Enter"&&x.key!==" "||(x.preventDefault(),x.stopPropagation(),i(l))},onPointerDown:()=>y(!0),onPointerEnter:()=>p(l),onPointerLeave:()=>{p(-1),y(!1)},style:w,tabIndex:0})},ln=({className:n,labels:r,next:t,properties:o,questionId:s,type:a})=>{const{border:d,useMobileStyling:u,viewDocument:i,enableCspTrustedTypes:p,update:y}=e.useConfig(S=>({border:S.border,useMobileStyling:S.useMobileStyling,viewDocument:S.viewDocument,enableCspTrustedTypes:S.enableCspTrustedTypes,update:S.update})),[g,l]=e.h(-1),[T,j]=e.h(!1),[m,c]=e.h(null),P=r&&r.left,L=r&&r.right;let h;const{range:_,scaleLabelType:w,ratingIcons:N}=o;_&&(h=Number(_));const x=h||5,q=S=>{var b,v;switch(w){case"star":return(b=N[0])==null?void 0:b.svg;case"smiley":return(v=N[S])==null?void 0:v.svg;default:return String(S+1)}};return e.p(()=>{y()},[y]),e.u("form",{className:e.cc(n,"ul-card--likert","fade-in-transition"),children:e.u(E.MobileEmbedView,{properties:o,children:[e.u(E.QuestionBodyWrapper,{children:[e.u("div",{"aria-label":`Rating (1 - ${x})`,className:"ul-card--likert__numbers",role:"radiogroup",children:[...Array(x)].map((S,b)=>{const v=b+1;return e.u(an,{activeValue:g,border:d,enableCspTrustedTypes:p,icon:q(b),isPressed:T,range:x,scaleLabelType:w,selectedValue:m,setActiveValue:l,setIsPressed:j,setSelectedValue:c,useMobileStyling:u,value:v,viewDocument:i},b)})}),e.u("div",{className:"ul-card--likert__labels",children:[e.u("span",{children:P}),e.u("span",{children:L})]})]}),e.u(E.QuestionBodyFooterContainer,{children:e.u(ie,{isDisabled:m===null&&o.required,onClick:()=>t({value:m,questionId:s,type:a},!0),children:e.getButtonText(o)})})]})},s)},dn=({columns:n,onSelect:r,options:t,selectedOptions:o})=>{const s=e._([]),{border:a,useMobileStyling:d}=e.useConfig(l=>({border:l.border,useMobileStyling:l.useMobileStyling})),u=t.findIndex(l=>o[l.id]===null),[i,p]=e.h(u),y=e.T((l,T)=>{r(l,T);const j=i+1,m=t[j];m&&o[m.id]===null&&p(j)},[r,t,o,i]),g=e.T((l,T)=>{const j=i===l;return e.u(e.Accordion,{animate:!0,header:T.label,isOpen:j,onClick:()=>{var m;return p(j&&!((m=window.UserLeap)!=null&&m.isMobileSDK)?-1:l)},ref:m=>{m&&(s.current[l]=m)},showHeaderCheck:o[T.id]!==null,children:e.u("div",{style:{paddingTop:"12px"},children:n.map(m=>e.u(E.Option,{allowTextEntry:!1,ariaLabel:`${T.label}-${m.label}`,border:a,error:!1,id:`${T.id}-${m.value}`,isRadio:!0,isSelected:o[T.id]===m.value,label:m.label,onUserInputChanged:()=>y(T.id,m.value),useMobileStyling:d},m.label))})},T.id)},[a,n,i,y,o,d]);return e.u("div",{children:t.map((l,T)=>g(T,l))})},cn=({className:n,next:r,options:t,properties:o,questionId:s,type:a,onSubmitButtonClick:d})=>{const u=o.matrixColumn,i=o.required,{update:p}=e.useConfig(m=>({update:m.update})),y=m=>{m.preventDefault(),m.stopPropagation(),r({value:l,questionId:s,type:a},!0),d&&d()},g=t.reduce((m,c)=>(m[c.id]=null,m),{}),[l,T]=e.h(g);return e.p(()=>{p()},[p]),e.u("form",{className:e.cc(n,"ul-card__matrix","fade-in-transition"),id:"text-form",onSubmit:y,children:e.u(E.MobileEmbedView,{properties:o,children:[e.u(E.QuestionBodyWrapper,{children:e.u(dn,{columns:u,onSelect:(m,c)=>{T(P=>({...P,[m]:c}))},options:t,selectedOptions:l})}),e.u(E.QuestionBodyFooterContainer,{children:e.u(ie,{isDisabled:(j=l,i&&Object.values(j).every(m=>m==null)),onClick:()=>y(new SubmitEvent("submit")),children:e.getButtonText(o)})})]})},s);var j},$e=({className:n,onSubmit:r,options:t=[],properties:o,questionId:s,type:a,showIndividualSubmit:d=!1,onSubmitButtonClick:u})=>{const{border:i,useMobileStyling:p,update:y}=e.useConfig(v=>({border:v.border,useMobileStyling:v.useMobileStyling,update:v.update})),g=t.reduce((v,k)=>(v[k.id]={isSelected:!1},v),{}),[l,T]=e.h(g),j=a==="multiplechoice",m=o.required,c=t.find(v=>{var k;return(k=v.optionProperties)==null?void 0:k.noneOfTheAbove}),P=v=>Object.entries(v).some(([k,A])=>{var O;const f=t.find(H=>`${H.id}`===k),D=A.userText===void 0||A.userText.trim()==="";return((O=f==null?void 0:f.optionProperties)==null?void 0:O.allowsTextEntry)&&D&&A.isSelected}),L=v=>Object.values(v).filter(k=>k.isSelected).length,h=o.minSelect&&o.minSelect>0&&o.maxSelectMode===E.MaxSelectModes.Range&&L(l)<o.minSelect&&(m||L(l)>0),_=v=>P(v)||m&&!L(v)||!(k=>{const{minSelect:A=0,maxSelect:f=1/0,maxSelectMode:D}=o,O=L(k);switch(D){case E.MaxSelectModes.Maximum:return O<=f;case E.MaxSelectModes.Range:return O===0||O>=A;default:return!0}})(v),w=Object.entries(l).some(([v,k])=>{var A,f;return k.isSelected&&((f=(A=t.find(D=>`${D.id}`===v))==null?void 0:A.optionProperties)==null?void 0:f.allowsTextEntry)}),N=d&&(!j||w),x=v=>{b(v.id,v.selected,v.userText,v.noneOfTheAbove)},q=v=>{var k;return(o==null?void 0:o.maxSelectMode)!==E.MaxSelectModes.Unlimited&&L(l)===(o==null?void 0:o.maxSelect)&&!((k=l[v])!=null&&k.isSelected)},S=()=>{r(l,!0),u&&u()},b=(v,k,A,f)=>{const D=Object.assign({},l);if((j||f)&&k)for(const O of Object.values(D))O.isSelected=!1,delete O.userText;else c&&!f&&l[c.id].isSelected&&(D[c.id].isSelected=!1);D[v]={isSelected:k,userText:A},T(D)};return e.p(()=>{y()},[y]),e.u("form",{className:e.cc(n,"ul-card--multiple","fade-in-transition"),id:"text-form",onSubmit:S,children:e.u(E.MobileEmbedView,{properties:o,children:[e.u(E.QuestionBodyWrapper,{children:[o.isDropdown?e.u(E.Select,{disabledOptions:t.filter(v=>q(v.id)),dropdownFooter:h?e.u("div",{className:"ul-card__min-select-counter",style:{marginLeft:"16px"},children:[L(l),"/",o.minSelect]}):void 0,isMultiSelect:!j,multiselectText:o.dropdownMultiselectedText??"choices selected",onChange:v=>{const k={...l};for(const A of t)v.includes(A)?k[A.id].isSelected=!0:k[A.id].isSelected=!1;T(k)},options:t,placeholderText:o.dropdownPlaceholderText??(j?"Select choice":"Select choice(s)"),value:t.filter(v=>l[v.id].isSelected)}):e.u("div",{className:e.cc(e.getClasses("ul-card__choices",p)),role:j?"radiogroup":"group",children:[t.map(({id:v,label:k,value:A,optionProperties:f})=>{var F,G;const D=`${v}`,{allowsTextEntry:O,noneOfTheAbove:H}={allowsTextEntry:!1,noneOfTheAbove:!1,...f};return e.u(E.Option,{allowTextEntry:O,border:i,disabled:q(D),error:($=l,P($)),id:D,isRadio:j,isSelected:!!((F=l[D])!=null&&F.isSelected),label:k,noneOfTheAbove:H,onUserInputChanged:x,promptText:"Please specify",text:(G=l[v])==null?void 0:G.userText,useMobileStyling:p,value:A},D);var $}),!!h&&e.u("div",{className:"ul-card__min-select-counter",children:[L(l),"/",o.minSelect]})]}),N&&e.u(E.LongformSubmitButton,{handleSubmit:S,isSubmitDisabled:_(l)})]}),e.u(E.QuestionBodyFooterContainer,{children:e.u(ie,{isDisabled:_(l),onClick:S,children:e.getButtonText(o)})})]})},s)},un=n=>{const{questionId:r,type:t,next:o,options:s}=n;return e.u($e,{...n,onSubmit:(a,d)=>{const u=Object.entries(a).find(([,l])=>l.isSelected)||[void 0,void 0],[i,p]=u,y=s.find(l=>`${l.id}`===i),g=p!=null&&p.userText?{[i]:{userText:p.userText}}:null;o({value:y&&i?{[i]:y.value}:{},secondaryValue:g,questionId:r,type:t},d)}})},pn=n=>{const{questionId:r,type:t,next:o}=n;return e.u($e,{...n,onSubmit:(s,a)=>{const d=Object.entries(s).reduce((i,[p,y])=>(i[p]=y.isSelected,i),{}),u=Object.entries(s).reduce((i,[p,y])=>{if(!y.userText)return i;const g=i||{};return g[p]={userText:y.userText},g},null);o({value:d,secondaryValue:u,questionId:r,type:t},a)}})},vn=({className:n,labels:r,properties:t,next:o,questionId:s,type:a})=>{const[d,u]=e.h(null),{border:i,useMobileStyling:p,viewDocument:y,update:g}=e.useConfig(j=>({border:j.border,useMobileStyling:j.useMobileStyling,viewDocument:j.viewDocument,update:j.update})),l=r&&r.left,T=r&&r.right;return e.p(()=>{g()},[g]),e.u("form",{className:e.cc(n,"ul-card--nps","fade-in-transition"),children:e.u(E.MobileEmbedView,{properties:t,children:[e.u(E.QuestionBodyWrapper,{children:[e.u("div",{className:"ul-card--nps__numbers",children:[...Array(11)].map((j,m)=>e.u("button",{className:e.cc(e.getClasses("nps-number",p),e.getClasses(`nps-number-${m}`,p)),id:`option-${m}`,onClick:c=>{c.preventDefault(),c.stopPropagation(),u(m)},onKeyDown:c=>{var L,h;const P=y.querySelectorAll("button.nps-number");c.key==="ArrowRight"?(L=P[m+1])==null||L.focus():c.key==="ArrowLeft"?(h=P[m-1])==null||h.focus():c.key!=="Enter"&&c.key!==" "||(c.preventDefault(),c.stopPropagation(),u(m))},onPointerDown:c=>{c.currentTarget.style.zIndex="2",c.currentTarget.style.borderColor=i},onPointerLeave:c=>{c.currentTarget.style.zIndex="auto",c.currentTarget.style.borderColor=Y.DEFAULT_BORDER_COLOR},style:d===m?{backgroundColor:i,color:"#fff"}:void 0,tabIndex:0,children:m},m))}),e.u("div",{className:"ul-card--nps__labels",children:[e.u("span",{children:l}),e.u("span",{children:T})]})]}),e.u(E.QuestionBodyFooterContainer,{children:e.u(ie,{isDisabled:d===null&&t.required,onClick:()=>o({value:d,questionId:s,type:a},!0),children:e.getButtonText(t)})})]})},s)},mn=({className:n,next:r,properties:t,questionId:o,type:s,onSubmitButtonClick:a})=>{const{border:d,useMobileStyling:u,update:i}=e.useConfig(c=>({border:c.border,useMobileStyling:c.useMobileStyling,update:c.update})),[p,y]=e.h(""),g=e._(null),l=p.trim(),T=t.required===!0&&!l,j=E.useAutoSize(g,()=>i()),m=t&&t.openTextPlaceholder?t.openTextPlaceholder:"";return e.p(()=>{i()},[i]),e.u("form",{className:e.cc(n,"ul-card-text","fade-in-transition"),id:"text-form",children:e.u(E.MobileEmbedView,{properties:t,children:e.u("div",{className:"ul-card-text",children:[e.u(E.QuestionBodyWrapper,{children:[e.u("div",{className:"ul-card-text__container",children:e.u("textarea",{"aria-describedby":"ul-caption","aria-labelledby":"ul-question","aria-multiline":"true","aria-placeholder":m,className:e.cc(e.getClasses("ul-card-text__input",u)),"data-gramm":"false",maxLength:5e3,name:"text",onBlur:c=>{c.currentTarget.style.borderColor=Y.DEFAULT_BORDER_COLOR},onChange:c=>{const{value:P}=c.currentTarget;j(),c.preventDefault(),c.stopPropagation(),y(P)},onFocus:c=>{c.currentTarget.style.borderColor=d},placeholder:m,ref:g,role:"textbox",tabIndex:0})}),t.footerHtml&&e.u(E.Html,{className:"footer",html:t.footerHtml})]}),e.u(E.QuestionBodyFooterContainer,{children:e.u(ie,{isDisabled:T,onClick:c=>{c.preventDefault(),c.stopPropagation();const P=t.required!==!0||l.length>0;r({value:p,questionId:o,type:s},P),a&&a()},children:e.getButtonText(t)})})]})})},o)},gn=({className:n,labels:r,next:t,properties:o,questionId:s,type:a,onSubmitButtonClick:d,options:u})=>{const i=e._(null),p=e._(0),y=e._(0),g=e._(null),l=e._(!1),T=e._([]),[j,m]=e.h(()=>(o==null?void 0:o.required)===!0),[c,P]=e.h(()=>u.map(C=>({...C,rank:null}))),L=e.F(()=>Array.from({length:u.length},(C,M)=>M+1),[u.length]),{useMobileStyling:h,isPreview:_,headers:w,update:N}=e.useConfig(C=>({useMobileStyling:C.useMobileStyling,isPreview:C.isPreview,headers:C.headers,update:C.update})),x=(w==null?void 0:w["userleap-platform"])==="android",q=h&&!_&&!x,S=!q&&!x,b=(C,M)=>{P(U=>{const R=parseInt(M),z=U.map(V=>({...V}));z.some(V=>V.rank==null)&&z.forEach((V,ae)=>V.rank=ae+1);const K=z.findIndex(V=>V.id===C);if(K===-1)return U;const Q=z[K].rank;return R<Q?z.forEach(V=>{V.id!==C&&V.rank>=R&&V.rank<Q&&(V.rank=V.rank+1)}):R>Q&&z.forEach(V=>{V.id!==C&&V.rank>Q&&V.rank<=R&&(V.rank=V.rank-1)}),z[K].rank=R,z.sort((V,ae)=>V.rank-ae.rank),H(),z})},v=(C,M)=>{for(let U=0;U<T.current.length;U++){const R=T.current[U];if(!R||R===g.current)continue;const z=R.getBoundingClientRect();if(C>=z.left&&C<=z.right&&M>=z.top&&M<=z.bottom)return{element:R,index:U}}return null},k=C=>M=>{if(!q)return;M.preventDefault(),M.stopPropagation(),l.current=!0,i.current=C;const U=M.touches[0];p.current=U.clientY,y.current=U.clientY;const R=M.currentTarget.closest(".ul-card-rank__option");R&&(g.current=R,R.classList.add("is-dragging"))},A=C=>{if(!q||!l.current||i.current===null)return;C.preventDefault(),C.stopPropagation();const M=C.touches[0];y.current=M.clientY;const U=y.current-p.current;g.current&&(g.current.style.transform=`translateY(${U}px)`,g.current.style.zIndex="1000"),T.current.forEach(z=>{z&&z!==g.current&&z.classList.remove("is-drop-target")});const R=v(M.clientX,M.clientY);R&&R.element.classList.add("is-drop-target")},f=C=>{if(!q||!l.current||i.current===null)return;C.preventDefault(),C.stopPropagation();const M=C.changedTouches[0],U=v(M.clientX,M.clientY);g.current&&(g.current.style.transform="",g.current.style.zIndex="",g.current.classList.remove("is-dragging")),T.current.forEach(R=>{R&&R.classList.remove("is-drop-target")}),U&&U.index!==i.current&&D(i.current,U.index),i.current=null,g.current=null,l.current=!1},D=(C,M)=>{P(U=>{const R=U.map(K=>({...K})),[z]=R.splice(C,1);return R.splice(M,0,z),R.forEach((K,Q)=>{K.rank=Q+1}),H(),R})},O=C=>{const M={};C.reduce((U,R)=>(U[R.id]=R.rank,U),M),t({value:M,questionId:s,type:a},!0)},H=()=>{m(!1)},{left:$,right:F}=r,G=u.length,Z=C=>{C.preventDefault(),C.currentTarget.classList.add("is-drop-target")},te=C=>{C.currentTarget.classList.remove("is-drop-target")},re=C=>{i.current=null,C.currentTarget.classList.remove("is-dragging")};return e.p(()=>{N()},[N]),e.u("form",{className:e.cc(n,"ul-card-rank","fade-in-transition"),onSubmit:C=>{C.preventDefault(),O(c),d&&d()},children:e.u(E.MobileEmbedView,{properties:o,children:x?e.u(E.QuestionBodyWrapper,{children:e.u("div",{className:"ul-card--rank__question-inner-container",children:[e.u("div",{className:"ul-card-rank__labels",children:e.u("span",{children:["1 - ",$]})}),e.u("ol",{className:"ul-card-rank__list",children:c.map(({id:C,label:M,rank:U})=>e.u("li",{className:"ul-card-rank__option",children:[e.u("select",{"aria-label":`Rank for ${M}`,className:e.cc("ul-card-rank__select",U==null&&"ul-card-rank__select--placeholder"),name:`rank[${C}]`,onChange:R=>b(C,R.currentTarget.value),value:U??"",children:[U==null&&e.u("option",{className:"ul-card-rank__select-option",disabled:!0,value:"",children:"-"}),L.map(R=>e.u("option",{className:"ul-card-rank__select-option",value:R,children:R},`${R}-${s}`))]}),e.u("span",{children:M})]},C))}),e.u("div",{className:"ul-card-rank__labels",children:e.u("span",{children:[G," - ",F]})})]})}):e.u(e.g,{children:[e.u(E.QuestionBodyWrapper,{children:e.u("div",{className:"ul-card--rank__question-inner-container",children:[e.u("div",{className:"ul-card-rank__labels",children:e.u("span",{children:["1 - ",$]})}),e.u("ol",{className:"ul-card-rank__list",onDragOver:x?void 0:C=>{C.preventDefault(),C.dataTransfer&&(C.dataTransfer.dropEffect="move")},children:c.map(({id:C,label:M,rank:U},R)=>{return e.u("li",{className:"ul-card-rank__option",draggable:!!S||void 0,onDragEnd:S?re:void 0,onDragEnter:S?Z:void 0,onDragLeave:S?te:void 0,onDragStart:S?(K=R,Q=>{i.current=K,Q.dataTransfer&&(Q.dataTransfer.effectAllowed="move",Q.dataTransfer.setData("text/plain",String(K)),Q.currentTarget.classList.add("is-dragging"))}):void 0,onDrop:S?(z=R,Q=>{var ae,je;Q.preventDefault(),Q.currentTarget.classList.remove("is-drop-target");const V=i.current;i.current=null,(je=(ae=Q.currentTarget.closest(".ul-card-rank__list"))==null?void 0:ae.querySelector(".is-dragging"))==null||je.classList.remove("is-dragging"),V!=null&&V!==z&&D(V,z)}):void 0,ref:Q=>T.current[R]=Q,children:[e.u("select",{"aria-label":`Rank for ${M}`,className:e.cc("ul-card-rank__select",U==null&&"ul-card-rank__select--placeholder"),name:`rank[${C}]`,onChange:Q=>b(C,Q.currentTarget.value),value:U??"",children:[U==null&&e.u("option",{className:"ul-card-rank__select-option",disabled:!0,value:"",children:"-"}),L.map(Q=>e.u("option",{className:"ul-card-rank__select-option",value:Q,children:Q},Q))]}),e.u("span",{children:M}),!x&&e.u("button",{"aria-label":`Drag ${M} to reorder`,className:"ul-card-rank__drag-btn",onTouchEnd:q?f:void 0,onTouchMove:q?A:void 0,onTouchStart:q?k(R):void 0,title:"Drag to reorder",type:"button",children:e.u("svg",{fill:"none",height:"17",viewBox:"0 0 16 17",width:"16",xmlns:"http://www.w3.org/2000/svg",children:e.u("path",{d:"M5.75 11.625C6.37132 11.625 6.875 12.1287 6.875 12.75C6.875 13.3713 6.37132 13.875 5.75 13.875C5.12868 13.875 4.625 13.3713 4.625 12.75C4.625 12.1287 5.12868 11.625 5.75 11.625ZM10.25 11.625C10.8713 11.625 11.375 12.1287 11.375 12.75C11.375 13.3713 10.8713 13.875 10.25 13.875C9.62868 13.875 9.125 13.3713 9.125 12.75C9.125 12.1287 9.62868 11.625 10.25 11.625ZM5.75 7.375C6.37132 7.375 6.875 7.87868 6.875 8.5C6.875 9.12132 6.37132 9.625 5.75 9.625C5.12868 9.625 4.625 9.12132 4.625 8.5C4.625 7.87868 5.12868 7.375 5.75 7.375ZM10.25 7.375C10.8713 7.375 11.375 7.87868 11.375 8.5C11.375 9.12132 10.8713 9.625 10.25 9.625C9.62868 9.625 9.125 9.12132 9.125 8.5C9.125 7.87868 9.62868 7.375 10.25 7.375ZM5.75 3.125C6.37132 3.125 6.875 3.62868 6.875 4.25C6.875 4.87132 6.37132 5.375 5.75 5.375C5.12868 5.375 4.625 4.87132 4.625 4.25C4.625 3.62868 5.12868 3.125 5.75 3.125ZM10.25 3.125C10.8713 3.125 11.375 3.62868 11.375 4.25C11.375 4.87132 10.8713 5.375 10.25 5.375C9.62868 5.375 9.125 4.87132 9.125 4.25C9.125 3.62868 9.62868 3.125 10.25 3.125Z",fill:"currentColor"})})})]},C);var z,K})}),e.u("div",{className:"ul-card-rank__labels",children:e.u("span",{children:[G," - ",F]})})]})}),e.u(E.QuestionBodyFooterContainer,{children:e.u("div",{className:"ul-card__button-wrapper",children:e.u(E.Button,{disabled:j,children:e.getButtonText(o)})})})]})})},s)},ye=1,Ve=2,Fe=3,ue=n=>n.type==="av_permission",Re=n=>n.type==="screen_permission",ze=(n,r)=>n===void 0?ye:n?((t,o)=>!(ue(o)?o.permissionDescriptors:[]).includes("camera")||t.getVideoTracks().length>0)(n,r)?Fe:ye:Ve,Pe={avStream:null,currentPage:null,mediaRecordingUids:null,nextQuestion:()=>{},passthroughData:void 0,recordingMediaTypes:void 0,screenPermissionRequested:!1,type:void 0},ee=e.create(n=>({...Pe,reset:()=>{n(Pe)},updatePage:r=>{n(r)}}));function Ce({currentPage:n,pages:r}){const{avStream:t,recordingMediaTypes:o,updatePage:s}=ee.getState(),{recorderEventEmitter:a}=e.useConfig.getState();a.emit("av.permission",{"permission.descriptors":n.permissionDescriptors,"stream.ready":(d,u)=>{if(t===d)return;let i=n;if(d&&!n.permissionDescriptors.includes("camera")){const p=r.indexOf(n),y=u!=null&&u.active?p+2:p+1;u!=null&&u.active&&o&&a.emit("begin.recording",{"recording.media.types":o,"start.recording.callback":g=>s({mediaRecordingUids:g})}),i=r[y]}s({currentPage:i,avStream:d})}})}function xe({status:n}){const{nextQuestion:r,passthroughData:t,mediaRecordingUids:o,reset:s}=ee.getState(),{recorderEventEmitter:a,handleUploadUpdate:d,index:u}=e.useConfig.getState(),i={value:{taskStatus:n},type:"recordedtask",questionId:(t==null?void 0:t.questionId)||1};t&&a.emit("finish.task",{"begin.callback":p=>{d({mediaRecordingUid:p,isSubmitted:!0,progressPct:0,isComplete:!1})},"progress.callback":(p,y)=>{d({mediaRecordingUid:p,progressPct:y.detail,isSubmitted:!1,isComplete:!1})},"upload.callback":p=>{p&&d({mediaRecordingUid:p,isComplete:!0,isSubmitted:!0,progressPct:100})},"passthrough.data":t,"current.index":u,"task.response":i,"task.complete.callback":p=>{i.value.taskDurationMillisecond=p,o&&(i.value.mediaRecordingUids=o),s(),r(i)}})}function we({pages:n,setIsRequestingPermission:r}){const{recorderEventEmitter:t,eventEmitFn:o}=e.useConfig.getState(),{updatePage:s,currentPage:a,recordingMediaTypes:d,screenPermissionRequested:u}=ee.getState();if(!a)return;const i=n.indexOf(a);switch(a.type){case"av_permission":{const p=u?i+2:i+1;return u&&d&&t.emit("begin.recording",{"recording.media.types":d,"start.recording.callback":y=>{s({mediaRecordingUids:y})}}),void s({currentPage:n[p]})}case"screen_permission":return void t.emit("screen.permission",{"screen.permission.requested":r,"stream.ready.callback":(p,y)=>{const g=y?n[i+1]:a;y&&d&&t.emit("begin.recording",{"recording.media.types":d,"start.recording.callback":l=>{s({captureStream:y,mediaRecordingUids:l})}}),s({currentPage:g,screenPermissionRequested:!0,captureStream:y})}});case"start_task":return o("recorded.task.start"),t.emit("recorded.task.start"),t.emit("start.task"),void s({currentPage:n[i+1],screenPermissionRequested:!0});case"complete_task":return}}const Qe="ul-permission-graphics-container",Ge="ul-permission-body",Ze=e.cc(Qe,"ul_recorded-task-inset-spacing"),pe=e.cc("ul-horizontal-button-container","ul-horizontal-button-container-left"),We=({richTextBody:n})=>e.u(E.Html,{className:"ul-rich-text-body",html:n,id:"ul-task-detail-container"}),ve=({required:n,skipButtonText:r,bottom:t=!1})=>n?null:e.u(E.Button,{className:e.cc(t&&"ul-skip-button-below","ul-button-inactive"),onClick:xe.bind(null,{status:"abandoned"}),children:r||"Skip"}),Ee=n=>{const{avStream:r,captureStream:t,recordingMediaTypes:o,updatePage:s}=ee.getState(),a=(o==null?void 0:o.includes("audio"))||(o==null?void 0:o.includes("video"));e.p(()=>{const d=setInterval(()=>{a&&r&&!r.active?s({avStream:null,currentPage:n[0]}):t&&t.active||s({captureStream:void 0,currentPage:n[a?1:0]})},1e3);return()=>clearInterval(d)},[r,t,a,n,o,s])},hn=({content:n,pages:r,required:t})=>{const{buttonText:o,skipButtonText:s,taskDetail:a}=n;return Ee(r),e.u("div",{className:"ul-task-page",children:[a&&e.u(We,{richTextBody:a}),e.u("div",{className:pe,children:[e.u(E.Button,{onClick:we.bind(null,{pages:r}),children:o}),e.u(ve,{required:t,skipButtonText:s})]})]},"start-task")},bn=({content:n,pages:r,properties:t})=>{const{buttonText:o,skipButtonText:s}=n;return Ee(r),e.u("div",{className:"ul-task-page",children:[n.taskDetail&&e.u(We,{richTextBody:n.taskDetail}),e.u(E.MobileEmbedView,{properties:t,children:e.u("div",{className:pe,children:[e.u(E.Button,{className:"ul-complete-task-button",onClick:xe.bind(null,{status:"completed"}),children:o}),e.u(E.Button,{className:e.cc("ul-button-inactive"),onClick:xe.bind(null,{status:"given.up"}),children:s})]})})]},"complete-task")},fn=({content:n,pages:r,required:t})=>{const{buttonText:o,skipButtonText:s}=n,[a]=e.useConfig(i=>[i.tabTitle]),[d,u]=e.h(!1);return e.u("div",{children:[e.u("div",{className:Ze,children:[e.u("p",{style:{marginTop:"auto"},children:n.selectTabText}),e.u("div",{className:"ul-select-tab-container",children:e.u("p",{className:Ge,children:a})})]}),e.u("div",{className:t?"":pe,children:[e.u(E.Button,{disabled:d,onClick:we.bind(null,{pages:r,setIsRequestingPermission:u}),children:o}),e.u(ve,{required:t,skipButtonText:s})]})]})},yn=({content:n})=>e.u(E.Html,{className:e.cc(Qe,"ul_permission_svg_container","ul_recorded-task-inset-spacing","ul-center-horizontally"),html:n.svg},"ul-permission-request-graphic"),Cn=({content:n,pages:r,required:t})=>{const{permissionDeniedHeadline:o,permissionDeniedBody:s,skipButtonText:a,tryAgainButtonText:d}=n,u=ue(r[0])?r[0]:null;return e.p(()=>{const i=setInterval(()=>{u!==null&&Ce({currentPage:u,pages:r})},1e3);return()=>clearInterval(i)},[u,r]),u?e.u("div",{children:[e.u("div",{className:Ze,children:e.u("p",{className:"ul-av-permission-denied-paragraph",children:[e.u("span",{className:"ul-av-permission-denied-headline",children:o}),e.u("span",{className:Ge,children:s})]})}),e.u("div",{className:pe,children:[e.u(E.Button,{onClick:Ce.bind(null,{currentPage:u,pages:r}),children:d}),e.u(ve,{required:t,skipButtonText:a})]})]}):null},xn=({stream:n})=>e.u("video",{autoPlay:!0,className:e.cc("ul_recorded-task-inset-spacing"),id:"ul-record-task-video-preview",muted:!0,ref:r=>{r&&(r.srcObject=n||null)}}),kn=({content:n,pages:r,required:t})=>{const{skipButtonText:o}=n,{avStream:s}=ee.getState();return Ee(r),e.u("div",{children:[e.u(xn,{stream:s}),e.u("div",{className:"ul-vertical-button-container-center",children:[e.u(E.Button,{onClick:we.bind(null,{pages:r}),children:n.buttonText}),e.u(ve,{bottom:!0,required:t,skipButtonText:o})]})]})},wn=({properties:n})=>{const{pages:r,required:t}=n,{avStream:o,currentPage:s}=ee.getState();if(s===void 0)return null;switch(s==null?void 0:s.type){case"av_permission":{const a=ze(o,s);return a===ye?e.u(yn,{content:s}):a===Ve?e.u(Cn,{content:s,pages:r,required:t}):e.u(kn,{content:s,pages:r,required:t})}case"screen_permission":return e.u(fn,{content:s,pages:r,required:t});case"start_task":return e.u(hn,{content:s,pages:r,required:t});case"complete_task":return e.u(bn,{content:s,pages:r,properties:n});default:return null}},En=({className:n,properties:r,next:t,questionId:o})=>{const s=e.useConfig(),{surveyId:a,responseGroupUid:d,userId:u,update:i}=s,p=ee(),{screenPermissionRequested:y}=p,g=ee(c=>c.avStream);let l=ee(c=>c.currentPage);l||(l=function({pages:c,userId:P,responseGroupUid:L,surveyId:h,questionId:_,next:w}){const{updatePage:N}=ee.getState(),{eventEmitFn:x,recorderEventEmitter:q}=e.useConfig.getState(),S={questionId:_,surveyId:h,visitorId:P,responseGroupUid:L};let b=0;q.emit("recorded.task.permission.screen"),x("recorded.task.permission.screen"),q.emit("permission.status",{"permission.status.callback":(k,A,f,D)=>{const O=c[b],{type:H}=O,$=["screen"];if(ue(O)){const{permissionDescriptors:F}=O,G=F==null?void 0:F.includes("microphone"),Z=F==null?void 0:F.includes("camera");G&&$.push("audio"),Z&&$.push("video"),(k!=null&&k.active&&!Z||k!=null&&k.active&&A)&&b++}Re(c[b])&&f&&(b++,q.emit("begin.recording",{"recording.media.types":$,"start.recording.callback":F=>N({mediaRecordingUids:F})})),N({currentPage:c[b],avStream:k,screenPermissionRequested:f,nextQuestion:w,type:H,passthroughData:S,recordingMediaTypes:$,captureStream:D})}});const v=c[b];return v.type==="av_permission"&&Ce({currentPage:v,pages:c}),v}({questionId:o,surveyId:a,next:c=>{t(c,!0)},pages:r.pages,responseGroupUid:d,userId:u}));let T=l.headline,j=l.captionText;const m=ze(g,l);return Re(l)&&y&&(T=l.permissionDeniedHeadline,j=l.permissionDeniedCaptionText),ue(l)&&m===Fe&&(T=l.permissionGrantedHeadline,j=l.permissionGrantedCaptionText),e.p(()=>{i()},[i]),e.u("div",{className:e.cc(n,"ul-center-horizontally","fade-in-transition"),children:[e.u(E.Header,{isRequired:r==null?void 0:r.required,message:T,properties:{captionText:j}}),e.u(E.QuestionBodyWrapper,{children:e.u(wn,{properties:r})})]})},jn=({className:n,next:r,properties:t,questionId:o,type:s})=>{const{visitorAttributes:a,isLongFormSurvey:d,update:u}=e.useConfig(g=>({visitorAttributes:g.visitorAttributes,isLongFormSurvey:Y.isLongFormSurvey(g.studyType),update:g.update})),i=(g,l=!1)=>{r({value:l?{skipped:!0}:void 0,questionId:o,type:s},!0)},p=E.getAttributedUrl(t&&t.buttonUrl,a),y=d&&t.promptActionType===E.PromptActionTypeEnum.NO_BUTTON;return e.p(()=>{u()},[u]),e.u("div",{className:e.cc(n,"ul-card__text-url-prompt","fade-in-transition"),children:e.u(E.MobileEmbedView,{properties:t,children:!y&&e.u("div",{children:e.u("div",{className:"ul-card-button-group",children:[e.u("a",{className:"ul-card-text__button ul-card__text-url-prompt-button",href:p,id:"ul-card-text__button",onClick:i,onKeyPress:g=>{g.key!=="Enter"&&g.key!==" "||r({value:void 0,questionId:o,type:s},!0)},rel:"noreferrer",role:p?"link":"button",tabIndex:0,target:"_blank",children:e.getButtonText(t)}),t.required===!1&&e.u("button",{className:"ul-card-skip__button",onClick:g=>i(0,!0),children:e.getSkipButtonText(t)})]})})})},o)},Tn=({className:n,questionId:r})=>{const{border:t,destroy:o,endCard:s,forceBrandedLogo:a}=e.useConfig(i=>({border:i.border,destroy:i.destroy,endCard:i.endCard,forceBrandedLogo:i.forceBrandedLogo}));e.p(()=>{setTimeout(()=>{o(Y.APP_ID)},a?4e3:2e3)},[o,a]);const d=s&&s.subheader?e.u("p",{className:"ul-caption",children:s.subheader}):null,u=s&&s.headline?s.headline:"";return e.u("div",{className:e.cc(n,"ul-card--thanks","fade-in-transition"),children:e.u("div",{children:e.u("div",{className:"ul-card--thanks-content",children:[e.u("div",{className:"ul-thanks-check",children:e.u("svg",{"aria-labelledby":"title",fill:"none",height:"99",viewBox:"0 0 81 99",width:"81",xmlns:"http://www.w3.org/2000/svg",children:[e.u("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:t,fillRule:"evenodd"}),e.u("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:t,fillRule:"evenodd"}),e.u("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"})]})}),e.u(E.Header,{message:u}),d]})})},r)},_n=()=>e.u("div",{className:"thinking-dots-container",children:e.u("div",{className:"thinking-dot"})}),In=({className:n})=>{const{uploadProgress:r}=e.useConfig(a=>({uploadProgress:a.uploadProgress}));let t,o;Object.values(r).filter(a=>a.isSubmitted).length>1?(t="Your responses are processing",o="Please keep this tab open until your responses are fully processed."):(t="Your response is processing",o="Please keep this tab open until your response is fully processed.");const s=Math.round(Math.min(99,...Object.values(r).filter(a=>a.isSubmitted).map(a=>a.progressPct||0)));return e.u("div",{className:e.cc(n,"ul-card--uploading","fade-in-transition"),children:[e.u("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:"ul-loading-spinner-container",role:"progressbar",children:e.u("div",{className:"ul-loading-spinner",children:[e.u("div",{className:"first"}),e.u("div",{className:"second"}),e.u("div",{className:"third"}),e.u("div",{className:"fourth"})]})}),e.u(E.Header,{message:`${t} (${s}% complete)`}),e.u("p",{className:"ul-caption",children:o})]})},Le=0,Me=1,Dn=({className:n,next:r,properties:t,questionId:o,type:s})=>{const a=`ul-card-video__player_recorder-q${o}`,{apiURL:d,envId:u,handleUploadUpdate:i,headers:p,responseGroupUid:y,surveyId:g,update:l,viewDocument:T,visitorId:j}=e.useConfig(f=>({apiURL:f.apiURL,envId:f.envId,handleUploadUpdate:f.handleUploadUpdate,headers:f.headers,responseGroupUid:f.responseGroupUid,surveyId:f.surveyId,update:f.update,viewDocument:f.viewDocument,visitorId:f.userId})),[m,c]=e.h(!1),[P,L]=e.h(null),[h,_]=e.h(null),[w,N]=e.h(Le),[x,q]=e.h(null),[S,b]=e.h(null),v=e.T(f=>{f&&q(f)},[q]);e.p(()=>{const f=new ResizeObserver(()=>{setTimeout(l,0)});return S&&f.observe(S),x&&f.observe(x),()=>{S&&f.unobserve(S),x&&f.unobserve(x)}},[l,S,x]);const k=(f,D)=>{f===B.UPLOAD_STARTED?(L(D[B.UPLOAD_ID]),_(D[B.MEDIA_RECORDING_UID]),c(!0)):f===B.DELETE?(L(null),_(null),c(!1)):f===B.UPLOAD_PROGRESS?isNaN(D[B.UPLOAD_PROGRESS_PCT])?i({mediaRecordingUid:D[B.MEDIA_RECORDING_UID],isComplete:!0}):i({mediaRecordingUid:D[B.MEDIA_RECORDING_UID],progressPct:D[B.UPLOAD_PROGRESS_PCT]}):f===B.UPLOAD_FINISHED&&i({mediaRecordingUid:D[B.MEDIA_RECORDING_UID],isComplete:!0})},A=f=>{f.preventDefault(),f.stopPropagation(),document.getElementById(a)&&(D=>{const O=D+Ie;if(I.document.getElementById(O)&&I.videojs){try{if(!I.videojs(O).record().stream)return}catch{return}I.videojs(O).record().stop(),I.videojs(O).record().stopDevice()}})(a),P&&h?(i({mediaRecordingUid:h,isSubmitted:!0}),r({value:{mediaRecordingUid:h},questionId:o,type:s},!0)):r({value:null,questionId:o,type:s},!0)};return e.u("form",{className:e.cc(n,"ul-card--video","fade-in-transition"),id:"ul-video-interview-form",children:[e.u(E.QuestionBodyWrapper,{children:[e.u("div",{id:"ul-question-player-container",ref:v,style:{display:w===Le?"":"none"},children:e.u(E.MobileEmbedView,{properties:t,children:e.u("button",{className:"ul-video-btn ul-record-response-btn",onClick:f=>{f.preventDefault(),f.stopPropagation(),document.getElementById(a)&&(D=>{const O=ce(D+Ne);O==null||O.pause()})(a),N(Me)}})})}),e.u("div",{style:{display:w===Me?"block":"none"},children:e.u("div",{id:"ul-recorder-player-container",ref:f=>{if(f&&f.children.length===0){b(f);const D=((O,H={},$="https://api.userleap.com",F,G,Z,te=!1,re=document)=>{I.document=re;const C=O+Ie,M=He(C);return I.document.addEventListener("securitypolicyviolation",U=>{ne(new Error(`Voice & Video feature violates ${U.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",$,Z,H.visitorId,H.envId)}),Oe(Be.concat(Ke),()=>{fe(C,M),I.document.getElementById(ke(C)).remove();try{Xe(M,C,H,$,F,G,Z,te)}catch(U){return void ne(new Error(`Error when creating video recorder player object ${U}`),"recorderDeviceError",$,Z,H.visitorId,H.envId)}}),M})(a,{surveyId:g,responseGroupUid:y,questionId:o,visitorId:j,envId:u},d,k,void 0,{...p,"x-ul-video-recorder-origin":"sdk"},t.mediaType===B.MEDIA_TYPE_AUDIO,T);f.appendChild(D)}}})})]}),e.u(E.QuestionBodyFooterContainer,{children:[e.u(ie,{isDisabled:!!t.required&&!m,onClick:A,children:e.getButtonText(t)}),e.u("button",{className:"ul-card-text__button ul-button-inactive ul-card-skip__button",id:"ul-card-video__skip_button",onClick:A,style:{...t.required?{display:"none"}:{},...m?{display:"none"}:{}},children:e.getSkipButtonText(t)})]})]})},Ye=n=>n.type==="thanks"||n.type==="uploading",Sn=({card:n,avatars:r,isThinking:t,isCurrentQuestion:o,currentQuestionBubbleRef:s})=>{const a=(d=>"properties"in d.props&&d.props.properties&&"questionHtml"in d.props.properties&&d.props.properties.questionHtml?{content:d.props.properties.questionHtml,isHtml:!0}:"message"in d.props?{content:d.props.message,isHtml:!1}:{content:"Question",isHtml:!1})(n);return e.u(le,{avatars:r,isLeft:!0,message:{id:`question-${n.name}`,type:"question",content:a.content},ref:o?s:null,children:t?e.u(_n,{}):e.u(e.g,{children:[a.isHtml?e.u(E.Html,{className:"chat-message-text",html:a.content}):e.u("div",{className:"chat-message-text",children:a.content}),n.type==="videovoice"&&e.u(rn,{properties:n.props,questionId:n.name,surveyVideoUrl:n.props.properties.videoUrl})]})})},Rn=({card:n,avatars:r})=>{const t=(o=>{if(!("properties"in o.props)||!o.props.properties||typeof o.props.properties!="object")return null;const s=o.props.properties,a=[{key:"captionHtml",isHtml:!0},{key:"captionText",isHtml:!1},{key:"richTextBody",isHtml:!0},{key:"body",isHtml:!1}];for(const{key:d,isHtml:u}of a){const i=s[d];if(typeof i!="string")continue;const p=i.trim();if(p){if(u&&!p.replaceAll(/<[^>]*>/g,"").trim())continue;return{content:p,isHtml:u}}}return null})(n);return t?e.u(le,{avatars:r,hideAvatar:!0,isLeft:!0,message:{id:`caption-${n.name}`,type:"question",content:t.content},children:t.isHtml?e.u(E.Html,{className:"chat-message-text",html:t.content}):e.u("div",{className:"chat-message-text",children:t.content})}):null},Pn=({card:n,userResponse:r,avatars:t})=>{const o=((s,a)=>{if(s.type==="open"&&a&&typeof a=="object"&&"value"in a)return a.value})(n,r);return e.u("div",{className:"chat-bubble-container chat-right",children:[e.u("div",{className:"chat-bubble chat-bubble-right chat-bubble-text-only",children:e.u("div",{className:"chat-message-text",children:o||e.u("div",{className:"chat-message-no-response",children:"No response"})})}),e.u("img",{alt:"User Avatar",className:"chat-avatar chat-avatar-right",srcSet:`${t.respondentAvatar["1x"]} 1x, ${t.respondentAvatar["2x"]} 2x`})]})},Ln=({card:n,avatars:r,isCurrentQuestion:t,currentQuestionBubbleRef:o})=>{const{endCard:s}=e.useConfig(a=>({endCard:a.endCard}));return e.u(e.g,{children:[e.u(le,{avatars:r,isLeft:!0,message:{id:`thanks-${n.name}`,type:"question",content:(s==null?void 0:s.headline)??"Great! Thank you for your participation."},ref:t?o:null}),(s==null?void 0:s.subheader)&&e.u(le,{avatars:r,hideAvatar:!0,isLeft:!0,message:{id:`caption-${n.name}`,type:"question",content:s.subheader}}),e.u(sn,{})]})},Mn=({card:n,cardIndex:r,index:t,avatars:o,cardResponses:s,questionThinkingStates:a,startingQuestionIdx:d,currentQuestionBubbleRef:u,handleCardResponse:i})=>{const p=r===t,y=r<t,g=Ye(n);if(g)return e.u(Ln,{avatars:o,card:n,currentQuestionBubbleRef:u,isCurrentQuestion:p});const l=`${n.name}`,T=s.get(l),j=n.type==="open",m=a.get(l),c=r>(d??0)&&n.type!=="thanks"&&n.type!=="uploading"&&(m===!0||m===void 0);return e.u(e.wn.Fragment,{children:[e.u(Sn,{avatars:o,card:n,currentQuestionBubbleRef:u,isCurrentQuestion:p,isThinking:c}),!c&&e.u(Rn,{avatars:o,card:n}),y&&j?e.u(Pn,{avatars:o,card:n,userResponse:T}):(!y||!j)&&!c&&e.u(le,{avatars:o,isLeft:!1,message:{id:`card-${n.name}`,type:"card",content:""},children:e.u("div",{className:"chat-card-container",children:e.u(Nn,{card:n,className:g?"chat-thanks-card":"chat-card",isAnswered:y,next:p?i:()=>{}})})})]},`question-card-${n.name}`)},le=e.wn.forwardRef(({message:n,isLeft:r=!1,children:t,avatars:o,hideAvatar:s=!1},a)=>{const d=r?"chat-bubble-left":"chat-bubble-right";return e.u("div",{className:`chat-bubble-container ${r?"chat-left":"chat-right"}${r&&s?" chat-no-avatar":""}`,ref:a,children:[r&&!s&&e.u("img",{alt:"AI Avatar",className:"chat-avatar chat-avatar-left",srcSet:`${o.agentAvatar["1x"]} 1x, ${o.agentAvatar["2x"]} 2x`}),e.u("div",{className:`chat-bubble ${d}`,children:t||e.u("div",{className:"chat-message-text",children:n.content})}),!r&&!s&&e.u("img",{alt:"User Avatar",className:"chat-avatar chat-avatar-right",srcSet:`${o.respondentAvatar["1x"]} 1x, ${o.respondentAvatar["2x"]} 2x`})]})});le.displayName="ChatBubble";const Bn=()=>{const n=e.useConfig(t=>t.close),r=e.F(()=>()=>n(Y.APP_ID),[n]);return e.u("div",{"aria-label":"Close button",className:"conversational-close-btn",onClick:r,onKeyPress:t=>{t.key==="Enter"&&r()},role:"button",tabIndex:0,children:e.u("svg",{fill:"none",height:"16px",viewBox:"0 0 13 13",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:e.u("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"})})})},Nn=({card:n,next:r,className:t="",isAnswered:o=!1})=>{const s={className:o?`${t} answered-card`:t,next:o?()=>{}:r,questionId:n.name,type:n.type,isAnswered:o};switch(n.type){case"consentlegal":return e.u(on,{...s,...n.props});case"likert":return e.u(ln,{...s,...n.props});case"matrix":return e.u(cn,{...s,...n.props});case"multiplechoice":return e.u(un,{...s,...n.props});case"multipleselect":return e.u(pn,{...s,...n.props});case"nps":return e.u(vn,{...s,...n.props});case"open":return e.u(mn,{...s,...n.props});case"rankorder":return e.u(gn,{...s,...n.props});case"recordedtask":return e.u(En,{...s,...n.props});case"texturlprompt":return e.u(jn,{...s,...n.props});case"thanks":return e.u(Tn,{...s,...n.props});case"uploading":return e.u(In,{...s,...n.props});case"videovoice":return e.u(Dn,{...s,...n.props});default:return null}};exports.default=({cards:n,next:r,previousResponses:t})=>{const{messagesContainerRef:o,currentQuestionBubbleRef:s,scrollToCurrentQuestion:a}=(()=>{const h=e._(null),_=e._(null),w=e.T(()=>{if(_.current&&h.current){const N=h.current,x=_.current.offsetTop-N.offsetTop-16;N.scrollTo({top:Math.max(0,x),behavior:"smooth"})}},[]);return{messagesContainerRef:h,currentQuestionBubbleRef:_,scrollToCurrentQuestion:w}})(),{cardResponses:d,setCardResponse:u}=(()=>{const[h,_]=e.h(new Map);return{cardResponses:h,setCardResponse:e.T((w,N)=>{_(x=>new Map(x).set(w,N))},[])}})(),{index:i,isLongFormSurvey:p,avatars:y,startingQuestionIdx:g,update:l}=e.useConfig(h=>({index:h.index,isLongFormSurvey:Y.isLongFormSurvey(h.studyType),avatars:h.avatars,startingQuestionIdx:h.startingQuestionIdx,update:h.update})),T=((h,_,w)=>{const[N,x]=e.h(new Map);return e.p(()=>{if(h.length>0&&_<h.length){const q=h[_],S=`${q.name}`;if(_<=(w??0)||Ye(q))return void x(v=>new Map(v).set(S,!1));x(v=>new Map(v).set(S,!0));const b=setTimeout(()=>{x(v=>new Map(v).set(S,!1))},1e3);return()=>clearTimeout(b)}},[_,h,w]),N})(n,i,g),j=((h,_)=>{const[w,N]=e.h(new Set([0]));return e.p(()=>{N(x=>new Set(x).add(h))},[h]),e.p(()=>{const x=_??0;x>0&&N(q=>{const S=new Set(q);for(let b=0;b<=x;b++)S.add(b);return S})},[_]),w})(i,g),m=e.F(()=>({...t,...e.buildReadableResponseMap(n.map((h,_)=>{var w,N;return{...h,value:_<i?((w=d.get(`${h.name}`))==null?void 0:w.value)??null:null,secondaryValue:_<i?((N=d.get(`${h.name}`))==null?void 0:N.secondaryValue)??null:null}}))}),[t,d,n,i]),c=e.pipeReadableResponsesIntoCards(n,m);e.p(()=>{requestAnimationFrame(()=>{a()})},[i,a,T]);const P=e.T((h,_)=>{if(!_)return;const w=c[i];if(!w)return;const N=`${w.name}`;u(N,h);const x={...h,questionText:e.getProcessedQuestionText(w)};r([x])},[c,i,r,u]),L=c.map((h,_)=>({card:h,cardIndex:_})).filter(({cardIndex:h})=>j.has(h));return e.p(()=>{l()},[i,l]),e.u("div",{className:"conversational-ui ul-conversational-ui","data-testid":"ui-container",children:[!p&&e.u(Bn,{}),e.u("div",{className:"chat-container",ref:o,children:e.u("div",{className:"chat-messages",children:L.map(({card:h,cardIndex:_})=>e.u(Mn,{avatars:y,card:h,cardIndex:_,cardResponses:d,currentQuestionBubbleRef:s,handleCardResponse:P,index:i,questionThinkingStates:T,startingQuestionIdx:g},`question-card-${h.name}`))})})]})};
|