@sprig-technologies/sprig-browser 2.30.0 → 2.30.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/core-CQmniVXc.cjs +12 -0
- package/dist/core-kjUN1Tk4.js +12 -0
- package/dist/core.cjs +1 -0
- package/dist/core.d.ts +2972 -0
- package/dist/core.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +46 -94
- package/dist/index.js +1 -1
- package/dist/metricsReporter-D4_mNhAn.js +2 -0
- package/dist/metricsReporter-FY7QqLGR.cjs +2 -0
- package/dist/replay.cjs +7 -0
- package/dist/replay.d.ts +2 -0
- package/dist/replay.js +7 -0
- package/dist/view-BpheV42S.cjs +685 -0
- package/dist/view-DT2qf_CK.js +685 -0
- package/package.json +12 -2
- package/dist/index-DCzsCvvC.cjs +0 -19
- package/dist/index-Del4rEas.js +0 -19
- package/dist/view-BeigWq26.js +0 -685
- package/dist/view-XkUymOdH.cjs +0 -685
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,2972 @@
|
|
|
1
|
+
declare enum NodeType {
|
|
2
|
+
Document = 0,
|
|
3
|
+
DocumentType = 1,
|
|
4
|
+
Element = 2,
|
|
5
|
+
Text = 3,
|
|
6
|
+
CDATA = 4,
|
|
7
|
+
Comment = 5
|
|
8
|
+
}
|
|
9
|
+
type documentNode = {
|
|
10
|
+
type: NodeType.Document;
|
|
11
|
+
childNodes: serializedNodeWithId[];
|
|
12
|
+
compatMode?: string;
|
|
13
|
+
};
|
|
14
|
+
type documentTypeNode = {
|
|
15
|
+
type: NodeType.DocumentType;
|
|
16
|
+
name: string;
|
|
17
|
+
publicId: string;
|
|
18
|
+
systemId: string;
|
|
19
|
+
};
|
|
20
|
+
type attributes = {
|
|
21
|
+
[key: string]: string | number | true | null;
|
|
22
|
+
};
|
|
23
|
+
type elementNode = {
|
|
24
|
+
type: NodeType.Element;
|
|
25
|
+
tagName: string;
|
|
26
|
+
attributes: attributes;
|
|
27
|
+
childNodes: serializedNodeWithId[];
|
|
28
|
+
isSVG?: true;
|
|
29
|
+
needBlock?: boolean;
|
|
30
|
+
isCustom?: true;
|
|
31
|
+
};
|
|
32
|
+
type textNode = {
|
|
33
|
+
type: NodeType.Text;
|
|
34
|
+
textContent: string;
|
|
35
|
+
isStyle?: true;
|
|
36
|
+
};
|
|
37
|
+
type cdataNode = {
|
|
38
|
+
type: NodeType.CDATA;
|
|
39
|
+
textContent: '';
|
|
40
|
+
};
|
|
41
|
+
type commentNode = {
|
|
42
|
+
type: NodeType.Comment;
|
|
43
|
+
textContent: string;
|
|
44
|
+
};
|
|
45
|
+
type serializedNode = (documentNode | documentTypeNode | elementNode | textNode | cdataNode | commentNode) & {
|
|
46
|
+
rootId?: number;
|
|
47
|
+
isShadowHost?: boolean;
|
|
48
|
+
isShadow?: boolean;
|
|
49
|
+
};
|
|
50
|
+
type serializedNodeWithId = serializedNode & {
|
|
51
|
+
id: number;
|
|
52
|
+
};
|
|
53
|
+
interface INode extends Node {
|
|
54
|
+
__sn: serializedNodeWithId;
|
|
55
|
+
}
|
|
56
|
+
interface IMirror<TNode> {
|
|
57
|
+
getId(n: TNode | undefined | null): number;
|
|
58
|
+
getNode(id: number): TNode | null;
|
|
59
|
+
getIds(): number[];
|
|
60
|
+
getMeta(n: TNode): serializedNodeWithId | null;
|
|
61
|
+
removeNodeFromMap(n: TNode): void;
|
|
62
|
+
has(id: number): boolean;
|
|
63
|
+
hasNode(node: TNode): boolean;
|
|
64
|
+
add(n: TNode, meta: serializedNodeWithId): void;
|
|
65
|
+
replace(id: number, n: TNode): void;
|
|
66
|
+
reset(): void;
|
|
67
|
+
}
|
|
68
|
+
type MaskInputOptions = Partial<{
|
|
69
|
+
color: boolean;
|
|
70
|
+
date: boolean;
|
|
71
|
+
'datetime-local': boolean;
|
|
72
|
+
email: boolean;
|
|
73
|
+
month: boolean;
|
|
74
|
+
number: boolean;
|
|
75
|
+
range: boolean;
|
|
76
|
+
search: boolean;
|
|
77
|
+
tel: boolean;
|
|
78
|
+
text: boolean;
|
|
79
|
+
time: boolean;
|
|
80
|
+
url: boolean;
|
|
81
|
+
week: boolean;
|
|
82
|
+
textarea: boolean;
|
|
83
|
+
select: boolean;
|
|
84
|
+
password: boolean;
|
|
85
|
+
}>;
|
|
86
|
+
type SlimDOMOptions = Partial<{
|
|
87
|
+
script: boolean;
|
|
88
|
+
comment: boolean;
|
|
89
|
+
headFavicon: boolean;
|
|
90
|
+
headWhitespace: boolean;
|
|
91
|
+
headMetaDescKeywords: boolean;
|
|
92
|
+
headMetaSocial: boolean;
|
|
93
|
+
headMetaRobots: boolean;
|
|
94
|
+
headMetaHttpEquiv: boolean;
|
|
95
|
+
headMetaAuthorship: boolean;
|
|
96
|
+
headMetaVerification: boolean;
|
|
97
|
+
}>;
|
|
98
|
+
type DataURLOptions = Partial<{
|
|
99
|
+
type: string;
|
|
100
|
+
quality: number;
|
|
101
|
+
}>;
|
|
102
|
+
type MaskTextFn = (text: string, element: HTMLElement | null) => string;
|
|
103
|
+
type MaskInputFn = (text: string, element: HTMLElement) => string;
|
|
104
|
+
|
|
105
|
+
declare class Mirror$1 implements IMirror<Node> {
|
|
106
|
+
private idNodeMap;
|
|
107
|
+
private nodeMetaMap;
|
|
108
|
+
getId(n: Node | undefined | null): number;
|
|
109
|
+
getNode(id: number): Node | null;
|
|
110
|
+
getIds(): number[];
|
|
111
|
+
getMeta(n: Node): serializedNodeWithId | null;
|
|
112
|
+
removeNodeFromMap(n: Node): void;
|
|
113
|
+
has(id: number): boolean;
|
|
114
|
+
hasNode(node: Node): boolean;
|
|
115
|
+
add(n: Node, meta: serializedNodeWithId): void;
|
|
116
|
+
replace(id: number, n: Node): void;
|
|
117
|
+
reset(): void;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
declare enum EventType {
|
|
121
|
+
DomContentLoaded = 0,
|
|
122
|
+
Load = 1,
|
|
123
|
+
FullSnapshot = 2,
|
|
124
|
+
IncrementalSnapshot = 3,
|
|
125
|
+
Meta = 4,
|
|
126
|
+
Custom = 5,
|
|
127
|
+
Plugin = 6
|
|
128
|
+
}
|
|
129
|
+
type domContentLoadedEvent = {
|
|
130
|
+
type: EventType.DomContentLoaded;
|
|
131
|
+
data: unknown;
|
|
132
|
+
};
|
|
133
|
+
type loadedEvent = {
|
|
134
|
+
type: EventType.Load;
|
|
135
|
+
data: unknown;
|
|
136
|
+
};
|
|
137
|
+
type fullSnapshotEvent = {
|
|
138
|
+
type: EventType.FullSnapshot;
|
|
139
|
+
data: {
|
|
140
|
+
node: serializedNodeWithId;
|
|
141
|
+
initialOffset: {
|
|
142
|
+
top: number;
|
|
143
|
+
left: number;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
type incrementalSnapshotEvent = {
|
|
148
|
+
type: EventType.IncrementalSnapshot;
|
|
149
|
+
data: incrementalData;
|
|
150
|
+
};
|
|
151
|
+
type metaEvent = {
|
|
152
|
+
type: EventType.Meta;
|
|
153
|
+
data: {
|
|
154
|
+
href: string;
|
|
155
|
+
width: number;
|
|
156
|
+
height: number;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
type customEvent<T = unknown> = {
|
|
160
|
+
type: EventType.Custom;
|
|
161
|
+
data: {
|
|
162
|
+
tag: string;
|
|
163
|
+
payload: T;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
type pluginEvent<T = unknown> = {
|
|
167
|
+
type: EventType.Plugin;
|
|
168
|
+
data: {
|
|
169
|
+
plugin: string;
|
|
170
|
+
payload: T;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
declare enum IncrementalSource {
|
|
174
|
+
Mutation = 0,
|
|
175
|
+
MouseMove = 1,
|
|
176
|
+
MouseInteraction = 2,
|
|
177
|
+
Scroll = 3,
|
|
178
|
+
ViewportResize = 4,
|
|
179
|
+
Input = 5,
|
|
180
|
+
TouchMove = 6,
|
|
181
|
+
MediaInteraction = 7,
|
|
182
|
+
StyleSheetRule = 8,
|
|
183
|
+
CanvasMutation = 9,
|
|
184
|
+
Font = 10,
|
|
185
|
+
Log = 11,
|
|
186
|
+
Drag = 12,
|
|
187
|
+
StyleDeclaration = 13,
|
|
188
|
+
Selection = 14,
|
|
189
|
+
AdoptedStyleSheet = 15,
|
|
190
|
+
CustomElement = 16
|
|
191
|
+
}
|
|
192
|
+
type mutationData = {
|
|
193
|
+
source: IncrementalSource.Mutation;
|
|
194
|
+
} & mutationCallbackParam;
|
|
195
|
+
type mousemoveData = {
|
|
196
|
+
source: IncrementalSource.MouseMove | IncrementalSource.TouchMove | IncrementalSource.Drag;
|
|
197
|
+
positions: mousePosition[];
|
|
198
|
+
};
|
|
199
|
+
type mouseInteractionData = {
|
|
200
|
+
source: IncrementalSource.MouseInteraction;
|
|
201
|
+
} & mouseInteractionParam;
|
|
202
|
+
type scrollData = {
|
|
203
|
+
source: IncrementalSource.Scroll;
|
|
204
|
+
} & scrollPosition;
|
|
205
|
+
type viewportResizeData = {
|
|
206
|
+
source: IncrementalSource.ViewportResize;
|
|
207
|
+
} & viewportResizeDimension;
|
|
208
|
+
type inputData = {
|
|
209
|
+
source: IncrementalSource.Input;
|
|
210
|
+
id: number;
|
|
211
|
+
} & inputValue;
|
|
212
|
+
type mediaInteractionData = {
|
|
213
|
+
source: IncrementalSource.MediaInteraction;
|
|
214
|
+
} & mediaInteractionParam;
|
|
215
|
+
type styleSheetRuleData = {
|
|
216
|
+
source: IncrementalSource.StyleSheetRule;
|
|
217
|
+
} & styleSheetRuleParam;
|
|
218
|
+
type styleDeclarationData = {
|
|
219
|
+
source: IncrementalSource.StyleDeclaration;
|
|
220
|
+
} & styleDeclarationParam;
|
|
221
|
+
type canvasMutationData = {
|
|
222
|
+
source: IncrementalSource.CanvasMutation;
|
|
223
|
+
} & canvasMutationParam;
|
|
224
|
+
type fontData = {
|
|
225
|
+
source: IncrementalSource.Font;
|
|
226
|
+
} & fontParam;
|
|
227
|
+
type selectionData = {
|
|
228
|
+
source: IncrementalSource.Selection;
|
|
229
|
+
} & selectionParam;
|
|
230
|
+
type adoptedStyleSheetData = {
|
|
231
|
+
source: IncrementalSource.AdoptedStyleSheet;
|
|
232
|
+
} & adoptedStyleSheetParam;
|
|
233
|
+
type customElementData = {
|
|
234
|
+
source: IncrementalSource.CustomElement;
|
|
235
|
+
} & customElementParam;
|
|
236
|
+
type incrementalData = mutationData | mousemoveData | mouseInteractionData | scrollData | viewportResizeData | inputData | mediaInteractionData | styleSheetRuleData | canvasMutationData | fontData | selectionData | styleDeclarationData | adoptedStyleSheetData | customElementData;
|
|
237
|
+
type event = domContentLoadedEvent | loadedEvent | fullSnapshotEvent | incrementalSnapshotEvent | metaEvent | customEvent | pluginEvent;
|
|
238
|
+
type eventWithTime = event & {
|
|
239
|
+
timestamp: number;
|
|
240
|
+
delay?: number;
|
|
241
|
+
};
|
|
242
|
+
type canvasEventWithTime = eventWithTime & {
|
|
243
|
+
type: EventType.IncrementalSnapshot;
|
|
244
|
+
data: canvasMutationData;
|
|
245
|
+
};
|
|
246
|
+
type blockClass = string | RegExp;
|
|
247
|
+
type maskTextClass = string | RegExp;
|
|
248
|
+
type SamplingStrategy = Partial<{
|
|
249
|
+
mousemove: boolean | number;
|
|
250
|
+
mousemoveCallback: number;
|
|
251
|
+
mouseInteraction: boolean | Record<string, boolean | undefined>;
|
|
252
|
+
scroll: number;
|
|
253
|
+
media: number;
|
|
254
|
+
input: 'all' | 'last';
|
|
255
|
+
canvas: 'all' | number;
|
|
256
|
+
}>;
|
|
257
|
+
interface ICrossOriginIframeMirror {
|
|
258
|
+
getId(iframe: HTMLIFrameElement, remoteId: number, parentToRemoteMap?: Map<number, number>, remoteToParentMap?: Map<number, number>): number;
|
|
259
|
+
getIds(iframe: HTMLIFrameElement, remoteId: number[]): number[];
|
|
260
|
+
getRemoteId(iframe: HTMLIFrameElement, parentId: number, map?: Map<number, number>): number;
|
|
261
|
+
getRemoteIds(iframe: HTMLIFrameElement, parentId: number[]): number[];
|
|
262
|
+
reset(iframe?: HTMLIFrameElement): void;
|
|
263
|
+
}
|
|
264
|
+
type RecordPlugin<TOptions = unknown> = {
|
|
265
|
+
name: string;
|
|
266
|
+
observer?: (cb: (...args: Array<unknown>) => void, win: IWindow, options: TOptions) => listenerHandler;
|
|
267
|
+
eventProcessor?: <TExtend>(event: eventWithTime) => eventWithTime & TExtend;
|
|
268
|
+
getMirror?: (mirrors: {
|
|
269
|
+
nodeMirror: Mirror$1;
|
|
270
|
+
crossOriginIframeMirror: ICrossOriginIframeMirror;
|
|
271
|
+
crossOriginIframeStyleMirror: ICrossOriginIframeMirror;
|
|
272
|
+
}) => void;
|
|
273
|
+
options: TOptions;
|
|
274
|
+
};
|
|
275
|
+
type hooksParam = {
|
|
276
|
+
mutation?: mutationCallBack;
|
|
277
|
+
mousemove?: mousemoveCallBack;
|
|
278
|
+
mouseInteraction?: mouseInteractionCallBack;
|
|
279
|
+
scroll?: scrollCallback;
|
|
280
|
+
viewportResize?: viewportResizeCallback;
|
|
281
|
+
input?: inputCallback;
|
|
282
|
+
mediaInteaction?: mediaInteractionCallback;
|
|
283
|
+
styleSheetRule?: styleSheetRuleCallback;
|
|
284
|
+
styleDeclaration?: styleDeclarationCallback;
|
|
285
|
+
canvasMutation?: canvasMutationCallback;
|
|
286
|
+
font?: fontCallback;
|
|
287
|
+
selection?: selectionCallback;
|
|
288
|
+
customElement?: customElementCallback;
|
|
289
|
+
};
|
|
290
|
+
type textMutation = {
|
|
291
|
+
id: number;
|
|
292
|
+
value: string | null;
|
|
293
|
+
};
|
|
294
|
+
type styleOMValue = {
|
|
295
|
+
[key: string]: styleValueWithPriority | string | false;
|
|
296
|
+
};
|
|
297
|
+
type styleValueWithPriority = [string, string];
|
|
298
|
+
type attributeMutation = {
|
|
299
|
+
id: number;
|
|
300
|
+
attributes: {
|
|
301
|
+
[key: string]: string | styleOMValue | null;
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
type removedNodeMutation = {
|
|
305
|
+
parentId: number;
|
|
306
|
+
id: number;
|
|
307
|
+
isShadow?: boolean;
|
|
308
|
+
};
|
|
309
|
+
type addedNodeMutation = {
|
|
310
|
+
parentId: number;
|
|
311
|
+
previousId?: number | null;
|
|
312
|
+
nextId: number | null;
|
|
313
|
+
node: serializedNodeWithId;
|
|
314
|
+
};
|
|
315
|
+
type mutationCallbackParam = {
|
|
316
|
+
texts: textMutation[];
|
|
317
|
+
attributes: attributeMutation[];
|
|
318
|
+
removes: removedNodeMutation[];
|
|
319
|
+
adds: addedNodeMutation[];
|
|
320
|
+
isAttachIframe?: true;
|
|
321
|
+
};
|
|
322
|
+
type mutationCallBack = (m: mutationCallbackParam) => void;
|
|
323
|
+
type mousemoveCallBack = (p: mousePosition[], source: IncrementalSource.MouseMove | IncrementalSource.TouchMove | IncrementalSource.Drag) => void;
|
|
324
|
+
type mousePosition = {
|
|
325
|
+
x: number;
|
|
326
|
+
y: number;
|
|
327
|
+
id: number;
|
|
328
|
+
timeOffset: number;
|
|
329
|
+
};
|
|
330
|
+
declare enum MouseInteractions {
|
|
331
|
+
MouseUp = 0,
|
|
332
|
+
MouseDown = 1,
|
|
333
|
+
Click = 2,
|
|
334
|
+
ContextMenu = 3,
|
|
335
|
+
DblClick = 4,
|
|
336
|
+
Focus = 5,
|
|
337
|
+
Blur = 6,
|
|
338
|
+
TouchStart = 7,
|
|
339
|
+
TouchMove_Departed = 8,
|
|
340
|
+
TouchEnd = 9,
|
|
341
|
+
TouchCancel = 10
|
|
342
|
+
}
|
|
343
|
+
declare enum PointerTypes {
|
|
344
|
+
Mouse = 0,
|
|
345
|
+
Pen = 1,
|
|
346
|
+
Touch = 2
|
|
347
|
+
}
|
|
348
|
+
declare enum CanvasContext {
|
|
349
|
+
'2D' = 0,
|
|
350
|
+
WebGL = 1,
|
|
351
|
+
WebGL2 = 2
|
|
352
|
+
}
|
|
353
|
+
type mouseInteractionParam = {
|
|
354
|
+
type: MouseInteractions;
|
|
355
|
+
id: number;
|
|
356
|
+
x?: number;
|
|
357
|
+
y?: number;
|
|
358
|
+
pointerType?: PointerTypes;
|
|
359
|
+
};
|
|
360
|
+
type mouseInteractionCallBack = (d: mouseInteractionParam) => void;
|
|
361
|
+
type scrollPosition = {
|
|
362
|
+
id: number;
|
|
363
|
+
x: number;
|
|
364
|
+
y: number;
|
|
365
|
+
};
|
|
366
|
+
type scrollCallback = (p: scrollPosition) => void;
|
|
367
|
+
type styleSheetAddRule = {
|
|
368
|
+
rule: string;
|
|
369
|
+
index?: number | number[];
|
|
370
|
+
};
|
|
371
|
+
type styleSheetDeleteRule = {
|
|
372
|
+
index: number | number[];
|
|
373
|
+
};
|
|
374
|
+
type styleSheetRuleParam = {
|
|
375
|
+
id?: number;
|
|
376
|
+
styleId?: number;
|
|
377
|
+
removes?: styleSheetDeleteRule[];
|
|
378
|
+
adds?: styleSheetAddRule[];
|
|
379
|
+
replace?: string;
|
|
380
|
+
replaceSync?: string;
|
|
381
|
+
};
|
|
382
|
+
type styleSheetRuleCallback = (s: styleSheetRuleParam) => void;
|
|
383
|
+
type adoptedStyleSheetParam = {
|
|
384
|
+
id: number;
|
|
385
|
+
styles?: {
|
|
386
|
+
styleId: number;
|
|
387
|
+
rules: styleSheetAddRule[];
|
|
388
|
+
}[];
|
|
389
|
+
styleIds: number[];
|
|
390
|
+
};
|
|
391
|
+
type styleDeclarationParam = {
|
|
392
|
+
id?: number;
|
|
393
|
+
styleId?: number;
|
|
394
|
+
index: number[];
|
|
395
|
+
set?: {
|
|
396
|
+
property: string;
|
|
397
|
+
value: string | null;
|
|
398
|
+
priority: string | undefined;
|
|
399
|
+
};
|
|
400
|
+
remove?: {
|
|
401
|
+
property: string;
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
type styleDeclarationCallback = (s: styleDeclarationParam) => void;
|
|
405
|
+
type canvasMutationCommand = {
|
|
406
|
+
property: string;
|
|
407
|
+
args: Array<unknown>;
|
|
408
|
+
setter?: true;
|
|
409
|
+
};
|
|
410
|
+
type canvasMutationParam = {
|
|
411
|
+
id: number;
|
|
412
|
+
type: CanvasContext;
|
|
413
|
+
commands: canvasMutationCommand[];
|
|
414
|
+
} | ({
|
|
415
|
+
id: number;
|
|
416
|
+
type: CanvasContext;
|
|
417
|
+
} & canvasMutationCommand);
|
|
418
|
+
type canvasMutationCallback = (p: canvasMutationParam) => void;
|
|
419
|
+
type fontParam = {
|
|
420
|
+
family: string;
|
|
421
|
+
fontSource: string;
|
|
422
|
+
buffer: boolean;
|
|
423
|
+
descriptors?: FontFaceDescriptors;
|
|
424
|
+
};
|
|
425
|
+
type fontCallback = (p: fontParam) => void;
|
|
426
|
+
type viewportResizeDimension = {
|
|
427
|
+
width: number;
|
|
428
|
+
height: number;
|
|
429
|
+
};
|
|
430
|
+
type viewportResizeCallback = (d: viewportResizeDimension) => void;
|
|
431
|
+
type inputValue = {
|
|
432
|
+
text: string;
|
|
433
|
+
isChecked: boolean;
|
|
434
|
+
userTriggered?: boolean;
|
|
435
|
+
};
|
|
436
|
+
type inputCallback = (v: inputValue & {
|
|
437
|
+
id: number;
|
|
438
|
+
}) => void;
|
|
439
|
+
declare const enum MediaInteractions {
|
|
440
|
+
Play = 0,
|
|
441
|
+
Pause = 1,
|
|
442
|
+
Seeked = 2,
|
|
443
|
+
VolumeChange = 3,
|
|
444
|
+
RateChange = 4
|
|
445
|
+
}
|
|
446
|
+
type mediaInteractionParam = {
|
|
447
|
+
type: MediaInteractions;
|
|
448
|
+
id: number;
|
|
449
|
+
currentTime?: number;
|
|
450
|
+
volume?: number;
|
|
451
|
+
muted?: boolean;
|
|
452
|
+
loop?: boolean;
|
|
453
|
+
playbackRate?: number;
|
|
454
|
+
};
|
|
455
|
+
type mediaInteractionCallback = (p: mediaInteractionParam) => void;
|
|
456
|
+
type DocumentDimension = {
|
|
457
|
+
x: number;
|
|
458
|
+
y: number;
|
|
459
|
+
relativeScale: number;
|
|
460
|
+
absoluteScale: number;
|
|
461
|
+
};
|
|
462
|
+
type SelectionRange = {
|
|
463
|
+
start: number;
|
|
464
|
+
startOffset: number;
|
|
465
|
+
end: number;
|
|
466
|
+
endOffset: number;
|
|
467
|
+
};
|
|
468
|
+
type selectionParam = {
|
|
469
|
+
ranges: Array<SelectionRange>;
|
|
470
|
+
};
|
|
471
|
+
type selectionCallback = (p: selectionParam) => void;
|
|
472
|
+
type customElementParam = {
|
|
473
|
+
define?: {
|
|
474
|
+
name: string;
|
|
475
|
+
};
|
|
476
|
+
};
|
|
477
|
+
type customElementCallback = (c: customElementParam) => void;
|
|
478
|
+
type DeprecatedMirror = {
|
|
479
|
+
map: {
|
|
480
|
+
[key: number]: INode;
|
|
481
|
+
};
|
|
482
|
+
getId: (n: Node) => number;
|
|
483
|
+
getNode: (id: number) => INode | null;
|
|
484
|
+
removeNodeFromMap: (n: Node) => void;
|
|
485
|
+
has: (id: number) => boolean;
|
|
486
|
+
reset: () => void;
|
|
487
|
+
};
|
|
488
|
+
type throttleOptions = {
|
|
489
|
+
leading?: boolean;
|
|
490
|
+
trailing?: boolean;
|
|
491
|
+
};
|
|
492
|
+
type listenerHandler = () => void;
|
|
493
|
+
type hookResetter = () => void;
|
|
494
|
+
type playerMetaData = {
|
|
495
|
+
startTime: number;
|
|
496
|
+
endTime: number;
|
|
497
|
+
totalTime: number;
|
|
498
|
+
};
|
|
499
|
+
type actionWithDelay = {
|
|
500
|
+
doAction: () => void;
|
|
501
|
+
delay: number;
|
|
502
|
+
};
|
|
503
|
+
type Handler = (event?: unknown) => void;
|
|
504
|
+
type Emitter$1 = {
|
|
505
|
+
on(type: string, handler: Handler): void;
|
|
506
|
+
emit(type: string, event?: unknown): void;
|
|
507
|
+
off(type: string, handler: Handler): void;
|
|
508
|
+
};
|
|
509
|
+
declare enum ReplayerEvents {
|
|
510
|
+
Start = "start",
|
|
511
|
+
Pause = "pause",
|
|
512
|
+
Resume = "resume",
|
|
513
|
+
Resize = "resize",
|
|
514
|
+
Finish = "finish",
|
|
515
|
+
FullsnapshotRebuilded = "fullsnapshot-rebuilded",
|
|
516
|
+
LoadStylesheetStart = "load-stylesheet-start",
|
|
517
|
+
LoadStylesheetEnd = "load-stylesheet-end",
|
|
518
|
+
SkipStart = "skip-start",
|
|
519
|
+
SkipEnd = "skip-end",
|
|
520
|
+
MouseInteraction = "mouse-interaction",
|
|
521
|
+
EventCast = "event-cast",
|
|
522
|
+
CustomEvent = "custom-event",
|
|
523
|
+
Flush = "flush",
|
|
524
|
+
StateChange = "state-change",
|
|
525
|
+
PlayBack = "play-back",
|
|
526
|
+
Destroy = "destroy"
|
|
527
|
+
}
|
|
528
|
+
type KeepIframeSrcFn = (src: string) => boolean;
|
|
529
|
+
declare global {
|
|
530
|
+
interface Window {
|
|
531
|
+
FontFace: typeof FontFace;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
type IWindow = Window & typeof globalThis;
|
|
535
|
+
|
|
536
|
+
type PackFn = (event: eventWithTime) => string;
|
|
537
|
+
type UnpackFn = (raw: string) => eventWithTime;
|
|
538
|
+
|
|
539
|
+
interface IRRNode {
|
|
540
|
+
parentElement: IRRNode | null;
|
|
541
|
+
parentNode: IRRNode | null;
|
|
542
|
+
ownerDocument: IRRDocument;
|
|
543
|
+
readonly childNodes: IRRNode[];
|
|
544
|
+
readonly ELEMENT_NODE: number;
|
|
545
|
+
readonly TEXT_NODE: number;
|
|
546
|
+
readonly nodeType: number;
|
|
547
|
+
readonly nodeName: string;
|
|
548
|
+
readonly RRNodeType: NodeType;
|
|
549
|
+
firstChild: IRRNode | null;
|
|
550
|
+
lastChild: IRRNode | null;
|
|
551
|
+
previousSibling: IRRNode | null;
|
|
552
|
+
nextSibling: IRRNode | null;
|
|
553
|
+
textContent: string | null;
|
|
554
|
+
contains(node: IRRNode): boolean;
|
|
555
|
+
appendChild(newChild: IRRNode): IRRNode;
|
|
556
|
+
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
557
|
+
removeChild(node: IRRNode): IRRNode;
|
|
558
|
+
toString(): string;
|
|
559
|
+
}
|
|
560
|
+
interface IRRDocument extends IRRNode {
|
|
561
|
+
documentElement: IRRElement | null;
|
|
562
|
+
body: IRRElement | null;
|
|
563
|
+
head: IRRElement | null;
|
|
564
|
+
implementation: IRRDocument;
|
|
565
|
+
firstElementChild: IRRElement | null;
|
|
566
|
+
readonly nodeName: '#document';
|
|
567
|
+
compatMode: 'BackCompat' | 'CSS1Compat';
|
|
568
|
+
createDocument(_namespace: string | null, _qualifiedName: string | null, _doctype?: DocumentType | null): IRRDocument;
|
|
569
|
+
createDocumentType(qualifiedName: string, publicId: string, systemId: string): IRRDocumentType;
|
|
570
|
+
createElement(tagName: string): IRRElement;
|
|
571
|
+
createElementNS(_namespaceURI: string, qualifiedName: string): IRRElement;
|
|
572
|
+
createTextNode(data: string): IRRText;
|
|
573
|
+
createComment(data: string): IRRComment;
|
|
574
|
+
createCDATASection(data: string): IRRCDATASection;
|
|
575
|
+
open(): void;
|
|
576
|
+
close(): void;
|
|
577
|
+
write(content: string): void;
|
|
578
|
+
}
|
|
579
|
+
interface IRRElement extends IRRNode {
|
|
580
|
+
tagName: string;
|
|
581
|
+
attributes: Record<string, string>;
|
|
582
|
+
shadowRoot: IRRElement | null;
|
|
583
|
+
scrollLeft?: number;
|
|
584
|
+
scrollTop?: number;
|
|
585
|
+
id: string;
|
|
586
|
+
className: string;
|
|
587
|
+
classList: ClassList;
|
|
588
|
+
style: CSSStyleDeclaration;
|
|
589
|
+
attachShadow(init: ShadowRootInit): IRRElement;
|
|
590
|
+
getAttribute(name: string): string | null;
|
|
591
|
+
setAttribute(name: string, attribute: string): void;
|
|
592
|
+
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
593
|
+
removeAttribute(name: string): void;
|
|
594
|
+
dispatchEvent(event: Event): boolean;
|
|
595
|
+
}
|
|
596
|
+
interface IRRDocumentType extends IRRNode {
|
|
597
|
+
readonly name: string;
|
|
598
|
+
readonly publicId: string;
|
|
599
|
+
readonly systemId: string;
|
|
600
|
+
}
|
|
601
|
+
interface IRRText extends IRRNode {
|
|
602
|
+
readonly nodeName: '#text';
|
|
603
|
+
data: string;
|
|
604
|
+
}
|
|
605
|
+
interface IRRComment extends IRRNode {
|
|
606
|
+
readonly nodeName: '#comment';
|
|
607
|
+
data: string;
|
|
608
|
+
}
|
|
609
|
+
interface IRRCDATASection extends IRRNode {
|
|
610
|
+
readonly nodeName: '#cdata-section';
|
|
611
|
+
data: string;
|
|
612
|
+
}
|
|
613
|
+
declare class BaseRRNode implements IRRNode {
|
|
614
|
+
parentElement: IRRNode | null;
|
|
615
|
+
parentNode: IRRNode | null;
|
|
616
|
+
ownerDocument: IRRDocument;
|
|
617
|
+
firstChild: IRRNode | null;
|
|
618
|
+
lastChild: IRRNode | null;
|
|
619
|
+
previousSibling: IRRNode | null;
|
|
620
|
+
nextSibling: IRRNode | null;
|
|
621
|
+
textContent: string | null;
|
|
622
|
+
readonly ELEMENT_NODE: number;
|
|
623
|
+
readonly TEXT_NODE: number;
|
|
624
|
+
readonly nodeType: number;
|
|
625
|
+
readonly nodeName: string;
|
|
626
|
+
readonly RRNodeType: NodeType;
|
|
627
|
+
constructor(..._args: any[]);
|
|
628
|
+
get childNodes(): IRRNode[];
|
|
629
|
+
contains(node: IRRNode): boolean;
|
|
630
|
+
appendChild(_newChild: IRRNode): IRRNode;
|
|
631
|
+
insertBefore(_newChild: IRRNode, _refChild: IRRNode | null): IRRNode;
|
|
632
|
+
removeChild(_node: IRRNode): IRRNode;
|
|
633
|
+
toString(): string;
|
|
634
|
+
}
|
|
635
|
+
declare class ClassList {
|
|
636
|
+
private onChange;
|
|
637
|
+
classes: string[];
|
|
638
|
+
constructor(classText?: string, onChange?: ((newClassText: string) => void) | undefined);
|
|
639
|
+
add: (...classNames: string[]) => void;
|
|
640
|
+
remove: (...classNames: string[]) => void;
|
|
641
|
+
}
|
|
642
|
+
type CSSStyleDeclaration = Record<string, string> & {
|
|
643
|
+
setProperty: (name: string, value: string | null, priority?: string | null) => void;
|
|
644
|
+
removeProperty: (name: string) => string;
|
|
645
|
+
};
|
|
646
|
+
|
|
647
|
+
declare const RRDocument_base: {
|
|
648
|
+
new (...args: any[]): {
|
|
649
|
+
readonly nodeType: number;
|
|
650
|
+
readonly nodeName: "#document";
|
|
651
|
+
readonly compatMode: "BackCompat" | "CSS1Compat";
|
|
652
|
+
readonly RRNodeType: NodeType.Document;
|
|
653
|
+
readonly documentElement: IRRElement | null;
|
|
654
|
+
readonly body: IRRElement | null;
|
|
655
|
+
readonly head: IRRElement | null;
|
|
656
|
+
readonly implementation: IRRDocument;
|
|
657
|
+
readonly firstElementChild: IRRElement | null;
|
|
658
|
+
appendChild(newChild: IRRNode): IRRNode;
|
|
659
|
+
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
660
|
+
removeChild(node: IRRNode): IRRNode;
|
|
661
|
+
open(): void;
|
|
662
|
+
close(): void;
|
|
663
|
+
write(content: string): void;
|
|
664
|
+
createDocument(_namespace: string | null, _qualifiedName: string | null, _doctype?: DocumentType | null | undefined): IRRDocument;
|
|
665
|
+
createDocumentType(qualifiedName: string, publicId: string, systemId: string): IRRDocumentType;
|
|
666
|
+
createElement(tagName: string): IRRElement;
|
|
667
|
+
createElementNS(_namespaceURI: string, qualifiedName: string): IRRElement;
|
|
668
|
+
createTextNode(data: string): IRRText;
|
|
669
|
+
createComment(data: string): IRRComment;
|
|
670
|
+
createCDATASection(data: string): IRRCDATASection;
|
|
671
|
+
toString(): string;
|
|
672
|
+
parentElement: IRRNode | null;
|
|
673
|
+
parentNode: IRRNode | null;
|
|
674
|
+
ownerDocument: IRRDocument;
|
|
675
|
+
readonly childNodes: IRRNode[];
|
|
676
|
+
readonly ELEMENT_NODE: number;
|
|
677
|
+
readonly TEXT_NODE: number;
|
|
678
|
+
firstChild: IRRNode | null;
|
|
679
|
+
lastChild: IRRNode | null;
|
|
680
|
+
previousSibling: IRRNode | null;
|
|
681
|
+
nextSibling: IRRNode | null;
|
|
682
|
+
textContent: string | null;
|
|
683
|
+
contains(node: IRRNode): boolean;
|
|
684
|
+
};
|
|
685
|
+
} & typeof BaseRRNode;
|
|
686
|
+
declare class RRDocument extends RRDocument_base {
|
|
687
|
+
private UNSERIALIZED_STARTING_ID;
|
|
688
|
+
private _unserializedId;
|
|
689
|
+
get unserializedId(): number;
|
|
690
|
+
mirror: Mirror;
|
|
691
|
+
scrollData: scrollData | null;
|
|
692
|
+
constructor(mirror?: Mirror);
|
|
693
|
+
createDocument(_namespace: string | null, _qualifiedName: string | null, _doctype?: DocumentType | null): RRDocument;
|
|
694
|
+
createDocumentType(qualifiedName: string, publicId: string, systemId: string): {
|
|
695
|
+
readonly nodeType: number;
|
|
696
|
+
readonly RRNodeType: NodeType.DocumentType;
|
|
697
|
+
readonly nodeName: string;
|
|
698
|
+
readonly name: string;
|
|
699
|
+
readonly publicId: string;
|
|
700
|
+
readonly systemId: string;
|
|
701
|
+
toString(): string;
|
|
702
|
+
parentElement: IRRNode | null;
|
|
703
|
+
parentNode: IRRNode | null;
|
|
704
|
+
ownerDocument: IRRDocument;
|
|
705
|
+
readonly childNodes: IRRNode[];
|
|
706
|
+
readonly ELEMENT_NODE: number;
|
|
707
|
+
readonly TEXT_NODE: number;
|
|
708
|
+
firstChild: IRRNode | null;
|
|
709
|
+
lastChild: IRRNode | null;
|
|
710
|
+
previousSibling: IRRNode | null;
|
|
711
|
+
nextSibling: IRRNode | null;
|
|
712
|
+
textContent: string | null;
|
|
713
|
+
contains(node: IRRNode): boolean;
|
|
714
|
+
appendChild(newChild: IRRNode): IRRNode;
|
|
715
|
+
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
716
|
+
removeChild(node: IRRNode): IRRNode;
|
|
717
|
+
} & BaseRRNode;
|
|
718
|
+
createElement<K extends keyof HTMLElementTagNameMap>(tagName: K): RRElementType<K>;
|
|
719
|
+
createElement(tagName: string): RRElement;
|
|
720
|
+
createComment(data: string): {
|
|
721
|
+
readonly nodeType: number;
|
|
722
|
+
readonly nodeName: "#comment";
|
|
723
|
+
readonly RRNodeType: NodeType.Comment;
|
|
724
|
+
data: string;
|
|
725
|
+
textContent: string;
|
|
726
|
+
toString(): string;
|
|
727
|
+
parentElement: IRRNode | null;
|
|
728
|
+
parentNode: IRRNode | null;
|
|
729
|
+
ownerDocument: IRRDocument;
|
|
730
|
+
readonly childNodes: IRRNode[];
|
|
731
|
+
readonly ELEMENT_NODE: number;
|
|
732
|
+
readonly TEXT_NODE: number;
|
|
733
|
+
firstChild: IRRNode | null;
|
|
734
|
+
lastChild: IRRNode | null;
|
|
735
|
+
previousSibling: IRRNode | null;
|
|
736
|
+
nextSibling: IRRNode | null;
|
|
737
|
+
contains(node: IRRNode): boolean;
|
|
738
|
+
appendChild(newChild: IRRNode): IRRNode;
|
|
739
|
+
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
740
|
+
removeChild(node: IRRNode): IRRNode;
|
|
741
|
+
} & BaseRRNode;
|
|
742
|
+
createCDATASection(data: string): {
|
|
743
|
+
readonly nodeName: "#cdata-section";
|
|
744
|
+
readonly nodeType: number;
|
|
745
|
+
readonly RRNodeType: NodeType.CDATA;
|
|
746
|
+
data: string;
|
|
747
|
+
textContent: string;
|
|
748
|
+
toString(): string;
|
|
749
|
+
parentElement: IRRNode | null;
|
|
750
|
+
parentNode: IRRNode | null;
|
|
751
|
+
ownerDocument: IRRDocument;
|
|
752
|
+
readonly childNodes: IRRNode[];
|
|
753
|
+
readonly ELEMENT_NODE: number;
|
|
754
|
+
readonly TEXT_NODE: number;
|
|
755
|
+
firstChild: IRRNode | null;
|
|
756
|
+
lastChild: IRRNode | null;
|
|
757
|
+
previousSibling: IRRNode | null;
|
|
758
|
+
nextSibling: IRRNode | null;
|
|
759
|
+
contains(node: IRRNode): boolean;
|
|
760
|
+
appendChild(newChild: IRRNode): IRRNode;
|
|
761
|
+
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
762
|
+
removeChild(node: IRRNode): IRRNode;
|
|
763
|
+
} & BaseRRNode;
|
|
764
|
+
createTextNode(data: string): {
|
|
765
|
+
readonly nodeType: number;
|
|
766
|
+
readonly nodeName: "#text";
|
|
767
|
+
readonly RRNodeType: NodeType.Text;
|
|
768
|
+
data: string;
|
|
769
|
+
textContent: string;
|
|
770
|
+
toString(): string;
|
|
771
|
+
parentElement: IRRNode | null;
|
|
772
|
+
parentNode: IRRNode | null;
|
|
773
|
+
ownerDocument: IRRDocument;
|
|
774
|
+
readonly childNodes: IRRNode[];
|
|
775
|
+
readonly ELEMENT_NODE: number;
|
|
776
|
+
readonly TEXT_NODE: number;
|
|
777
|
+
firstChild: IRRNode | null;
|
|
778
|
+
lastChild: IRRNode | null;
|
|
779
|
+
previousSibling: IRRNode | null;
|
|
780
|
+
nextSibling: IRRNode | null;
|
|
781
|
+
contains(node: IRRNode): boolean;
|
|
782
|
+
appendChild(newChild: IRRNode): IRRNode;
|
|
783
|
+
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
784
|
+
removeChild(node: IRRNode): IRRNode;
|
|
785
|
+
} & BaseRRNode;
|
|
786
|
+
destroyTree(): void;
|
|
787
|
+
open(): void;
|
|
788
|
+
}
|
|
789
|
+
declare const RRElement_base: {
|
|
790
|
+
new (tagName: string): {
|
|
791
|
+
readonly nodeType: number;
|
|
792
|
+
readonly RRNodeType: NodeType.Element;
|
|
793
|
+
readonly nodeName: string;
|
|
794
|
+
tagName: string;
|
|
795
|
+
attributes: Record<string, string>;
|
|
796
|
+
shadowRoot: IRRElement | null;
|
|
797
|
+
scrollLeft?: number | undefined;
|
|
798
|
+
scrollTop?: number | undefined;
|
|
799
|
+
textContent: string;
|
|
800
|
+
readonly classList: ClassList;
|
|
801
|
+
readonly id: string;
|
|
802
|
+
readonly className: string;
|
|
803
|
+
readonly style: CSSStyleDeclaration;
|
|
804
|
+
getAttribute(name: string): string | null;
|
|
805
|
+
setAttribute(name: string, attribute: string): void;
|
|
806
|
+
setAttributeNS(_namespace: string | null, qualifiedName: string, value: string): void;
|
|
807
|
+
removeAttribute(name: string): void;
|
|
808
|
+
appendChild(newChild: IRRNode): IRRNode;
|
|
809
|
+
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
810
|
+
removeChild(node: IRRNode): IRRNode;
|
|
811
|
+
attachShadow(_init: ShadowRootInit): IRRElement;
|
|
812
|
+
dispatchEvent(_event: Event): boolean;
|
|
813
|
+
toString(): string;
|
|
814
|
+
parentElement: IRRNode | null;
|
|
815
|
+
parentNode: IRRNode | null;
|
|
816
|
+
ownerDocument: IRRDocument;
|
|
817
|
+
readonly childNodes: IRRNode[];
|
|
818
|
+
readonly ELEMENT_NODE: number;
|
|
819
|
+
readonly TEXT_NODE: number;
|
|
820
|
+
firstChild: IRRNode | null;
|
|
821
|
+
lastChild: IRRNode | null;
|
|
822
|
+
previousSibling: IRRNode | null;
|
|
823
|
+
nextSibling: IRRNode | null;
|
|
824
|
+
contains(node: IRRNode): boolean;
|
|
825
|
+
};
|
|
826
|
+
} & typeof BaseRRNode;
|
|
827
|
+
declare class RRElement extends RRElement_base {
|
|
828
|
+
inputData: inputData | null;
|
|
829
|
+
scrollData: scrollData | null;
|
|
830
|
+
}
|
|
831
|
+
declare const RRMediaElement_base: {
|
|
832
|
+
new (...args: any[]): {
|
|
833
|
+
currentTime?: number | undefined;
|
|
834
|
+
volume?: number | undefined;
|
|
835
|
+
paused?: boolean | undefined;
|
|
836
|
+
muted?: boolean | undefined;
|
|
837
|
+
playbackRate?: number | undefined;
|
|
838
|
+
loop?: boolean | undefined;
|
|
839
|
+
attachShadow(_init: ShadowRootInit): IRRElement;
|
|
840
|
+
play(): void;
|
|
841
|
+
pause(): void;
|
|
842
|
+
tagName: string;
|
|
843
|
+
attributes: Record<string, string>;
|
|
844
|
+
shadowRoot: IRRElement | null;
|
|
845
|
+
scrollLeft?: number | undefined;
|
|
846
|
+
scrollTop?: number | undefined;
|
|
847
|
+
id: string;
|
|
848
|
+
className: string;
|
|
849
|
+
classList: ClassList;
|
|
850
|
+
style: CSSStyleDeclaration;
|
|
851
|
+
getAttribute(name: string): string | null;
|
|
852
|
+
setAttribute(name: string, attribute: string): void;
|
|
853
|
+
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
854
|
+
removeAttribute(name: string): void;
|
|
855
|
+
dispatchEvent(event: Event): boolean;
|
|
856
|
+
parentElement: IRRNode | null;
|
|
857
|
+
parentNode: IRRNode | null;
|
|
858
|
+
ownerDocument: IRRDocument;
|
|
859
|
+
readonly childNodes: IRRNode[];
|
|
860
|
+
readonly ELEMENT_NODE: number;
|
|
861
|
+
readonly TEXT_NODE: number;
|
|
862
|
+
readonly nodeType: number;
|
|
863
|
+
readonly nodeName: string;
|
|
864
|
+
readonly RRNodeType: NodeType;
|
|
865
|
+
firstChild: IRRNode | null;
|
|
866
|
+
lastChild: IRRNode | null;
|
|
867
|
+
previousSibling: IRRNode | null;
|
|
868
|
+
nextSibling: IRRNode | null;
|
|
869
|
+
textContent: string | null;
|
|
870
|
+
contains(node: IRRNode): boolean;
|
|
871
|
+
appendChild(newChild: IRRNode): IRRNode;
|
|
872
|
+
insertBefore(newChild: IRRNode, refChild: IRRNode | null): IRRNode;
|
|
873
|
+
removeChild(node: IRRNode): IRRNode;
|
|
874
|
+
toString(): string;
|
|
875
|
+
};
|
|
876
|
+
} & typeof RRElement;
|
|
877
|
+
declare class RRMediaElement extends RRMediaElement_base {
|
|
878
|
+
}
|
|
879
|
+
declare class RRCanvasElement extends RRElement implements IRRElement {
|
|
880
|
+
rr_dataURL: string | null;
|
|
881
|
+
canvasMutations: {
|
|
882
|
+
event: canvasEventWithTime;
|
|
883
|
+
mutation: canvasMutationData;
|
|
884
|
+
}[];
|
|
885
|
+
getContext(): RenderingContext | null;
|
|
886
|
+
}
|
|
887
|
+
declare class RRStyleElement extends RRElement {
|
|
888
|
+
rules: (styleSheetRuleData | styleDeclarationData)[];
|
|
889
|
+
}
|
|
890
|
+
declare class RRIFrameElement extends RRElement {
|
|
891
|
+
contentDocument: RRDocument;
|
|
892
|
+
constructor(upperTagName: string, mirror: Mirror);
|
|
893
|
+
}
|
|
894
|
+
interface RRElementTagNameMap {
|
|
895
|
+
audio: RRMediaElement;
|
|
896
|
+
canvas: RRCanvasElement;
|
|
897
|
+
iframe: RRIFrameElement;
|
|
898
|
+
style: RRStyleElement;
|
|
899
|
+
video: RRMediaElement;
|
|
900
|
+
}
|
|
901
|
+
type RRElementType<K extends keyof HTMLElementTagNameMap> = K extends keyof RRElementTagNameMap ? RRElementTagNameMap[K] : RRElement;
|
|
902
|
+
declare class Mirror implements IMirror<BaseRRNode> {
|
|
903
|
+
private idNodeMap;
|
|
904
|
+
private nodeMetaMap;
|
|
905
|
+
getId(n: BaseRRNode | undefined | null): number;
|
|
906
|
+
getNode(id: number): BaseRRNode | null;
|
|
907
|
+
getIds(): number[];
|
|
908
|
+
getMeta(n: BaseRRNode): serializedNodeWithId | null;
|
|
909
|
+
removeNodeFromMap(n: BaseRRNode): void;
|
|
910
|
+
has(id: number): boolean;
|
|
911
|
+
hasNode(node: BaseRRNode): boolean;
|
|
912
|
+
add(n: BaseRRNode, meta: serializedNodeWithId): void;
|
|
913
|
+
replace(id: number, n: BaseRRNode): void;
|
|
914
|
+
reset(): void;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
declare function on(type: string, fn: EventListenerOrEventListenerObject, target?: Document | IWindow): listenerHandler;
|
|
918
|
+
declare let _mirror: DeprecatedMirror;
|
|
919
|
+
declare function throttle<T>(func: (arg: T) => void, wait: number, options?: throttleOptions): (...args: T[]) => void;
|
|
920
|
+
declare function hookSetter<T>(target: T, key: string | number | symbol, d: PropertyDescriptor, isRevoked?: boolean, win?: Window & typeof globalThis): hookResetter;
|
|
921
|
+
declare function patch(source: {
|
|
922
|
+
[key: string]: any;
|
|
923
|
+
}, name: string, replacement: (...args: unknown[]) => unknown): () => void;
|
|
924
|
+
declare let nowTimestamp: () => number;
|
|
925
|
+
|
|
926
|
+
declare function getWindowScroll(win: Window): {
|
|
927
|
+
left: number;
|
|
928
|
+
top: number;
|
|
929
|
+
};
|
|
930
|
+
declare function getWindowHeight(): number;
|
|
931
|
+
declare function getWindowWidth(): number;
|
|
932
|
+
declare function isBlocked(node: Node | null, blockClass: blockClass, blockSelector: string | null, checkAncestors: boolean): boolean;
|
|
933
|
+
declare function isSerialized(n: Node, mirror: Mirror$1): boolean;
|
|
934
|
+
declare function isIgnored(n: Node, mirror: Mirror$1): boolean;
|
|
935
|
+
declare function isAncestorRemoved(target: Node, mirror: Mirror$1): boolean;
|
|
936
|
+
declare function legacy_isTouchEvent(event: MouseEvent | TouchEvent | PointerEvent): event is TouchEvent;
|
|
937
|
+
declare function polyfill(win?: Window & typeof globalThis): void;
|
|
938
|
+
type ResolveTree = {
|
|
939
|
+
value: addedNodeMutation;
|
|
940
|
+
children: ResolveTree[];
|
|
941
|
+
parent: ResolveTree | null;
|
|
942
|
+
};
|
|
943
|
+
declare function queueToResolveTrees(queue: addedNodeMutation[]): ResolveTree[];
|
|
944
|
+
declare function iterateResolveTree(tree: ResolveTree, cb: (mutation: addedNodeMutation) => unknown): void;
|
|
945
|
+
type AppendedIframe = {
|
|
946
|
+
mutationInQueue: addedNodeMutation;
|
|
947
|
+
builtNode: HTMLIFrameElement | RRIFrameElement;
|
|
948
|
+
};
|
|
949
|
+
declare function isSerializedIframe<TNode extends Node | BaseRRNode>(n: TNode, mirror: IMirror<TNode>): boolean;
|
|
950
|
+
declare function isSerializedStylesheet<TNode extends Node | BaseRRNode>(n: TNode, mirror: IMirror<TNode>): boolean;
|
|
951
|
+
declare function getBaseDimension(node: Node, rootIframe: Node): DocumentDimension;
|
|
952
|
+
declare function hasShadowRoot<T extends Node | BaseRRNode>(n: T): n is T & {
|
|
953
|
+
shadowRoot: ShadowRoot;
|
|
954
|
+
};
|
|
955
|
+
declare function getNestedRule(rules: CSSRuleList, position: number[]): CSSGroupingRule;
|
|
956
|
+
declare function getPositionsAndIndex(nestedIndex: number[]): {
|
|
957
|
+
positions: number[];
|
|
958
|
+
index: number | undefined;
|
|
959
|
+
};
|
|
960
|
+
declare function uniqueTextMutations(mutations: textMutation[]): textMutation[];
|
|
961
|
+
declare class StyleSheetMirror {
|
|
962
|
+
private id;
|
|
963
|
+
private styleIDMap;
|
|
964
|
+
private idStyleMap;
|
|
965
|
+
getId(stylesheet: CSSStyleSheet): number;
|
|
966
|
+
has(stylesheet: CSSStyleSheet): boolean;
|
|
967
|
+
add(stylesheet: CSSStyleSheet, id?: number): number;
|
|
968
|
+
getStyle(id: number): CSSStyleSheet | null;
|
|
969
|
+
reset(): void;
|
|
970
|
+
generateId(): number;
|
|
971
|
+
}
|
|
972
|
+
declare function getShadowHost(n: Node): Element | null;
|
|
973
|
+
declare function getRootShadowHost(n: Node): Node;
|
|
974
|
+
declare function shadowHostInDom(n: Node): boolean;
|
|
975
|
+
declare function inDom(n: Node): boolean;
|
|
976
|
+
|
|
977
|
+
type utils_d_AppendedIframe = AppendedIframe;
|
|
978
|
+
type utils_d_StyleSheetMirror = StyleSheetMirror;
|
|
979
|
+
declare const utils_d_StyleSheetMirror: typeof StyleSheetMirror;
|
|
980
|
+
declare const utils_d__mirror: typeof _mirror;
|
|
981
|
+
declare const utils_d_getBaseDimension: typeof getBaseDimension;
|
|
982
|
+
declare const utils_d_getNestedRule: typeof getNestedRule;
|
|
983
|
+
declare const utils_d_getPositionsAndIndex: typeof getPositionsAndIndex;
|
|
984
|
+
declare const utils_d_getRootShadowHost: typeof getRootShadowHost;
|
|
985
|
+
declare const utils_d_getShadowHost: typeof getShadowHost;
|
|
986
|
+
declare const utils_d_getWindowHeight: typeof getWindowHeight;
|
|
987
|
+
declare const utils_d_getWindowScroll: typeof getWindowScroll;
|
|
988
|
+
declare const utils_d_getWindowWidth: typeof getWindowWidth;
|
|
989
|
+
declare const utils_d_hasShadowRoot: typeof hasShadowRoot;
|
|
990
|
+
declare const utils_d_hookSetter: typeof hookSetter;
|
|
991
|
+
declare const utils_d_inDom: typeof inDom;
|
|
992
|
+
declare const utils_d_isAncestorRemoved: typeof isAncestorRemoved;
|
|
993
|
+
declare const utils_d_isBlocked: typeof isBlocked;
|
|
994
|
+
declare const utils_d_isIgnored: typeof isIgnored;
|
|
995
|
+
declare const utils_d_isSerialized: typeof isSerialized;
|
|
996
|
+
declare const utils_d_isSerializedIframe: typeof isSerializedIframe;
|
|
997
|
+
declare const utils_d_isSerializedStylesheet: typeof isSerializedStylesheet;
|
|
998
|
+
declare const utils_d_iterateResolveTree: typeof iterateResolveTree;
|
|
999
|
+
declare const utils_d_legacy_isTouchEvent: typeof legacy_isTouchEvent;
|
|
1000
|
+
declare const utils_d_nowTimestamp: typeof nowTimestamp;
|
|
1001
|
+
declare const utils_d_on: typeof on;
|
|
1002
|
+
declare const utils_d_patch: typeof patch;
|
|
1003
|
+
declare const utils_d_polyfill: typeof polyfill;
|
|
1004
|
+
declare const utils_d_queueToResolveTrees: typeof queueToResolveTrees;
|
|
1005
|
+
declare const utils_d_shadowHostInDom: typeof shadowHostInDom;
|
|
1006
|
+
declare const utils_d_throttle: typeof throttle;
|
|
1007
|
+
declare const utils_d_uniqueTextMutations: typeof uniqueTextMutations;
|
|
1008
|
+
declare namespace utils_d {
|
|
1009
|
+
export { type utils_d_AppendedIframe as AppendedIframe, utils_d_StyleSheetMirror as StyleSheetMirror, utils_d__mirror as _mirror, utils_d_getBaseDimension as getBaseDimension, utils_d_getNestedRule as getNestedRule, utils_d_getPositionsAndIndex as getPositionsAndIndex, utils_d_getRootShadowHost as getRootShadowHost, utils_d_getShadowHost as getShadowHost, utils_d_getWindowHeight as getWindowHeight, utils_d_getWindowScroll as getWindowScroll, utils_d_getWindowWidth as getWindowWidth, utils_d_hasShadowRoot as hasShadowRoot, utils_d_hookSetter as hookSetter, utils_d_inDom as inDom, utils_d_isAncestorRemoved as isAncestorRemoved, utils_d_isBlocked as isBlocked, utils_d_isIgnored as isIgnored, utils_d_isSerialized as isSerialized, utils_d_isSerializedIframe as isSerializedIframe, utils_d_isSerializedStylesheet as isSerializedStylesheet, utils_d_iterateResolveTree as iterateResolveTree, utils_d_legacy_isTouchEvent as legacy_isTouchEvent, utils_d_nowTimestamp as nowTimestamp, utils_d_on as on, utils_d_patch as patch, utils_d_polyfill as polyfill, utils_d_queueToResolveTrees as queueToResolveTrees, utils_d_shadowHostInDom as shadowHostInDom, utils_d_throttle as throttle, utils_d_uniqueTextMutations as uniqueTextMutations };
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
declare class Timer {
|
|
1013
|
+
timeOffset: number;
|
|
1014
|
+
speed: number;
|
|
1015
|
+
private actions;
|
|
1016
|
+
private raf;
|
|
1017
|
+
private lastTimestamp;
|
|
1018
|
+
constructor(actions: actionWithDelay[] | undefined, config: {
|
|
1019
|
+
speed: number;
|
|
1020
|
+
});
|
|
1021
|
+
addAction(action: actionWithDelay): void;
|
|
1022
|
+
start(): void;
|
|
1023
|
+
private rafCheck;
|
|
1024
|
+
clear(): void;
|
|
1025
|
+
setSpeed(speed: number): void;
|
|
1026
|
+
isActive(): boolean;
|
|
1027
|
+
private findActionIndex;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
declare enum InterpreterStatus {
|
|
1031
|
+
NotStarted = 0,
|
|
1032
|
+
Running = 1,
|
|
1033
|
+
Stopped = 2
|
|
1034
|
+
}
|
|
1035
|
+
declare type SingleOrArray<T> = T[] | T;
|
|
1036
|
+
interface EventObject {
|
|
1037
|
+
type: string;
|
|
1038
|
+
}
|
|
1039
|
+
declare type InitEvent = {
|
|
1040
|
+
type: 'xstate.init';
|
|
1041
|
+
};
|
|
1042
|
+
declare namespace StateMachine {
|
|
1043
|
+
type Action<TContext extends object, TEvent extends EventObject> = string | AssignActionObject<TContext, TEvent> | ActionObject<TContext, TEvent> | ActionFunction<TContext, TEvent>;
|
|
1044
|
+
type ActionMap<TContext extends object, TEvent extends EventObject> = Record<string, Exclude<Action<TContext, TEvent>, string>>;
|
|
1045
|
+
interface ActionObject<TContext extends object, TEvent extends EventObject> {
|
|
1046
|
+
type: string;
|
|
1047
|
+
exec?: ActionFunction<TContext, TEvent>;
|
|
1048
|
+
[key: string]: any;
|
|
1049
|
+
}
|
|
1050
|
+
type ActionFunction<TContext extends object, TEvent extends EventObject> = (context: TContext, event: TEvent | InitEvent) => void;
|
|
1051
|
+
type AssignAction = 'xstate.assign';
|
|
1052
|
+
interface AssignActionObject<TContext extends object, TEvent extends EventObject> extends ActionObject<TContext, TEvent> {
|
|
1053
|
+
type: AssignAction;
|
|
1054
|
+
assignment: Assigner<TContext, TEvent> | PropertyAssigner<TContext, TEvent>;
|
|
1055
|
+
}
|
|
1056
|
+
type Transition<TContext extends object, TEvent extends EventObject> = string | {
|
|
1057
|
+
target?: string;
|
|
1058
|
+
actions?: SingleOrArray<Action<TContext, TEvent>>;
|
|
1059
|
+
cond?: (context: TContext, event: TEvent) => boolean;
|
|
1060
|
+
};
|
|
1061
|
+
interface State<TContext extends object, TEvent extends EventObject, TState extends Typestate<TContext>> {
|
|
1062
|
+
value: TState['value'];
|
|
1063
|
+
context: TContext;
|
|
1064
|
+
actions: Array<ActionObject<TContext, TEvent>>;
|
|
1065
|
+
changed?: boolean | undefined;
|
|
1066
|
+
matches: <TSV extends TState['value']>(value: TSV) => this is TState extends {
|
|
1067
|
+
value: TSV;
|
|
1068
|
+
} ? TState & {
|
|
1069
|
+
value: TSV;
|
|
1070
|
+
} : never;
|
|
1071
|
+
}
|
|
1072
|
+
type AnyState = State<any, any, any>;
|
|
1073
|
+
interface Config<TContext extends object, TEvent extends EventObject, TState extends Typestate<TContext> = {
|
|
1074
|
+
value: any;
|
|
1075
|
+
context: TContext;
|
|
1076
|
+
}> {
|
|
1077
|
+
id?: string;
|
|
1078
|
+
initial: string;
|
|
1079
|
+
context?: TContext;
|
|
1080
|
+
states: {
|
|
1081
|
+
[key in TState['value']]: {
|
|
1082
|
+
on?: {
|
|
1083
|
+
[K in TEvent['type']]?: SingleOrArray<Transition<TContext, TEvent extends {
|
|
1084
|
+
type: K;
|
|
1085
|
+
} ? TEvent : never>>;
|
|
1086
|
+
};
|
|
1087
|
+
exit?: SingleOrArray<Action<TContext, TEvent>>;
|
|
1088
|
+
entry?: SingleOrArray<Action<TContext, TEvent>>;
|
|
1089
|
+
};
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
interface Machine<TContext extends object, TEvent extends EventObject, TState extends Typestate<TContext>> {
|
|
1093
|
+
config: StateMachine.Config<TContext, TEvent, TState>;
|
|
1094
|
+
initialState: State<TContext, TEvent, TState>;
|
|
1095
|
+
transition: (state: string | State<TContext, TEvent, TState>, event: TEvent['type'] | TEvent) => State<TContext, TEvent, TState>;
|
|
1096
|
+
}
|
|
1097
|
+
type StateListener<T extends AnyState> = (state: T) => void;
|
|
1098
|
+
interface Service<TContext extends object, TEvent extends EventObject, TState extends Typestate<TContext> = {
|
|
1099
|
+
value: any;
|
|
1100
|
+
context: TContext;
|
|
1101
|
+
}> {
|
|
1102
|
+
send: (event: TEvent | TEvent['type']) => void;
|
|
1103
|
+
subscribe: (listener: StateListener<State<TContext, TEvent, TState>>) => {
|
|
1104
|
+
unsubscribe: () => void;
|
|
1105
|
+
};
|
|
1106
|
+
start: (initialState?: TState['value'] | {
|
|
1107
|
+
context: TContext;
|
|
1108
|
+
value: TState['value'];
|
|
1109
|
+
}) => Service<TContext, TEvent, TState>;
|
|
1110
|
+
stop: () => Service<TContext, TEvent, TState>;
|
|
1111
|
+
readonly status: InterpreterStatus;
|
|
1112
|
+
readonly state: State<TContext, TEvent, TState>;
|
|
1113
|
+
}
|
|
1114
|
+
type Assigner<TContext extends object, TEvent extends EventObject> = (context: TContext, event: TEvent) => Partial<TContext>;
|
|
1115
|
+
type PropertyAssigner<TContext extends object, TEvent extends EventObject> = {
|
|
1116
|
+
[K in keyof TContext]?: ((context: TContext, event: TEvent) => TContext[K]) | TContext[K];
|
|
1117
|
+
};
|
|
1118
|
+
}
|
|
1119
|
+
interface Typestate<TContext extends object> {
|
|
1120
|
+
value: string;
|
|
1121
|
+
context: TContext;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
type PlayerContext = {
|
|
1125
|
+
events: eventWithTime[];
|
|
1126
|
+
timer: Timer;
|
|
1127
|
+
timeOffset: number;
|
|
1128
|
+
baselineTime: number;
|
|
1129
|
+
lastPlayedEvent: eventWithTime | null;
|
|
1130
|
+
};
|
|
1131
|
+
type PlayerEvent = {
|
|
1132
|
+
type: 'PLAY';
|
|
1133
|
+
payload: {
|
|
1134
|
+
timeOffset: number;
|
|
1135
|
+
};
|
|
1136
|
+
} | {
|
|
1137
|
+
type: 'CAST_EVENT';
|
|
1138
|
+
payload: {
|
|
1139
|
+
event: eventWithTime;
|
|
1140
|
+
};
|
|
1141
|
+
} | {
|
|
1142
|
+
type: 'PAUSE';
|
|
1143
|
+
} | {
|
|
1144
|
+
type: 'TO_LIVE';
|
|
1145
|
+
payload: {
|
|
1146
|
+
baselineTime?: number;
|
|
1147
|
+
};
|
|
1148
|
+
} | {
|
|
1149
|
+
type: 'ADD_EVENT';
|
|
1150
|
+
payload: {
|
|
1151
|
+
event: eventWithTime;
|
|
1152
|
+
};
|
|
1153
|
+
} | {
|
|
1154
|
+
type: 'END';
|
|
1155
|
+
};
|
|
1156
|
+
type PlayerState = {
|
|
1157
|
+
value: 'playing';
|
|
1158
|
+
context: PlayerContext;
|
|
1159
|
+
} | {
|
|
1160
|
+
value: 'paused';
|
|
1161
|
+
context: PlayerContext;
|
|
1162
|
+
} | {
|
|
1163
|
+
value: 'live';
|
|
1164
|
+
context: PlayerContext;
|
|
1165
|
+
};
|
|
1166
|
+
type PlayerAssets = {
|
|
1167
|
+
emitter: Emitter$1;
|
|
1168
|
+
applyEventsSynchronously(events: Array<eventWithTime>): void;
|
|
1169
|
+
getCastFn(event: eventWithTime, isSync: boolean): () => void;
|
|
1170
|
+
};
|
|
1171
|
+
declare function createPlayerService(context: PlayerContext, { getCastFn, applyEventsSynchronously, emitter }: PlayerAssets): StateMachine.Service<PlayerContext, PlayerEvent, PlayerState>;
|
|
1172
|
+
type SpeedContext = {
|
|
1173
|
+
normalSpeed: playerConfig['speed'];
|
|
1174
|
+
timer: Timer;
|
|
1175
|
+
};
|
|
1176
|
+
type SpeedEvent = {
|
|
1177
|
+
type: 'FAST_FORWARD';
|
|
1178
|
+
payload: {
|
|
1179
|
+
speed: playerConfig['speed'];
|
|
1180
|
+
};
|
|
1181
|
+
} | {
|
|
1182
|
+
type: 'BACK_TO_NORMAL';
|
|
1183
|
+
} | {
|
|
1184
|
+
type: 'SET_SPEED';
|
|
1185
|
+
payload: {
|
|
1186
|
+
speed: playerConfig['speed'];
|
|
1187
|
+
};
|
|
1188
|
+
};
|
|
1189
|
+
type SpeedState = {
|
|
1190
|
+
value: 'normal';
|
|
1191
|
+
context: SpeedContext;
|
|
1192
|
+
} | {
|
|
1193
|
+
value: 'skipping';
|
|
1194
|
+
context: SpeedContext;
|
|
1195
|
+
};
|
|
1196
|
+
declare function createSpeedService(context: SpeedContext): StateMachine.Service<SpeedContext, SpeedEvent, SpeedState>;
|
|
1197
|
+
|
|
1198
|
+
declare class Replayer {
|
|
1199
|
+
wrapper: HTMLDivElement;
|
|
1200
|
+
iframe: HTMLIFrameElement;
|
|
1201
|
+
service: ReturnType<typeof createPlayerService>;
|
|
1202
|
+
speedService: ReturnType<typeof createSpeedService>;
|
|
1203
|
+
get timer(): Timer;
|
|
1204
|
+
config: playerConfig;
|
|
1205
|
+
usingVirtualDom: boolean;
|
|
1206
|
+
virtualDom: RRDocument;
|
|
1207
|
+
private mouse;
|
|
1208
|
+
private mouseTail;
|
|
1209
|
+
private tailPositions;
|
|
1210
|
+
private emitter;
|
|
1211
|
+
private nextUserInteractionEvent;
|
|
1212
|
+
private legacy_missingNodeRetryMap;
|
|
1213
|
+
private cache;
|
|
1214
|
+
private imageMap;
|
|
1215
|
+
private canvasEventMap;
|
|
1216
|
+
private mirror;
|
|
1217
|
+
private styleMirror;
|
|
1218
|
+
private firstFullSnapshot;
|
|
1219
|
+
private newDocumentQueue;
|
|
1220
|
+
private mousePos;
|
|
1221
|
+
private touchActive;
|
|
1222
|
+
private lastMouseDownEvent;
|
|
1223
|
+
private lastHoveredRootNode;
|
|
1224
|
+
private lastSelectionData;
|
|
1225
|
+
private constructedStyleMutations;
|
|
1226
|
+
private adoptedStyleSheets;
|
|
1227
|
+
constructor(events: Array<eventWithTime | string>, config?: Partial<playerConfig>);
|
|
1228
|
+
on(event: string, handler: Handler): this;
|
|
1229
|
+
off(event: string, handler: Handler): this;
|
|
1230
|
+
setConfig(config: Partial<playerConfig>): void;
|
|
1231
|
+
getMetaData(): playerMetaData;
|
|
1232
|
+
getCurrentTime(): number;
|
|
1233
|
+
getTimeOffset(): number;
|
|
1234
|
+
getMirror(): Mirror$1;
|
|
1235
|
+
play(timeOffset?: number): void;
|
|
1236
|
+
pause(timeOffset?: number): void;
|
|
1237
|
+
resume(timeOffset?: number): void;
|
|
1238
|
+
destroy(): void;
|
|
1239
|
+
startLive(baselineTime?: number): void;
|
|
1240
|
+
addEvent(rawEvent: eventWithTime | string): void;
|
|
1241
|
+
enableInteract(): void;
|
|
1242
|
+
disableInteract(): void;
|
|
1243
|
+
resetCache(): void;
|
|
1244
|
+
private setupDom;
|
|
1245
|
+
private handleResize;
|
|
1246
|
+
private applyEventsSynchronously;
|
|
1247
|
+
private getCastFn;
|
|
1248
|
+
private rebuildFullSnapshot;
|
|
1249
|
+
private insertStyleRules;
|
|
1250
|
+
private attachDocumentToIframe;
|
|
1251
|
+
private collectIframeAndAttachDocument;
|
|
1252
|
+
private waitForStylesheetLoad;
|
|
1253
|
+
private preloadAllImages;
|
|
1254
|
+
private preloadImages;
|
|
1255
|
+
private deserializeAndPreloadCanvasEvents;
|
|
1256
|
+
private applyIncremental;
|
|
1257
|
+
private applyMutation;
|
|
1258
|
+
private applyScroll;
|
|
1259
|
+
private applyInput;
|
|
1260
|
+
private applySelection;
|
|
1261
|
+
private applyStyleSheetMutation;
|
|
1262
|
+
private applyStyleSheetRule;
|
|
1263
|
+
private applyStyleDeclaration;
|
|
1264
|
+
private applyAdoptedStyleSheet;
|
|
1265
|
+
private legacy_resolveMissingNode;
|
|
1266
|
+
private moveAndHover;
|
|
1267
|
+
private drawMouseTail;
|
|
1268
|
+
private hoverElements;
|
|
1269
|
+
private isUserInteraction;
|
|
1270
|
+
private backToNormal;
|
|
1271
|
+
private warnNodeNotFound;
|
|
1272
|
+
private warnCanvasMutationFailed;
|
|
1273
|
+
private debugNodeNotFound;
|
|
1274
|
+
private warn;
|
|
1275
|
+
private debug;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
type recordOptions<T> = {
|
|
1279
|
+
emit?: (e: T, isCheckout?: boolean) => void;
|
|
1280
|
+
checkoutEveryNth?: number;
|
|
1281
|
+
checkoutEveryNms?: number;
|
|
1282
|
+
blockClass?: blockClass;
|
|
1283
|
+
blockSelector?: string;
|
|
1284
|
+
ignoreClass?: string;
|
|
1285
|
+
ignoreSelector?: string;
|
|
1286
|
+
maskTextClass?: maskTextClass;
|
|
1287
|
+
maskTextSelector?: string;
|
|
1288
|
+
maskAllInputs?: boolean;
|
|
1289
|
+
maskInputOptions?: MaskInputOptions;
|
|
1290
|
+
maskInputFn?: MaskInputFn;
|
|
1291
|
+
maskTextFn?: MaskTextFn;
|
|
1292
|
+
slimDOMOptions?: SlimDOMOptions | 'all' | true;
|
|
1293
|
+
ignoreCSSAttributes?: Set<string>;
|
|
1294
|
+
inlineStylesheet?: boolean;
|
|
1295
|
+
hooks?: hooksParam;
|
|
1296
|
+
packFn?: PackFn;
|
|
1297
|
+
sampling?: SamplingStrategy;
|
|
1298
|
+
dataURLOptions?: DataURLOptions;
|
|
1299
|
+
recordCanvas?: boolean;
|
|
1300
|
+
recordCrossOriginIframes?: boolean;
|
|
1301
|
+
recordAfter?: 'DOMContentLoaded' | 'load';
|
|
1302
|
+
userTriggeredOnInput?: boolean;
|
|
1303
|
+
collectFonts?: boolean;
|
|
1304
|
+
inlineImages?: boolean;
|
|
1305
|
+
plugins?: RecordPlugin[];
|
|
1306
|
+
mousemoveWait?: number;
|
|
1307
|
+
keepIframeSrcFn?: KeepIframeSrcFn;
|
|
1308
|
+
errorHandler?: ErrorHandler;
|
|
1309
|
+
};
|
|
1310
|
+
type ReplayPlugin = {
|
|
1311
|
+
handler?: (event: eventWithTime, isSync: boolean, context: {
|
|
1312
|
+
replayer: Replayer;
|
|
1313
|
+
}) => void;
|
|
1314
|
+
onBuild?: (node: Node | BaseRRNode, context: {
|
|
1315
|
+
id: number;
|
|
1316
|
+
replayer: Replayer;
|
|
1317
|
+
}) => void;
|
|
1318
|
+
getMirror?: (mirrors: {
|
|
1319
|
+
nodeMirror: Mirror$1;
|
|
1320
|
+
}) => void;
|
|
1321
|
+
};
|
|
1322
|
+
type playerConfig = {
|
|
1323
|
+
speed: number;
|
|
1324
|
+
maxSpeed: number;
|
|
1325
|
+
root: Element;
|
|
1326
|
+
loadTimeout: number;
|
|
1327
|
+
skipInactive: boolean;
|
|
1328
|
+
showWarning: boolean;
|
|
1329
|
+
showDebug: boolean;
|
|
1330
|
+
blockClass: string;
|
|
1331
|
+
liveMode: boolean;
|
|
1332
|
+
insertStyleRules: string[];
|
|
1333
|
+
triggerFocus: boolean;
|
|
1334
|
+
UNSAFE_replayCanvas: boolean;
|
|
1335
|
+
pauseAnimation?: boolean;
|
|
1336
|
+
mouseTail: boolean | {
|
|
1337
|
+
duration?: number;
|
|
1338
|
+
lineCap?: string;
|
|
1339
|
+
lineWidth?: number;
|
|
1340
|
+
strokeStyle?: string;
|
|
1341
|
+
};
|
|
1342
|
+
unpackFn?: UnpackFn;
|
|
1343
|
+
useVirtualDom: boolean;
|
|
1344
|
+
logger: {
|
|
1345
|
+
log: (...args: Parameters<typeof console.log>) => void;
|
|
1346
|
+
warn: (...args: Parameters<typeof console.warn>) => void;
|
|
1347
|
+
};
|
|
1348
|
+
plugins?: ReplayPlugin[];
|
|
1349
|
+
};
|
|
1350
|
+
declare global {
|
|
1351
|
+
interface Window {
|
|
1352
|
+
FontFace: typeof FontFace;
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
type ErrorHandler = (error: unknown) => void | boolean;
|
|
1356
|
+
|
|
1357
|
+
declare function record<T = eventWithTime>(options?: recordOptions<T>): listenerHandler | undefined;
|
|
1358
|
+
declare namespace record {
|
|
1359
|
+
var addCustomEvent: <T>(tag: string, payload: T) => void;
|
|
1360
|
+
var freezePage: () => void;
|
|
1361
|
+
var takeFullSnapshot: (isCheckout?: boolean | undefined) => void;
|
|
1362
|
+
var mirror: Mirror$1;
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
declare const addCustomEvent: <T>(tag: string, payload: T) => void;
|
|
1366
|
+
declare const freezePage: () => void;
|
|
1367
|
+
|
|
1368
|
+
declare const pack: PackFn;
|
|
1369
|
+
|
|
1370
|
+
declare const unpack: UnpackFn;
|
|
1371
|
+
|
|
1372
|
+
type StringifyOptions = {
|
|
1373
|
+
stringLengthLimit?: number;
|
|
1374
|
+
numOfKeysLimit: number;
|
|
1375
|
+
depthOfLimit: number;
|
|
1376
|
+
};
|
|
1377
|
+
type LogRecordOptions = {
|
|
1378
|
+
level?: LogLevel$1[];
|
|
1379
|
+
lengthThreshold?: number;
|
|
1380
|
+
stringifyOptions?: StringifyOptions;
|
|
1381
|
+
logger?: Logger | 'console';
|
|
1382
|
+
};
|
|
1383
|
+
type LogData = {
|
|
1384
|
+
level: LogLevel$1;
|
|
1385
|
+
trace: string[];
|
|
1386
|
+
payload: string[];
|
|
1387
|
+
};
|
|
1388
|
+
type Logger = {
|
|
1389
|
+
assert?: typeof console.assert;
|
|
1390
|
+
clear?: typeof console.clear;
|
|
1391
|
+
count?: typeof console.count;
|
|
1392
|
+
countReset?: typeof console.countReset;
|
|
1393
|
+
debug?: typeof console.debug;
|
|
1394
|
+
dir?: typeof console.dir;
|
|
1395
|
+
dirxml?: typeof console.dirxml;
|
|
1396
|
+
error?: typeof console.error;
|
|
1397
|
+
group?: typeof console.group;
|
|
1398
|
+
groupCollapsed?: typeof console.groupCollapsed;
|
|
1399
|
+
groupEnd?: () => void;
|
|
1400
|
+
info?: typeof console.info;
|
|
1401
|
+
log?: typeof console.log;
|
|
1402
|
+
table?: typeof console.table;
|
|
1403
|
+
time?: typeof console.time;
|
|
1404
|
+
timeEnd?: typeof console.timeEnd;
|
|
1405
|
+
timeLog?: typeof console.timeLog;
|
|
1406
|
+
trace?: typeof console.trace;
|
|
1407
|
+
warn?: typeof console.warn;
|
|
1408
|
+
};
|
|
1409
|
+
type LogLevel$1 = keyof Logger;
|
|
1410
|
+
declare const PLUGIN_NAME = "rrweb/console@1";
|
|
1411
|
+
declare const getRecordConsolePlugin: (options?: LogRecordOptions) => RecordPlugin;
|
|
1412
|
+
|
|
1413
|
+
type ReplayLogger = Partial<Record<LogLevel$1, (data: LogData) => void>>;
|
|
1414
|
+
type LogReplayConfig = {
|
|
1415
|
+
level?: LogLevel$1[];
|
|
1416
|
+
replayLogger?: ReplayLogger;
|
|
1417
|
+
};
|
|
1418
|
+
declare const getReplayConsolePlugin: (options?: LogReplayConfig) => ReplayPlugin;
|
|
1419
|
+
|
|
1420
|
+
type rrweb_EventType = EventType;
|
|
1421
|
+
declare const rrweb_EventType: typeof EventType;
|
|
1422
|
+
type rrweb_IncrementalSource = IncrementalSource;
|
|
1423
|
+
declare const rrweb_IncrementalSource: typeof IncrementalSource;
|
|
1424
|
+
type rrweb_LogData = LogData;
|
|
1425
|
+
type rrweb_Logger = Logger;
|
|
1426
|
+
type rrweb_MouseInteractions = MouseInteractions;
|
|
1427
|
+
declare const rrweb_MouseInteractions: typeof MouseInteractions;
|
|
1428
|
+
declare const rrweb_PLUGIN_NAME: typeof PLUGIN_NAME;
|
|
1429
|
+
type rrweb_Replayer = Replayer;
|
|
1430
|
+
declare const rrweb_Replayer: typeof Replayer;
|
|
1431
|
+
type rrweb_ReplayerEvents = ReplayerEvents;
|
|
1432
|
+
declare const rrweb_ReplayerEvents: typeof ReplayerEvents;
|
|
1433
|
+
type rrweb_StringifyOptions = StringifyOptions;
|
|
1434
|
+
declare const rrweb_addCustomEvent: typeof addCustomEvent;
|
|
1435
|
+
declare const rrweb_freezePage: typeof freezePage;
|
|
1436
|
+
declare const rrweb_getRecordConsolePlugin: typeof getRecordConsolePlugin;
|
|
1437
|
+
declare const rrweb_getReplayConsolePlugin: typeof getReplayConsolePlugin;
|
|
1438
|
+
declare const rrweb_pack: typeof pack;
|
|
1439
|
+
declare const rrweb_record: typeof record;
|
|
1440
|
+
type rrweb_recordOptions<T> = recordOptions<T>;
|
|
1441
|
+
declare const rrweb_unpack: typeof unpack;
|
|
1442
|
+
declare namespace rrweb {
|
|
1443
|
+
export { rrweb_EventType as EventType, rrweb_IncrementalSource as IncrementalSource, type rrweb_LogData as LogData, type LogLevel$1 as LogLevel, type rrweb_Logger as Logger, rrweb_MouseInteractions as MouseInteractions, rrweb_PLUGIN_NAME as PLUGIN_NAME, rrweb_Replayer as Replayer, rrweb_ReplayerEvents as ReplayerEvents, type rrweb_StringifyOptions as StringifyOptions, rrweb_addCustomEvent as addCustomEvent, rrweb_freezePage as freezePage, rrweb_getRecordConsolePlugin as getRecordConsolePlugin, rrweb_getReplayConsolePlugin as getReplayConsolePlugin, _mirror as mirror, rrweb_pack as pack, rrweb_record as record, type rrweb_recordOptions as recordOptions, rrweb_unpack as unpack, utils_d as utils };
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
interface XhrResponse {
|
|
1447
|
+
body: Object | string;
|
|
1448
|
+
statusCode: number;
|
|
1449
|
+
method: string;
|
|
1450
|
+
headers: XhrHeaders;
|
|
1451
|
+
url: string;
|
|
1452
|
+
rawRequest: XMLHttpRequest;
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
interface XhrHeaders {
|
|
1456
|
+
[key: string]: string;
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
declare type ChunkedStreamIterableOptions = {
|
|
1460
|
+
defaultChunkSize?: number;
|
|
1461
|
+
minChunkSize?: number;
|
|
1462
|
+
maxChunkSize?: number;
|
|
1463
|
+
};
|
|
1464
|
+
declare class ChunkedStreamIterable implements AsyncIterable<Blob> {
|
|
1465
|
+
protected readableStream: ReadableStream<Uint8Array | Blob>;
|
|
1466
|
+
protected _chunkSize: number | undefined;
|
|
1467
|
+
protected defaultChunkSize: number;
|
|
1468
|
+
readonly minChunkSize: number;
|
|
1469
|
+
readonly maxChunkSize: number;
|
|
1470
|
+
constructor(readableStream: ReadableStream<Uint8Array | Blob>, options?: ChunkedStreamIterableOptions);
|
|
1471
|
+
get chunkSize(): number;
|
|
1472
|
+
set chunkSize(value: number);
|
|
1473
|
+
get chunkByteSize(): number;
|
|
1474
|
+
[Symbol.asyncIterator](): AsyncIterator<Blob>;
|
|
1475
|
+
}
|
|
1476
|
+
declare type EventName = 'attempt' | 'attemptFailure' | 'chunkSuccess' | 'error' | 'offline' | 'online' | 'progress' | 'success';
|
|
1477
|
+
declare type AllowedMethods = 'PUT' | 'POST' | 'PATCH';
|
|
1478
|
+
interface UpChunkOptions {
|
|
1479
|
+
endpoint: string | ((file?: File) => Promise<string>);
|
|
1480
|
+
file: File;
|
|
1481
|
+
method?: AllowedMethods;
|
|
1482
|
+
headers?: XhrHeaders | (() => XhrHeaders) | (() => Promise<XhrHeaders>);
|
|
1483
|
+
maxFileSize?: number;
|
|
1484
|
+
chunkSize?: number;
|
|
1485
|
+
attempts?: number;
|
|
1486
|
+
delayBeforeAttempt?: number;
|
|
1487
|
+
retryCodes?: number[];
|
|
1488
|
+
dynamicChunkSize?: boolean;
|
|
1489
|
+
maxChunkSize?: number;
|
|
1490
|
+
minChunkSize?: number;
|
|
1491
|
+
}
|
|
1492
|
+
declare class UpChunk {
|
|
1493
|
+
static createUpload(options: UpChunkOptions): UpChunk;
|
|
1494
|
+
endpoint: string | ((file?: File) => Promise<string>);
|
|
1495
|
+
file: File;
|
|
1496
|
+
headers: XhrHeaders | (() => XhrHeaders) | (() => Promise<XhrHeaders>);
|
|
1497
|
+
method: AllowedMethods;
|
|
1498
|
+
attempts: number;
|
|
1499
|
+
delayBeforeAttempt: number;
|
|
1500
|
+
retryCodes: number[];
|
|
1501
|
+
dynamicChunkSize: boolean;
|
|
1502
|
+
protected chunkedStreamIterable: ChunkedStreamIterable;
|
|
1503
|
+
protected chunkedStreamIterator: AsyncIterator<Blob, any, undefined>;
|
|
1504
|
+
protected pendingChunk?: Blob;
|
|
1505
|
+
private chunkCount;
|
|
1506
|
+
private maxFileBytes;
|
|
1507
|
+
private endpointValue;
|
|
1508
|
+
private totalChunks;
|
|
1509
|
+
private attemptCount;
|
|
1510
|
+
private offline;
|
|
1511
|
+
private _paused;
|
|
1512
|
+
private success;
|
|
1513
|
+
private currentXhr?;
|
|
1514
|
+
private lastChunkStart;
|
|
1515
|
+
private nextChunkRangeStart;
|
|
1516
|
+
private eventTarget;
|
|
1517
|
+
constructor(options: UpChunkOptions);
|
|
1518
|
+
protected get maxChunkSize(): number;
|
|
1519
|
+
protected get minChunkSize(): number;
|
|
1520
|
+
get chunkSize(): number;
|
|
1521
|
+
set chunkSize(value: number);
|
|
1522
|
+
get chunkByteSize(): number;
|
|
1523
|
+
get totalChunkSize(): number;
|
|
1524
|
+
/**
|
|
1525
|
+
* Subscribe to an event
|
|
1526
|
+
*/
|
|
1527
|
+
on(eventName: EventName, fn: (event: CustomEvent) => void): void;
|
|
1528
|
+
/**
|
|
1529
|
+
* Subscribe to an event once
|
|
1530
|
+
*/
|
|
1531
|
+
once(eventName: EventName, fn: (event: CustomEvent) => void): void;
|
|
1532
|
+
/**
|
|
1533
|
+
* Unsubscribe to an event
|
|
1534
|
+
*/
|
|
1535
|
+
off(eventName: EventName, fn: (event: CustomEvent) => void): void;
|
|
1536
|
+
get paused(): boolean;
|
|
1537
|
+
abort(): void;
|
|
1538
|
+
pause(): void;
|
|
1539
|
+
resume(): void;
|
|
1540
|
+
/**
|
|
1541
|
+
* Dispatch an event
|
|
1542
|
+
*/
|
|
1543
|
+
private dispatch;
|
|
1544
|
+
/**
|
|
1545
|
+
* Validate options and throw errors if expectations are violated.
|
|
1546
|
+
*/
|
|
1547
|
+
private validateOptions;
|
|
1548
|
+
/**
|
|
1549
|
+
* Endpoint can either be a URL or a function that returns a promise that resolves to a string.
|
|
1550
|
+
*/
|
|
1551
|
+
private getEndpoint;
|
|
1552
|
+
private xhrPromise;
|
|
1553
|
+
/**
|
|
1554
|
+
* Send chunk of the file with appropriate headers
|
|
1555
|
+
*/
|
|
1556
|
+
protected sendChunk(chunk: Blob): Promise<XhrResponse>;
|
|
1557
|
+
protected sendChunkWithRetries(chunk: Blob): Promise<boolean>;
|
|
1558
|
+
/**
|
|
1559
|
+
* Manage the whole upload by calling getChunk & sendChunk
|
|
1560
|
+
* handle errors & retries and dispatch events
|
|
1561
|
+
*/
|
|
1562
|
+
private sendChunks;
|
|
1563
|
+
}
|
|
1564
|
+
declare const createUpload: typeof UpChunk.createUpload;
|
|
1565
|
+
|
|
1566
|
+
declare enum NOTIFICATION_TYPES {
|
|
1567
|
+
ACTIVATE = "ACTIVATE:experiment, user_id,attributes, variation, event",
|
|
1568
|
+
DECISION = "DECISION:type, userId, attributes, decisionInfo",
|
|
1569
|
+
LOG_EVENT = "LOG_EVENT:logEvent",
|
|
1570
|
+
OPTIMIZELY_CONFIG_UPDATE = "OPTIMIZELY_CONFIG_UPDATE",
|
|
1571
|
+
TRACK = "TRACK:event_key, user_id, attributes, event_tags, event"
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
declare type UserAttributes = {
|
|
1575
|
+
[name: string]: any;
|
|
1576
|
+
};
|
|
1577
|
+
declare type EventTags = {
|
|
1578
|
+
[key: string]: string | number | null;
|
|
1579
|
+
};
|
|
1580
|
+
interface ListenerPayload {
|
|
1581
|
+
userId: string;
|
|
1582
|
+
attributes?: UserAttributes;
|
|
1583
|
+
}
|
|
1584
|
+
declare type NotificationListener<T extends ListenerPayload> = (notificationData: T) => void;
|
|
1585
|
+
interface NotificationCenter {
|
|
1586
|
+
addNotificationListener<T extends ListenerPayload>(notificationType: string, callback: NotificationListener<T>): number;
|
|
1587
|
+
removeNotificationListener(listenerId: number): boolean;
|
|
1588
|
+
clearAllNotificationListeners(): void;
|
|
1589
|
+
clearNotificationListeners(notificationType: NOTIFICATION_TYPES): void;
|
|
1590
|
+
}
|
|
1591
|
+
declare enum OptimizelyDecideOption {
|
|
1592
|
+
DISABLE_DECISION_EVENT = "DISABLE_DECISION_EVENT",
|
|
1593
|
+
ENABLED_FLAGS_ONLY = "ENABLED_FLAGS_ONLY",
|
|
1594
|
+
IGNORE_USER_PROFILE_SERVICE = "IGNORE_USER_PROFILE_SERVICE",
|
|
1595
|
+
INCLUDE_REASONS = "INCLUDE_REASONS",
|
|
1596
|
+
EXCLUDE_VARIABLES = "EXCLUDE_VARIABLES"
|
|
1597
|
+
}
|
|
1598
|
+
/**
|
|
1599
|
+
* Optimizely Config Entities
|
|
1600
|
+
*/
|
|
1601
|
+
interface OptimizelyExperiment {
|
|
1602
|
+
id: string;
|
|
1603
|
+
key: string;
|
|
1604
|
+
audiences: string;
|
|
1605
|
+
variationsMap: {
|
|
1606
|
+
[variationKey: string]: OptimizelyVariation;
|
|
1607
|
+
};
|
|
1608
|
+
}
|
|
1609
|
+
interface OptimizelyVariable {
|
|
1610
|
+
id: string;
|
|
1611
|
+
key: string;
|
|
1612
|
+
type: string;
|
|
1613
|
+
value: string;
|
|
1614
|
+
}
|
|
1615
|
+
interface Client {
|
|
1616
|
+
notificationCenter: NotificationCenter;
|
|
1617
|
+
createUserContext(userId: string, attributes?: UserAttributes): OptimizelyUserContext | null;
|
|
1618
|
+
activate(experimentKey: string, userId: string, attributes?: UserAttributes): string | null;
|
|
1619
|
+
track(eventKey: string, userId: string, attributes?: UserAttributes, eventTags?: EventTags): void;
|
|
1620
|
+
getVariation(experimentKey: string, userId: string, attributes?: UserAttributes): string | null;
|
|
1621
|
+
setForcedVariation(experimentKey: string, userId: string, variationKey: string | null): boolean;
|
|
1622
|
+
getForcedVariation(experimentKey: string, userId: string): string | null;
|
|
1623
|
+
isFeatureEnabled(featureKey: string, userId: string, attributes?: UserAttributes): boolean;
|
|
1624
|
+
getEnabledFeatures(userId: string, attributes?: UserAttributes): string[];
|
|
1625
|
+
getFeatureVariable(featureKey: string, variableKey: string, userId: string, attributes?: UserAttributes): unknown;
|
|
1626
|
+
getFeatureVariableBoolean(featureKey: string, variableKey: string, userId: string, attributes?: UserAttributes): boolean | null;
|
|
1627
|
+
getFeatureVariableDouble(featureKey: string, variableKey: string, userId: string, attributes?: UserAttributes): number | null;
|
|
1628
|
+
getFeatureVariableInteger(featureKey: string, variableKey: string, userId: string, attributes?: UserAttributes): number | null;
|
|
1629
|
+
getFeatureVariableString(featureKey: string, variableKey: string, userId: string, attributes?: UserAttributes): string | null;
|
|
1630
|
+
getFeatureVariableJSON(featureKey: string, variableKey: string, userId: string, attributes?: UserAttributes): unknown;
|
|
1631
|
+
getAllFeatureVariables(featureKey: string, userId: string, attributes?: UserAttributes): {
|
|
1632
|
+
[variableKey: string]: unknown;
|
|
1633
|
+
} | null;
|
|
1634
|
+
getOptimizelyConfig(): OptimizelyConfig | null;
|
|
1635
|
+
onReady(options?: {
|
|
1636
|
+
timeout?: number;
|
|
1637
|
+
}): Promise<{
|
|
1638
|
+
success: boolean;
|
|
1639
|
+
reason?: string;
|
|
1640
|
+
}>;
|
|
1641
|
+
close(): Promise<{
|
|
1642
|
+
success: boolean;
|
|
1643
|
+
reason?: string;
|
|
1644
|
+
}>;
|
|
1645
|
+
}
|
|
1646
|
+
declare type OptimizelyExperimentsMap = {
|
|
1647
|
+
[experimentKey: string]: OptimizelyExperiment;
|
|
1648
|
+
};
|
|
1649
|
+
declare type OptimizelyVariablesMap = {
|
|
1650
|
+
[variableKey: string]: OptimizelyVariable;
|
|
1651
|
+
};
|
|
1652
|
+
declare type OptimizelyFeaturesMap = {
|
|
1653
|
+
[featureKey: string]: OptimizelyFeature;
|
|
1654
|
+
};
|
|
1655
|
+
declare type OptimizelyAttribute = {
|
|
1656
|
+
id: string;
|
|
1657
|
+
key: string;
|
|
1658
|
+
};
|
|
1659
|
+
declare type OptimizelyAudience = {
|
|
1660
|
+
id: string;
|
|
1661
|
+
name: string;
|
|
1662
|
+
conditions: string;
|
|
1663
|
+
};
|
|
1664
|
+
declare type OptimizelyEvent = {
|
|
1665
|
+
id: string;
|
|
1666
|
+
key: string;
|
|
1667
|
+
experimentsIds: string[];
|
|
1668
|
+
};
|
|
1669
|
+
interface OptimizelyFeature {
|
|
1670
|
+
id: string;
|
|
1671
|
+
key: string;
|
|
1672
|
+
experimentRules: OptimizelyExperiment[];
|
|
1673
|
+
deliveryRules: OptimizelyExperiment[];
|
|
1674
|
+
variablesMap: OptimizelyVariablesMap;
|
|
1675
|
+
/**
|
|
1676
|
+
* @deprecated Use experimentRules and deliveryRules
|
|
1677
|
+
*/
|
|
1678
|
+
experimentsMap: OptimizelyExperimentsMap;
|
|
1679
|
+
}
|
|
1680
|
+
interface OptimizelyVariation {
|
|
1681
|
+
id: string;
|
|
1682
|
+
key: string;
|
|
1683
|
+
featureEnabled?: boolean;
|
|
1684
|
+
variablesMap: OptimizelyVariablesMap;
|
|
1685
|
+
}
|
|
1686
|
+
interface OptimizelyConfig {
|
|
1687
|
+
environmentKey: string;
|
|
1688
|
+
sdkKey: string;
|
|
1689
|
+
revision: string;
|
|
1690
|
+
/**
|
|
1691
|
+
* This experimentsMap is for experiments of legacy projects only.
|
|
1692
|
+
* For flag projects, experiment keys are not guaranteed to be unique
|
|
1693
|
+
* across multiple flags, so this map may not include all experiments
|
|
1694
|
+
* when keys conflict.
|
|
1695
|
+
*/
|
|
1696
|
+
experimentsMap: OptimizelyExperimentsMap;
|
|
1697
|
+
featuresMap: OptimizelyFeaturesMap;
|
|
1698
|
+
attributes: OptimizelyAttribute[];
|
|
1699
|
+
audiences: OptimizelyAudience[];
|
|
1700
|
+
events: OptimizelyEvent[];
|
|
1701
|
+
getDatafile(): string;
|
|
1702
|
+
}
|
|
1703
|
+
interface OptimizelyUserContext {
|
|
1704
|
+
getUserId(): string;
|
|
1705
|
+
getAttributes(): UserAttributes;
|
|
1706
|
+
setAttribute(key: string, value: unknown): void;
|
|
1707
|
+
decide(key: string, options?: OptimizelyDecideOption[]): OptimizelyDecision;
|
|
1708
|
+
decideForKeys(keys: string[], options?: OptimizelyDecideOption[]): {
|
|
1709
|
+
[key: string]: OptimizelyDecision;
|
|
1710
|
+
};
|
|
1711
|
+
decideAll(options?: OptimizelyDecideOption[]): {
|
|
1712
|
+
[key: string]: OptimizelyDecision;
|
|
1713
|
+
};
|
|
1714
|
+
trackEvent(eventName: string, eventTags?: EventTags): void;
|
|
1715
|
+
setForcedDecision(context: OptimizelyDecisionContext, decision: OptimizelyForcedDecision): boolean;
|
|
1716
|
+
getForcedDecision(context: OptimizelyDecisionContext): OptimizelyForcedDecision | null;
|
|
1717
|
+
removeForcedDecision(context: OptimizelyDecisionContext): boolean;
|
|
1718
|
+
removeAllForcedDecisions(): boolean;
|
|
1719
|
+
}
|
|
1720
|
+
interface OptimizelyDecision {
|
|
1721
|
+
variationKey: string | null;
|
|
1722
|
+
enabled: boolean;
|
|
1723
|
+
variables: {
|
|
1724
|
+
[variableKey: string]: unknown;
|
|
1725
|
+
};
|
|
1726
|
+
ruleKey: string | null;
|
|
1727
|
+
flagKey: string;
|
|
1728
|
+
userContext: OptimizelyUserContext;
|
|
1729
|
+
reasons: string[];
|
|
1730
|
+
}
|
|
1731
|
+
interface OptimizelyDecisionContext {
|
|
1732
|
+
flagKey: string;
|
|
1733
|
+
ruleKey?: string;
|
|
1734
|
+
}
|
|
1735
|
+
interface OptimizelyForcedDecision {
|
|
1736
|
+
variationKey: string;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
declare type EventMap = {
|
|
1740
|
+
[eventName: string]: Array<unknown>;
|
|
1741
|
+
};
|
|
1742
|
+
declare type InternalEventNames = 'newListener' | 'removeListener';
|
|
1743
|
+
declare type InternalListener<Events extends EventMap> = Listener<[
|
|
1744
|
+
eventName: keyof Events,
|
|
1745
|
+
listener: Listener<Array<unknown>>
|
|
1746
|
+
]>;
|
|
1747
|
+
declare type Listener<Data extends Array<unknown>> = (...data: Data) => void;
|
|
1748
|
+
/**
|
|
1749
|
+
* Node.js-compatible implementation of `EventEmitter`.
|
|
1750
|
+
*
|
|
1751
|
+
* @example
|
|
1752
|
+
* const emitter = new Emitter<{ hello: [string] }>()
|
|
1753
|
+
* emitter.on('hello', (name) => console.log(name))
|
|
1754
|
+
* emitter.emit('hello', 'John')
|
|
1755
|
+
*/
|
|
1756
|
+
declare class Emitter<Events extends EventMap> {
|
|
1757
|
+
private events;
|
|
1758
|
+
private maxListeners;
|
|
1759
|
+
private hasWarnedAboutPotentialMemoryLeak;
|
|
1760
|
+
static defaultMaxListeners: number;
|
|
1761
|
+
static listenerCount<Events extends EventMap>(emitter: Emitter<EventMap>, eventName: keyof Events): number;
|
|
1762
|
+
constructor();
|
|
1763
|
+
private _emitInternalEvent;
|
|
1764
|
+
private _getListeners;
|
|
1765
|
+
private _removeListener;
|
|
1766
|
+
private _wrapOnceListener;
|
|
1767
|
+
setMaxListeners(maxListeners: number): this;
|
|
1768
|
+
/**
|
|
1769
|
+
* Returns the current max listener value for the `Emitter` which is
|
|
1770
|
+
* either set by `emitter.setMaxListeners(n)` or defaults to
|
|
1771
|
+
* `Emitter.defaultMaxListeners`.
|
|
1772
|
+
*/
|
|
1773
|
+
getMaxListeners(): number;
|
|
1774
|
+
/**
|
|
1775
|
+
* Returns an array listing the events for which the emitter has registered listeners.
|
|
1776
|
+
* The values in the array will be strings or Symbols.
|
|
1777
|
+
*/
|
|
1778
|
+
eventNames(): Array<keyof Events>;
|
|
1779
|
+
/**
|
|
1780
|
+
* Synchronously calls each of the listeners registered for the event named `eventName`,
|
|
1781
|
+
* in the order they were registered, passing the supplied arguments to each.
|
|
1782
|
+
* Returns `true` if the event has listeners, `false` otherwise.
|
|
1783
|
+
*
|
|
1784
|
+
* @example
|
|
1785
|
+
* const emitter = new Emitter<{ hello: [string] }>()
|
|
1786
|
+
* emitter.emit('hello', 'John')
|
|
1787
|
+
*/
|
|
1788
|
+
emit<EventName extends keyof Events>(eventName: EventName, ...data: Events[EventName]): boolean;
|
|
1789
|
+
addListener(eventName: InternalEventNames, listener: InternalListener<Events>): this;
|
|
1790
|
+
addListener<EventName extends keyof Events>(eventName: EventName, listener: Listener<Events[EventName]>): this;
|
|
1791
|
+
on(eventName: InternalEventNames, listener: InternalListener<Events>): this;
|
|
1792
|
+
on<EventName extends keyof Events>(eventName: EventName, listener: Listener<Events[EventName]>): this;
|
|
1793
|
+
once(eventName: InternalEventNames, listener: InternalListener<Events>): this;
|
|
1794
|
+
once<EventName extends keyof Events>(eventName: EventName, listener: Listener<Events[EventName]>): this;
|
|
1795
|
+
prependListener(eventName: InternalEventNames, listener: InternalListener<Events>): this;
|
|
1796
|
+
prependListener<EventName extends keyof Events>(eventName: EventName, listener: Listener<Events[EventName]>): this;
|
|
1797
|
+
prependOnceListener(eventName: InternalEventNames, listener: InternalListener<Events>): this;
|
|
1798
|
+
prependOnceListener<EventName extends keyof Events>(eventName: EventName, listener: Listener<Events[EventName]>): this;
|
|
1799
|
+
removeListener(eventName: InternalEventNames, listener: InternalListener<Events>): this;
|
|
1800
|
+
removeListener<EventName extends keyof Events>(eventName: EventName, listener: Listener<Events[EventName]>): this;
|
|
1801
|
+
off(eventName: InternalEventNames, listener: InternalListener<Events>): this;
|
|
1802
|
+
off<EventName extends keyof Events>(eventName: EventName, listener: Listener<Events[EventName]>): this;
|
|
1803
|
+
removeAllListeners(eventName?: InternalEventNames): this;
|
|
1804
|
+
removeAllListeners<EventName extends keyof Events>(eventName?: EventName): this;
|
|
1805
|
+
listeners(eventName: InternalEventNames): Array<Listener<any>>;
|
|
1806
|
+
listeners<EventName extends keyof Events>(eventName: EventName): Array<Listener<Events[EventName]>>;
|
|
1807
|
+
listenerCount(eventName: InternalEventNames): number;
|
|
1808
|
+
listenerCount<EventName extends keyof Events>(eventName: EventName): number;
|
|
1809
|
+
rawListeners<EventName extends keyof Events>(eventName: EventName): Array<Listener<Events[EventName]>>;
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
type MediaType = "video" | "audio" | "screen";
|
|
1813
|
+
type TaskStatus = "abandoned" | "given.up" | "completed";
|
|
1814
|
+
interface PassthroughData {
|
|
1815
|
+
questionId: number;
|
|
1816
|
+
surveyId: number;
|
|
1817
|
+
visitorId: string | null;
|
|
1818
|
+
responseGroupUid: UUID;
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
interface RecordedTaskResponseValueType {
|
|
1822
|
+
mediaRecordingUids?: string[] | null;
|
|
1823
|
+
taskDurationMillisecond?: number;
|
|
1824
|
+
taskStatus: TaskStatus;
|
|
1825
|
+
}
|
|
1826
|
+
declare const BOOLEAN_OPERATOR: {
|
|
1827
|
+
readonly And: 1;
|
|
1828
|
+
readonly Or: 2;
|
|
1829
|
+
};
|
|
1830
|
+
type BooleanOperator = (typeof BOOLEAN_OPERATOR)[keyof typeof BOOLEAN_OPERATOR];
|
|
1831
|
+
|
|
1832
|
+
type CardType = "consentlegal" | "likert" | "matrix" | "multiplechoice" | "multipleselect" | "nps" | "open" | "recordedtask" | "texturlprompt" | "thanks" | "uploading" | "videovoice";
|
|
1833
|
+
type ConceptUrl = string | null;
|
|
1834
|
+
interface BaseCard {
|
|
1835
|
+
name: number;
|
|
1836
|
+
surveyId: number;
|
|
1837
|
+
updatedAt: string;
|
|
1838
|
+
value?: unknown;
|
|
1839
|
+
type: CardType;
|
|
1840
|
+
}
|
|
1841
|
+
type Comparator = "answered" | "contains" | "notcontains" | "list_dni" | "eq" | "given_up" | "gt" | "gte" | "lt" | "lte" | "list_all" | "list_alo" | "list_exact" | "neq" | "partial" | "skipped";
|
|
1842
|
+
type DefaultComparator = Extract<Comparator, "answered" | "skipped">;
|
|
1843
|
+
type RoutingOption<C extends Comparator = DefaultComparator> = OldRoutingOption<C> | GroupRoutingOption;
|
|
1844
|
+
type OldRoutingOption<C extends Comparator = DefaultComparator> = {
|
|
1845
|
+
comparator: C;
|
|
1846
|
+
target: number;
|
|
1847
|
+
/** @example '', 'option_2', ['option_1'] */
|
|
1848
|
+
value: number | string | string[];
|
|
1849
|
+
};
|
|
1850
|
+
type GroupRoutingOption = {
|
|
1851
|
+
group: (RoutingGroupOption | BooleanOperator)[];
|
|
1852
|
+
target: number;
|
|
1853
|
+
};
|
|
1854
|
+
type RoutingGroupOption = {
|
|
1855
|
+
comparator: Comparator;
|
|
1856
|
+
questionIndex: number;
|
|
1857
|
+
value: number | string | string[] | {
|
|
1858
|
+
skipped: true;
|
|
1859
|
+
} | null | undefined;
|
|
1860
|
+
};
|
|
1861
|
+
type RoutingOptions<C extends Comparator = DefaultComparator> = RoutingOption<C | DefaultComparator>[] | null;
|
|
1862
|
+
/** @example <p>Body</p> */
|
|
1863
|
+
type RichTextBody = string;
|
|
1864
|
+
type PromptActionType = "CONTINUE" | "EXTERNAL";
|
|
1865
|
+
interface TextUrlPromptCard extends BaseCard {
|
|
1866
|
+
props: {
|
|
1867
|
+
message: string;
|
|
1868
|
+
options: [];
|
|
1869
|
+
properties: {
|
|
1870
|
+
body: string;
|
|
1871
|
+
buttonText?: string;
|
|
1872
|
+
skipButtonText?: string;
|
|
1873
|
+
buttonUrl?: string;
|
|
1874
|
+
conceptUrl: ConceptUrl;
|
|
1875
|
+
promptActionType: PromptActionType;
|
|
1876
|
+
required: boolean;
|
|
1877
|
+
richTextBody: RichTextBody;
|
|
1878
|
+
};
|
|
1879
|
+
routingOptions: RoutingOptions;
|
|
1880
|
+
};
|
|
1881
|
+
type: "texturlprompt";
|
|
1882
|
+
}
|
|
1883
|
+
type AvPermission = "camera" | "microphone" | "screen";
|
|
1884
|
+
interface ConsentLegalCard extends BaseCard {
|
|
1885
|
+
props: {
|
|
1886
|
+
message: string;
|
|
1887
|
+
options: [];
|
|
1888
|
+
properties: {
|
|
1889
|
+
body: string;
|
|
1890
|
+
captionText: string;
|
|
1891
|
+
collectName: boolean;
|
|
1892
|
+
conceptUrl: ConceptUrl;
|
|
1893
|
+
consentDocument?: {
|
|
1894
|
+
originalFilename: string;
|
|
1895
|
+
url: string;
|
|
1896
|
+
};
|
|
1897
|
+
consentText: string;
|
|
1898
|
+
nameLabelText: string;
|
|
1899
|
+
required: boolean;
|
|
1900
|
+
richTextBody: RichTextBody;
|
|
1901
|
+
skipButtonText: string;
|
|
1902
|
+
submitButtonText: string;
|
|
1903
|
+
};
|
|
1904
|
+
routingOptions: RoutingOptions;
|
|
1905
|
+
};
|
|
1906
|
+
type: "consentlegal";
|
|
1907
|
+
}
|
|
1908
|
+
interface BaseTaskPage {
|
|
1909
|
+
buttonText: string;
|
|
1910
|
+
headline: string;
|
|
1911
|
+
type: RecordedTaskPageType;
|
|
1912
|
+
}
|
|
1913
|
+
type RecordedTaskPageType = "av_permission" | "screen_permission" | "start_task" | "complete_task";
|
|
1914
|
+
interface PermissionTaskPage extends BaseTaskPage {
|
|
1915
|
+
captionText: string;
|
|
1916
|
+
headline: string;
|
|
1917
|
+
permissionDeniedBody: string;
|
|
1918
|
+
permissionDeniedHeadline: string;
|
|
1919
|
+
permissionDescriptors: AvPermission[];
|
|
1920
|
+
permissionGrantedCaptionText?: string;
|
|
1921
|
+
permissionGrantedHeadline?: string;
|
|
1922
|
+
skipButtonText?: string;
|
|
1923
|
+
svg: string;
|
|
1924
|
+
tryAgainButtonText: string;
|
|
1925
|
+
type: "av_permission";
|
|
1926
|
+
}
|
|
1927
|
+
interface ScreenTaskPage extends BaseTaskPage {
|
|
1928
|
+
captionText: string;
|
|
1929
|
+
permissionDeniedCaptionText: string;
|
|
1930
|
+
permissionDeniedHeadline: string;
|
|
1931
|
+
selectTabText: string;
|
|
1932
|
+
skipButtonText: string;
|
|
1933
|
+
type: "screen_permission";
|
|
1934
|
+
}
|
|
1935
|
+
interface StartTaskPage extends BaseTaskPage {
|
|
1936
|
+
captionText?: string;
|
|
1937
|
+
skipButtonText: string;
|
|
1938
|
+
taskDetail: string;
|
|
1939
|
+
type: "start_task";
|
|
1940
|
+
}
|
|
1941
|
+
interface CompleteTaskPage extends BaseTaskPage {
|
|
1942
|
+
captionText?: string;
|
|
1943
|
+
skipButtonText: string;
|
|
1944
|
+
taskDetail: string;
|
|
1945
|
+
type: "complete_task";
|
|
1946
|
+
}
|
|
1947
|
+
type RecordedTaskPage = PermissionTaskPage | ScreenTaskPage | StartTaskPage | CompleteTaskPage;
|
|
1948
|
+
interface RecordedTaskCardProperties {
|
|
1949
|
+
captionText: string;
|
|
1950
|
+
conceptUrl: ConceptUrl;
|
|
1951
|
+
pages: RecordedTaskPage[];
|
|
1952
|
+
permissions: AvPermission[];
|
|
1953
|
+
required: boolean;
|
|
1954
|
+
taskDetail: string;
|
|
1955
|
+
}
|
|
1956
|
+
interface RecordedTaskCard extends BaseCard {
|
|
1957
|
+
props: {
|
|
1958
|
+
message: string;
|
|
1959
|
+
options: [];
|
|
1960
|
+
properties: RecordedTaskCardProperties;
|
|
1961
|
+
routingOptions: RoutingOptions<"given_up">;
|
|
1962
|
+
};
|
|
1963
|
+
type: "recordedtask";
|
|
1964
|
+
}
|
|
1965
|
+
interface Labels {
|
|
1966
|
+
left: string;
|
|
1967
|
+
right: string;
|
|
1968
|
+
}
|
|
1969
|
+
interface RatingIcon {
|
|
1970
|
+
idx?: number;
|
|
1971
|
+
svg: string;
|
|
1972
|
+
}
|
|
1973
|
+
type ScaleLabelType = "number" | "smiley" | "star";
|
|
1974
|
+
interface LikertCard extends BaseCard {
|
|
1975
|
+
props: {
|
|
1976
|
+
labels: Labels;
|
|
1977
|
+
message: string;
|
|
1978
|
+
options: [];
|
|
1979
|
+
properties: {
|
|
1980
|
+
captionText: string;
|
|
1981
|
+
buttonText?: string;
|
|
1982
|
+
conceptUrl: ConceptUrl;
|
|
1983
|
+
labels: Labels;
|
|
1984
|
+
range: string;
|
|
1985
|
+
ratingIcons: RatingIcon[];
|
|
1986
|
+
scaleLabelType: ScaleLabelType;
|
|
1987
|
+
required: boolean;
|
|
1988
|
+
};
|
|
1989
|
+
routingOptions: RoutingOptions<"eq" | "given_up" | "gt" | "gte" | "lt" | "lte" | "neq">;
|
|
1990
|
+
};
|
|
1991
|
+
type: "likert";
|
|
1992
|
+
}
|
|
1993
|
+
interface OpenTextCard extends BaseCard {
|
|
1994
|
+
props: {
|
|
1995
|
+
message: string;
|
|
1996
|
+
options: [];
|
|
1997
|
+
properties: {
|
|
1998
|
+
body: string;
|
|
1999
|
+
buttonText?: string;
|
|
2000
|
+
captionText?: string;
|
|
2001
|
+
conceptUrl: ConceptUrl;
|
|
2002
|
+
footerHtml?: string;
|
|
2003
|
+
openTextPlaceholder?: string;
|
|
2004
|
+
required: boolean;
|
|
2005
|
+
richTextBody: RichTextBody;
|
|
2006
|
+
skipButtonText?: string;
|
|
2007
|
+
};
|
|
2008
|
+
routingOptions: RoutingOptions<"contains" | "notcontains">;
|
|
2009
|
+
};
|
|
2010
|
+
type: "open";
|
|
2011
|
+
}
|
|
2012
|
+
interface MultipleChoiceOption {
|
|
2013
|
+
createdAt: string;
|
|
2014
|
+
deletedAt: null;
|
|
2015
|
+
id: number;
|
|
2016
|
+
label: string;
|
|
2017
|
+
optionProperties: null | {
|
|
2018
|
+
allowsTextEntry?: boolean;
|
|
2019
|
+
noneOfTheAbove?: boolean;
|
|
2020
|
+
isPinned?: boolean;
|
|
2021
|
+
};
|
|
2022
|
+
order: number;
|
|
2023
|
+
productId: number;
|
|
2024
|
+
surveyId: number;
|
|
2025
|
+
surveyQuestionId: number;
|
|
2026
|
+
updatedAt: string;
|
|
2027
|
+
value: string;
|
|
2028
|
+
}
|
|
2029
|
+
interface CommonMultipleChoiceProps {
|
|
2030
|
+
message: string;
|
|
2031
|
+
options: MultipleChoiceOption[];
|
|
2032
|
+
properties: {
|
|
2033
|
+
buttonText?: string;
|
|
2034
|
+
captionText: string;
|
|
2035
|
+
conceptUrl: ConceptUrl;
|
|
2036
|
+
isDropdown?: boolean;
|
|
2037
|
+
/**
|
|
2038
|
+
* Placeholder text on the dropdown button when no items are selected
|
|
2039
|
+
*/
|
|
2040
|
+
dropdownPlaceholderText?: string;
|
|
2041
|
+
/**
|
|
2042
|
+
* Text when multiple items are selected, such as "2 items selected" / "3 items selected"
|
|
2043
|
+
*/
|
|
2044
|
+
dropdownMultiselectedText?: string;
|
|
2045
|
+
randomize: "none" | "all";
|
|
2046
|
+
required: boolean;
|
|
2047
|
+
};
|
|
2048
|
+
}
|
|
2049
|
+
interface MultiChoiceCard<C extends Comparator = DefaultComparator> extends BaseCard {
|
|
2050
|
+
props: CommonMultipleChoiceProps & {
|
|
2051
|
+
routingOptions: RoutingOptions<C>;
|
|
2052
|
+
};
|
|
2053
|
+
}
|
|
2054
|
+
interface MultipleChoiceSingleSelectCard extends MultiChoiceCard<"eq" | "neq" | "list_alo" | "list_dni"> {
|
|
2055
|
+
type: "multiplechoice";
|
|
2056
|
+
}
|
|
2057
|
+
interface MultipleChoiceMultiSelectCard extends MultiChoiceCard<"list_all" | "list_alo" | "list_exact" | "list_dni"> {
|
|
2058
|
+
type: "multipleselect";
|
|
2059
|
+
}
|
|
2060
|
+
interface MatrixCard extends BaseCard {
|
|
2061
|
+
props: {
|
|
2062
|
+
options: MultipleChoiceOption[];
|
|
2063
|
+
message: string;
|
|
2064
|
+
routingOptions: RoutingOptions<"skipped" | "partial" | "answered">;
|
|
2065
|
+
properties: {
|
|
2066
|
+
buttonText?: string;
|
|
2067
|
+
captionText: string;
|
|
2068
|
+
conceptUrl: ConceptUrl;
|
|
2069
|
+
matrixColumn: {
|
|
2070
|
+
label: string;
|
|
2071
|
+
value: string;
|
|
2072
|
+
}[];
|
|
2073
|
+
randomize: "none" | "all";
|
|
2074
|
+
required: boolean;
|
|
2075
|
+
};
|
|
2076
|
+
};
|
|
2077
|
+
type: "matrix";
|
|
2078
|
+
}
|
|
2079
|
+
interface NPSCard extends BaseCard {
|
|
2080
|
+
props: {
|
|
2081
|
+
labels: {
|
|
2082
|
+
left: string;
|
|
2083
|
+
right: string;
|
|
2084
|
+
};
|
|
2085
|
+
message: string;
|
|
2086
|
+
options: [];
|
|
2087
|
+
properties: {
|
|
2088
|
+
buttonText?: string;
|
|
2089
|
+
captionText: string;
|
|
2090
|
+
conceptUrl: null;
|
|
2091
|
+
labels: {
|
|
2092
|
+
left: string;
|
|
2093
|
+
right: string;
|
|
2094
|
+
};
|
|
2095
|
+
required: boolean;
|
|
2096
|
+
};
|
|
2097
|
+
routingOptions: RoutingOptions<"eq" | "gt" | "gte" | "lt" | "lte" | "neq">;
|
|
2098
|
+
};
|
|
2099
|
+
type: "nps";
|
|
2100
|
+
}
|
|
2101
|
+
interface VideoVoiceCard extends BaseCard {
|
|
2102
|
+
props: {
|
|
2103
|
+
message: string;
|
|
2104
|
+
options: [];
|
|
2105
|
+
properties: {
|
|
2106
|
+
buttonText: string;
|
|
2107
|
+
captionText: string;
|
|
2108
|
+
conceptUrl: null;
|
|
2109
|
+
hideRecordedPrompt?: boolean;
|
|
2110
|
+
mediaType: "video" | "audio";
|
|
2111
|
+
required: boolean;
|
|
2112
|
+
skipButtonText: string;
|
|
2113
|
+
uploadId: string;
|
|
2114
|
+
videoUrl: string;
|
|
2115
|
+
};
|
|
2116
|
+
routingOptions: RoutingOptions;
|
|
2117
|
+
};
|
|
2118
|
+
type: "videovoice";
|
|
2119
|
+
}
|
|
2120
|
+
type Card = TextUrlPromptCard | ConsentLegalCard | RecordedTaskCard | LikertCard | OpenTextCard | MatrixCard | MultipleChoiceSingleSelectCard | MultipleChoiceMultiSelectCard | NPSCard | VideoVoiceCard;
|
|
2121
|
+
|
|
2122
|
+
type InteractiveMatchType = "exactly" | "legacy";
|
|
2123
|
+
type PageUrlMatchType = "contains" | "exactly" | "legacy" | "notContains" | "regex" | "startsWith";
|
|
2124
|
+
interface InteractiveEvent {
|
|
2125
|
+
id: number;
|
|
2126
|
+
matchType: InteractiveMatchType;
|
|
2127
|
+
name: string;
|
|
2128
|
+
pattern: string;
|
|
2129
|
+
properties: {
|
|
2130
|
+
innerText: string;
|
|
2131
|
+
selector?: string;
|
|
2132
|
+
type?: "click";
|
|
2133
|
+
};
|
|
2134
|
+
}
|
|
2135
|
+
interface PageUrlEvent {
|
|
2136
|
+
id: number;
|
|
2137
|
+
matchType: PageUrlMatchType;
|
|
2138
|
+
pattern: string;
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
declare enum DismissReason {
|
|
2142
|
+
Closed = "close.click",// user clicked the close button
|
|
2143
|
+
Complete = "survey.completed",// user answered all questions
|
|
2144
|
+
FeedbackClosed = "feedback.closed",// user either clicked on feedback button or close button
|
|
2145
|
+
PageChange = "page.change",// productConfig.dismissOnPageChange == true and we detected a page change (excludes hash/query param changes)
|
|
2146
|
+
API = "api",// JS called Sprig('dismissActiveSurvey')
|
|
2147
|
+
Override = "override"
|
|
2148
|
+
}
|
|
2149
|
+
type StudyType = "feedbackButton" | "inProductSurvey";
|
|
2150
|
+
declare enum SprigEvent {
|
|
2151
|
+
ReplayCapture = "replay.capture",
|
|
2152
|
+
FeedbackButtonLoaded = "feedback.button.loaded",
|
|
2153
|
+
SDKReady = "sdk.ready",
|
|
2154
|
+
SurveyAppeared = "survey.appeared",
|
|
2155
|
+
SurveyClosed = "survey.closed",
|
|
2156
|
+
SurveyDimensions = "survey.dimensions",
|
|
2157
|
+
SurveyFadingOut = "survey.fadingOut",
|
|
2158
|
+
SurveyHeight = "survey.height",
|
|
2159
|
+
SurveyPresented = "survey.presented",
|
|
2160
|
+
SurveyLifeCycle = "survey.lifeCycle",
|
|
2161
|
+
SurveyWidth = "survey.width",
|
|
2162
|
+
SurveyWillClose = "survey.willClose",
|
|
2163
|
+
SurveyWillPresent = "survey.will.present",
|
|
2164
|
+
CloseSurveyOnOverlayClick = "close.survey.overlayClick",
|
|
2165
|
+
VisitorIDUpdated = "visitor.id.updated",
|
|
2166
|
+
QuestionAnswered = "question.answered"
|
|
2167
|
+
}
|
|
2168
|
+
declare const EVENTS: {
|
|
2169
|
+
FEEDBACK_BUTTON_LOADED: SprigEvent;
|
|
2170
|
+
SDK_READY: SprigEvent;
|
|
2171
|
+
SURVEY_APPEARED: SprigEvent;
|
|
2172
|
+
SURVEY_CLOSED: SprigEvent;
|
|
2173
|
+
SURVEY_DIMENSIONS: SprigEvent;
|
|
2174
|
+
SURVEY_FADING_OUT: SprigEvent;
|
|
2175
|
+
SURVEY_HEIGHT: SprigEvent;
|
|
2176
|
+
SURVEY_WIDTH: SprigEvent;
|
|
2177
|
+
SURVEY_PRESENTED: SprigEvent;
|
|
2178
|
+
SURVEY_LIFE_CYCLE: SprigEvent;
|
|
2179
|
+
SURVEY_WILL_CLOSE: SprigEvent;
|
|
2180
|
+
SURVEY_WILL_PRESENT: SprigEvent;
|
|
2181
|
+
QUESTION_ANSWERED: SprigEvent;
|
|
2182
|
+
REPLAY_CAPTURE: SprigEvent;
|
|
2183
|
+
CLOSE_SURVEY_ON_OVERLAY_CLICK: SprigEvent;
|
|
2184
|
+
VISITOR_ID_UPDATED: SprigEvent;
|
|
2185
|
+
DATA: {
|
|
2186
|
+
DISMISS_REASONS: {
|
|
2187
|
+
API: DismissReason;
|
|
2188
|
+
CLOSED: DismissReason;
|
|
2189
|
+
COMPLETE: DismissReason;
|
|
2190
|
+
PAGE_CHANGE: DismissReason;
|
|
2191
|
+
OVERRIDE: DismissReason;
|
|
2192
|
+
};
|
|
2193
|
+
SURVEY_ID: string;
|
|
2194
|
+
};
|
|
2195
|
+
};
|
|
2196
|
+
|
|
2197
|
+
type Metric = "sdk_event_queue_latency_seconds" | "sdk_replay_add_event_batch_seconds" | "sdk_replay_cleanup_seconds" | "sdk_replay_compression_seconds" | "sdk_replay_get_events_between_seconds" | "sdk_replay_snapshot_seconds";
|
|
2198
|
+
type ThresholdType = "max" | "min";
|
|
2199
|
+
interface MetricThreshold {
|
|
2200
|
+
metric: Metric;
|
|
2201
|
+
type: ThresholdType;
|
|
2202
|
+
value: number;
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2205
|
+
interface RecordedTaskResponseType {
|
|
2206
|
+
questionId: number;
|
|
2207
|
+
type: CardType;
|
|
2208
|
+
value: RecordedTaskResponseValueType;
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
type SurveyState = "ready" | "no survey";
|
|
2212
|
+
type ReplayDurationType = "after" | "before" | "beforeAndAfter";
|
|
2213
|
+
|
|
2214
|
+
interface MobileReplayConfig {
|
|
2215
|
+
mobileMetricsReportingEnabled?: boolean;
|
|
2216
|
+
metricsReportingInterval?: number;
|
|
2217
|
+
metricsThresholds?: MetricThreshold[];
|
|
2218
|
+
maxMobileReplayDurationSeconds?: number;
|
|
2219
|
+
mobileReplaySettings?: {
|
|
2220
|
+
hideAllFormContents: boolean;
|
|
2221
|
+
hidePasswordsOnly: boolean;
|
|
2222
|
+
hideAllImages: boolean;
|
|
2223
|
+
};
|
|
2224
|
+
}
|
|
2225
|
+
type SprigEventMap = {
|
|
2226
|
+
"survey.question": [
|
|
2227
|
+
{
|
|
2228
|
+
qid: number;
|
|
2229
|
+
props: unknown;
|
|
2230
|
+
}
|
|
2231
|
+
];
|
|
2232
|
+
"recorded.task.permission.screen": [];
|
|
2233
|
+
"recorded.task.start": [];
|
|
2234
|
+
"survey.complete": [number];
|
|
2235
|
+
"verify.view.version": [
|
|
2236
|
+
{
|
|
2237
|
+
"view.version": string;
|
|
2238
|
+
}
|
|
2239
|
+
];
|
|
2240
|
+
[SprigEvent.CloseSurveyOnOverlayClick]: [];
|
|
2241
|
+
[SprigEvent.FeedbackButtonLoaded]: [
|
|
2242
|
+
{
|
|
2243
|
+
name: string;
|
|
2244
|
+
"survey.id"?: number;
|
|
2245
|
+
}
|
|
2246
|
+
];
|
|
2247
|
+
[SprigEvent.SDKReady]: [MobileReplayConfig];
|
|
2248
|
+
[SprigEvent.SurveyAppeared]: [
|
|
2249
|
+
{
|
|
2250
|
+
name: string;
|
|
2251
|
+
"survey.id": number;
|
|
2252
|
+
}
|
|
2253
|
+
];
|
|
2254
|
+
[SprigEvent.SurveyDimensions]: [
|
|
2255
|
+
{
|
|
2256
|
+
contentFrameHeight: number;
|
|
2257
|
+
contentFrameWidth: number;
|
|
2258
|
+
name: string;
|
|
2259
|
+
}
|
|
2260
|
+
];
|
|
2261
|
+
[SprigEvent.SurveyClosed]: [
|
|
2262
|
+
{
|
|
2263
|
+
initiator?: string;
|
|
2264
|
+
name: string;
|
|
2265
|
+
studyType?: StudyType;
|
|
2266
|
+
}
|
|
2267
|
+
];
|
|
2268
|
+
[SprigEvent.SurveyFadingOut]: [];
|
|
2269
|
+
[SprigEvent.SurveyHeight]: [
|
|
2270
|
+
{
|
|
2271
|
+
name: string;
|
|
2272
|
+
contentFrameHeight: number;
|
|
2273
|
+
}
|
|
2274
|
+
];
|
|
2275
|
+
[SprigEvent.SurveyWidth]: [
|
|
2276
|
+
{
|
|
2277
|
+
name: string;
|
|
2278
|
+
contentFrameWidth: number;
|
|
2279
|
+
}
|
|
2280
|
+
];
|
|
2281
|
+
[SprigEvent.SurveyLifeCycle]: [{
|
|
2282
|
+
state: string;
|
|
2283
|
+
}];
|
|
2284
|
+
[SprigEvent.SurveyPresented]: [
|
|
2285
|
+
{
|
|
2286
|
+
name: string;
|
|
2287
|
+
"survey.id": number;
|
|
2288
|
+
}
|
|
2289
|
+
];
|
|
2290
|
+
[SprigEvent.SurveyWillClose]: [
|
|
2291
|
+
{
|
|
2292
|
+
initiator: DismissReason;
|
|
2293
|
+
name?: string;
|
|
2294
|
+
studyType?: StudyType;
|
|
2295
|
+
}
|
|
2296
|
+
];
|
|
2297
|
+
[SprigEvent.SurveyWillPresent]: [
|
|
2298
|
+
{
|
|
2299
|
+
name: string;
|
|
2300
|
+
"survey.id": number;
|
|
2301
|
+
}
|
|
2302
|
+
];
|
|
2303
|
+
[SprigEvent.VisitorIDUpdated]: [{
|
|
2304
|
+
visitorId: string | null;
|
|
2305
|
+
}];
|
|
2306
|
+
[SprigEvent.QuestionAnswered]: [
|
|
2307
|
+
{
|
|
2308
|
+
answeredAt?: number;
|
|
2309
|
+
questionIndex?: number;
|
|
2310
|
+
value: unknown;
|
|
2311
|
+
}
|
|
2312
|
+
];
|
|
2313
|
+
[SprigEvent.ReplayCapture]: [
|
|
2314
|
+
{
|
|
2315
|
+
responseGroupUid: string;
|
|
2316
|
+
hasQuestions: boolean;
|
|
2317
|
+
uploadId: string;
|
|
2318
|
+
seconds: number;
|
|
2319
|
+
replayType: ReplayDurationType;
|
|
2320
|
+
generateVideoUploadUrlPayload: {
|
|
2321
|
+
isReplay: boolean;
|
|
2322
|
+
mediaRecordingUid: string;
|
|
2323
|
+
mediaType: MediaType;
|
|
2324
|
+
questionId: number;
|
|
2325
|
+
responseGroupUid: string;
|
|
2326
|
+
surveyId: number;
|
|
2327
|
+
updatedAt: string;
|
|
2328
|
+
visitorId: string | null;
|
|
2329
|
+
};
|
|
2330
|
+
surveyId: number;
|
|
2331
|
+
}
|
|
2332
|
+
];
|
|
2333
|
+
"av.permission": [
|
|
2334
|
+
{
|
|
2335
|
+
"stream.ready": (avStream: MediaStream | null, captureStream?: MediaStream | null) => void;
|
|
2336
|
+
"permission.descriptors": AvPermission[];
|
|
2337
|
+
}
|
|
2338
|
+
];
|
|
2339
|
+
"begin.recording": [
|
|
2340
|
+
{
|
|
2341
|
+
"recording.media.types": MediaType[];
|
|
2342
|
+
"start.recording.callback": (mediaRecordingUids: UUID[]) => void;
|
|
2343
|
+
}
|
|
2344
|
+
];
|
|
2345
|
+
"finish.task": [
|
|
2346
|
+
{
|
|
2347
|
+
"begin.callback": (mediaRecordingUid: UUID) => void;
|
|
2348
|
+
"current.index": number;
|
|
2349
|
+
"passthrough.data": PassthroughData;
|
|
2350
|
+
"progress.callback": (mediaRecordingUid: UUID, data: {
|
|
2351
|
+
detail: number;
|
|
2352
|
+
}) => void;
|
|
2353
|
+
"task.complete.callback": (taskDurationMillisecond: number) => void;
|
|
2354
|
+
"task.response": RecordedTaskResponseType;
|
|
2355
|
+
"upload.callback": (mediaRecordingUid: UUID | null, successOrError: true | unknown) => void;
|
|
2356
|
+
}
|
|
2357
|
+
];
|
|
2358
|
+
"permission.status": [
|
|
2359
|
+
{
|
|
2360
|
+
"permission.status.callback": (avStream: MediaStream | undefined, hasVideoPermission: boolean, hasScreenPermission: boolean, captureStream: MediaStream | undefined) => void;
|
|
2361
|
+
}
|
|
2362
|
+
];
|
|
2363
|
+
"screen.permission": [
|
|
2364
|
+
{
|
|
2365
|
+
"screen.permission.requested"?: (data: boolean) => void;
|
|
2366
|
+
"stream.ready.callback": (avStream: MediaStream | null, captureStream: MediaStream | null) => void;
|
|
2367
|
+
}
|
|
2368
|
+
];
|
|
2369
|
+
"start.task": [];
|
|
2370
|
+
};
|
|
2371
|
+
declare const eventEmitter: Emitter<SprigEventMap>;
|
|
2372
|
+
type SprigEventEmitter = typeof eventEmitter;
|
|
2373
|
+
|
|
2374
|
+
declare const LogLevels: {
|
|
2375
|
+
readonly Error: 1;
|
|
2376
|
+
readonly Warn: 2;
|
|
2377
|
+
readonly Info: 3;
|
|
2378
|
+
readonly Debug: 4;
|
|
2379
|
+
};
|
|
2380
|
+
type LogLevel = (typeof LogLevels)[keyof typeof LogLevels];
|
|
2381
|
+
|
|
2382
|
+
type FramePosition = "bottomLeft" | "bottomRight" | "center" | "topLeft" | "topRight";
|
|
2383
|
+
type Platform = "email" | "link" | "web";
|
|
2384
|
+
type InstallationMethod = "web-npm" | "web-npm-bundled" | "web-gtm" | "web-segment" | "android-segment" | "react-native-segment" | "ios-segment" | "web-snippet";
|
|
2385
|
+
interface Answer {
|
|
2386
|
+
questionId: number;
|
|
2387
|
+
value: unknown;
|
|
2388
|
+
}
|
|
2389
|
+
type FeedbackPlacement = "center-left" | "center-right" | "bottom-left" | "bottom-right";
|
|
2390
|
+
type FeedbackDesktopDisplay = "center-modal" | "slider";
|
|
2391
|
+
interface AppProductConfig {
|
|
2392
|
+
framePosition?: FramePosition;
|
|
2393
|
+
desktopDisplay?: FeedbackDesktopDisplay;
|
|
2394
|
+
placement?: FeedbackPlacement;
|
|
2395
|
+
}
|
|
2396
|
+
interface Config extends MobileReplayConfig {
|
|
2397
|
+
allResponses: unknown[];
|
|
2398
|
+
answers?: Answer[];
|
|
2399
|
+
apiURL: string;
|
|
2400
|
+
/** @example "#000000" */
|
|
2401
|
+
border: string;
|
|
2402
|
+
cards: Card[];
|
|
2403
|
+
configureExitOnOverlayClick: (cb: () => void) => void;
|
|
2404
|
+
context: {
|
|
2405
|
+
outcome: string;
|
|
2406
|
+
product: {
|
|
2407
|
+
name: string;
|
|
2408
|
+
};
|
|
2409
|
+
visitor: {
|
|
2410
|
+
outcome: string;
|
|
2411
|
+
};
|
|
2412
|
+
};
|
|
2413
|
+
customMetadata?: Record<string, unknown>;
|
|
2414
|
+
customStyles?: string;
|
|
2415
|
+
dismissOnPageChange: boolean;
|
|
2416
|
+
forceBrandedLogo?: boolean;
|
|
2417
|
+
endCard?: {
|
|
2418
|
+
headline: string;
|
|
2419
|
+
subheader?: string;
|
|
2420
|
+
};
|
|
2421
|
+
/** @example "SJcVfq-7QQ" */
|
|
2422
|
+
envId: string;
|
|
2423
|
+
environmentId?: string;
|
|
2424
|
+
exitOnOverlayClick?: boolean;
|
|
2425
|
+
exitOnOverlayClickMobile?: boolean;
|
|
2426
|
+
eventEmitFn: SprigEventEmitter["emit"];
|
|
2427
|
+
fontFamily?: string;
|
|
2428
|
+
fontFamilyURL: undefined;
|
|
2429
|
+
frame: HTMLIFrameElement & {
|
|
2430
|
+
eventEmitter?: SprigEventEmitter;
|
|
2431
|
+
setHeight?: (height: number) => void;
|
|
2432
|
+
setWidth?: (width: number) => void;
|
|
2433
|
+
};
|
|
2434
|
+
framePosition: FramePosition;
|
|
2435
|
+
headers: {
|
|
2436
|
+
"accept-language"?: string;
|
|
2437
|
+
/** @example "Bearer 123" */
|
|
2438
|
+
Authorization?: string;
|
|
2439
|
+
"Content-Type"?: string;
|
|
2440
|
+
"userleap-platform": Platform | "ios" | "android" | "video_recorder";
|
|
2441
|
+
"sprig-modules"?: string;
|
|
2442
|
+
/** @example "SJcVfq-7QQ" */
|
|
2443
|
+
"x-ul-environment-id"?: string;
|
|
2444
|
+
"x-ul-installation-method": InstallationMethod;
|
|
2445
|
+
"x-ul-anonymous-id"?: string;
|
|
2446
|
+
"x-ul-error"?: string;
|
|
2447
|
+
"x-ul-preview-mode"?: string;
|
|
2448
|
+
/** @example "2.18.0" */
|
|
2449
|
+
"x-ul-sdk-version"?: string;
|
|
2450
|
+
/** For web-bundled sdk */
|
|
2451
|
+
"x-ul-package-version"?: string;
|
|
2452
|
+
"x-ul-user-id"?: string;
|
|
2453
|
+
"x-ul-visitor-id"?: string;
|
|
2454
|
+
};
|
|
2455
|
+
installationMethod?: InstallationMethod;
|
|
2456
|
+
interactiveEvents: InteractiveEvent[];
|
|
2457
|
+
interactiveEventsHandler?: (e: MouseEvent) => void;
|
|
2458
|
+
isOnQuestionsTab?: boolean;
|
|
2459
|
+
isPreview?: boolean;
|
|
2460
|
+
launchDarklyEnabled?: boolean;
|
|
2461
|
+
locale: string;
|
|
2462
|
+
logLevel?: LogLevel;
|
|
2463
|
+
logBufferLimit?: number;
|
|
2464
|
+
marketingUrl?: string;
|
|
2465
|
+
maxAttrNameLength: number;
|
|
2466
|
+
maxAttrValueLength: number;
|
|
2467
|
+
maxEmailLength: number;
|
|
2468
|
+
maxEventLength: number;
|
|
2469
|
+
maxReplayDurationSeconds?: number;
|
|
2470
|
+
maxUserIdLength: number;
|
|
2471
|
+
mobileSDKVersion: undefined;
|
|
2472
|
+
mode?: string;
|
|
2473
|
+
mute?: boolean;
|
|
2474
|
+
optimizelyEnabled?: boolean;
|
|
2475
|
+
overlayStyle: "light";
|
|
2476
|
+
overlayStyleMobile: "none";
|
|
2477
|
+
pageUrlEvents: PageUrlEvent[];
|
|
2478
|
+
path?: string;
|
|
2479
|
+
platform?: Platform;
|
|
2480
|
+
previewKey?: string | null;
|
|
2481
|
+
previewMode?: boolean;
|
|
2482
|
+
productConfig?: AppProductConfig;
|
|
2483
|
+
replayNonce?: string;
|
|
2484
|
+
replaySettings?: object;
|
|
2485
|
+
requireUserIdForTracking: boolean;
|
|
2486
|
+
responseGroupUid: UUID;
|
|
2487
|
+
showStripes: boolean;
|
|
2488
|
+
showSurveyBrand: boolean;
|
|
2489
|
+
slugName: null;
|
|
2490
|
+
startingQuestionIdx?: number | null;
|
|
2491
|
+
styleNonce?: string;
|
|
2492
|
+
studyType?: StudyType;
|
|
2493
|
+
surveyId: number;
|
|
2494
|
+
tabTitle: string;
|
|
2495
|
+
trackPageViewUrl?: string;
|
|
2496
|
+
ulEvents: typeof SprigEvent;
|
|
2497
|
+
UpChunk: Window["UpChunk"];
|
|
2498
|
+
upchunkLibraryURL?: string;
|
|
2499
|
+
useDesktopPrototype?: boolean;
|
|
2500
|
+
useMobileStyling: boolean;
|
|
2501
|
+
userId: UUID | null;
|
|
2502
|
+
visitorId: UUID | null;
|
|
2503
|
+
viewDocument: Document;
|
|
2504
|
+
viewWindow: Window;
|
|
2505
|
+
visitorAttributes: {
|
|
2506
|
+
email?: string;
|
|
2507
|
+
externalUserId?: string;
|
|
2508
|
+
};
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
interface Experiment {
|
|
2512
|
+
id: string;
|
|
2513
|
+
variation?: string;
|
|
2514
|
+
}
|
|
2515
|
+
|
|
2516
|
+
type QueueItem = [string, ...unknown[]] | (() => void);
|
|
2517
|
+
declare class SprigQueue {
|
|
2518
|
+
paused: boolean;
|
|
2519
|
+
queue: QueueItem[];
|
|
2520
|
+
ul: WindowSprig;
|
|
2521
|
+
constructor(ul: WindowSprig, queue: QueueItem[]);
|
|
2522
|
+
flush(queue: QueueItem[]): void;
|
|
2523
|
+
isPaused(): boolean;
|
|
2524
|
+
pause(): void;
|
|
2525
|
+
unpause(): void;
|
|
2526
|
+
push(action: QueueItem): void;
|
|
2527
|
+
perform(func: () => void): void | Promise<unknown>;
|
|
2528
|
+
/**
|
|
2529
|
+
* Removes all queued items
|
|
2530
|
+
*/
|
|
2531
|
+
empty(): void;
|
|
2532
|
+
}
|
|
2533
|
+
|
|
2534
|
+
declare global {
|
|
2535
|
+
interface SymbolConstructor {
|
|
2536
|
+
readonly observable: symbol;
|
|
2537
|
+
}
|
|
2538
|
+
}
|
|
2539
|
+
|
|
2540
|
+
type EventDigest = {
|
|
2541
|
+
timestamp: number;
|
|
2542
|
+
type: "Sprig_Click";
|
|
2543
|
+
} | {
|
|
2544
|
+
timestamp: number;
|
|
2545
|
+
name: string;
|
|
2546
|
+
type: "Sprig_TrackEvent";
|
|
2547
|
+
} | {
|
|
2548
|
+
timestamp: number;
|
|
2549
|
+
type: "Sprig_PageView";
|
|
2550
|
+
url: string;
|
|
2551
|
+
} | {
|
|
2552
|
+
timestamp: number;
|
|
2553
|
+
surveyId: string;
|
|
2554
|
+
type: "Sprig_ShowSurvey";
|
|
2555
|
+
} | {
|
|
2556
|
+
timestamp: number;
|
|
2557
|
+
surveyId: string;
|
|
2558
|
+
type: "Sprig_SubmitSurvey";
|
|
2559
|
+
};
|
|
2560
|
+
|
|
2561
|
+
declare namespace optimizely {
|
|
2562
|
+
interface Optimizely {
|
|
2563
|
+
get?: (key: "state") => {
|
|
2564
|
+
getExperimentStates: (options: {
|
|
2565
|
+
filter?: unknown;
|
|
2566
|
+
isActive?: boolean;
|
|
2567
|
+
}) => Record<string, OptimizelyExperimentState>;
|
|
2568
|
+
};
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
// Ref: https://docs.developers.optimizely.com/web/docs/state#return-value-2
|
|
2572
|
+
interface OptimizelyExperimentState {
|
|
2573
|
+
/** Audiences the visitor was in when the experiment was activated.
|
|
2574
|
+
* @example { "id": "6672770135", "name": "Chrome users" }
|
|
2575
|
+
*/
|
|
2576
|
+
audiences: { id: number; name: string }[];
|
|
2577
|
+
/** The name of the experiment
|
|
2578
|
+
* @example OptimizelyExperimentState
|
|
2579
|
+
* */
|
|
2580
|
+
experimentName: string;
|
|
2581
|
+
/** The ID of the experiment
|
|
2582
|
+
* @example OptimizelyExperimentState
|
|
2583
|
+
* */
|
|
2584
|
+
id: string;
|
|
2585
|
+
/** Indicates if the experiment is currently active */
|
|
2586
|
+
isActive: boolean;
|
|
2587
|
+
/** Indicates if the visitor is in the holdback (i.e., is excluded due traffic allocation) */
|
|
2588
|
+
isInExperimentHoldback: boolean;
|
|
2589
|
+
/** The name of the object. Required */
|
|
2590
|
+
name: string;
|
|
2591
|
+
/** An object with the name and the ID of the variation the visitor is bucketed in, or null if the visitor was not bucketed
|
|
2592
|
+
* @example { "id": "6626731852", "name": "Variation #1" }
|
|
2593
|
+
*/
|
|
2594
|
+
variation: { id: number; name: string } | null;
|
|
2595
|
+
/** Indicates if the visitor was redirected due to this experiment */
|
|
2596
|
+
visitorRedirected: boolean;
|
|
2597
|
+
}
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
declare namespace sprigConfig {
|
|
2601
|
+
type IdentifyResult = Promise<
|
|
2602
|
+
| {
|
|
2603
|
+
error?: Error;
|
|
2604
|
+
success: boolean;
|
|
2605
|
+
message?: string;
|
|
2606
|
+
surveyState?: SurveyState;
|
|
2607
|
+
surveyId?: number;
|
|
2608
|
+
responseGroupUid?: string;
|
|
2609
|
+
}
|
|
2610
|
+
| undefined
|
|
2611
|
+
>;
|
|
2612
|
+
|
|
2613
|
+
interface TrackPayload {
|
|
2614
|
+
anonymousId?: string;
|
|
2615
|
+
metadata?: SprigMetadata;
|
|
2616
|
+
eventName?: string;
|
|
2617
|
+
properties?: SprigProperties;
|
|
2618
|
+
userId?: string;
|
|
2619
|
+
showSurveyCallback?: (surveyId?: number) => Promise<boolean>;
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2622
|
+
interface SprigAPIActions {
|
|
2623
|
+
// internal apis
|
|
2624
|
+
_completeSessionReplay: (payload: {
|
|
2625
|
+
surveyId: number;
|
|
2626
|
+
responseGroupUuid: string;
|
|
2627
|
+
eventDigest?: EventDigest[];
|
|
2628
|
+
}) => Promise<boolean>;
|
|
2629
|
+
_generateVideoUploadUrl: (body: {
|
|
2630
|
+
mediaRecordingUid?: string;
|
|
2631
|
+
mediaType?: MediaType;
|
|
2632
|
+
questionId?: number;
|
|
2633
|
+
responseGroupUid?: string;
|
|
2634
|
+
surveyId?: number;
|
|
2635
|
+
updatedAt?: string;
|
|
2636
|
+
visitorId?: string | null;
|
|
2637
|
+
isReplay?: boolean;
|
|
2638
|
+
}) => Promise<string | null>;
|
|
2639
|
+
_previewSurvey: (surveyTemplateId: UUID) => void;
|
|
2640
|
+
_reviewSurvey: (surveyId: number) => void;
|
|
2641
|
+
_reportMetric: (name: Metric, value: number) => void;
|
|
2642
|
+
|
|
2643
|
+
// external apis
|
|
2644
|
+
addListener: (event: SprigEvent, listener: SprigListener) => Promise<void>;
|
|
2645
|
+
addSurveyListener: (listener: SprigListener) => Promise<void>;
|
|
2646
|
+
applyFeedbackStyles: (styles: { button?: string; view?: string }) => void;
|
|
2647
|
+
applyStyles: (styleString: string) => void;
|
|
2648
|
+
dismissActiveSurvey: (reason?: DismissReason) => void;
|
|
2649
|
+
displaySurvey: (surveyId: number) => IdentifyResult;
|
|
2650
|
+
identifyAndSetAttributes: (payload: {
|
|
2651
|
+
anonymousId?: string;
|
|
2652
|
+
attributes?: SprigAttributes;
|
|
2653
|
+
userId?: string;
|
|
2654
|
+
}) => IdentifyResult;
|
|
2655
|
+
identifyAndTrack: (payload: TrackPayload) => IdentifyResult;
|
|
2656
|
+
importLaunchDarklyData: (data: Record<string, number | undefined>) => void;
|
|
2657
|
+
integrateOptimizely: (
|
|
2658
|
+
strData: string | { experiments: Experiment[] },
|
|
2659
|
+
isOverride?: boolean,
|
|
2660
|
+
) => void;
|
|
2661
|
+
integrateOptimizelyClient: (client: Client) => void;
|
|
2662
|
+
logoutUser: () => void;
|
|
2663
|
+
mute: () => void;
|
|
2664
|
+
previewSurvey: (surveyTemplateId: UUID) => void;
|
|
2665
|
+
removeAllListeners: () => Promise<void>;
|
|
2666
|
+
removeAttributes: (attributes: SprigAttributes) => IdentifyResult;
|
|
2667
|
+
removeListener: (
|
|
2668
|
+
event: SprigEvent,
|
|
2669
|
+
listener: SprigListener,
|
|
2670
|
+
) => Promise<void>;
|
|
2671
|
+
removeSurveyListener: (listener: SprigListener) => Promise<void>;
|
|
2672
|
+
reviewSurvey: (surveyId: number) => void;
|
|
2673
|
+
setAttribute: (
|
|
2674
|
+
attribute: string,
|
|
2675
|
+
value: string | number | boolean,
|
|
2676
|
+
) => IdentifyResult;
|
|
2677
|
+
setAttributes: (attributes?: SprigAttributes) => IdentifyResult;
|
|
2678
|
+
setPartnerAnonymousId: (
|
|
2679
|
+
partnerAnonymousId: string,
|
|
2680
|
+
) => Promise<{ success: boolean; message?: string }>;
|
|
2681
|
+
setVisitorAttribute: (
|
|
2682
|
+
attribute: string,
|
|
2683
|
+
value: string | number,
|
|
2684
|
+
) => IdentifyResult;
|
|
2685
|
+
setWindowDimensions: (
|
|
2686
|
+
width: number | string,
|
|
2687
|
+
height: number | string,
|
|
2688
|
+
) => void;
|
|
2689
|
+
setEmail: (email: string) => IdentifyResult;
|
|
2690
|
+
setPreviewKey: (previewKey: string) => void;
|
|
2691
|
+
setUserId: (userId: string) => IdentifyResult;
|
|
2692
|
+
setVisitorEmail: (email: string) => IdentifyResult;
|
|
2693
|
+
setVisitorToken: () => void;
|
|
2694
|
+
teardown: () => void;
|
|
2695
|
+
track: (
|
|
2696
|
+
eventName: string,
|
|
2697
|
+
properties?: TrackPayload["properties"],
|
|
2698
|
+
metadata?: SprigMetadata,
|
|
2699
|
+
showSurveyCallback?: (surveyId?: number) => Promise<boolean>,
|
|
2700
|
+
) => IdentifyResult;
|
|
2701
|
+
trackPageView: (
|
|
2702
|
+
url: string,
|
|
2703
|
+
properties?: SprigProperties,
|
|
2704
|
+
showSurveyCallback?: (surveyId?: number) => Promise<boolean>,
|
|
2705
|
+
calledFromApi?: boolean,
|
|
2706
|
+
) => void;
|
|
2707
|
+
unmute: () => void;
|
|
2708
|
+
}
|
|
2709
|
+
|
|
2710
|
+
type SprigCommand = keyof SprigAPIActions;
|
|
2711
|
+
type SprigCommands = <C extends SprigCommand>(
|
|
2712
|
+
command: C,
|
|
2713
|
+
...params: Parameters<SprigAPIActions[C]>
|
|
2714
|
+
) => ReturnType<SprigAPIActions[C]>;
|
|
2715
|
+
|
|
2716
|
+
type WindowSprig = Config &
|
|
2717
|
+
SprigAPIActions &
|
|
2718
|
+
SprigCommands & {
|
|
2719
|
+
_API_URL: string;
|
|
2720
|
+
_config: Config & {
|
|
2721
|
+
desktopDisplay?: string;
|
|
2722
|
+
previewLanguage?: string;
|
|
2723
|
+
};
|
|
2724
|
+
_gtm: unknown; // TODO: determine if boolean?
|
|
2725
|
+
_queue: SprigQueue;
|
|
2726
|
+
_segment: unknown; // TODO: determine if boolean?
|
|
2727
|
+
appId: string;
|
|
2728
|
+
container?: HTMLElement | null;
|
|
2729
|
+
config: Config;
|
|
2730
|
+
debugMode?: boolean;
|
|
2731
|
+
delayingSurvey: boolean;
|
|
2732
|
+
email?: string | null;
|
|
2733
|
+
envId: string;
|
|
2734
|
+
error?: Error;
|
|
2735
|
+
feedbackCustomStyles?: string;
|
|
2736
|
+
frameId: string;
|
|
2737
|
+
loaded: boolean;
|
|
2738
|
+
locale?: string;
|
|
2739
|
+
maxHeight?: number | string;
|
|
2740
|
+
maxInflightReplayRequests?: number;
|
|
2741
|
+
mobileHeadersJSON?: string;
|
|
2742
|
+
nonce?: string;
|
|
2743
|
+
partnerAnonymousId: string | null;
|
|
2744
|
+
replayLibraryURL?: string;
|
|
2745
|
+
replayNonce?: string;
|
|
2746
|
+
reportError: (name: string, err: Error, extraInfo?: object) => void;
|
|
2747
|
+
sampleRate?: number;
|
|
2748
|
+
token: string | null;
|
|
2749
|
+
upchunkLibraryURL?: string;
|
|
2750
|
+
UPDATES: typeof EVENTS;
|
|
2751
|
+
viewSDKURL?: string;
|
|
2752
|
+
windowDimensions?: {
|
|
2753
|
+
height: number;
|
|
2754
|
+
width: number;
|
|
2755
|
+
};
|
|
2756
|
+
};
|
|
2757
|
+
}
|
|
2758
|
+
type ArgumentTypes<F> = F extends (...args: infer A) => unknown ? A : never;
|
|
2759
|
+
type ArgumentType<T> = T extends (arg1: infer U, ...args: unknown[]) => unknown
|
|
2760
|
+
? U
|
|
2761
|
+
: unknown;
|
|
2762
|
+
type PublicOf<T> = { [K in keyof T]: T[K] };
|
|
2763
|
+
type rrwebRecord = (typeof rrweb)["record"];
|
|
2764
|
+
type rrwebCustomEvent = (typeof rrweb)["record"]["addCustomEvent"];
|
|
2765
|
+
declare global {
|
|
2766
|
+
interface Window {
|
|
2767
|
+
__cfg: Config;
|
|
2768
|
+
attachEvent?: typeof window.addEventListener;
|
|
2769
|
+
Backbone: {
|
|
2770
|
+
history: typeof window.history;
|
|
2771
|
+
};
|
|
2772
|
+
Intercom: { ul_wasVisible?: boolean } & ((
|
|
2773
|
+
method: string,
|
|
2774
|
+
data?: unknown,
|
|
2775
|
+
) => void);
|
|
2776
|
+
optimizely?: optimizely.Optimizely;
|
|
2777
|
+
optimizelyDatafile?: object;
|
|
2778
|
+
previewMode?: unknown;
|
|
2779
|
+
UpChunk: {
|
|
2780
|
+
createUpload: typeof createUpload;
|
|
2781
|
+
};
|
|
2782
|
+
_Sprig?: sprigConfig.WindowSprig;
|
|
2783
|
+
Sprig: sprigConfig.WindowSprig;
|
|
2784
|
+
UserLeap: sprigConfig.WindowSprig;
|
|
2785
|
+
rrwebRecord?: {
|
|
2786
|
+
addCustomEvent: (
|
|
2787
|
+
...args: ArgumentTypes<rrwebCustomEvent>
|
|
2788
|
+
) => PublicOf<ReturnType<rrwebCustomEvent>>;
|
|
2789
|
+
} & ((
|
|
2790
|
+
arg: Omit<ArgumentType<rrwebRecord>, "hooks">,
|
|
2791
|
+
) => PublicOf<ReturnType<rrwebRecord>>);
|
|
2792
|
+
sprigAPI?: object;
|
|
2793
|
+
}
|
|
2794
|
+
|
|
2795
|
+
type WindowSprig = sprigConfig.WindowSprig;
|
|
2796
|
+
type SprigAttributes = Record<string, boolean | number | string>;
|
|
2797
|
+
type SprigListener = Listener<unknown[]>;
|
|
2798
|
+
type SprigMetadata = {
|
|
2799
|
+
url?: string;
|
|
2800
|
+
trackPageView?: boolean;
|
|
2801
|
+
optimizelyExperiments?: object;
|
|
2802
|
+
launchDarklyFlags?: object;
|
|
2803
|
+
eventProperties?: SprigProperties;
|
|
2804
|
+
};
|
|
2805
|
+
type SprigProperties = Record<string, unknown>;
|
|
2806
|
+
type SprigAPIActions = sprigConfig.SprigAPIActions;
|
|
2807
|
+
type TrackPayload = sprigConfig.TrackPayload;
|
|
2808
|
+
|
|
2809
|
+
// common types
|
|
2810
|
+
/** @example "123e4567-e89b-12d3-a456-426614174000" */
|
|
2811
|
+
type UUID = string;
|
|
2812
|
+
}
|
|
2813
|
+
|
|
2814
|
+
declare class SprigAPI {
|
|
2815
|
+
/**
|
|
2816
|
+
* Include external events emitted from Sprig
|
|
2817
|
+
*/
|
|
2818
|
+
UPDATES: {
|
|
2819
|
+
FEEDBACK_BUTTON_LOADED: SprigEvent;
|
|
2820
|
+
SDK_READY: SprigEvent;
|
|
2821
|
+
SURVEY_APPEARED: SprigEvent;
|
|
2822
|
+
SURVEY_CLOSED: SprigEvent;
|
|
2823
|
+
SURVEY_DIMENSIONS: SprigEvent;
|
|
2824
|
+
SURVEY_FADING_OUT: SprigEvent;
|
|
2825
|
+
SURVEY_HEIGHT: SprigEvent;
|
|
2826
|
+
SURVEY_WIDTH: SprigEvent; /**
|
|
2827
|
+
* Track an event to show survey if eligible
|
|
2828
|
+
* @param eventName name of event to track
|
|
2829
|
+
*/
|
|
2830
|
+
SURVEY_PRESENTED: SprigEvent;
|
|
2831
|
+
SURVEY_LIFE_CYCLE: SprigEvent;
|
|
2832
|
+
SURVEY_WILL_CLOSE: SprigEvent;
|
|
2833
|
+
SURVEY_WILL_PRESENT: SprigEvent;
|
|
2834
|
+
QUESTION_ANSWERED: SprigEvent;
|
|
2835
|
+
REPLAY_CAPTURE: SprigEvent;
|
|
2836
|
+
CLOSE_SURVEY_ON_OVERLAY_CLICK: SprigEvent;
|
|
2837
|
+
VISITOR_ID_UPDATED: SprigEvent;
|
|
2838
|
+
DATA: {
|
|
2839
|
+
DISMISS_REASONS: {
|
|
2840
|
+
API: DismissReason;
|
|
2841
|
+
CLOSED: DismissReason;
|
|
2842
|
+
COMPLETE: DismissReason;
|
|
2843
|
+
PAGE_CHANGE: DismissReason;
|
|
2844
|
+
OVERRIDE: DismissReason;
|
|
2845
|
+
};
|
|
2846
|
+
SURVEY_ID: string;
|
|
2847
|
+
};
|
|
2848
|
+
};
|
|
2849
|
+
/**
|
|
2850
|
+
* Triggers displaying specified survey. Does submit answers!
|
|
2851
|
+
*/
|
|
2852
|
+
displaySurvey(surveyId: number): void;
|
|
2853
|
+
/**
|
|
2854
|
+
* Pauses api interactions
|
|
2855
|
+
*/
|
|
2856
|
+
mute(): void;
|
|
2857
|
+
/**
|
|
2858
|
+
* Restart api interactions
|
|
2859
|
+
*/
|
|
2860
|
+
unmute(): void;
|
|
2861
|
+
/**
|
|
2862
|
+
* Manually dismiss an opened survey
|
|
2863
|
+
*/
|
|
2864
|
+
dismissActiveSurvey(): void;
|
|
2865
|
+
/**
|
|
2866
|
+
* Set an arbitrary attribute on the visitor
|
|
2867
|
+
*/
|
|
2868
|
+
setAttribute(attribute: string, value: string | number | boolean): void;
|
|
2869
|
+
/**
|
|
2870
|
+
* Set attributes on visitor
|
|
2871
|
+
*/
|
|
2872
|
+
setAttributes(attributes: SprigAttributes): void;
|
|
2873
|
+
/**
|
|
2874
|
+
* Set identifiers and attributes on visitor
|
|
2875
|
+
*/
|
|
2876
|
+
identifyAndSetAttributes(payload: {
|
|
2877
|
+
anonymousID?: string;
|
|
2878
|
+
attributes: SprigAttributes;
|
|
2879
|
+
userID?: string;
|
|
2880
|
+
}): void;
|
|
2881
|
+
/**
|
|
2882
|
+
* Remove attributes on visitor
|
|
2883
|
+
*/
|
|
2884
|
+
removeAttributes(attributes: SprigAttributes): void;
|
|
2885
|
+
/**
|
|
2886
|
+
* Add a listener for an event defined in ulEvents
|
|
2887
|
+
*/
|
|
2888
|
+
addListener(event: SprigEvent, listener: SprigListener): void;
|
|
2889
|
+
/**
|
|
2890
|
+
* Remove a listener for an event defined in ulEvents
|
|
2891
|
+
*/
|
|
2892
|
+
removeListener(event: SprigEvent, listener: SprigListener): void;
|
|
2893
|
+
/**
|
|
2894
|
+
* Remove all listeners set on Sprig
|
|
2895
|
+
*/
|
|
2896
|
+
removeAllListeners(): void;
|
|
2897
|
+
/**
|
|
2898
|
+
* Attach an email address to visitor
|
|
2899
|
+
*/
|
|
2900
|
+
setEmail(email: string): void;
|
|
2901
|
+
/**
|
|
2902
|
+
* Attach a user id to the visitor
|
|
2903
|
+
*/
|
|
2904
|
+
setUserId(userId: string): void;
|
|
2905
|
+
/**
|
|
2906
|
+
* Set a partner anonymous id for future requests.
|
|
2907
|
+
*/
|
|
2908
|
+
setPartnerAnonymousId(partnerAnonymousId: string): void;
|
|
2909
|
+
/**
|
|
2910
|
+
* Track an event to show survey if eligible
|
|
2911
|
+
* @param eventName name of event to track
|
|
2912
|
+
*/
|
|
2913
|
+
track(eventName: string, properties?: Record<string, unknown>, metadata?: SprigMetadata): void;
|
|
2914
|
+
/**
|
|
2915
|
+
* Optionally set userId and/or anonymousId, track an event to show survey if eligible
|
|
2916
|
+
*/
|
|
2917
|
+
identifyAndTrack(payload: {
|
|
2918
|
+
anonymousId?: string;
|
|
2919
|
+
eventName: string;
|
|
2920
|
+
metadata?: SprigMetadata;
|
|
2921
|
+
userId?: string;
|
|
2922
|
+
}): void;
|
|
2923
|
+
/**
|
|
2924
|
+
* Tracks a page view with the provided URL and additional event properties.
|
|
2925
|
+
*/
|
|
2926
|
+
trackPageView(url: string, props?: SprigProperties, showSurveyCallback?: (surveyId?: number) => Promise<boolean>): void;
|
|
2927
|
+
/**
|
|
2928
|
+
* Apply a css string representing the customized styles
|
|
2929
|
+
*/
|
|
2930
|
+
applyStyles(styleString: string): void;
|
|
2931
|
+
/**
|
|
2932
|
+
Set viewport dimensions, in int pixels. necessary if Sprig is installed in an iframe/component defaulting to 0 width and height.
|
|
2933
|
+
*/
|
|
2934
|
+
setWindowDimensions(width: number | string, height: number | string): void;
|
|
2935
|
+
/**
|
|
2936
|
+
* Logs out current visitor and associated ids
|
|
2937
|
+
*/
|
|
2938
|
+
logoutUser(): void;
|
|
2939
|
+
/**
|
|
2940
|
+
* Clears Sprig from window
|
|
2941
|
+
*/
|
|
2942
|
+
teardown(): void;
|
|
2943
|
+
}
|
|
2944
|
+
type NpmConfig = {
|
|
2945
|
+
envId?: string;
|
|
2946
|
+
environmentId?: string;
|
|
2947
|
+
path?: string;
|
|
2948
|
+
} & Partial<WindowSprig$1>;
|
|
2949
|
+
declare const sprig: {
|
|
2950
|
+
/**
|
|
2951
|
+
* Sets up the sprig api and load the sprig sdk on document load
|
|
2952
|
+
* @param config
|
|
2953
|
+
* @returns an instance of the sprig api
|
|
2954
|
+
*/
|
|
2955
|
+
configure: (config: NpmConfig) => sprigConfig.WindowSprig;
|
|
2956
|
+
};
|
|
2957
|
+
type WindowSprig$1 = typeof window.Sprig;
|
|
2958
|
+
|
|
2959
|
+
declare const _default: {
|
|
2960
|
+
sprig: {
|
|
2961
|
+
/**
|
|
2962
|
+
* Sets up the sprig api and load the sprig sdk on document load
|
|
2963
|
+
* @param config
|
|
2964
|
+
* @returns an instance of the sprig api
|
|
2965
|
+
*/
|
|
2966
|
+
configure: (config: NpmConfig) => sprigConfig.WindowSprig;
|
|
2967
|
+
};
|
|
2968
|
+
SprigAPI: typeof SprigAPI;
|
|
2969
|
+
configure: (config: NpmConfig) => sprigConfig.WindowSprig;
|
|
2970
|
+
};
|
|
2971
|
+
|
|
2972
|
+
export { DismissReason, SprigAPI, SprigEvent, type WindowSprig$1 as WindowSprig, _default as default, sprig };
|