@opexa/portal-components 0.0.966 → 0.0.968

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.
Files changed (105) hide show
  1. package/dist/client/hooks/useCamera.js +28 -62
  2. package/dist/components/AccountInfo/AccountInfo.js +1 -1
  3. package/dist/components/AccountSecurity/AccountSecurity.js +1 -1
  4. package/dist/components/Banner/Banner.js +3 -3
  5. package/dist/components/DepositWithdrawal/Deposit/AiOGCashDeposit/AiOGCashDeposit.js +1 -1
  6. package/dist/components/DepositWithdrawal/Deposit/AiOGrabPayDeposit/AiOGrabPayDeposit.js +1 -1
  7. package/dist/components/DepositWithdrawal/Deposit/AiOPayMayaDeposit/AiOPayMayaDeposit.js +1 -1
  8. package/dist/components/DepositWithdrawal/Deposit/AurixPayGCashDeposit/AurixPayGCashDeposit.js +2 -2
  9. package/dist/components/DepositWithdrawal/Deposit/AurixPayGrabPayDeposit/AurixPayGrabPayDeposit.js +2 -2
  10. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayPayMayaDeposit.js +2 -2
  11. package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/Form.js +1 -1
  12. package/dist/components/DepositWithdrawal/Deposit/Deposit.js +22 -11
  13. package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +1 -1
  14. package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit/GCashWebpayDeposit.js +1 -1
  15. package/dist/components/DepositWithdrawal/Deposit/LibanganDeposit/LibanganDeposit.js +1 -1
  16. package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +1 -1
  17. package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +1 -1
  18. package/dist/components/DepositWithdrawal/Deposit/MayaWebpayDeposit/MayaWebpayDeposit.js +1 -1
  19. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
  20. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +1 -1
  21. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
  22. package/dist/components/DepositWithdrawal/Deposit/PisoPayDeposit/PisoPayDeposit.js +1 -1
  23. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/Form.js +1 -1
  24. package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.d.ts +1 -0
  25. package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.js +2 -1
  26. package/dist/components/DepositWithdrawal/Withdrawal/GCashStandardCashInWithdrawal/GCashStandardCashInWithdrawal.js +2 -2
  27. package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +2 -2
  28. package/dist/components/DepositWithdrawal/Withdrawal/InstapayGCashWithdrawal/InstapayGcashWithdrawal.js +3 -3
  29. package/dist/components/DepositWithdrawal/Withdrawal/InstapayPaymayaWithdrawal/InstapayPaymayaWithdrawal.js +3 -3
  30. package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +1 -1
  31. package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +1 -1
  32. package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +2 -2
  33. package/dist/components/DepositWithdrawal/Withdrawal/PisoPayWithdrawal/PisoPayWithdrawal.js +1 -1
  34. package/dist/components/DepositWithdrawal/Withdrawal/TransactionPasswordNotSet.js +2 -2
  35. package/dist/components/DepositWithdrawal/Withdrawal/VentajaWithdrawal/VentajaWithdrawal.js +5 -5
  36. package/dist/components/Disclaimer/DisclaimerV1.js +3 -3
  37. package/dist/components/Disclaimer/DisclaimerV2.js +3 -3
  38. package/dist/components/Disclaimer/DisclaimerV3.js +24 -15
  39. package/dist/components/ForgotPassword/Crazywin/CWForgotPassword.js +1 -1
  40. package/dist/components/ForgotPassword/Crazywin/CWForgotPasswordForm.js +2 -2
  41. package/dist/components/ForgotPassword/ForgotPasswordForm.js +3 -3
  42. package/dist/components/GameProviders/GameProvidersCarousel.d.ts +8 -0
  43. package/dist/components/GameProviders/GameProvidersCarousel.js +32 -0
  44. package/dist/components/Games/Game.js +2 -1
  45. package/dist/components/GamesSearch/GamesSearch.js +8 -5
  46. package/dist/components/Jackpots/JackpotsCarouselNext/JackpotsCarouselStageItem.js +1 -1
  47. package/dist/components/Quests/Crazywin/components/Countdown.js +1 -1
  48. package/dist/components/Search/Search.lazy.js +8 -5
  49. package/dist/components/SignUp/SignUpKYC/SelfieImageField/useSelfieImageField.js +0 -1
  50. package/dist/components/TermsOfUse/TermsOfUseV2.lazy.d.ts +1 -1
  51. package/dist/components/TermsOfUse/TermsOfUseV2.lazy.js +1 -1
  52. package/dist/components/TermsOfUse/TermsOfUseV3.lazy.d.ts +1 -1
  53. package/dist/components/TermsOfUse/TermsOfUseV3.lazy.js +1 -1
  54. package/dist/components/shared/SelfieImageField/useSelfieImageField.js +104 -59
  55. package/dist/handlers/index.d.ts +2 -2
  56. package/dist/schemas/forgotPasswordSchema.d.ts +4 -4
  57. package/dist/services/auth.d.ts +2 -2
  58. package/dist/services/httpRequest.d.ts +2 -2
  59. package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
  60. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +8 -8
  61. package/dist/ui/Badge/Badge.d.ts +12 -12
  62. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  63. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  64. package/dist/ui/Carousel/Carousel.d.ts +153 -99
  65. package/dist/ui/Carousel/carousel.recipe.d.ts +17 -11
  66. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  67. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  68. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  69. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  70. package/dist/ui/Combobox/Combobox.d.ts +43 -43
  71. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  72. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  73. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  74. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  75. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  76. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  77. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  78. package/dist/ui/Field/Field.d.ts +21 -21
  79. package/dist/ui/Field/field.recipe.d.ts +3 -3
  80. package/dist/ui/Menu/Menu.d.ts +252 -252
  81. package/dist/ui/Menu/menu.recipe.d.ts +14 -14
  82. package/dist/ui/Popover/Popover.d.ts +88 -88
  83. package/dist/ui/Popover/popover.recipe.d.ts +8 -8
  84. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  85. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  86. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  87. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  88. package/dist/ui/Select/Select.d.ts +46 -46
  89. package/dist/ui/Select/select.recipe.d.ts +3 -3
  90. package/dist/ui/Table/Table.d.ts +21 -21
  91. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  92. package/dist/ui/Table/table.recipe.d.ts +3 -3
  93. package/package.json +1 -1
  94. package/dist/client/hooks/useVerifyMobileNumber.d.ts +0 -3
  95. package/dist/client/hooks/useVerifyMobileNumber.js +0 -20
  96. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.d.ts +0 -1
  97. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.js +0 -241
  98. package/dist/components/SingleSignOn/SingleSignOn.d.ts +0 -4
  99. package/dist/components/SingleSignOn/SingleSignOn.js +0 -185
  100. package/dist/components/SingleSignOn/index.d.ts +0 -1
  101. package/dist/components/SingleSignOn/index.js +0 -1
  102. /package/dist/{lib/components → components}/UpdateMobilePhoneNumber/UpdateMobilePhoneNumber.d.ts +0 -0
  103. /package/dist/{lib/components → components}/UpdateMobilePhoneNumber/UpdateMobilePhoneNumber.js +0 -0
  104. /package/dist/{lib/components → components}/UpdateMobilePhoneNumber/index.d.ts +0 -0
  105. /package/dist/{lib/components → components}/UpdateMobilePhoneNumber/index.js +0 -0
@@ -14,6 +14,7 @@ import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
14
14
  import { GAME_PROVIDER_DATA } from '../../constants/index.js';
15
15
  import { SearchLgIcon } from '../../icons/SearchLgIcon.js';
16
16
  import { XIcon } from '../../icons/XIcon.js';
17
+ import RainbowballImg from '../../images/rainbow-ball-online.webp';
17
18
  import { Button } from '../../ui/Button/index.js';
18
19
  import { Dialog } from '../../ui/Dialog/index.js';
19
20
  import { Field } from '../../ui/Field/index.js';
@@ -86,11 +87,13 @@ export function Search(props) {
86
87
  }, children: _jsx(Image, { src: props.gameProviderImages?.[provider.id] ??
87
88
  provider.logo, alt: "", width: 100, height: 50, className: twMerge('mx-auto h-auto w-full', classNames.providerThumbnailImage) }) }, provider.id))) })] })), games.length > 0 && (_jsxs(_Fragment, { children: [_jsx("h2", { className: "font-semibold text-lg", children: "Games" }), _jsx("div", { className: twMerge('mt-3.5 grid grid-cols-3 gap-1.5 lg:grid-cols-9 lg:gap-3.5', classNames.gameSearchResult), children: games.map((game) => (_jsxs(GameLaunchTrigger, { bypassKycCheck: isBypass, game: game, className: twMerge('block w-full shadow-sm', classNames.gameThumbnailRoot), onClick: () => {
88
89
  globalStore.search.setOpen(false);
89
- }, children: [_jsx(Image, { src: getGameImageUrl({
90
- reference: game.reference,
91
- provider: game.provider,
92
- image: game.image,
93
- }), alt: "", width: 200, height: 200, loading: "lazy", unoptimized: true, className: "aspect-square w-full rounded-t-md object-cover" }), _jsx("span", { className: twMerge('block w-full rounded-b-md bg-bg-tertiary px-2 py-2.5 text-center font-semibold text-text-primary-brand text-xs', props.variant !== '88play' && 'truncate', classNames.gameThumbnailTitle), children: fixMojibake(game.name) })] }, game.id))) })] })), _jsx(Presence, { present: gamesQuery.hasNextPage, children: _jsx(Button, { variant: "outline", className: twMerge('mx-auto mt-12 w-fit', classNames.loadMoreButton), onClick: () => gamesQuery.fetchNextPage(), children: "Load More" }) })] }))] })) }) })] }) })] }) }));
90
+ }, children: [_jsx(Image, { src: game.name === 'Rainbow Ball'
91
+ ? RainbowballImg
92
+ : getGameImageUrl({
93
+ reference: game.reference,
94
+ provider: game.provider,
95
+ image: game.image,
96
+ }), alt: "", width: 200, height: 200, loading: "lazy", unoptimized: true, className: "aspect-square w-full rounded-t-md object-cover" }), _jsx("span", { className: twMerge('block w-full rounded-b-md bg-bg-tertiary px-2 py-2.5 text-center font-semibold text-text-primary-brand text-xs', props.variant !== '88play' && 'truncate', classNames.gameThumbnailTitle), children: fixMojibake(game.name) })] }, game.id))) })] })), _jsx(Presence, { present: gamesQuery.hasNextPage, children: _jsx(Button, { variant: "outline", className: twMerge('mx-auto mt-12 w-fit', classNames.loadMoreButton), onClick: () => gamesQuery.fetchNextPage(), children: "Load More" }) })] }))] })) }) })] }) })] }) }));
94
97
  }
95
98
  function DebouncedInput(props) {
96
99
  const [value, setValue] = useControllableState({
@@ -58,7 +58,6 @@ export function useSelfieImageField(props) {
58
58
  invariant(blob);
59
59
  resolve(new File([blob], `front-image-${Date.now()}.jpeg`, {
60
60
  type: 'image/jpeg',
61
- endings: 'native',
62
61
  lastModified: Date.now(),
63
62
  }));
64
63
  }, 'image/jpeg', 1.0));
@@ -6,4 +6,4 @@ export interface TermsOfUseV2Props {
6
6
  siteName: string;
7
7
  responsibleGamingLogo?: ImageProps['src'];
8
8
  }
9
- export declare function TermsOfUseV2({ logo, siteName, content, ...props }: TermsOfUseV2Props): import("react/jsx-runtime").JSX.Element;
9
+ export declare function TermsOfUseV2({ logo, content }: TermsOfUseV2Props): import("react/jsx-runtime").JSX.Element;
@@ -9,7 +9,7 @@ import { ScrollToTopIcon } from '../../icons/ScrollToTopIcon.js';
9
9
  import { Button } from '../../ui/Button/index.js';
10
10
  import { Dialog } from '../../ui/Dialog/index.js';
11
11
  import { Portal } from '../../ui/Portal/index.js';
12
- export function TermsOfUseV2({ logo, siteName, content, ...props }) {
12
+ export function TermsOfUseV2({ logo, content }) {
13
13
  const scrollableContentRef = useRef(null);
14
14
  const [hasReachedBottom, setHasReachedBottom] = useState(false);
15
15
  const [isAtBottom, setIsAtBottom] = useState(false);
@@ -6,4 +6,4 @@ export interface TermsOfUseV3Props {
6
6
  siteName: string;
7
7
  responsibleGamingLogo?: ImageProps['src'];
8
8
  }
9
- export declare function TermsOfUseV3({ logo, siteName, content, ...props }: TermsOfUseV3Props): import("react/jsx-runtime").JSX.Element;
9
+ export declare function TermsOfUseV3({ logo, content }: TermsOfUseV3Props): import("react/jsx-runtime").JSX.Element;
@@ -10,7 +10,7 @@ import decorativebackground from '../../images/decorative-patern.png';
10
10
  import { Button } from '../../ui/Button/index.js';
11
11
  import { Dialog } from '../../ui/Dialog/index.js';
12
12
  import { Portal } from '../../ui/Portal/index.js';
13
- export function TermsOfUseV3({ logo, siteName, content, ...props }) {
13
+ export function TermsOfUseV3({ logo, content }) {
14
14
  const scrollableContentRef = useRef(null);
15
15
  const [hasReachedBottom, setHasReachedBottom] = useState(false);
16
16
  const [isAtBottom, setIsAtBottom] = useState(false);
@@ -2,7 +2,7 @@ import { useFieldContext } from '@ark-ui/react';
2
2
  import { FaceDetector, FilesetResolver } from '@mediapipe/tasks-vision';
3
3
  import { useRef, useState } from 'react';
4
4
  import invariant from 'tiny-invariant';
5
- import { useInterval, useMediaQuery } from 'usehooks-ts';
5
+ import { useInterval } from 'usehooks-ts';
6
6
  import { useCamera } from '../../../client/hooks/useCamera.js';
7
7
  import { useControllableState } from '../../../client/hooks/useControllableState.js';
8
8
  import { useDisclosure } from '../../../client/hooks/useDisclosure.js';
@@ -11,7 +11,6 @@ import { useUploadPrivateImageFileMutation } from '../../../client/hooks/useUplo
11
11
  import { toaster } from '../../../client/utils/toaster.js';
12
12
  export function useSelfieImageField(props) {
13
13
  const field = useFieldContext();
14
- const desktop = useMediaQuery('(min-width: 1024px)');
15
14
  const [value, setValue] = useControllableState({
16
15
  value: props.value,
17
16
  defaultValue: props.defaultValue ?? '',
@@ -88,7 +87,6 @@ export function useSelfieImageField(props) {
88
87
  invariant(blob);
89
88
  resolve(new File([blob], `front-image-${Date.now()}.jpeg`, {
90
89
  type: 'image/jpeg',
91
- endings: 'native',
92
90
  lastModified: Date.now(),
93
91
  }));
94
92
  }, 'image/jpeg', 1.0));
@@ -113,6 +111,10 @@ export function useSelfieImageField(props) {
113
111
  if (open) {
114
112
  camera.open();
115
113
  }
114
+ else {
115
+ setFaceFound(false);
116
+ camera.close();
117
+ }
116
118
  },
117
119
  });
118
120
  const [faceFound, setFaceFound] = useState(false);
@@ -122,7 +124,7 @@ export function useSelfieImageField(props) {
122
124
  }
123
125
  setFaceFound(await validateFaceFromVideo(camera.videoRef.current, guideRef.current));
124
126
  }, disclosure.open && !camera.data && !camera.error && !camera.loading
125
- ? 500
127
+ ? 300
126
128
  : null);
127
129
  return {
128
130
  field,
@@ -138,48 +140,85 @@ export function useSelfieImageField(props) {
138
140
  faceFound,
139
141
  };
140
142
  }
141
- let __image_face_detector__;
142
- let __video_face_detector__;
143
- let __vision__;
143
+ let __image_face_detector__ = null;
144
+ let __video_face_detector__ = null;
145
+ let __vision__ = null;
146
+ let __image_face_detector_promise__ = null;
147
+ let __video_face_detector_promise__ = null;
148
+ let __vision_promise__ = null;
149
+ async function getVision() {
150
+ if (__vision__)
151
+ return __vision__;
152
+ if (__vision_promise__)
153
+ return __vision_promise__;
154
+ __vision_promise__ = (async () => {
155
+ try {
156
+ const vision = await FilesetResolver.forVisionTasks('https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.0/wasm');
157
+ __vision__ = vision;
158
+ return vision;
159
+ }
160
+ catch (e) {
161
+ __vision_promise__ = null;
162
+ throw e;
163
+ }
164
+ })();
165
+ return __vision_promise__;
166
+ }
144
167
  async function getImageFaceDetector() {
145
- if (!__image_face_detector__) {
146
- if (!__vision__) {
147
- __vision__ = await FilesetResolver.forVisionTasks('https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.0/wasm');
168
+ if (__image_face_detector__)
169
+ return __image_face_detector__;
170
+ if (__image_face_detector_promise__)
171
+ return __image_face_detector_promise__;
172
+ __image_face_detector_promise__ = (async () => {
173
+ try {
174
+ const vision = await getVision();
175
+ const detector = await FaceDetector.createFromOptions(vision, {
176
+ runningMode: 'IMAGE',
177
+ minDetectionConfidence: 0.5,
178
+ baseOptions: {
179
+ delegate: 'GPU',
180
+ modelAssetPath: 'https://storage.googleapis.com/mediapipe-models/face_detector/blaze_face_short_range/float16/1/blaze_face_short_range.tflite',
181
+ },
182
+ });
183
+ __image_face_detector__ = detector;
184
+ return detector;
148
185
  }
149
- const detector = await FaceDetector.createFromOptions(__vision__, {
150
- runningMode: 'IMAGE',
151
- minDetectionConfidence: 0.5,
152
- baseOptions: {
153
- delegate: 'GPU',
154
- modelAssetPath: 'https://storage.googleapis.com/mediapipe-models/face_detector/blaze_face_short_range/float16/1/blaze_face_short_range.tflite',
155
- },
156
- });
157
- __image_face_detector__ = detector;
158
- return detector;
159
- }
160
- return __image_face_detector__;
186
+ catch (e) {
187
+ __image_face_detector_promise__ = null;
188
+ throw e;
189
+ }
190
+ })();
191
+ return __image_face_detector_promise__;
161
192
  }
162
193
  async function getVideoFaceDetector() {
163
- if (!__video_face_detector__) {
164
- if (!__vision__) {
165
- __vision__ = await FilesetResolver.forVisionTasks('https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.0/wasm');
194
+ if (__video_face_detector__)
195
+ return __video_face_detector__;
196
+ if (__video_face_detector_promise__)
197
+ return __video_face_detector_promise__;
198
+ __video_face_detector_promise__ = (async () => {
199
+ try {
200
+ const vision = await getVision();
201
+ const detector = await FaceDetector.createFromOptions(vision, {
202
+ runningMode: 'VIDEO',
203
+ minDetectionConfidence: 0.5,
204
+ baseOptions: {
205
+ delegate: 'GPU',
206
+ modelAssetPath: 'https://storage.googleapis.com/mediapipe-models/face_detector/blaze_face_short_range/float16/1/blaze_face_short_range.tflite',
207
+ },
208
+ });
209
+ __video_face_detector__ = detector;
210
+ return detector;
166
211
  }
167
- const detector = await FaceDetector.createFromOptions(__vision__, {
168
- runningMode: 'VIDEO',
169
- minDetectionConfidence: 0.5,
170
- baseOptions: {
171
- delegate: 'GPU',
172
- modelAssetPath: 'https://storage.googleapis.com/mediapipe-models/face_detector/blaze_face_short_range/float16/1/blaze_face_short_range.tflite',
173
- },
174
- });
175
- __video_face_detector__ = detector;
176
- return detector;
177
- }
178
- return __video_face_detector__;
212
+ catch (e) {
213
+ __video_face_detector_promise__ = null;
214
+ throw e;
215
+ }
216
+ })();
217
+ return __video_face_detector_promise__;
179
218
  }
180
219
  async function validateFaceFromImage(image) {
181
- const detector = await getImageFaceDetector();
182
220
  try {
221
+ const detector = await getImageFaceDetector();
183
222
  const result = detector.detect(image);
184
223
  return result.detections.length > 0;
185
224
  }
@@ -191,26 +230,32 @@ async function validateFaceFromImage(image) {
191
230
  async function validateFaceFromVideo(video, guide) {
192
231
  if (video.readyState < 2)
193
232
  return false;
194
- const detector = await getVideoFaceDetector();
195
- const result = detector.detectForVideo(video, performance.now());
196
- const detection = result.detections.at(0);
197
- if (!detection)
198
- return false;
199
- const videoRect = video.getBoundingClientRect();
200
- const guideRect = guide.getBoundingClientRect();
201
- if (!detection.boundingBox)
233
+ try {
234
+ const detector = await getVideoFaceDetector();
235
+ const result = detector.detectForVideo(video, performance.now());
236
+ const detection = result.detections.at(0);
237
+ if (!detection)
238
+ return false;
239
+ const videoRect = video.getBoundingClientRect();
240
+ const guideRect = guide.getBoundingClientRect();
241
+ if (!detection.boundingBox)
242
+ return false;
243
+ const faceLeft = videoRect.left +
244
+ (detection.boundingBox.originX / video.videoWidth) * videoRect.width;
245
+ const faceTop = videoRect.top +
246
+ (detection.boundingBox.originY / video.videoHeight) * videoRect.height;
247
+ const faceRight = faceLeft +
248
+ (detection.boundingBox.width / video.videoWidth) * videoRect.width;
249
+ const faceBottom = faceTop +
250
+ (detection.boundingBox.height / video.videoHeight) * videoRect.height;
251
+ const isInside = faceLeft >= guideRect.left &&
252
+ faceTop >= guideRect.top &&
253
+ faceRight <= guideRect.right &&
254
+ faceBottom <= guideRect.bottom;
255
+ return isInside;
256
+ }
257
+ catch (e) {
258
+ console.error(e);
202
259
  return false;
203
- const faceLeft = videoRect.left +
204
- (detection.boundingBox.originX / video.videoWidth) * videoRect.width;
205
- const faceTop = videoRect.top +
206
- (detection.boundingBox.originY / video.videoHeight) * videoRect.height;
207
- const faceRight = faceLeft +
208
- (detection.boundingBox.width / video.videoWidth) * videoRect.width;
209
- const faceBottom = faceTop +
210
- (detection.boundingBox.height / video.videoHeight) * videoRect.height;
211
- const isInside = faceLeft >= guideRect.left &&
212
- faceTop >= guideRect.top &&
213
- faceRight <= guideRect.right &&
214
- faceBottom <= guideRect.bottom;
215
- return isInside;
260
+ }
216
261
  }
@@ -18,14 +18,14 @@ export declare const GET: (req: NextRequest, { params }: Context) => Promise<Nex
18
18
  __error?: unknown;
19
19
  } | {
20
20
  ok: true;
21
- data: import("../types").Session;
21
+ data: Record<string, unknown>;
22
22
  }> | NextResponse<{
23
23
  ok: false;
24
24
  message: string;
25
25
  __error?: unknown;
26
26
  } | {
27
27
  ok: true;
28
- data: Record<string, unknown>;
28
+ data: import("../types").Session;
29
29
  }>>;
30
30
  export declare const DELETE: (req: NextRequest, { params }: Context) => Promise<NextResponse<{
31
31
  ok: true;
@@ -8,24 +8,24 @@ export declare const createForgotPasswordSchema: (mobileNumberParser: MobileNumb
8
8
  mobileNumber: z.ZodEffects<z.ZodString, string, string>;
9
9
  verificationCode: z.ZodEffects<z.ZodString, string, string>;
10
10
  }, "strip", z.ZodTypeAny, {
11
+ mobileNumber: string;
11
12
  verificationCode: string;
12
13
  password: string;
13
- mobileNumber: string;
14
14
  confirmPassword: string;
15
15
  }, {
16
+ mobileNumber: string;
16
17
  verificationCode: string;
17
18
  password: string;
18
- mobileNumber: string;
19
19
  confirmPassword: string;
20
20
  }>, {
21
+ mobileNumber: string;
21
22
  verificationCode: string;
22
23
  password: string;
23
- mobileNumber: string;
24
24
  confirmPassword: string;
25
25
  }, {
26
+ mobileNumber: string;
26
27
  verificationCode: string;
27
28
  password: string;
28
- mobileNumber: string;
29
29
  confirmPassword: string;
30
30
  }>;
31
31
  export type ForgotPasswordSchema = z.infer<ReturnType<typeof createForgotPasswordSchema>>;
@@ -85,11 +85,11 @@ export declare function sendVerificationCode(input: SendVerificationCodeInput, o
85
85
  type: ResponseType;
86
86
  url: string;
87
87
  clone(): Response;
88
- body: ReadableStream<Uint8Array> | null;
88
+ body: ReadableStream<Uint8Array<ArrayBuffer>> | null;
89
89
  bodyUsed: boolean;
90
90
  arrayBuffer(): Promise<ArrayBuffer>;
91
91
  blob(): Promise<Blob>;
92
- bytes(): Promise<Uint8Array>;
92
+ bytes(): Promise<Uint8Array<ArrayBuffer>>;
93
93
  formData(): Promise<FormData>;
94
94
  text(): Promise<string>;
95
95
  }>;
@@ -10,11 +10,11 @@ export declare function httpRequest(url: string, opts?: HttpRequestOptions): Pro
10
10
  type: ResponseType;
11
11
  url: string;
12
12
  clone(): Response;
13
- body: ReadableStream<Uint8Array> | null;
13
+ body: ReadableStream<Uint8Array<ArrayBuffer>> | null;
14
14
  bodyUsed: boolean;
15
15
  arrayBuffer(): Promise<ArrayBuffer>;
16
16
  blob(): Promise<Blob>;
17
- bytes(): Promise<Uint8Array>;
17
+ bytes(): Promise<Uint8Array<ArrayBuffer>>;
18
18
  formData(): Promise<FormData>;
19
19
  text(): Promise<string>;
20
20
  }>;