@unissey-web/web-components 5.4.0 → 5.5.0-rc.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/button.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { i, d as _taggedTemplateLiteral, _ as _inherits, a as _createClass, x, s, b as _classCallCheck, c as _callSuper } from './lit-element-c42ac26e.js';
2
- import { e as buttonsVars, d as defaultVars } from './variables-0db5ef1b.js';
2
+ import { e as buttonsVars, d as defaultVars } from './variables-513bd26a.js';
3
3
 
4
4
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
5
5
  var Button = /*#__PURE__*/function (_LitElement) {
@@ -38,7 +38,7 @@ Button.properties = {
38
38
  type: Boolean
39
39
  }
40
40
  };
41
- Button.styles = i(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n @media screen and (max-width: 576px) {\n .btn {\n width: ", ";\n }\n }\n\n :host {\n }\n\n .btn {\n display: inline-block;\n align-items: center;\n vertical-align: top;\n padding: ", ";\n border: ", ";\n border-color: ", ";\n border-radius: ", ";\n background-color: ", ";\n color: ", ";\n cursor: pointer;\n font-size: ", ";\n text-transform: ", ";\n }\n\n .btn:hover {\n background-color: ", ";\n }\n\n .btn:disabled {\n cursor: default;\n background-color: ", ";\n border-color: ", ";\n }\n\n .btn-outlined {\n color: ", ";\n background-color: ", ";\n border: ", ";\n }\n\n .btn-outlined:hover {\n background-color: ", ";\n }\n\n .box {\n display: block;\n text-align: center;\n }\n\n .label {\n margin: 0 10px;\n }\n\n .item-center {\n display: inline-block;\n vertical-align: middle;\n }\n "])), buttonsVars.smWidth, buttonsVars.padding, buttonsVars.border, defaultVars.colors.primary, buttonsVars.borderRadius, defaultVars.colors.primary, defaultVars.colors.white, buttonsVars.fontSize, buttonsVars.textTransform, defaultVars.colors.primaryLighter, buttonsVars.btnDisabledBgColor, buttonsVars.btnDisabledBgColor, defaultVars.colors.primary, defaultVars.colors.white, buttonsVars.outlinedBorders, buttonsVars.btnDisabledBgColor);
41
+ Button.styles = i(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n @media screen and (max-width: 576px) {\n .btn {\n width: ", ";\n }\n }\n\n :host {\n }\n\n .btn {\n display: inline-block;\n align-items: center;\n vertical-align: top;\n padding: ", ";\n border: ", ";\n border-color: ", ";\n border-radius: ", ";\n background-color: ", ";\n color: ", ";\n cursor: pointer;\n font-size: ", ";\n text-transform: ", ";\n }\n\n .btn:hover {\n background-color: ", ";\n }\n\n .btn:focus {\n outline: ", ";\n }\n\n .btn:disabled {\n cursor: default;\n background-color: ", ";\n border-color: ", ";\n }\n\n .btn-outlined {\n color: ", ";\n background-color: ", ";\n border: ", ";\n }\n\n .btn-outlined:hover {\n background-color: ", ";\n }\n\n .box {\n display: block;\n text-align: center;\n }\n\n .label {\n margin: 0 10px;\n }\n\n .item-center {\n display: inline-block;\n vertical-align: middle;\n }\n "])), buttonsVars.smWidth, buttonsVars.padding, buttonsVars.border, defaultVars.colors.primary, buttonsVars.borderRadius, defaultVars.colors.primary, defaultVars.colors.white, buttonsVars.fontSize, buttonsVars.textTransform, defaultVars.colors.primaryLighter, buttonsVars.focusOutline, buttonsVars.btnDisabledBgColor, buttonsVars.btnDisabledBgColor, defaultVars.colors.primary, defaultVars.colors.white, buttonsVars.outlinedBorders, buttonsVars.btnDisabledBgColor);
42
42
  customElements.define("uni-button", Button);
43
43
 
44
44
  export { Button };
@@ -1,5 +1,5 @@
1
1
  import { i, d as _taggedTemplateLiteral, _ as _inherits, a as _createClass, x, s, b as _classCallCheck, c as _callSuper } from './lit-element-c42ac26e.js';
2
- import { d as defaultVars, c as directionCardsVars } from './variables-0db5ef1b.js';
2
+ import { d as defaultVars, c as directionCardsVars } from './variables-513bd26a.js';
3
3
 
4
4
  var _templateObject$1;
5
5
  var directionsStyle = i(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n .layout {\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n\n .item {\n margin-top: 15px;\n width: 100%;\n }\n"])));
@@ -49,10 +49,18 @@ var videoRecorder = {
49
49
  },
50
50
  rotationWhileCapturingErrorMessage: "Please don't rotate the device during acquisition.",
51
51
  activeChallengeMessages: {
52
- rotateLeft: 'Turn head to the <strong font-size: 18px">left</strong>',
53
- rotateRight: 'Turn head to the <strong font-size: 18px">right</strong>',
54
- rotateUp: 'Turn head <strong font-size: 18px">up</strong>',
55
- rotateDown: 'Turn head <strong font-size: 18px">down</strong>'
52
+ rotateLeft: 'Turn head to the <strong style="font-size: 18px">left</strong>',
53
+ rotateRight: 'Turn head to the <strong style="font-size: 18px">right</strong>',
54
+ rotateUp: 'Turn head <strong style="font-size: 18px">up</strong>',
55
+ rotateDown: 'Turn head <strong style="font-size: 18px">down</strong>'
56
+ },
57
+ accessibility: {
58
+ flipCamera: "Switch camera",
59
+ turnLeft: "Turn left",
60
+ turnRight: "Turn right",
61
+ turnUp: "Turn up",
62
+ turnDown: "Turn down",
63
+ videoFeed: "Camera feed for identity verification"
56
64
  }
57
65
  };
58
66
  var pictureRecorder = {
@@ -1,7 +1,7 @@
1
- import { i, d as _taggedTemplateLiteral, _ as _inherits, a as _createClass, x, s, b as _classCallCheck, c as _callSuper, e as _objectSpread2, f as _asyncToGenerator, g as _regenerator } from './lit-element-c42ac26e.js';
2
- import { E as EN } from './en-57f1198e.js';
3
- import { f as fileUploadVars } from './variables-0db5ef1b.js';
4
- import { c as commonjsGlobal } from './_commonjsHelpers-02146103.js';
1
+ import { i, d as _taggedTemplateLiteral, _ as _inherits, a as _createClass, h as _superPropGet, x, s, b as _classCallCheck, c as _callSuper, e as _objectSpread2, f as _asyncToGenerator, g as _regenerator } from './lit-element-c42ac26e.js';
2
+ import { E as EN } from './en-27ff3a75.js';
3
+ import { f as fileUploadVars } from './variables-513bd26a.js';
4
+ import { c as commonjsGlobal, K as KEY_ENTER, a as KEY_SPACE } from './utils-474188c7.js';
5
5
 
6
6
  var heic2any$1 = {exports: {}};
7
7
 
@@ -296,11 +296,23 @@ var FileUpload = /*#__PURE__*/function (_LitElement) {
296
296
  _this.strings = _objectSpread2({}, defaultStrings);
297
297
  _this.error = "";
298
298
  _this.inited = false;
299
+ _this.handleKeyboardSelection = function (e) {
300
+ if (e.code === KEY_ENTER || e.code === KEY_SPACE) {
301
+ _this.handleClick();
302
+ }
303
+ };
299
304
  _this.handleFileSelection = _this.handleFileSelection.bind(_this);
300
305
  return _this;
301
306
  }
302
307
  _inherits(FileUpload, _LitElement);
303
308
  return _createClass(FileUpload, [{
309
+ key: "connectedCallback",
310
+ value: function connectedCallback() {
311
+ _superPropGet(FileUpload, "connectedCallback", this, 3)([]);
312
+ this.setAttribute("tabindex", "0");
313
+ this.addEventListener("keydown", this.handleKeyboardSelection);
314
+ }
315
+ }, {
304
316
  key: "validateFile",
305
317
  value: function validateFile(type, size) {
306
318
  var error = "";
@@ -408,6 +420,12 @@ var FileUpload = /*#__PURE__*/function (_LitElement) {
408
420
  value: function updated() {
409
421
  if (!this.inited) this.init();
410
422
  }
423
+ }, {
424
+ key: "disconnectedCallback",
425
+ value: function disconnectedCallback() {
426
+ _superPropGet(FileUpload, "disconnectedCallback", this, 3)([]);
427
+ this.removeEventListener("keydown", this.handleKeyboardSelection);
428
+ }
411
429
  }, {
412
430
  key: "render",
413
431
  value: function render() {
@@ -435,7 +453,7 @@ FileUpload.properties = {
435
453
  state: true
436
454
  }
437
455
  };
438
- FileUpload.styles = i(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n #drop-zone {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: ", ";\n text-align: center;\n\n width: ", ";\n height: ", ";\n border: ", ";\n background-color: ", ";\n\n cursor: pointer;\n }\n\n .text {\n color: ", ";\n font-size: ", ";\n }\n\n .error {\n display: inline-block;\n margin-top: 40px;\n color: ", ";\n font-size: ", ";\n }\n "])), fileUploadVars.padding, fileUploadVars.width, fileUploadVars.height, fileUploadVars.border, fileUploadVars.backgroundColor, fileUploadVars.textColor, fileUploadVars.textFontSize, fileUploadVars.errorTextColor, fileUploadVars.errorTextFontSize);
456
+ FileUpload.styles = i(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n #drop-zone {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: ", ";\n text-align: center;\n\n width: ", ";\n height: ", ";\n border: ", ";\n background-color: ", ";\n\n cursor: pointer;\n }\n\n :host(:focus) #drop-zone {\n outline: ", ";\n }\n\n .text {\n color: ", ";\n font-size: ", ";\n }\n\n .error {\n display: inline-block;\n margin-top: 40px;\n color: ", ";\n font-size: ", ";\n }\n "])), fileUploadVars.padding, fileUploadVars.width, fileUploadVars.height, fileUploadVars.border, fileUploadVars.backgroundColor, fileUploadVars.focusOutline, fileUploadVars.textColor, fileUploadVars.textFontSize, fileUploadVars.errorTextColor, fileUploadVars.errorTextFontSize);
439
457
  customElements.define("uni-file-upload", FileUpload);
440
458
 
441
459
  export { FileUpload };
@@ -2,12 +2,12 @@ import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b
2
2
  import { selfieCaptureStrings } from './selfie-capture.js';
3
3
  import { referenceCaptureStrings } from './reference-capture.js';
4
4
  import './button.js';
5
- import './en-57f1198e.js';
6
- import './video-recorder-04ecd01a.js';
7
- import './_commonjsHelpers-02146103.js';
8
- import './variables-0db5ef1b.js';
5
+ import './en-27ff3a75.js';
6
+ import './video-recorder-31ce7f04.js';
7
+ import './utils-474188c7.js';
8
+ import './variables-513bd26a.js';
9
9
  import './video-record-directions.js';
10
- import './direction-card-fd8d8d8b.js';
10
+ import './direction-card-88c5d34f.js';
11
11
  import './image-capture-directions.js';
12
12
  import './file-upload.js';
13
13
  import './picture-recorder.js';
@@ -1,7 +1,7 @@
1
1
  import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, i, e as _objectSpread2 } from './lit-element-c42ac26e.js';
2
- import { d as directionsStyle } from './direction-card-fd8d8d8b.js';
3
- import { d as defaultVars } from './variables-0db5ef1b.js';
4
- import { E as EN } from './en-57f1198e.js';
2
+ import { d as directionsStyle } from './direction-card-88c5d34f.js';
3
+ import { d as defaultVars } from './variables-513bd26a.js';
4
+ import { E as EN } from './en-27ff3a75.js';
5
5
 
6
6
  var _templateObject$3;
7
7
  var FaceCardPicto = /*#__PURE__*/function (_LitElement) {
package/dist/index.d.ts CHANGED
@@ -125,6 +125,14 @@ declare const EN: {
125
125
  rotateUp: string;
126
126
  rotateDown: string;
127
127
  };
128
+ accessibility: {
129
+ flipCamera: string;
130
+ turnLeft: string;
131
+ turnRight: string;
132
+ turnUp: string;
133
+ turnDown: string;
134
+ videoFeed: string;
135
+ };
128
136
  };
129
137
  pictureRecorder: {
130
138
  capture: string;
@@ -215,6 +223,14 @@ declare const EN: {
215
223
  rotateUp: string;
216
224
  rotateDown: string;
217
225
  };
226
+ accessibility: {
227
+ flipCamera: string;
228
+ turnLeft: string;
229
+ turnRight: string;
230
+ turnUp: string;
231
+ turnDown: string;
232
+ videoFeed: string;
233
+ };
218
234
  };
219
235
  };
220
236
  referenceCapture: {
@@ -276,6 +292,14 @@ declare const EN: {
276
292
  rotateUp: string;
277
293
  rotateDown: string;
278
294
  };
295
+ accessibility: {
296
+ flipCamera: string;
297
+ turnLeft: string;
298
+ turnRight: string;
299
+ turnUp: string;
300
+ turnDown: string;
301
+ videoFeed: string;
302
+ };
279
303
  };
280
304
  pictureRecorder: {
281
305
  capture: string;
@@ -289,6 +313,25 @@ declare const EN: {
289
313
  };
290
314
  type I18n = typeof EN;
291
315
 
316
+ type SdkNotification = {
317
+ message: string;
318
+ type: "info" | "error";
319
+ };
320
+ type NotificationCallback = (notification: SdkNotification) => void;
321
+ declare class NotificationThrottler {
322
+ private nextNotification;
323
+ private isProcessing;
324
+ private readRate;
325
+ private readonly notificationCallback;
326
+ private readonly targetElement;
327
+ constructor(notificationCallback: NotificationCallback, readRate: number | undefined, targetElement: HTMLElement);
328
+ setReadRate(rate: number): void;
329
+ private execAndDelay;
330
+ private processCycleEnd;
331
+ getIsProcessing(): boolean;
332
+ sendNotification(notification: SdkNotification): void;
333
+ }
334
+
292
335
  declare class Recorder extends LitElement {
293
336
  session: UnisseySession | null;
294
337
  sessionPromise: Promise<void> | null;
@@ -341,6 +384,14 @@ declare class Recorder extends LitElement {
341
384
  rotateUp: string;
342
385
  rotateDown: string;
343
386
  };
387
+ accessibility: {
388
+ flipCamera: string;
389
+ turnLeft: string;
390
+ turnRight: string;
391
+ turnUp: string;
392
+ turnDown: string;
393
+ videoFeed: string;
394
+ };
344
395
  };
345
396
  strings: Partial<typeof EN.videoRecorder>;
346
397
  captureButtonPicto: lit_html.TemplateResult<1>;
@@ -350,6 +401,7 @@ declare class Recorder extends LitElement {
350
401
  disconnected: boolean;
351
402
  initSessionInprogress: boolean;
352
403
  hints: HintType;
404
+ internalHints: HintType | undefined;
353
405
  error: string;
354
406
  sdkJsStatus: StatusEvent;
355
407
  willRetryCapture: boolean;
@@ -447,6 +499,7 @@ declare class Recorder extends LitElement {
447
499
  state: boolean;
448
500
  };
449
501
  };
502
+ notificationThrotler: NotificationThrottler;
450
503
  constructor();
451
504
  retryCapture(): Promise<void>;
452
505
  capture(): Promise<void>;
@@ -552,6 +605,8 @@ declare class FileUpload extends LitElement {
552
605
  error: string;
553
606
  inited: boolean;
554
607
  constructor();
608
+ connectedCallback(): void;
609
+ handleKeyboardSelection: (e: KeyboardEvent) => void;
555
610
  static properties: {
556
611
  supportedTypes: {
557
612
  attribute: string;
@@ -580,6 +635,7 @@ declare class FileUpload extends LitElement {
580
635
  handleClick(): void;
581
636
  init(): void;
582
637
  updated(): void;
638
+ disconnectedCallback(): void;
583
639
  static styles: lit.CSSResult;
584
640
  render(): lit_html.TemplateResult<1>;
585
641
  }
@@ -698,6 +754,14 @@ declare const selfieCaptureStrings: {
698
754
  rotateUp: string;
699
755
  rotateDown: string;
700
756
  };
757
+ accessibility: {
758
+ flipCamera: string;
759
+ turnLeft: string;
760
+ turnRight: string;
761
+ turnUp: string;
762
+ turnDown: string;
763
+ videoFeed: string;
764
+ };
701
765
  };
702
766
  };
703
767
  type RecorderOptions$1 = Partial<{
@@ -863,6 +927,14 @@ declare const referenceCaptureStrings: {
863
927
  rotateUp: string;
864
928
  rotateDown: string;
865
929
  };
930
+ accessibility: {
931
+ flipCamera: string;
932
+ turnLeft: string;
933
+ turnRight: string;
934
+ turnUp: string;
935
+ turnDown: string;
936
+ videoFeed: string;
937
+ };
866
938
  };
867
939
  pictureRecorder: {
868
940
  capture: string;
@@ -1017,6 +1089,14 @@ declare const fullCaptureStrings: {
1017
1089
  rotateUp: string;
1018
1090
  rotateDown: string;
1019
1091
  };
1092
+ accessibility: {
1093
+ flipCamera: string;
1094
+ turnLeft: string;
1095
+ turnRight: string;
1096
+ turnUp: string;
1097
+ turnDown: string;
1098
+ videoFeed: string;
1099
+ };
1020
1100
  };
1021
1101
  pictureRecorder: {
1022
1102
  capture: string;
@@ -1081,6 +1161,14 @@ declare const fullCaptureStrings: {
1081
1161
  rotateUp: string;
1082
1162
  rotateDown: string;
1083
1163
  };
1164
+ accessibility: {
1165
+ flipCamera: string;
1166
+ turnLeft: string;
1167
+ turnRight: string;
1168
+ turnUp: string;
1169
+ turnDown: string;
1170
+ videoFeed: string;
1171
+ };
1084
1172
  };
1085
1173
  };
1086
1174
  };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { Button } from './button.js';
2
- import { R as Recorder } from './video-recorder-04ecd01a.js';
3
- export { A as Animation, C as CameraVideoOutlinedIcon, O as OverlayHints } from './video-recorder-04ecd01a.js';
2
+ import { R as Recorder } from './video-recorder-31ce7f04.js';
3
+ export { A as Animation, C as CameraVideoOutlinedIcon, O as OverlayHints } from './video-recorder-31ce7f04.js';
4
4
  export { VideoRecordDirections } from './video-record-directions.js';
5
5
  export { PictureRecorder } from './picture-recorder.js';
6
6
  export { PictureEditor } from './picture-editor.js';
@@ -11,10 +11,10 @@ export { RetryResult } from './retry-result.js';
11
11
  export { SelfieCapture } from './selfie-capture.js';
12
12
  export { ReferenceCapture } from './reference-capture.js';
13
13
  export { FullCapture } from './full-capture.js';
14
- export { D as DirectionCard } from './direction-card-fd8d8d8b.js';
15
- export { E as EN } from './en-57f1198e.js';
16
- import './variables-0db5ef1b.js';
17
- import './_commonjsHelpers-02146103.js';
14
+ export { D as DirectionCard } from './direction-card-88c5d34f.js';
15
+ export { E as EN } from './en-27ff3a75.js';
16
+ import './variables-513bd26a.js';
17
+ import './utils-474188c7.js';
18
18
 
19
19
  // @ts-ignore
20
20
 
@@ -60,10 +60,18 @@ var videoRecorder = {
60
60
  },
61
61
  rotationWhileCapturingErrorMessage: "Veuillez ne pas tourner l'appareil pendant l'acquisition.",
62
62
  activeChallengeMessages: {
63
- rotateLeft: 'Tournez la tête à <strong font-size: 18px">gauche</strong>',
64
- rotateRight: 'Tournez la tête à <strong font-size: 18px">droite</strong>',
65
- rotateUp: 'Pivotez la tête en <strong font-size: 18px">haut</strong>',
66
- rotateDown: 'Pivotez la tête en <strong font-size: 18px">bas</strong>'
63
+ rotateLeft: 'Tournez la tête à <strong style="font-size: 18px">gauche</strong>',
64
+ rotateRight: 'Tournez la tête à <strong style="font-size: 18px">droite</strong>',
65
+ rotateUp: 'Pivotez la tête en <strong style="font-size: 18px">haut</strong>',
66
+ rotateDown: 'Pivotez la tête en <strong style="font-size: 18px">bas</strong>'
67
+ },
68
+ accessibility: {
69
+ flipCamera: "Changer de caméra",
70
+ turnLeft: "Tourner à gauche",
71
+ turnRight: "Tourner à droite",
72
+ turnUp: "Tourner vers le haut",
73
+ turnDown: "Tourner vers le bas",
74
+ videoFeed: "Flux caméra pour la vérification d'identité"
67
75
  }
68
76
  };
69
77
  var pictureRecorder = {
@@ -1,5 +1,5 @@
1
1
  import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, i, e as _objectSpread2, f as _asyncToGenerator, g as _regenerator, h as _superPropGet } from './lit-element-c42ac26e.js';
2
- import { E as EN } from './en-57f1198e.js';
2
+ import { E as EN } from './en-27ff3a75.js';
3
3
 
4
4
  var _templateObject$2;
5
5
  var RotateLeftIcon = /*#__PURE__*/function (_LitElement) {
@@ -1,8 +1,8 @@
1
1
  import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, e as _objectSpread2 } from './lit-element-c42ac26e.js';
2
- import { R as Recorder, b as buildPacked } from './video-recorder-04ecd01a.js';
3
- import { E as EN } from './en-57f1198e.js';
4
- import './_commonjsHelpers-02146103.js';
5
- import './variables-0db5ef1b.js';
2
+ import { R as Recorder, b as buildPacked } from './video-recorder-31ce7f04.js';
3
+ import { E as EN } from './en-27ff3a75.js';
4
+ import './utils-474188c7.js';
5
+ import './variables-513bd26a.js';
6
6
  import './button.js';
7
7
 
8
8
  var _templateObject$1;
@@ -3,11 +3,11 @@ import './button.js';
3
3
  import './image-capture-directions.js';
4
4
  import './file-upload.js';
5
5
  import './picture-recorder.js';
6
- import { b as buildPacked } from './video-recorder-04ecd01a.js';
7
- import { E as EN } from './en-57f1198e.js';
8
- import { a as referenceCaptureVars } from './variables-0db5ef1b.js';
9
- import './direction-card-fd8d8d8b.js';
10
- import './_commonjsHelpers-02146103.js';
6
+ import { b as buildPacked } from './video-recorder-31ce7f04.js';
7
+ import { E as EN } from './en-27ff3a75.js';
8
+ import { a as referenceCaptureVars } from './variables-513bd26a.js';
9
+ import './direction-card-88c5d34f.js';
10
+ import './utils-474188c7.js';
11
11
 
12
12
  var _templateObject$1;
13
13
  var UploadIcon = /*#__PURE__*/function (_LitElement) {
@@ -1,7 +1,7 @@
1
1
  import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, i } from './lit-element-c42ac26e.js';
2
2
  import './button.js';
3
- import { d as defaultVars, r as retryResultVars } from './variables-0db5ef1b.js';
4
- import { E as EN } from './en-57f1198e.js';
3
+ import { d as defaultVars, r as retryResultVars } from './variables-513bd26a.js';
4
+ import { E as EN } from './en-27ff3a75.js';
5
5
 
6
6
  var _templateObject$3;
7
7
  var GenericHintIcon = /*#__PURE__*/function (_LitElement) {
@@ -1,11 +1,11 @@
1
1
  import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, i } from './lit-element-c42ac26e.js';
2
- import { E as EN } from './en-57f1198e.js';
3
- import { b as buildPacked } from './video-recorder-04ecd01a.js';
2
+ import { E as EN } from './en-27ff3a75.js';
3
+ import { b as buildPacked } from './video-recorder-31ce7f04.js';
4
4
  import './video-record-directions.js';
5
5
  import './button.js';
6
- import { s as selfieCaptureVars } from './variables-0db5ef1b.js';
7
- import './_commonjsHelpers-02146103.js';
8
- import './direction-card-fd8d8d8b.js';
6
+ import { s as selfieCaptureVars } from './variables-513bd26a.js';
7
+ import './utils-474188c7.js';
8
+ import './direction-card-88c5d34f.js';
9
9
 
10
10
  var _templateObject$1;
11
11
  var BackArrowIcon = /*#__PURE__*/function (_LitElement) {
@@ -0,0 +1,21 @@
1
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
2
+
3
+ function commonjsRequire (path) {
4
+ throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
5
+ }
6
+
7
+ var KEY_ENTER = "Enter";
8
+ var KEY_SPACE = "Space";
9
+
10
+ //add new isMobileDevice() function from sdk-js;
11
+ function isMobileDevice() {
12
+ var navigator = window.navigator;
13
+ var check = false;
14
+ (function (a) {
15
+ if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(a.substr(0, 4))) check = true;
16
+ // @ts-ignore ('window.opera' is not officially defined. Actually only on Opera.)
17
+ })(navigator.userAgent || navigator.vendor || window.opera);
18
+ return check;
19
+ }
20
+
21
+ export { KEY_ENTER as K, KEY_SPACE as a, commonjsRequire as b, commonjsGlobal as c, isMobileDevice as i };
@@ -1,6 +1,6 @@
1
1
  import { i, d as _taggedTemplateLiteral } from './lit-element-c42ac26e.js';
2
2
 
3
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0, _templateObject1, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55, _templateObject56, _templateObject57, _templateObject58, _templateObject59, _templateObject60, _templateObject61, _templateObject62, _templateObject63, _templateObject64, _templateObject65, _templateObject66, _templateObject67, _templateObject68, _templateObject69, _templateObject70, _templateObject71, _templateObject72, _templateObject73, _templateObject74, _templateObject75;
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0, _templateObject1, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55, _templateObject56, _templateObject57, _templateObject58, _templateObject59, _templateObject60, _templateObject61, _templateObject62, _templateObject63, _templateObject64, _templateObject65, _templateObject66, _templateObject67, _templateObject68, _templateObject69, _templateObject70, _templateObject71, _templateObject72, _templateObject73, _templateObject74, _templateObject75, _templateObject76, _templateObject77;
4
4
  var recorderVars = {
5
5
  borderRadius: i(_templateObject || (_templateObject = _taggedTemplateLiteral(["var(--uni-recorder-border-radius, 10px)"]))),
6
6
  buttonsMargin: i(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["var(--uni-recorder-buttons-margin, 30px 0)"]))),
@@ -59,42 +59,44 @@ var fileUploadVars = {
59
59
  width: i(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["var(--uni-file-upload-width, 80%)"]))),
60
60
  height: i(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["var(--uni-file-upload-height, 80%)"]))),
61
61
  border: i(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["var(--uni-file-upload-border, dashed 2px #eee)"]))),
62
- backgroundColor: i(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["var(--uni-file-upload-bg-color, #fafafa)"]))),
63
- textColor: i(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["var(--uni-file-upload-txt-color, #ccc)"]))),
64
- textFontSize: i(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["var(--uni-file-upload-txt-font-size, 20px)"]))),
65
- errorTextColor: i(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["var(--uni-file-upload-err-txt-color, #333)"]))),
66
- errorTextFontSize: i(_templateObject50 || (_templateObject50 = _taggedTemplateLiteral(["var(--uni-file-upload-err-txt-font-size, 16px)"])))
62
+ focusOutline: i(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["var(--uni-file-upload-focus-outline, 2px solid #3b54f0)"]))),
63
+ backgroundColor: i(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["var(--uni-file-upload-bg-color, #fafafa)"]))),
64
+ textColor: i(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["var(--uni-file-upload-txt-color, #ccc)"]))),
65
+ textFontSize: i(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["var(--uni-file-upload-txt-font-size, 20px)"]))),
66
+ errorTextColor: i(_templateObject50 || (_templateObject50 = _taggedTemplateLiteral(["var(--uni-file-upload-err-txt-color, #333)"]))),
67
+ errorTextFontSize: i(_templateObject51 || (_templateObject51 = _taggedTemplateLiteral(["var(--uni-file-upload-err-txt-font-size, 16px)"])))
67
68
  };
68
69
  var buttonsVars = {
69
- padding: i(_templateObject51 || (_templateObject51 = _taggedTemplateLiteral(["var(--uni-btn-padding, 8px 15px)"]))),
70
- border: i(_templateObject52 || (_templateObject52 = _taggedTemplateLiteral(["var(--uni-btn-border, solid 1px)"]))),
71
- borderRadius: i(_templateObject53 || (_templateObject53 = _taggedTemplateLiteral(["var(--uni-btn-border-radius, 7px)"]))),
72
- fontSize: i(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["var(--uni-btn-font-size, 14px)"]))),
73
- textTransform: i(_templateObject55 || (_templateObject55 = _taggedTemplateLiteral(["var(--uni-btn-text-transform, normal)"]))),
74
- outlinedBorders: i(_templateObject56 || (_templateObject56 = _taggedTemplateLiteral(["var(--uni-btn-border-outlined, solid 1px)"]))),
75
- btnLabelMargin: i(_templateObject57 || (_templateObject57 = _taggedTemplateLiteral(["var(--uni-btn-label-margin, 10px 0px)"]))),
76
- btnDisabledBgColor: i(_templateObject58 || (_templateObject58 = _taggedTemplateLiteral(["var(--uni-btn-disabled-bg-color, #eee)"]))),
77
- smWidth: i(_templateObject59 || (_templateObject59 = _taggedTemplateLiteral(["var(--uni-btn-sm-width, 250px)"])))
70
+ padding: i(_templateObject52 || (_templateObject52 = _taggedTemplateLiteral(["var(--uni-btn-padding, 8px 15px)"]))),
71
+ border: i(_templateObject53 || (_templateObject53 = _taggedTemplateLiteral(["var(--uni-btn-border, solid 1px)"]))),
72
+ borderRadius: i(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["var(--uni-btn-border-radius, 7px)"]))),
73
+ fontSize: i(_templateObject55 || (_templateObject55 = _taggedTemplateLiteral(["var(--uni-btn-font-size, 14px)"]))),
74
+ focusOutline: i(_templateObject56 || (_templateObject56 = _taggedTemplateLiteral(["var(--uni-btn-focus-outline, 3px solid #3b54f0)"]))),
75
+ textTransform: i(_templateObject57 || (_templateObject57 = _taggedTemplateLiteral(["var(--uni-btn-text-transform, normal)"]))),
76
+ outlinedBorders: i(_templateObject58 || (_templateObject58 = _taggedTemplateLiteral(["var(--uni-btn-border-outlined, solid 1px)"]))),
77
+ btnLabelMargin: i(_templateObject59 || (_templateObject59 = _taggedTemplateLiteral(["var(--uni-btn-label-margin, 10px 0px)"]))),
78
+ btnDisabledBgColor: i(_templateObject60 || (_templateObject60 = _taggedTemplateLiteral(["var(--uni-btn-disabled-bg-color, #eee)"]))),
79
+ smWidth: i(_templateObject61 || (_templateObject61 = _taggedTemplateLiteral(["var(--uni-btn-sm-width, 250px)"])))
78
80
  };
79
81
  var directionCardsVars = {
80
- padding: i(_templateObject60 || (_templateObject60 = _taggedTemplateLiteral(["var(--uni-card-padding, 8px 4%)"]))),
81
- margin: i(_templateObject61 || (_templateObject61 = _taggedTemplateLiteral(["var(--uni-card-margin, 0px)"]))),
82
- width: i(_templateObject62 || (_templateObject62 = _taggedTemplateLiteral(["var(--uni-card-width, 92%)"]))),
83
- radius: i(_templateObject63 || (_templateObject63 = _taggedTemplateLiteral(["var(--uni-card-border-radius, 20px)"]))),
84
- fontSize: i(_templateObject64 || (_templateObject64 = _taggedTemplateLiteral(["var(--uni-card-font-size, 16px)"]))),
85
- fontWeight: i(_templateObject65 || (_templateObject65 = _taggedTemplateLiteral(["var(--uni-card-font-weight, normal)"]))),
86
- textMarginLeft: i(_templateObject66 || (_templateObject66 = _taggedTemplateLiteral(["var(--uni-card-text-margin-left, 25px)"]))),
87
- iconHeight: i(_templateObject67 || (_templateObject67 = _taggedTemplateLiteral(["var(--uni-card-icon-height, 55px)"]))),
88
- iconWidth: i(_templateObject68 || (_templateObject68 = _taggedTemplateLiteral(["var(--uni-card-icon-width, auto)"]))),
89
- backgroundColor: i(_templateObject69 || (_templateObject69 = _taggedTemplateLiteral(["var(--uni-card-bg-color, #f2f5f8)"])))
82
+ padding: i(_templateObject62 || (_templateObject62 = _taggedTemplateLiteral(["var(--uni-card-padding, 8px 4%)"]))),
83
+ margin: i(_templateObject63 || (_templateObject63 = _taggedTemplateLiteral(["var(--uni-card-margin, 0px)"]))),
84
+ width: i(_templateObject64 || (_templateObject64 = _taggedTemplateLiteral(["var(--uni-card-width, 92%)"]))),
85
+ radius: i(_templateObject65 || (_templateObject65 = _taggedTemplateLiteral(["var(--uni-card-border-radius, 20px)"]))),
86
+ fontSize: i(_templateObject66 || (_templateObject66 = _taggedTemplateLiteral(["var(--uni-card-font-size, 16px)"]))),
87
+ fontWeight: i(_templateObject67 || (_templateObject67 = _taggedTemplateLiteral(["var(--uni-card-font-weight, normal)"]))),
88
+ textMarginLeft: i(_templateObject68 || (_templateObject68 = _taggedTemplateLiteral(["var(--uni-card-text-margin-left, 25px)"]))),
89
+ iconHeight: i(_templateObject69 || (_templateObject69 = _taggedTemplateLiteral(["var(--uni-card-icon-height, 55px)"]))),
90
+ iconWidth: i(_templateObject70 || (_templateObject70 = _taggedTemplateLiteral(["var(--uni-card-icon-width, auto)"]))),
91
+ backgroundColor: i(_templateObject71 || (_templateObject71 = _taggedTemplateLiteral(["var(--uni-card-bg-color, #f2f5f8)"])))
90
92
  };
91
93
  var retryResultVars = {
92
- retriesColor: i(_templateObject70 || (_templateObject70 = _taggedTemplateLiteral(["var(--uni-retry-result-retries-color, grey)"]))),
93
- fontSizeMd: i(_templateObject71 || (_templateObject71 = _taggedTemplateLiteral(["var(--uni-retry-result-font-size-md, 22px)"]))),
94
- lineHeightMd: i(_templateObject72 || (_templateObject72 = _taggedTemplateLiteral(["var(--uni-retry-result-line-height-md, 24px)"]))),
95
- fontSizeSm: i(_templateObject73 || (_templateObject73 = _taggedTemplateLiteral(["var(--uni-retry-result-font-size-sm, 16px)"]))),
96
- lineHeightSm: i(_templateObject74 || (_templateObject74 = _taggedTemplateLiteral(["var(--uni-retry-result-line-height-sm, 18px)"]))),
97
- iconWidth: i(_templateObject75 || (_templateObject75 = _taggedTemplateLiteral(["var(--uni-retry-result-icon-width, 150px)"])))
94
+ retriesColor: i(_templateObject72 || (_templateObject72 = _taggedTemplateLiteral(["var(--uni-retry-result-retries-color, grey)"]))),
95
+ fontSizeMd: i(_templateObject73 || (_templateObject73 = _taggedTemplateLiteral(["var(--uni-retry-result-font-size-md, 22px)"]))),
96
+ lineHeightMd: i(_templateObject74 || (_templateObject74 = _taggedTemplateLiteral(["var(--uni-retry-result-line-height-md, 24px)"]))),
97
+ fontSizeSm: i(_templateObject75 || (_templateObject75 = _taggedTemplateLiteral(["var(--uni-retry-result-font-size-sm, 16px)"]))),
98
+ lineHeightSm: i(_templateObject76 || (_templateObject76 = _taggedTemplateLiteral(["var(--uni-retry-result-line-height-sm, 18px)"]))),
99
+ iconWidth: i(_templateObject77 || (_templateObject77 = _taggedTemplateLiteral(["var(--uni-retry-result-icon-width, 150px)"])))
98
100
  };
99
101
 
100
102
  export { referenceCaptureVars as a, recorderVars as b, directionCardsVars as c, defaultVars as d, buttonsVars as e, fileUploadVars as f, retryResultVars as r, selfieCaptureVars as s };
@@ -1,7 +1,7 @@
1
1
  import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, e as _objectSpread2 } from './lit-element-c42ac26e.js';
2
- import { d as directionsStyle } from './direction-card-fd8d8d8b.js';
3
- import { d as defaultVars } from './variables-0db5ef1b.js';
4
- import { E as EN } from './en-57f1198e.js';
2
+ import { d as directionsStyle } from './direction-card-88c5d34f.js';
3
+ import { d as defaultVars } from './variables-513bd26a.js';
4
+ import { E as EN } from './en-27ff3a75.js';
5
5
 
6
6
  var _templateObject$4;
7
7
  var LightPicto = /*#__PURE__*/function (_LitElement) {
@@ -1,17 +1,17 @@
1
1
  import { i, d as _taggedTemplateLiteral, _ as _inherits, a as _createClass, x as x$2, s as s$1, b as _classCallCheck, c as _callSuper, e as _objectSpread2, j as _toConsumableArray, h as _superPropGet, f as _asyncToGenerator, g as _regenerator } from './lit-element-c42ac26e.js';
2
- import { a as commonjsRequire } from './_commonjsHelpers-02146103.js';
3
- import { b as recorderVars, d as defaultVars } from './variables-0db5ef1b.js';
4
- import { E as EN } from './en-57f1198e.js';
2
+ import { b as commonjsRequire, i as isMobileDevice } from './utils-474188c7.js';
3
+ import { b as recorderVars, d as defaultVars } from './variables-513bd26a.js';
4
+ import { E as EN } from './en-27ff3a75.js';
5
5
  import './button.js';
6
6
 
7
7
  var name = "@unissey-web/web-components";
8
- var version = "5.4.0";
8
+ var version = "5.5.0-rc.1";
9
9
  var description = "";
10
10
  var module = "./dist/index.js";
11
11
  var typings = "./dist/index.d.ts";
12
12
  var scripts = {
13
13
  dev: "start-storybook -p 6006 --ci --https --ssl-cert https/certificate.crt --ssl-key https/privateKey.key",
14
- "dev:server": "rimraf ./dev-server/dist && rollup --config rollup.dev.mjs",
14
+ "dev:server": "rimraf ./dev-server/dist && rollup --config rollup.dev.mjs --silent --watch",
15
15
  "build:base": "npm run build:types && npm run build:pkg",
16
16
  "build:types": "tsc",
17
17
  "build:pkg": "rimraf dist && rimraf dist-iife && rollup --config --silent",
@@ -72,7 +72,7 @@ var buildPacked = {exports: {}};
72
72
  }(buildPacked, buildPacked.exports));
73
73
 
74
74
  var _templateObject$g;
75
- var cameraStyle = i(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral(["\n .container {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .wrapper {\n position: relative;\n top: 0;\n left: 0;\n width: ", ";\n }\n\n .hints,\n .instructions,\n .errors,\n .flip-icon-container,\n .face-hints {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n .face-hints {\n width: 100%;\n height: 100%;\n z-index: 5;\n }\n\n .top-hints {\n margin-bottom: 20px;\n }\n\n .bottom-hints {\n margin-top: 20px;\n min-height: 18px;\n }\n\n .spinner {\n z-index: -1;\n width: 100%;\n height: 400px;\n }\n\n .flip-icon-container {\n z-index: 6;\n }\n\n .flip-icon {\n position: absolute;\n bottom: 5%;\n left: 5d%;\n }\n\n .hints {\n z-index: 3;\n }\n\n .instructions {\n z-index: 4;\n }\n\n .errors {\n display: none;\n justify-content: center;\n align-items: center;\n z-index: 3;\n\n border-radius: 10px;\n }\n\n .errors .message {\n display: inline-block;\n width: 70%;\n background-color: ", ";\n color: var(--uni-light-color, #fff);\n padding: 7px 15px;\n border-radius: 5px;\n text-align: center;\n }\n\n .item-center {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .buttons {\n text-align: center;\n width: 100%;\n\n margin: ", ";\n }\n\n .buttons-item {\n display: inline-block;\n padding: 7px;\n }\n\n .ac-arrow-container {\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n .ac-arrow-hint {\n position: absolute;\n bottom: -40%;\n transform: scale(0.65);\n width: 100%;\n height: 100%;\n object-fit: none;\n overflow: visible;\n display: block;\n }\n\n @media screen and (max-width: 576px) {\n .buttons-item {\n width: 95%;\n }\n\n .buttons {\n margin-top: 15px;\n }\n }\n"])), recorderVars.videoWidth, defaultVars.colors.error, recorderVars.buttonsMargin);
75
+ var cameraStyle = i(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral(["\n .container {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .wrapper {\n position: relative;\n top: 0;\n left: 0;\n width: ", ";\n }\n\n .hints,\n .instructions,\n .errors,\n .flip-icon-container,\n .face-hints {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n .face-hints {\n width: 100%;\n height: 100%;\n z-index: 5;\n }\n\n .top-hints {\n margin-bottom: 20px;\n }\n\n .bottom-hints {\n margin-top: 20px;\n min-height: 18px;\n }\n\n .spinner {\n z-index: -1;\n width: 100%;\n height: 400px;\n }\n\n .flip-icon-container {\n z-index: 6;\n }\n\n .flip-icon {\n position: absolute;\n bottom: 5%;\n left: 5%;\n min-width: 44px;\n min-height: 44px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n\n .hints {\n z-index: 3;\n }\n\n .instructions {\n z-index: 4;\n }\n\n .errors {\n display: none;\n justify-content: center;\n align-items: center;\n z-index: 3;\n\n border-radius: 10px;\n }\n\n .errors .message {\n display: inline-block;\n width: 70%;\n background-color: ", ";\n color: var(--uni-light-color, #fff);\n padding: 7px 15px;\n border-radius: 5px;\n text-align: center;\n }\n\n .item-center {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .buttons {\n text-align: center;\n width: 100%;\n\n margin: ", ";\n }\n\n .buttons-item {\n display: inline-block;\n padding: 7px;\n }\n\n .ac-arrow-container {\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n .ac-arrow-hint {\n position: absolute;\n bottom: -40%;\n transform: scale(0.65);\n width: 100%;\n height: 100%;\n object-fit: none;\n overflow: visible;\n display: block;\n }\n\n @media screen and (max-width: 576px) {\n .buttons-item {\n width: 95%;\n }\n\n .buttons {\n margin-top: 15px;\n }\n }\n"])), recorderVars.videoWidth, defaultVars.colors.error, recorderVars.buttonsMargin);
76
76
 
77
77
  var _templateObject$f;
78
78
  var fadeAnimation = i(_templateObject$f || (_templateObject$f = _taggedTemplateLiteral(["\n @keyframes fade {\n from {\n width: 25px;\n margin-left: 0%;\n margin-top: 0%;\n opacity: 1;\n }\n to {\n width: 30px;\n margin-left: -2%;\n margin-top: -2%;\n opacity: 0;\n }\n }\n\n .icon {\n width: 25px;\n animation-name: fade;\n animation-duration: 1s;\n animation-iteration-count: infinite;\n }\n"])));
@@ -439,17 +439,6 @@ var FlipCameraIcon = /*#__PURE__*/function (_LitElement) {
439
439
  }(s$1);
440
440
  customElements.define("uni-flip-camera-icon", FlipCameraIcon);
441
441
 
442
- //add new isMobileDevice() function from sdk-js;
443
- function isMobileDevice() {
444
- var navigator = window.navigator;
445
- var check = false;
446
- (function (a) {
447
- if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(a.substr(0, 4))) check = true;
448
- // @ts-ignore ('window.opera' is not officially defined. Actually only on Opera.)
449
- })(navigator.userAgent || navigator.vendor || window.opera);
450
- return check;
451
- }
452
-
453
442
  var TICK_MS = 50;
454
443
  var ProgressBarSequencer = /*#__PURE__*/function () {
455
444
  function ProgressBarSequencer(options) {
@@ -584,6 +573,80 @@ var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAYAAAA4qEECA
584
573
 
585
574
  var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAYAAAA4qEECAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAUGVYSWZNTQAqAAAACAACARIAAwAAAAEAAQAAh2kABAAAAAEAAAAmAAAAAAADoAEAAwAAAAEAAQAAoAIABAAAAAEAAABaoAMABAAAAAEAAABaAAAAAFuhpakAAAIwaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj45MDwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+MTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+OTA8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KGQ1LEQAACwxJREFUeAHtnUty20gShkn6uWvcYKAIP+SVOSdo6gSWTyAq7IkY98b0CSSdwPRm7JiZDlMnsH0C0ydoaiXJXohzgmEv/RL7/2EUowhmFgCiAFAWEQEByHplfZXISjwINRsrtnz8+LENldrn5+ftZrMZYL0/nU4DyMxqazzBwQR5xsjD/SOsIx7fuXNnZGese79ZtwLHx8edVqvVAZxfAasNfQJfOqHOIQbs6MqVK29v37499FXvMvXUAppwAWEb6w6U9gY2BcCY4LEe1gG9MtBnZ2fBly9feoDxtEK4GntCP/j+/fvw3r17Yy2TT3npoFcM8AI7AB8A+EHZwEsDveqAk8QBvA/gL8oCXgrok5OTHhTfQ2eW8b8TTIofUHaMSXKEzo+5j7WRhMDB/Pr1a4g8ASa8kJEKyjBKaSP7Mm1HLgURy4Dt+Vy8gsYkF6LDr9HRTh4lMSiMDt6h3NskzDz12HkZJmIA2tBnZxl9UHbXly7UyxvovFZs4N64cWOwsbExsSH53qcBoM5OTuiMz/dh3S986FMYNE/fz58/70MpRhNZlrewXvrCYZbMvvPEF0RPYeXdLHWjX33AfpYlrytPIdCxq3gDpekT0xYCfubzdExr0JUe676XEfgYum8V0X1p0FQUE897dCZ0dYguAv6O4dPQla+utKz9gH6FYC8FmqcfLOENGg8dgBg9HGxubvYdeVYmCcD3YTiMlFwLo5KHy9xHyQ06hkxLdoVPhUbf1dMy0zJaNyfJrbywW3kUpyKxJauQocTg+vXrfy/iz/Lo5DMvdabu6KMr0gjIgCzytJ3ZorOMNk69fdywOcijwKrmRX/TXEmuszYz6NPT0zNACTUwGOVnZfnjxycvp1K7/918kll/qXyaLL42eO7IN8IZsJXlOiCT60CDnNBCR4PdsiA72iw9iX1CWLfraKiNWwBpE2hUPBV0PKpPtcZoyXfv3j3U0i+6HH57wD5q/UBaDwGCyseUc4KmX8bkpo4YffLPaMkGjtnGln1gjpNbwN5PmxydoHmDCJWKEQYGoP+zTHxJcNIxLHsfbkQ7c3n3kKzURQWNEepipDpKyfG1a9fUEVbKXHjxzZs3e+jEWOoIWblciAiap4HrKonX/VlmWkmhiyxjn9l39GEi9YMuhDfZpDQRNNwCRy4UC8AvX8SLEakvy8jYdwDVzubg27dv4sS4ADqeAMXMUGx8mfyyNhCcHGGMQykdFt+TrHoBNCMJqQLK4tNGS75Uct6RVDosWvUc6DhE2ZEqwAgOLrPLSDIBiyFkb5NyHktWPQcaeTrMKC2OEZSyXwoZgGoXMgtWPQdaizTW1izbTXyGq1Ztl5qBhtvoICG0E619121DK9vl24VVa2yCT58+dQyRGWhYc9cI7S1n17w3ue3yP/s+fbUWgSAMfGD6PwMNwa9GmNgeJo7XhwkCsOp3CVF0CNBdI49Au9wGJsGhybzeygT4boqc0pi5jwg0TH9byshTYh3SSWTmZbw019wHckaeIgIN/3x/vujsaO02ZijcOw730WHJCDR8SXRAQWIZJY7XhwoBMBTDPMjbLNLi6wNK2ck62lDICOLYxU6EpICMWyAeCokN+JyRJF/LnASGSmqbrkOz6DVohZomhtH+T0m7T9DaRHikFFqLFQIArRln0IKLCKRykI8l+VrmJCAy44So+mgkTpxVrhMlAiJoZAzoOkSLxsNXrRCKrJecBHTQl/Hha054C9kdV9ER6IUCa4F/AnQdpS7ds+cB11IbWaLyqvUqDfQ/j1+Gj09evb/6+eb/uT7++Or5EjxKKfLo5GXf6PWP01dvqGspDVmVErQYXeCReaHGvzdbAGvdQzmf9h6dvnS+NmXpVdruo+N/DZo/fo8etYHoavtbs+FFL+k1g7gjExV0kZ72zl4H08b5drKO5rTRrRN2BPnHFxWSqnWoc1KY95i/4lXKTHjBIlo03rjRCil1ZRPXBdsBOZviGXLhIYk4WLz4o0WPpDpwSoWSPIusv7E7mTYa2kPLRtWw0yC3WtM+dc7St5Q8oZTOi78Wblj/KSVCpt0DUbLPi3/ffNJDA+qDg6pgp0FuNhuDf9/57dm89ssdwXLbSskjXoJ7t2jT2O/3fuOrv7XBzgL5P3ef7Bp9i24dT6pGLbxALYJGo52iDbN8XbCrhsy+wqhEi458dPwUZcKMiSUoGuKZ+qqGXQfk+ElVYPpsb8mYk6H6NAVfLdi2CxTZrwp2HZDJBRGHZs1DpkegkekDD5ILfM6DpKzIcdmw64JMJnDBOwqbEeURaGyHPEgu8Dkdx9VOMnum47Jg1wmZrzuTlQQA/vkd5RFovj+G/QkFyQXuo5uUFT32DbtOyDGLjsKEv5AYMs1YNGdMMQzz7T6MQr5grwBk1W3AmiPI7HPTdJzv3wHqe3NsbyHfMiNjy33sp4Ga4oKCFzdSWzQOdEbzjZjkGwOfcbKkA6MN6PGHlGZzm1m0y33g6vGpVJEPWRbL1tqpGzL1AuSeot/MbTB9BpoHAKrdn9imw2eeMpY02HnbrMKSqVPMRDyjYAQHtt5zoPHL0D4SxUkRp8Fzu6DvfV+wq4LM/oPJvsYh+brzHGg+kHVZtf1TAa2BIvKisKuEnGLNC79gmwNNSC6rhj/aKwIyS9llYVcJmf2ANYuBA9NgzXNuI8rPP/bismqAdv6w3K6nyH5e2FVDhjXvo3+h1Ef45r702sEsvLML8WoQ33o+gyyw5fE+3UslH6dKC/2oTw2Q+UECspGWMdiIHyJccB0sTauG9S6Yf1xzwNPG96W5pHWaZVcNmX12uQxGGpI1s28iaCa4fliO5BAPIkuNQqgDFw121ZCpC7/Bik2IdWEBZP5McLCQEAtU0EyHU9/FRgz3YPFdRCGlT47UI4LNZ5B8kMx1en5Q9hUf27UX+mXA1C7cJjEru8jcvuij7RxpnyRD4z2MpHahY1d1YffTGMDoUj9FlwqadPg5Nsdo8qZK99atW4cXlqRDcVhyF375tZYFXDJ99jgT6DgKeY/G2o4GfzrLTrNksBjjU3QbGhNb7vTRJmMcWz9kxUaW3OL06Vfls5Ntl3Ec+2TXhB+FclnbzmTRpjI0zhiSlh0aWXLLU4lfEOPgJNMuwnF89vah645DXzVe1srkAs1K4vuvhB1olUKeWxFHXZUlZTEkKFP+Z43ZYz46h9VuYXfMY2WJrp4ukiuhP8bZ+gf6Eyp9onjMvpOBI4+YlNuiTS0ZR5/ZV9q60Q/+N4s9zDEd0zdlW6gfS4OmMjlg4zqjmn+VpEBaEMe6c7LbXkhcFIxwD+Ohdnm9mH1RUgi0qS4tzjb5uCVwbF4sc/qxfNGFFgwXwSu8LICpr5fJ3Qtodj6OOfew65okmTVa0IEhdg75JKKIpfyozf2XkQRfmwDgBxlchKksurHm62vC3kBTO56O8Hevc3Qm6pSBjoORL0unLqh3OyfcmT68d+HTALyCjrTEH3SS1kPrDo0sx5bhE33iEepghDPGwE34A9NkbE6YrPfq1ash8oQo00b+v0HUwZrpzEI+e/FqxXbFpYBmA7FF9dBx+sNVXyZQ8AW+199PDqYvxUsDbRQk8Dh86hrZCm1LB2z6Wjpo01B8mnPGX9almKp8bCsDbJStDLRpkFtA50XCTjxphnZaifv0v4dY+T8ThyW2I1ZdC2hbE0KHH2d0wP+s2bHTCu5Hkyrq/IBJkiHksGB9hYrXDjqpfXzTKoS8DUhtDMAv2PKYUQRXe6ELiFYMFiOVPxmpQOYtTLQbK7L/FyFsgtFEIBkvAAAAAElFTkSuQmCC";
586
575
 
576
+ /**
577
+ * This class ensures that a stream of continuous notifications is processed at a controlled rate, preventing rapid-fire announcements.
578
+ * - When a notification is being processed (i.e., the calculated delay is running), any new notification overwrites the buffered item, effectively discarding intermediate events.
579
+ * - Processing for the next notification only begins after the full delay of the previous one has completed.
580
+ * - Dispatches an 'onNotification' event when the system is free.
581
+ */
582
+ var NotificationThrottler = /*#__PURE__*/function () {
583
+ /**
584
+ * @param notificationCallback The function that executes UI changes
585
+ * @param readRate The time in milliseconds (ms) estimated to read one character.
586
+ * @param targetElement The HTML element to dispatch the 'onNotification' event from.
587
+ */
588
+ function NotificationThrottler(notificationCallback) {
589
+ var _this = this;
590
+ var readRate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
591
+ var targetElement = arguments.length > 2 ? arguments[2] : undefined;
592
+ _classCallCheck(this, NotificationThrottler);
593
+ this.nextNotification = null;
594
+ this.isProcessing = false;
595
+ this.readRate = void 0;
596
+ this.notificationCallback = void 0;
597
+ this.targetElement = void 0;
598
+ this.processCycleEnd = function () {
599
+ if (_this.nextNotification === null) {
600
+ _this.isProcessing = false;
601
+ } else {
602
+ var _notification = _this.nextNotification;
603
+ _this.nextNotification = null;
604
+ _this.execAndDelay(_notification).then(_this.processCycleEnd);
605
+ }
606
+ };
607
+ this.notificationCallback = notificationCallback;
608
+ this.readRate = readRate;
609
+ this.targetElement = targetElement;
610
+ }
611
+ return _createClass(NotificationThrottler, [{
612
+ key: "setReadRate",
613
+ value: function setReadRate(rate) {
614
+ this.readRate = rate;
615
+ }
616
+ }, {
617
+ key: "execAndDelay",
618
+ value: function execAndDelay(notification) {
619
+ var duration = this.readRate * notification.message.length;
620
+ this.notificationCallback(notification);
621
+ this.targetElement.dispatchEvent(new CustomEvent("onNotification", {
622
+ detail: notification
623
+ }));
624
+ return new Promise(function (resolve) {
625
+ setTimeout(resolve, duration);
626
+ });
627
+ }
628
+ }, {
629
+ key: "getIsProcessing",
630
+ value: function getIsProcessing() {
631
+ return this.isProcessing;
632
+ }
633
+
634
+ /**
635
+ * Receive continuous event data.
636
+ */
637
+ }, {
638
+ key: "sendNotification",
639
+ value: function sendNotification(notification) {
640
+ if (this.isProcessing) {
641
+ this.nextNotification = notification;
642
+ } else {
643
+ this.isProcessing = true;
644
+ this.execAndDelay(notification).then(this.processCycleEnd);
645
+ }
646
+ }
647
+ }]);
648
+ }();
649
+
587
650
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
588
651
  var Recorder = /*#__PURE__*/function (_LitElement) {
589
652
  function Recorder() {
@@ -623,7 +686,10 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
623
686
  _this.disconnected = false;
624
687
  _this.initSessionInprogress = false;
625
688
  // Indicate which hint to display on recorder screen
689
+ // It is a state variable, so it triggers a re render on change
626
690
  _this.hints = "nil";
691
+ // It is a class variable, that does not trigger a re render
692
+ _this.internalHints = void 0;
627
693
  // Error message
628
694
  _this.error = "";
629
695
  // Indicate if a record session is running
@@ -645,6 +711,7 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
645
711
  _this.acActiveActionIndex = 0;
646
712
  _this.acNumberOfActions = 0;
647
713
  _this.acProgressBarValues = [];
714
+ _this.notificationThrotler = void 0;
648
715
  _this.sdkJsListener_status = function (status) {
649
716
  var _this$shadowRoot, _this$shadowRoot2;
650
717
  _this.sdkJsStatus = status;
@@ -679,18 +746,25 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
679
746
  _this.sdkJsListener_faceInfo = function (type, value) {
680
747
  switch (type) {
681
748
  case buildPacked.exports.FaceInfoType.BAD_POS:
682
- _this.handleBadFacePos(value);
749
+ _this.internalHints = _this.handleBadFacePos(value);
683
750
  break;
684
751
  case buildPacked.exports.FaceInfoType.TOO_FAR:
685
- _this.hints = "closer";
752
+ _this.internalHints = "closer";
686
753
  break;
687
754
  case buildPacked.exports.FaceInfoType.GOOD_POS:
688
- _this.hints = "perfect";
755
+ _this.internalHints = "perfect";
689
756
  break;
690
757
  case buildPacked.exports.FaceInfoType.FACE_VALID:
691
- _this.hints = "record";
758
+ _this.internalHints = "record";
692
759
  break;
693
760
  }
761
+ if (_this.internalHints) {
762
+ var message = _this.getString(["hints", _this.internalHints]);
763
+ if (message) _this.notificationThrotler.sendNotification({
764
+ type: "info",
765
+ message: message
766
+ });
767
+ }
694
768
  };
695
769
  _this.handleError = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
696
770
  var _this$shadowRoot3, _this$session;
@@ -716,7 +790,7 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
716
790
  }));
717
791
  _this.sdkJsListener_issue = /*#__PURE__*/function () {
718
792
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(type, value) {
719
- var forbiddenActionMessages, cameraErrorMessages, _t;
793
+ var forbiddenActionMessages, cameraErrorMessages, message, _t;
720
794
  return _regenerator().w(function (_context2) {
721
795
  while (1) switch (_context2.n) {
722
796
  case 0:
@@ -730,37 +804,42 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
730
804
  "1": _this.getString(["cameraErrorMessages", "permissionDenied"]),
731
805
  "2": _this.getString(["cameraErrorMessages", "openFailed"])
732
806
  };
807
+ message = undefined;
733
808
  _t = type;
734
809
  _context2.n = _t === buildPacked.exports.IssueType.NO_FACE ? 1 : _t === buildPacked.exports.IssueType.FORBIDDEN_ACTION ? 2 : _t === buildPacked.exports.IssueType.CAMERA_ERROR ? 3 : _t === buildPacked.exports.IssueType.MOVE ? 4 : _t === buildPacked.exports.IssueType.UNSUPPORTED_FACE_DETECTOR ? 5 : 6;
735
810
  break;
736
811
  case 1:
737
- _this.displayError(_this.getString(["errors", "noFace"]));
812
+ message = _this.getString(["errors", "noFace"]);
738
813
  _this.faceDetectionFails = true;
739
814
  return _context2.a(3, 6);
740
815
  case 2:
741
816
  if (Object.keys(forbiddenActionMessages).includes("".concat(value))) {
742
- _this.displayError(forbiddenActionMessages["".concat(value)]);
817
+ message = forbiddenActionMessages["".concat(value)];
743
818
  } else {
744
- _this.displayError(_this.getString(["forbiddenActionMessages", "default"]));
819
+ message = _this.getString(["forbiddenActionMessages", "default"]);
745
820
  }
746
821
  return _context2.a(3, 6);
747
822
  case 3:
748
823
  if (Object.keys(cameraErrorMessages).includes("".concat(value))) {
749
- _this.displayError(cameraErrorMessages["".concat(value)]);
824
+ message = cameraErrorMessages["".concat(value)];
750
825
  } else {
751
- _this.displayError(_this.getString(["cameraErrorMessages", "default"]));
826
+ message = _this.getString(["cameraErrorMessages", "default"]);
752
827
  }
753
828
  return _context2.a(3, 6);
754
829
  case 4:
755
830
  if (value === 7) {
756
- _this.displayError(_this.getString(["rotationWhileCapturingErrorMessage"]));
831
+ message = _this.getString(["rotationWhileCapturingErrorMessage"]);
757
832
  }
758
833
  return _context2.a(3, 6);
759
834
  case 5:
760
- _this.displayError(_this.getString(["errors", "unsupportedFaceDetector"]));
835
+ message = _this.getString(["errors", "unsupportedFaceDetector"]);
761
836
  return _context2.a(3, 6);
762
837
  case 6:
763
838
  if (_this.acSequenceStarted) _this.acSequenceStarted = false;
839
+ if (message) _this.notificationThrotler.sendNotification({
840
+ type: "error",
841
+ message: message
842
+ });
764
843
  _context2.n = 7;
765
844
  return _this.handleError();
766
845
  case 7:
@@ -868,6 +947,15 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
868
947
  };
869
948
  }();
870
949
  _this.addEventListener("startCapture", _this.capture.bind(_this));
950
+ var DEFAULT_READ_RATE = 100; // ms
951
+
952
+ _this.notificationThrotler = new NotificationThrottler(function (notification) {
953
+ if (notification.type === "error") {
954
+ _this.displayError(notification.message);
955
+ } else if (_this.internalHints) {
956
+ _this.hints = _this.internalHints;
957
+ }
958
+ }, DEFAULT_READ_RATE, _this);
871
959
  return _this;
872
960
  }
873
961
  _inherits(Recorder, _LitElement);
@@ -1021,6 +1109,7 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
1021
1109
  }, {
1022
1110
  key: "updated",
1023
1111
  value: function updated(_changedProperties) {
1112
+ var _this$getString, _this$getString2, _this$getString3, _this$getString4;
1024
1113
  var presetChanged = _changedProperties.has("preset");
1025
1114
  var configChanged = _changedProperties.has("config");
1026
1115
  var faceCheckerChanged = _changedProperties.has("faceChecker");
@@ -1041,16 +1130,16 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
1041
1130
  if (_container) {
1042
1131
  switch (this.acCurrentAction) {
1043
1132
  case "left":
1044
- _container.innerHTML = "<img class=\"ac-arrow-hint\" alt=\"Arrow\" src=".concat(img$3, " />");
1133
+ _container.innerHTML = "<img class=\"ac-arrow-hint\" alt=\"".concat((_this$getString = this.getString(["accessibility", "turnLeft"])) !== null && _this$getString !== void 0 ? _this$getString : "Turn left", "\" src=").concat(img$3, " />");
1045
1134
  break;
1046
1135
  case "right":
1047
- _container.innerHTML = "<img class=\"ac-arrow-hint\" alt=\"Arrow\" src=".concat(img$2, " />");
1136
+ _container.innerHTML = "<img class=\"ac-arrow-hint\" alt=\"".concat((_this$getString2 = this.getString(["accessibility", "turnRight"])) !== null && _this$getString2 !== void 0 ? _this$getString2 : "Turn right", "\" src=").concat(img$2, " />");
1048
1137
  break;
1049
1138
  case "up":
1050
- _container.innerHTML = "<img class=\"ac-arrow-hint\" alt=\"Arrow\" src=".concat(img$1, " />");
1139
+ _container.innerHTML = "<img class=\"ac-arrow-hint\" alt=\"".concat((_this$getString3 = this.getString(["accessibility", "turnUp"])) !== null && _this$getString3 !== void 0 ? _this$getString3 : "Turn up", "\" src=").concat(img$1, " />");
1051
1140
  break;
1052
1141
  case "down":
1053
- _container.innerHTML = "<img class=\"ac-arrow-hint\" alt=\"Arrow\" src=".concat(img, " />");
1142
+ _container.innerHTML = "<img class=\"ac-arrow-hint\" alt=\"".concat((_this$getString4 = this.getString(["accessibility", "turnDown"])) !== null && _this$getString4 !== void 0 ? _this$getString4 : "Turn down", "\" src=").concat(img, " />");
1054
1143
  break;
1055
1144
  default:
1056
1145
  _container.innerHTML = "";
@@ -1073,6 +1162,10 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
1073
1162
  _this$config$iadConfi2,
1074
1163
  _this2 = this;
1075
1164
  _superPropGet(Recorder, "connectedCallback", this, 3)([]);
1165
+ var readRate = this.getAttribute("read-rate");
1166
+ if (readRate !== null && !isNaN(Number(readRate))) {
1167
+ this.notificationThrotler.setReadRate(Number(readRate));
1168
+ }
1076
1169
  this.disconnected = false;
1077
1170
  this.initSdkJs();
1078
1171
  this.sequencer = new ProgressBarSequencer({
@@ -1153,9 +1246,9 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
1153
1246
  check: faceCheckerValue
1154
1247
  };
1155
1248
  if (((_sessionConfig$iadCon = sessionConfig.iadConfig) === null || _sessionConfig$iadCon === void 0 ? void 0 : _sessionConfig$iadCon.mode) === buildPacked.exports.IadMode.SUBSTANTIAL || !!((_sessionConfig$iadCon2 = sessionConfig.iadConfig) !== null && _sessionConfig$iadCon2 !== void 0 && _sessionConfig$iadCon2.activeChallengeConfig)) {
1156
- var _this$getString, _this$getString2, _this$getString3, _this$getString4, _sessionConfig$iadCon3, _sessionConfig$iadCon4, _sessionConfig$iadCon5, _sessionConfig$iadCon6, _sessionConfig$iadCon7, _sessionConfig$iadCon8, _sessionConfig$iadCon9;
1249
+ var _this$getString5, _this$getString6, _this$getString7, _this$getString8, _sessionConfig$iadCon3, _sessionConfig$iadCon4, _sessionConfig$iadCon5, _sessionConfig$iadCon6, _sessionConfig$iadCon7, _sessionConfig$iadCon8, _sessionConfig$iadCon9;
1157
1250
  // configure active challenge
1158
- this.instructions = [(_this$getString = this.getString(["activeChallengeMessages", "rotateLeft"])) !== null && _this$getString !== void 0 ? _this$getString : "undefined action", (_this$getString2 = this.getString(["activeChallengeMessages", "rotateRight"])) !== null && _this$getString2 !== void 0 ? _this$getString2 : "undefined action", (_this$getString3 = this.getString(["activeChallengeMessages", "rotateUp"])) !== null && _this$getString3 !== void 0 ? _this$getString3 : "undefined action", (_this$getString4 = this.getString(["activeChallengeMessages", "rotateDown"])) !== null && _this$getString4 !== void 0 ? _this$getString4 : "undefined action"];
1251
+ this.instructions = [(_this$getString5 = this.getString(["activeChallengeMessages", "rotateLeft"])) !== null && _this$getString5 !== void 0 ? _this$getString5 : "undefined action", (_this$getString6 = this.getString(["activeChallengeMessages", "rotateRight"])) !== null && _this$getString6 !== void 0 ? _this$getString6 : "undefined action", (_this$getString7 = this.getString(["activeChallengeMessages", "rotateUp"])) !== null && _this$getString7 !== void 0 ? _this$getString7 : "undefined action", (_this$getString8 = this.getString(["activeChallengeMessages", "rotateDown"])) !== null && _this$getString8 !== void 0 ? _this$getString8 : "undefined action"];
1159
1252
  sessionConfig.iadConfig.activeChallengeConfig = {
1160
1253
  maxSecondsBetweenActions: (_sessionConfig$iadCon3 = (_sessionConfig$iadCon4 = sessionConfig.iadConfig.activeChallengeConfig) === null || _sessionConfig$iadCon4 === void 0 ? void 0 : _sessionConfig$iadCon4.maxSecondsBetweenActions) !== null && _sessionConfig$iadCon3 !== void 0 ? _sessionConfig$iadCon3 : 8,
1161
1254
  // client customisation or default (8 seconds)
@@ -1205,7 +1298,7 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
1205
1298
  var _initSession = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
1206
1299
  var _this$shadowRoot6,
1207
1300
  _this4 = this;
1208
- var videoContainer, _this$shadowRoot7, _this$shadowRoot8, _this$session3, sessionConfig, _this$session4, sessionInfos, acquisitionTime, activeChallengeNumActions, _this$sequencer7, _this$config$iadConfi3, _this$config$iadConfi4, canvasElem, videoElem, recorderReadyEvent;
1301
+ var videoContainer, _this$shadowRoot7, _this$shadowRoot8, _this$session3, sessionConfig, _this$session4, sessionInfos, acquisitionTime, activeChallengeNumActions, _this$sequencer7, _this$config$iadConfi3, _this$config$iadConfi4, canvasElem, videoElem, _this$getString9, recorderReadyEvent;
1209
1302
  return _regenerator().w(function (_context8) {
1210
1303
  while (1) switch (_context8.n) {
1211
1304
  case 0:
@@ -1279,6 +1372,9 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
1279
1372
  }
1280
1373
  canvasElem = (_this$shadowRoot7 = this.shadowRoot) === null || _this$shadowRoot7 === void 0 ? void 0 : _this$shadowRoot7.getElementById(buildPacked.exports.CANVAS_ELEMENT_ID);
1281
1374
  videoElem = (_this$shadowRoot8 = this.shadowRoot) === null || _this$shadowRoot8 === void 0 ? void 0 : _this$shadowRoot8.getElementById(buildPacked.exports.VIDEO_ELEMENT_ID);
1375
+ if (videoElem) {
1376
+ videoElem.setAttribute("aria-label", (_this$getString9 = this.getString(["accessibility", "videoFeed"])) !== null && _this$getString9 !== void 0 ? _this$getString9 : "Camera feed for identity verification");
1377
+ }
1282
1378
  recorderReadyEvent = new CustomEvent("recorderReady", {
1283
1379
  detail: {
1284
1380
  recorderElmt: this,
@@ -1313,20 +1409,15 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
1313
1409
  };
1314
1410
  switch (value) {
1315
1411
  case values.front:
1316
- this.hints = "closer";
1317
- break;
1412
+ return "closer";
1318
1413
  case values.left:
1319
- this.hints = "left";
1320
- break;
1414
+ return "left";
1321
1415
  case values.right:
1322
- this.hints = "right";
1323
- break;
1416
+ return "right";
1324
1417
  case values.down:
1325
- this.hints = "down";
1326
- break;
1418
+ return "down";
1327
1419
  case values.up:
1328
- this.hints = "up";
1329
- break;
1420
+ return "up";
1330
1421
  }
1331
1422
  }
1332
1423
  }, {
@@ -1400,11 +1491,20 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
1400
1491
  }, {
1401
1492
  key: "render",
1402
1493
  value: function render() {
1403
- var _this$acActiveActionI;
1494
+ var _this$acActiveActionI,
1495
+ _this5 = this,
1496
+ _this$getString0;
1497
+ var retryButtonLabel = this.willRetryCapture ? this.getString(["retry"]) : this.getString(["capture"]);
1498
+
1404
1499
  // not necessary : this.strings = { ...this.defaultStrings, ...this.strings };
1405
- return x$2(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n <div class=\"container\" id=\"container\">\n <div id=\"top-hints\" class=\"top-hints\">\n <slot name=\"ac-top-hints\">\n ", "\n </slot>\n </div>\n <div class=\"wrapper\" id=\"wrapper\">\n <div id=\"face-hints\" class=\"face-hints\">\n <slot name=\"ac-face-hints\">\n <div id=\"ac-arrow-container\" class=\"ac-arrow-container\"></div>\n </slot>\n </div>\n\n ", "\n\n <uni-overlay-hints\n class=\"hints item-center\"\n hints=\"", "\"\n strings=\"", "\"\n ></uni-overlay-hints>\n\n <div id=\"spinner\" class=\"spinner item-center\" style=\"display: none\">\n <uni-spinner></uni-spinner>\n </div>\n <div class=\"errors\" id=\"errors\">\n <span class=\"message\">", "</span>\n </div>\n </div>\n <div id=\"bottom-hints\" class=\"bottom-hints\">\n <slot name=\"ac-bottom-hints\"><span id=\"ac-message-container\"></span> </slot>\n <div class=\"ac-bottom-hints\">", "</div>\n </div>\n <div class=\"buttons\" id=\"buttons\">\n <div class=\"buttons-item\">\n <slot name=\"left\"></slot>\n </div>\n\n <div class=\"buttons-item\">\n <!-- Display record/retry button -->\n ", "\n </div>\n </div>\n </div>\n "])), this.acSequenceStarted ? x$2(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n <uni-progress-bar-group\n count=\"", "\"\n .values=\"", "\"\n active-index=\"", "\"\n ></uni-progress-bar-group>\n "])), this.acNumberOfActions, this.acProgressBarValues, (_this$acActiveActionI = this.acActiveActionIndex) !== null && _this$acActiveActionI !== void 0 ? _this$acActiveActionI : -1) : x$2(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral([""]))), isMobileDevice() && (
1500
+ return x$2(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n <div class=\"container\" id=\"container\">\n <div id=\"top-hints\" class=\"top-hints\">\n <slot name=\"ac-top-hints\">\n ", "\n </slot>\n </div>\n <div class=\"wrapper\" id=\"wrapper\">\n <div id=\"face-hints\" class=\"face-hints\">\n <slot name=\"ac-face-hints\">\n <div id=\"ac-arrow-container\" class=\"ac-arrow-container\"></div>\n </slot>\n </div>\n\n ", "\n\n <uni-overlay-hints\n class=\"hints item-center\"\n hints=\"", "\"\n strings=\"", "\"\n ></uni-overlay-hints>\n\n <div id=\"spinner\" class=\"spinner item-center\" style=\"display: none\">\n <uni-spinner></uni-spinner>\n </div>\n <div class=\"errors\" id=\"errors\">\n <span class=\"message\" id=\"sdk-error\" aria-live=\"assertive\">", "</span>\n </div>\n </div>\n <div id=\"bottom-hints\" class=\"bottom-hints\">\n <slot name=\"ac-bottom-hints\"><span id=\"ac-message-container\"></span></slot>\n <div class=\"ac-bottom-hints\">\n <span id=\"pos-hint\" role=\"alert\" aria-live=\"assertive\">", "</span>\n </div>\n </div>\n <div class=\"buttons\" id=\"buttons\">\n <div class=\"buttons-item\">\n <slot name=\"left\"></slot>\n </div>\n\n <div class=\"buttons-item\">\n <!-- Display record/retry button -->\n ", "\n </div>\n </div>\n </div>\n "])), this.acSequenceStarted ? x$2(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n <uni-progress-bar-group\n count=\"", "\"\n .values=\"", "\"\n active-index=\"", "\"\n ></uni-progress-bar-group>\n "])), this.acNumberOfActions, this.acProgressBarValues, (_this$acActiveActionI = this.acActiveActionIndex) !== null && _this$acActiveActionI !== void 0 ? _this$acActiveActionI : -1) : x$2(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral([""]))), isMobileDevice() && (
1406
1501
  // eslint-disable-next-line no-extra-boolean-cast
1407
- !!this.displayFlipCameraBtn ? this.displayFlipCameraBtn : this.preset === buildPacked.exports.AcquisitionPreset.DOC_VIDEO || this.preset === buildPacked.exports.AcquisitionPreset.DOC_IMAGE) && !this.isRunning() ? x$2(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral([" <div id=\"flip-icon-container\" class=\"flip-icon-container\">\n <uni-flip-camera-icon @click=\"", "\" class=\"flip-icon\"> </uni-flip-camera-icon>\n </div>"])), this.flipCamera) : x$2(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral([""]))), this.hints, JSON.stringify(this.getString(["hints"])), this.error, this.getString(["hints", this.hints]), !this.hideCaptureBtn || this.willRetryCapture ? x$2(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["<uni-button id=\"capture\" @click=\"", "\">\n <div slot=\"icon\">", "</div>\n ", "\n </uni-button>"])), this.capture, this.captureButtonPicto, this.willRetryCapture ? this.getString(["retry"]) : this.getString(["capture"])) : x$2(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral([""]))));
1502
+ !!this.displayFlipCameraBtn ? this.displayFlipCameraBtn : this.preset === buildPacked.exports.AcquisitionPreset.DOC_VIDEO || this.preset === buildPacked.exports.AcquisitionPreset.DOC_IMAGE) && !this.isRunning() ? x$2(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral([" <div id=\"flip-icon-container\" class=\"flip-icon-container\">\n <uni-flip-camera-icon\n @click=\"", "\"\n @keydown=\"", "\"\n class=\"flip-icon\"\n tabindex=\"0\"\n role=\"button\"\n aria-label=\"", "\"\n ></uni-flip-camera-icon>\n </div>"])), this.flipCamera, function (e) {
1503
+ if (e.key === "Enter" || e.key === " ") {
1504
+ e.preventDefault();
1505
+ _this5.flipCamera();
1506
+ }
1507
+ }, (_this$getString0 = this.getString(["accessibility", "flipCamera"])) !== null && _this$getString0 !== void 0 ? _this$getString0 : "Switch camera") : x$2(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral([""]))), this.hints, JSON.stringify(this.getString(["hints"])), this.error, this.getString(["hints", this.hints]), !this.hideCaptureBtn || this.willRetryCapture ? x$2(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["<uni-button\n id=\"capture\"\n @click=\"", "\"\n aria-role=\"button\"\n aria-label=\"", "\"\n >\n <div slot=\"icon\">", "</div>\n ", "\n </uni-button>"])), this.capture, retryButtonLabel, this.captureButtonPicto, retryButtonLabel) : x$2(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral([""]))));
1408
1508
  }
1409
1509
  }]);
1410
1510
  }(s$1);
@@ -1,6 +1,6 @@
1
1
  import './lit-element-c42ac26e.js';
2
- export { R as Recorder, V as VideoRecorder } from './video-recorder-04ecd01a.js';
3
- import './variables-0db5ef1b.js';
2
+ export { R as Recorder, V as VideoRecorder } from './video-recorder-31ce7f04.js';
3
+ import './variables-513bd26a.js';
4
4
  import './button.js';
5
- import './en-57f1198e.js';
6
- import './_commonjsHelpers-02146103.js';
5
+ import './en-27ff3a75.js';
6
+ import './utils-474188c7.js';
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@unissey-web/web-components",
3
- "version": "5.4.0",
3
+ "version": "5.5.0-rc.1",
4
4
  "description": "",
5
5
  "module": "./dist/index.js",
6
6
  "typings": "./dist/index.d.ts",
7
7
  "scripts": {
8
8
  "dev": "start-storybook -p 6006 --ci --https --ssl-cert https/certificate.crt --ssl-key https/privateKey.key",
9
- "dev:server": "rimraf ./dev-server/dist && rollup --config rollup.dev.mjs",
9
+ "dev:server": "rimraf ./dev-server/dist && rollup --config rollup.dev.mjs --silent --watch",
10
10
  "build:base": "npm run build:types && npm run build:pkg",
11
11
  "build:types": "tsc",
12
12
  "build:pkg": "rimraf dist && rimraf dist-iife && rollup --config --silent",
@@ -1,7 +0,0 @@
1
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
2
-
3
- function commonjsRequire (path) {
4
- throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
5
- }
6
-
7
- export { commonjsRequire as a, commonjsGlobal as c };