@scandit/web-datacapture-core 7.2.2 → 7.3.0-beta.2

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 (142) hide show
  1. package/build/js/{Camera-CWDY5hQK.d.ts → Camera-C8CzJUpi.d.ts} +6 -6
  2. package/build/js/Camera.d.ts +1 -1
  3. package/build/js/Camera.js +1 -1
  4. package/build/js/CameraAccess.d.ts +1 -1
  5. package/build/js/CameraAccess.js +1 -1
  6. package/build/js/CameraRelated.d.ts +1 -1
  7. package/build/js/Common.d.ts +1 -1
  8. package/build/js/DataCaptureContext.d.ts +1 -1
  9. package/build/js/DataCaptureContext.js +1 -1
  10. package/build/js/DataCaptureContextRelated.d.ts +1 -1
  11. package/build/js/DataCaptureVersion.js +1 -1
  12. package/build/js/DataCaptureView.d.ts +1 -1
  13. package/build/js/DataCaptureView.js +1 -1
  14. package/build/js/Defaults.d.ts +1 -1
  15. package/build/js/FrameData.d.ts +1 -1
  16. package/build/js/ImageFrameSource.d.ts +1 -1
  17. package/build/js/LocationSelection.d.ts +1 -1
  18. package/build/js/ScanditIcon.js +1 -1
  19. package/build/js/ScanditIconBuilder.d.ts +3 -1
  20. package/build/js/ScanditIconBuilder.js +1 -1
  21. package/build/js/SingleImageUploader.d.ts +1 -1
  22. package/build/js/ViewfinderPlusRelated.d.ts +1 -1
  23. package/build/js/chunks/chunk-2Q5FZVGV.js +1 -1
  24. package/build/js/chunks/chunk-2WFRFPNN.js +3 -0
  25. package/build/js/chunks/chunk-457L5N2F.js +1 -1
  26. package/build/js/chunks/chunk-46WJFV3I.js +1 -1
  27. package/build/js/chunks/chunk-6X73W3EO.js +1 -1
  28. package/build/js/chunks/chunk-72DAONJI.js +1 -1
  29. package/build/js/chunks/chunk-77BBIAZE.js +1 -1
  30. package/build/js/chunks/chunk-7CQVGY6N.js +1 -1
  31. package/build/js/chunks/chunk-7HWKBORK.js +5 -0
  32. package/build/js/chunks/chunk-ACXIZNMK.js +1 -1
  33. package/build/js/chunks/chunk-AIC4H5KG.js +1 -1
  34. package/build/js/chunks/chunk-B5JOQVFY.js +1 -1
  35. package/build/js/chunks/chunk-BL6D2W34.js +1 -0
  36. package/build/js/chunks/chunk-BWKNTXLA.js +5 -0
  37. package/build/js/chunks/chunk-CCL6CJ7C.js +1 -0
  38. package/build/js/chunks/chunk-CXBLYHGE.js +1 -1
  39. package/build/js/chunks/chunk-DGHKL762.js +21 -0
  40. package/build/js/chunks/chunk-DPZMXGPP.js +1 -0
  41. package/build/js/chunks/chunk-E3TDSWVQ.js +1 -1
  42. package/build/js/chunks/chunk-FFTRSHP6.js +1 -1
  43. package/build/js/chunks/chunk-FSWALUUO.js +1 -1
  44. package/build/js/chunks/chunk-FSXBNEVH.js +1 -0
  45. package/build/js/chunks/chunk-FTD535WI.js +1 -1
  46. package/build/js/chunks/chunk-GZIGVBIW.js +1 -0
  47. package/build/js/chunks/chunk-H4TH4342.js +1 -1
  48. package/build/js/chunks/{chunk-7QNII4K3.js → chunk-HY2GIAZH.js} +1 -1
  49. package/build/js/chunks/chunk-IGJQFAQU.js +1 -1
  50. package/build/js/chunks/chunk-IQNYV5T2.js +4 -0
  51. package/build/js/chunks/chunk-J2UL6U3I.js +1 -1
  52. package/build/js/chunks/chunk-JVZYXEYO.js +1 -1
  53. package/build/js/chunks/chunk-LA6TM76R.js +1 -1
  54. package/build/js/chunks/chunk-MU4VAJIM.js +1 -1
  55. package/build/js/chunks/{chunk-YKP6UYCY.js → chunk-OZQL57EF.js} +1 -1
  56. package/build/js/chunks/chunk-Q7JWDX4U.js +1 -1
  57. package/build/js/chunks/chunk-QTV62ZV2.js +1 -0
  58. package/build/js/chunks/chunk-RDOOIDFI.js +1 -0
  59. package/build/js/chunks/chunk-S6RRLBEL.js +1 -0
  60. package/build/js/chunks/{chunk-AYWOZOZP.js → chunk-SCB3YPEP.js} +1 -1
  61. package/build/js/chunks/chunk-T3AOBMAS.js +1 -1
  62. package/build/js/chunks/chunk-T5EUB6UG.js +1 -1
  63. package/build/js/chunks/chunk-TCJPGGHY.js +1 -1
  64. package/build/js/chunks/chunk-TXNSQTT7.js +6 -0
  65. package/build/js/chunks/chunk-V2ZMK4M5.js +1 -0
  66. package/build/js/chunks/chunk-VMA23L2N.js +1 -0
  67. package/build/js/chunks/chunk-WYO7P76R.js +1 -0
  68. package/build/js/chunks/chunk-XR65N6EG.js +1 -1
  69. package/build/js/chunks/chunk-YOAZ4K7N.js +11 -0
  70. package/build/js/chunks/chunk-ZE2WH3AH.js +1 -1
  71. package/build/js/index.d.ts +16 -17
  72. package/build/js/index.js +3 -3
  73. package/build/js/private/AnchorPositions.d.ts +2 -2
  74. package/build/js/private/CameraAccess.d.ts +1 -1
  75. package/build/js/private/CameraAccess.js +1 -1
  76. package/build/js/private/CameraManager.d.ts +1 -1
  77. package/build/js/private/CameraManager.js +1 -1
  78. package/build/js/private/CanvasDrawerWithMetrics.d.ts +1 -1
  79. package/build/js/private/CoreModuleLicenseTextProvider.d.ts +2 -2
  80. package/build/js/private/DataCaptureContextRelated.d.ts +1 -1
  81. package/build/js/private/FrameReaders/FrameReader.d.ts +1 -1
  82. package/build/js/private/FrameReaders/FrameReaderAbstract.d.ts +1 -1
  83. package/build/js/private/FrameReaders/GrayScaleFrameReader.d.ts +1 -1
  84. package/build/js/private/FrameReaders/index.d.ts +1 -1
  85. package/build/js/private/NormalizedConfigureOptions.d.ts +11 -11
  86. package/build/js/private/ViewControls+related.js +1 -1
  87. package/build/js/private/ViewControls_related.d.ts +2 -2
  88. package/build/js/private/ViewsRegistry.d.ts +1 -1
  89. package/build/js/private/ui/atoms/AimerSvgIcon.d.ts +17 -0
  90. package/build/js/private/ui/atoms/AimerSvgIcon.js +10 -0
  91. package/build/js/private/ui/atoms/Card.d.ts +21 -0
  92. package/build/js/private/ui/atoms/Card.js +1 -0
  93. package/build/js/private/ui/atoms/CardList.d.ts +60 -0
  94. package/build/js/private/ui/atoms/CardList.js +1 -0
  95. package/build/js/private/ui/atoms/KeyboardSvgIcon.d.ts +17 -0
  96. package/build/js/private/ui/atoms/KeyboardSvgIcon.js +10 -0
  97. package/build/js/private/ui/atoms/ProgressBar.js +1 -1
  98. package/build/js/private/ui/atoms/RestartSvgIcon.d.ts +17 -0
  99. package/build/js/private/ui/atoms/RestartSvgIcon.js +11 -0
  100. package/build/js/private/ui/atoms/RoundedCrossSvgIcon.d.ts +17 -0
  101. package/build/js/private/ui/atoms/RoundedCrossSvgIcon.js +11 -0
  102. package/build/js/private/ui/atoms/ShutterButton.js +1 -1
  103. package/build/js/private/ui/atoms/Toast.d.ts +1 -1
  104. package/build/js/private/ui/atoms/Toast.js +1 -1
  105. package/build/js/private/ui/colors.d.ts +2 -1
  106. package/build/js/private/ui/colors.js +1 -1
  107. package/build/js/private/ui/molecules/HintPresenter.d.ts +1 -1
  108. package/build/js/private/ui/molecules/HintPresenter.js +1 -1
  109. package/build/js/private/ui/molecules/LoadingOverlay.js +1 -1
  110. package/build/js/private/utils/replaceImagesInViewUtils.js +1 -1
  111. package/build/js/sdk.d.ts +1 -1
  112. package/build/js/worker/WorkerMain.d.ts +1 -1
  113. package/build/js/worker/WorkerMain.js +1 -1
  114. package/build/js/worker/{dataCapture.inlineWorker.d.ts → coreCapture.inlineWorker.d.ts} +1 -1
  115. package/build/js/worker/{dataCapture.inlineWorker.js → coreCapture.inlineWorker.js} +1 -1
  116. package/build/js/worker/dataCaptureEngine.d.ts +1 -1
  117. package/build/js/worker/dataCaptureEngine.js +1 -1
  118. package/build/js/worker/dataCaptureLoader.d.ts +2 -2
  119. package/build/js/worker/dataCaptureWorkerRelated.d.ts +1 -1
  120. package/build/js/worker/helper.d.ts +2 -1
  121. package/build/js/worker/helper.js +1 -1
  122. package/build/js/worker/importWasmScript.js +1 -1
  123. package/build/js/worker/index.d.ts +1 -1
  124. package/build/js/worker/index.js +1 -1
  125. package/package.json +1 -1
  126. package/build/js/chunks/chunk-4KCDIWC3.js +0 -21
  127. package/build/js/chunks/chunk-54WEG7AR.js +0 -1
  128. package/build/js/chunks/chunk-6HPS3VUF.js +0 -1
  129. package/build/js/chunks/chunk-6LUJAFBV.js +0 -1
  130. package/build/js/chunks/chunk-7M3GGOSL.js +0 -5
  131. package/build/js/chunks/chunk-AC6MK6LU.js +0 -1
  132. package/build/js/chunks/chunk-ACXLPROZ.js +0 -11
  133. package/build/js/chunks/chunk-COAVJAOQ.js +0 -1
  134. package/build/js/chunks/chunk-CWOHXN5B.js +0 -1
  135. package/build/js/chunks/chunk-EEA7AA2K.js +0 -4
  136. package/build/js/chunks/chunk-EVI6U6CG.js +0 -3
  137. package/build/js/chunks/chunk-FLO5QRX5.js +0 -1
  138. package/build/js/chunks/chunk-FNLMNXZR.js +0 -1
  139. package/build/js/chunks/chunk-NAOIN6LV.js +0 -6
  140. package/build/js/chunks/chunk-QIPZN4PA.js +0 -1
  141. package/build/js/chunks/chunk-VZJ2FQ7I.js +0 -1
  142. package/build/js/chunks/chunk-WPY7T7HY.js +0 -1
@@ -1,10 +1,10 @@
1
1
  /// <reference types="emscripten" />
2
2
  import { Serializable } from './private/Serializable.js';
3
- import { Size, Orientation, MarginsWithUnitJSON, PointWithUnitJSON, Anchor, MarginsWithUnit, PointWithUnit, Point, Quadrilateral, JSONType, RectJSON, PointJSON, Rect } from './Common.js';
3
+ import { MarginsWithUnitJSON, PointWithUnitJSON, Anchor, MarginsWithUnit, PointWithUnit, Size, Orientation, Point, Quadrilateral, JSONType, PointJSON, RectJSON, Rect } from './Common.js';
4
4
  import { WatermarkStack } from './private/FrameReaders/WatermarkStack.js';
5
5
  import { Optional, MethodSignature } from './tsHelper.js';
6
6
  import './ScanditIcon.js';
7
- import { DataCaptureContextSettings, DataCaptureContextSettingsJSON } from './DataCaptureContextSettings.js';
7
+ import { DataCaptureContextSettingsJSON, DataCaptureContextSettings } from './DataCaptureContextSettings.js';
8
8
  import { LogoStyle, FocusGestureJSON, ZoomGestureJSON, FocusGesture, ZoomGesture } from './DataCaptureViewPlusRelated.js';
9
9
  import { Control } from './ViewControls.js';
10
10
  import { DidTapCustomLocationsViewListener, StateToRender, StateToRenderDomView } from './private/CustomLocationsView.js';
@@ -595,7 +595,7 @@ interface NativeDataCaptureMode {
595
595
  setEnabled(enabled: boolean): Promise<void>;
596
596
  }
597
597
  interface DataCaptureModeJSON<S = JSONType> {
598
- type: "barcodeCapture" | "barcodeTracking" | "idCapture" | "parser" | "sparkScan" | "barcodeFind" | "barcodeCheck" | "labelCapture";
598
+ type: "barcodeCapture" | "barcodeTracking" | "idCapture" | "parser" | "sparkScan" | "barcodeFind" | "barcodeAr" | "labelCapture";
599
599
  enabled: boolean;
600
600
  settings: S;
601
601
  }
@@ -1291,8 +1291,8 @@ interface Module extends EmscriptenModule {
1291
1291
  removeBarcodeFindFromContext: (context: DataCaptureContext, mode: EmscriptenClassHandle) => void;
1292
1292
  addBarcodeFindBasicOverlayToView: (view: DataCaptureView, overlay: EmscriptenClassHandle) => void;
1293
1293
  removeBarcodeFindBasicOverlayFromView: (view: DataCaptureView, overlay: EmscriptenClassHandle) => void;
1294
- addBarcodeCheckToContext: (context: DataCaptureContext, mode: EmscriptenClassHandle) => void;
1295
- removeBarcodeCheckFromContext: (context: DataCaptureContext, mode: EmscriptenClassHandle) => void;
1294
+ addBarcodeArToContext: (context: DataCaptureContext, mode: EmscriptenClassHandle) => void;
1295
+ removeBarcodeArFromContext: (context: DataCaptureContext, mode: EmscriptenClassHandle) => void;
1296
1296
  OpenSourceSoftwareLicenseInfo: {
1297
1297
  getLicenseText(): string;
1298
1298
  };
@@ -1783,4 +1783,4 @@ declare class Camera implements FrameSource, Serializable<CameraJSON> {
1783
1783
  private isZoomAvailable;
1784
1784
  }
1785
1785
 
1786
- export { type AugmentedWorker as $, type PrivateFrameHandler as A, DataCaptureContext$1 as B, CameraPosition as C, DataCaptureLoader as D, type DataCaptureContextListener as E, FocusGestureStrategy as F, type ContextStatusJSON as G, ContextStatus as H, PrivateMirrorAxis as I, type DataCaptureOverlay as J, type DataCaptureViewListener as K, type DataCaptureViewJSON as L, DataCaptureView$1 as M, type NativeDataCaptureMode as N, type FrameData as O, type PrivateChangeSet as P, type PrivateLoadableFrameData as Q, convertToPublicFrameData as R, type DataCaptureLoaderOptions as S, TorchState as T, type PerformanceMetrics as U, VideoResolution as V, DataCaptureEngine as W, type Module as X, type GenericHint as Y, type DataCaptureCallbackMessage as Z, type AnyDataCaptureActionMessage as _, type FrameSource as a, HintWidth as a$, type ModuleHandler as a0, type DataCaptureActionMessageKey as a1, type EngineWorkerResponse as a2, type ExtractCentaurusLicenseResponse as a3, type RequestFrameDataResponse as a4, type IsFeatureSupportedResponse as a5, type GetViewfinderInfo as a6, type GetOpenSourceSoftwareLicenseInfoResponse as a7, type WorkerResponse as a8, type LoadLibraryDataCaptureAction as a9, type DidTapTrackedBarcode as aA, type OnFrameProcessingStartedMessage as aB, type OnFrameProcessingFinishedMessage as aC, type OnFrameSkippedMessage as aD, type ShowToastMessage as aE, type HideToastMessage as aF, type ShowGuidanceMessage as aG, type HideGuidanceMessage as aH, type StartUpdateTimerMessage as aI, type StopUpdateTimerMessage as aJ, type PayloadForCommand as aK, type DataCaptureWorker as aL, type EmscriptenClassHandle as aM, type DataCaptureContext as aN, type DataCaptureImageBufferFrameSource as aO, type GestureListener as aP, type GestureRecognizer as aQ, type DataCaptureView as aR, type JSONParseable as aS, type DataCaptureContextDeserializerResult as aT, type DataCaptureContextDeserializer as aU, type CaptureModeDeserializerInstance as aV, type ModuleMirrorAxis as aW, type Vector as aX, type WasmFrameData as aY, HintFont as aZ, HintTextAlignment as a_, type CreateContextDataCaptureAction as aa, type SetFrameSourceDataCaptureAction as ab, type ProcessFrameDataCaptureAction as ac, type RequestFrameDataDataCaptureAction as ad, type DeleteFrameDataDataCaptureAction as ae, type VisibilityChangeAction as af, type IsFeatureSupportedAction as ag, type UpdateContextDataCaptureAction as ah, type DisposeDataCaptureAction as ai, type FlushAnalyticsDataCaptureAction as aj, type ReportCameraPropertiesDataCaptureAction as ak, type SetLogLevelDataCaptureAction as al, type ExtractCentaurusLicenseDataCaptureAction as am, type OnTapAction as an, type HintPresenterV2updateAction as ao, type GetViewfinderInfoAction as ap, type GetOpenSourceSoftwareLicenseInfoAction as aq, type AddNativeOverlayAction as ar, type RemoveNativeOverlayAction as as, type DataCaptureCallbackMessageKeys as at, type SuccessFeedbackWorkerMessage as au, type ShowHintWorkerMessage as av, type UpdateHintWorkerMessage as aw, type IsFeatureSupportedMessage as ax, type HideHintWorkerMessage as ay, type PerformanceMetricsReportMessage as az, FrameSourceState as b, HintHeight as b0, HintCornerStyle as b1, HintIcon as b2, HintAnchor as b3, type HintStyle as b4, GuidanceHintAnchor as b5, GuidanceHintStyle as b6, type GuidanceHint as b7, ToastHintStyle as b8, type ToastHint as b9, type CameraManagerEventParameters as bA, CameraManager as bB, LicensedFeature as ba, type HintPresenterV2 as bb, type PlatformHintPresenter as bc, type LoadLibraryParameters as bd, type CreateContextParameters as be, type UpdateContextParameters as bf, type SetFrameSourceParameters as bg, type ProcessFrameParameters as bh, type ReportCameraPropertiesParameters as bi, type WorkerFunctions as bj, FrameReaderAbstract as bk, ColorType as bl, type PoolCapacityOptions as bm, type FrameCapture as bn, FrameReader as bo, CameraPosition$1 as bp, CameraResolutionConstraint$1 as bq, AspectRatio as br, type DeviceCamera$1 as bs, CameraAccess$1 as bt, MeteringMode as bu, CameraResolutionConstraint as bv, type ExtendedMediaTrackCapabilities as bw, type ExtendedMediaTrackConstraintSet as bx, type GUI as by, CameraManagerEvent as bz, type FrameSourceListener as c, type FrameSourceJSON as d, type CameraJSON as e, type VideoFrameResolution as f, Camera as g, type CameraSettingsJSONBase as h, type CameraSettingsFromJSON as i, type CameraSettingsJSON as j, isCameraFrameSource as k, CameraSettings as l, CameraAccess as m, type DeviceCamera as n, type Change as o, type PrivateDataCaptureMode as p, type DataCaptureMode as q, type DataCaptureModeJSON as r, type PrivateDataCaptureComponent as s, type DataCaptureComponentJSON as t, type DataCaptureComponent as u, type PrivateDataCaptureContextOptions as v, type PrivateDataCaptureContext as w, type DataCaptureContextCreationOptions as x, type DataCaptureContextJSON as y, type PrivateFrameHandlerResponse as z };
1786
+ export { type AugmentedWorker as $, type PrivateFrameHandler as A, DataCaptureContext$1 as B, CameraPosition as C, DataCaptureLoader as D, type DataCaptureContextListener as E, FocusGestureStrategy as F, type ContextStatusJSON as G, ContextStatus as H, PrivateMirrorAxis as I, type DataCaptureOverlay as J, type DataCaptureViewListener as K, type DataCaptureViewJSON as L, DataCaptureView$1 as M, type NativeDataCaptureMode as N, type FrameData as O, type PrivateChangeSet as P, type PrivateLoadableFrameData as Q, convertToPublicFrameData as R, type DataCaptureLoaderOptions as S, TorchState as T, type PerformanceMetrics as U, VideoResolution as V, DataCaptureEngine as W, type Module as X, type DataCaptureCallbackMessage as Y, type GenericHint as Z, type AnyDataCaptureActionMessage as _, type FrameSource as a, HintWidth as a$, type ModuleHandler as a0, type DataCaptureActionMessageKey as a1, type EngineWorkerResponse as a2, type ExtractCentaurusLicenseResponse as a3, type RequestFrameDataResponse as a4, type IsFeatureSupportedResponse as a5, type GetViewfinderInfo as a6, type GetOpenSourceSoftwareLicenseInfoResponse as a7, type WorkerResponse as a8, type LoadLibraryDataCaptureAction as a9, type DidTapTrackedBarcode as aA, type OnFrameProcessingStartedMessage as aB, type OnFrameProcessingFinishedMessage as aC, type OnFrameSkippedMessage as aD, type ShowToastMessage as aE, type HideToastMessage as aF, type ShowGuidanceMessage as aG, type HideGuidanceMessage as aH, type StartUpdateTimerMessage as aI, type StopUpdateTimerMessage as aJ, type PayloadForCommand as aK, type DataCaptureWorker as aL, type EmscriptenClassHandle as aM, type DataCaptureContext as aN, type DataCaptureImageBufferFrameSource as aO, type GestureListener as aP, type GestureRecognizer as aQ, type DataCaptureView as aR, type JSONParseable as aS, type DataCaptureContextDeserializerResult as aT, type DataCaptureContextDeserializer as aU, type CaptureModeDeserializerInstance as aV, type ModuleMirrorAxis as aW, type Vector as aX, type WasmFrameData as aY, HintFont as aZ, HintTextAlignment as a_, type CreateContextDataCaptureAction as aa, type SetFrameSourceDataCaptureAction as ab, type ProcessFrameDataCaptureAction as ac, type RequestFrameDataDataCaptureAction as ad, type DeleteFrameDataDataCaptureAction as ae, type VisibilityChangeAction as af, type IsFeatureSupportedAction as ag, type UpdateContextDataCaptureAction as ah, type DisposeDataCaptureAction as ai, type FlushAnalyticsDataCaptureAction as aj, type ReportCameraPropertiesDataCaptureAction as ak, type SetLogLevelDataCaptureAction as al, type ExtractCentaurusLicenseDataCaptureAction as am, type OnTapAction as an, type HintPresenterV2updateAction as ao, type GetViewfinderInfoAction as ap, type GetOpenSourceSoftwareLicenseInfoAction as aq, type AddNativeOverlayAction as ar, type RemoveNativeOverlayAction as as, type DataCaptureCallbackMessageKeys as at, type SuccessFeedbackWorkerMessage as au, type ShowHintWorkerMessage as av, type UpdateHintWorkerMessage as aw, type IsFeatureSupportedMessage as ax, type HideHintWorkerMessage as ay, type PerformanceMetricsReportMessage as az, FrameSourceState as b, HintHeight as b0, HintCornerStyle as b1, HintIcon as b2, HintAnchor as b3, type HintStyle as b4, GuidanceHintAnchor as b5, GuidanceHintStyle as b6, type GuidanceHint as b7, ToastHintStyle as b8, type ToastHint as b9, type CameraManagerEventParameters as bA, CameraManager as bB, LicensedFeature as ba, type HintPresenterV2 as bb, type PlatformHintPresenter as bc, type LoadLibraryParameters as bd, type CreateContextParameters as be, type UpdateContextParameters as bf, type SetFrameSourceParameters as bg, type ProcessFrameParameters as bh, type ReportCameraPropertiesParameters as bi, type WorkerFunctions as bj, FrameReaderAbstract as bk, ColorType as bl, type PoolCapacityOptions as bm, type FrameCapture as bn, FrameReader as bo, CameraPosition$1 as bp, CameraResolutionConstraint$1 as bq, AspectRatio as br, type DeviceCamera$1 as bs, CameraAccess$1 as bt, MeteringMode as bu, CameraResolutionConstraint as bv, type ExtendedMediaTrackCapabilities as bw, type ExtendedMediaTrackConstraintSet as bx, type GUI as by, CameraManagerEvent as bz, type FrameSourceListener as c, type FrameSourceJSON as d, type CameraJSON as e, type VideoFrameResolution as f, Camera as g, CameraAccess as h, type DeviceCamera as i, type CameraSettingsJSONBase as j, type CameraSettingsFromJSON as k, type CameraSettingsJSON as l, isCameraFrameSource as m, CameraSettings as n, type Change as o, type PrivateDataCaptureMode as p, type DataCaptureMode as q, type DataCaptureModeJSON as r, type PrivateDataCaptureComponent as s, type DataCaptureComponentJSON as t, type DataCaptureComponent as u, type PrivateDataCaptureContextOptions as v, type PrivateDataCaptureContext as w, type DataCaptureContextCreationOptions as x, type DataCaptureContextJSON as y, type PrivateFrameHandlerResponse as z };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { g as Camera, e as CameraJSON, f as VideoFrameResolution } from './Camera-CWDY5hQK.js';
2
+ export { g as Camera, e as CameraJSON, f as VideoFrameResolution } from './Camera-C8CzJUpi.js';
3
3
  import './Common.js';
4
4
  import './private/Serializable.js';
5
5
  import './private/FrameReaders/WatermarkStack.js';
@@ -1 +1 @@
1
- export{a as Camera}from'./chunks/chunk-FLO5QRX5.js';
1
+ export{a as Camera}from'./chunks/chunk-S6RRLBEL.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { m as CameraAccess, n as DeviceCamera } from './Camera-CWDY5hQK.js';
2
+ export { h as CameraAccess, i as DeviceCamera } from './Camera-C8CzJUpi.js';
3
3
  import './private/Serializable.js';
4
4
  import './Common.js';
5
5
  import './private/FrameReaders/WatermarkStack.js';
@@ -1 +1 @@
1
- export{a as CameraAccess}from'./chunks/chunk-6LUJAFBV.js';
1
+ export{a as CameraAccess}from'./chunks/chunk-QTV62ZV2.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { C as CameraPosition, l as CameraSettings, i as CameraSettingsFromJSON, j as CameraSettingsJSON, h as CameraSettingsJSONBase, F as FocusGestureStrategy, a as FrameSource, d as FrameSourceJSON, c as FrameSourceListener, b as FrameSourceState, T as TorchState, V as VideoResolution, k as isCameraFrameSource } from './Camera-CWDY5hQK.js';
2
+ export { C as CameraPosition, n as CameraSettings, k as CameraSettingsFromJSON, l as CameraSettingsJSON, j as CameraSettingsJSONBase, F as FocusGestureStrategy, a as FrameSource, d as FrameSourceJSON, c as FrameSourceListener, b as FrameSourceState, T as TorchState, V as VideoResolution, m as isCameraFrameSource } from './Camera-C8CzJUpi.js';
3
3
  import './private/Serializable.js';
4
4
  import './Common.js';
5
5
  import './private/FrameReaders/WatermarkStack.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- import { Serializable, StringSerializable } from './private/Serializable.js';
2
+ import { StringSerializable, Serializable } from './private/Serializable.js';
3
3
 
4
4
  interface PointJSON {
5
5
  x: number;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { o as Change, u as DataCaptureComponent, t as DataCaptureComponentJSON, B as DataCaptureContext, x as DataCaptureContextCreationOptions, y as DataCaptureContextJSON, q as DataCaptureMode, r as DataCaptureModeJSON, N as NativeDataCaptureMode, P as PrivateChangeSet, s as PrivateDataCaptureComponent, w as PrivateDataCaptureContext, v as PrivateDataCaptureContextOptions, p as PrivateDataCaptureMode, A as PrivateFrameHandler, z as PrivateFrameHandlerResponse } from './Camera-CWDY5hQK.js';
2
+ export { o as Change, u as DataCaptureComponent, t as DataCaptureComponentJSON, B as DataCaptureContext, x as DataCaptureContextCreationOptions, y as DataCaptureContextJSON, q as DataCaptureMode, r as DataCaptureModeJSON, N as NativeDataCaptureMode, P as PrivateChangeSet, s as PrivateDataCaptureComponent, w as PrivateDataCaptureContext, v as PrivateDataCaptureContextOptions, p as PrivateDataCaptureMode, A as PrivateFrameHandler, z as PrivateFrameHandlerResponse } from './Camera-C8CzJUpi.js';
3
3
  import './Common.js';
4
4
  import './DataCaptureContextSettings.js';
5
5
  import './license/OpenSourceSoftwareLicenseInfo.js';
@@ -1 +1 @@
1
- export{a as DataCaptureContext}from'./chunks/chunk-EEA7AA2K.js';
1
+ export{a as DataCaptureContext}from'./chunks/chunk-IQNYV5T2.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { H as ContextStatus, G as ContextStatusJSON, E as DataCaptureContextListener, I as PrivateMirrorAxis } from './Camera-CWDY5hQK.js';
2
+ export { H as ContextStatus, G as ContextStatusJSON, E as DataCaptureContextListener, I as PrivateMirrorAxis } from './Camera-C8CzJUpi.js';
3
3
  import './ScanditIcon.js';
4
4
  import './private/Serializable.js';
5
5
  import './Common.js';
@@ -1 +1 @@
1
- export{a as DataCaptureVersion}from'./chunks/chunk-QIPZN4PA.js';
1
+ export{a as DataCaptureVersion}from'./chunks/chunk-WYO7P76R.js';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="emscripten" />
2
2
  import './Common.js';
3
- export { J as DataCaptureOverlay, M as DataCaptureView, L as DataCaptureViewJSON, K as DataCaptureViewListener } from './Camera-CWDY5hQK.js';
3
+ export { J as DataCaptureOverlay, M as DataCaptureView, L as DataCaptureViewJSON, K as DataCaptureViewListener } from './Camera-C8CzJUpi.js';
4
4
  import './DataCaptureViewPlusRelated.js';
5
5
  import './ViewControls.js';
6
6
  import './private/CustomLocationsView.js';
@@ -1 +1 @@
1
- export{a as DataCaptureView}from'./chunks/chunk-4KCDIWC3.js';
1
+ export{a as DataCaptureView}from'./chunks/chunk-DGHKL762.js';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="emscripten" />
2
2
  import * as CSS from 'csstype';
3
- import { V as VideoResolution, F as FocusGestureStrategy, C as CameraPosition } from './Camera-CWDY5hQK.js';
3
+ import { V as VideoResolution, F as FocusGestureStrategy, C as CameraPosition } from './Camera-C8CzJUpi.js';
4
4
  import { MarginsWithUnit, PointWithUnit, Anchor, Color } from './Common.js';
5
5
  import { FocusGestureJSON, FocusGesture, ZoomGestureJSON, ZoomGesture, LogoStyle } from './DataCaptureViewPlusRelated.js';
6
6
  import { RectangularViewfinderStyle, PrivateRectangularViewfinderDefault } from './ViewfinderPlusRelated.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { O as FrameData, Q as PrivateLoadableFrameData, R as convertToPublicFrameData } from './Camera-CWDY5hQK.js';
2
+ export { O as FrameData, Q as PrivateLoadableFrameData, R as convertToPublicFrameData } from './Camera-C8CzJUpi.js';
3
3
  import './ScanditIcon.js';
4
4
  import './private/Serializable.js';
5
5
  import './Common.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- import { a as FrameSource, b as FrameSourceState, c as FrameSourceListener } from './Camera-CWDY5hQK.js';
2
+ import { a as FrameSource, b as FrameSourceState, c as FrameSourceListener } from './Camera-C8CzJUpi.js';
3
3
  import { Serializable } from './private/Serializable.js';
4
4
  import './Common.js';
5
5
  import './private/FrameReaders/WatermarkStack.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- import { NumberWithUnit, SizeWithUnitAndAspect, SizeWithUnit, NumberWithUnitJSON, SizeWithUnitAndAspectJSON } from './Common.js';
2
+ import { NumberWithUnitJSON, NumberWithUnit, SizeWithUnitAndAspectJSON, SizeWithUnitAndAspect, SizeWithUnit } from './Common.js';
3
3
  import { Serializable } from './private/Serializable.js';
4
4
 
5
5
  interface LocationSelectionJSON {
@@ -1 +1 @@
1
- export{b as ScanditIcon,a as ScanditIconShape}from'./chunks/chunk-6HPS3VUF.js';
1
+ export{b as ScanditIcon,a as ScanditIconShape}from'./chunks/chunk-BL6D2W34.js';
@@ -31,7 +31,9 @@ declare enum ScanditIconType {
31
31
  CameraSwitch = "cameraSwitch",
32
32
  DotFiveX = "dotFiveX",
33
33
  OneX = "oneX",
34
- TwoX = "twoX"
34
+ TwoX = "twoX",
35
+ Restart = "restart",
36
+ Keyboard = "keyboard"
35
37
  }
36
38
  declare const ScanditIconForIconType: Record<ScanditIconType, Promise<{
37
39
  register(): void;
@@ -1 +1 @@
1
- export{c as ScanditIconBuilder,b as ScanditIconForIconType,a as ScanditIconType}from'./chunks/chunk-VZJ2FQ7I.js';export{a as ScanditIconShape}from'./chunks/chunk-6HPS3VUF.js';
1
+ export{c as ScanditIconBuilder,b as ScanditIconForIconType,a as ScanditIconType}from'./chunks/chunk-GZIGVBIW.js';export{a as ScanditIconShape}from'./chunks/chunk-BL6D2W34.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- import { d as FrameSourceJSON, b as FrameSourceState, a as FrameSource, c as FrameSourceListener } from './Camera-CWDY5hQK.js';
2
+ import { d as FrameSourceJSON, b as FrameSourceState, a as FrameSource, c as FrameSourceListener } from './Camera-C8CzJUpi.js';
3
3
  import { SingleImageUploaderSettingsJSON, SingleImageUploaderSettings } from './SingleImageUploaderSettings.js';
4
4
  import { Serializable } from './private/Serializable.js';
5
5
  import './Common.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- import { Color, SizeWithUnitAndAspect, ColorJSON, SizeWithUnitAndAspectJSON } from './Common.js';
2
+ import { ColorJSON, Color, SizeWithUnitAndAspect, SizeWithUnitAndAspectJSON } from './Common.js';
3
3
  import { Serializable } from './private/Serializable.js';
4
4
 
5
5
  type ViewfinderTypeNone = "none";
@@ -1 +1 @@
1
- var q=Object.create;var o=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var t=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var l=(a,b)=>(b=Symbol[a])?b:Symbol.for("Symbol."+a);var x=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var v=(a,b,c,e)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of s(b))!u.call(a,d)&&d!==c&&o(a,d,{get:()=>b[d],enumerable:!(e=r(b,d))||e.enumerable});return a};var y=(a,b,c)=>(c=a!=null?q(t(a)):{},v(b||!a||!a.__esModule?o(c,"default",{value:a,enumerable:!0}):c,a));var w=function(a,b){this[0]=a,this[1]=b;},z=(a,b,c)=>{var e=(h,g,i,k)=>{try{var m=c[h](g),n=(g=m.value)instanceof w,p=m.done;Promise.resolve(n?g[0]:g).then(j=>n?e(h==="return"?h:"next",g[1]?{done:j.done,value:j.value}:j,i,k):i({value:j,done:p})).catch(j=>e("throw",j,i,k));}catch(j){k(j);}},d=h=>f[h]=g=>new Promise((i,k)=>e(h,g,i,k)),f={};return c=c.apply(a,b),f[l("asyncIterator")]=()=>f,d("next"),d("throw"),d("return"),f};var A=(a,b,c)=>(b=a[l("asyncIterator")])?b.call(a):(a=a[l("iterator")](),b={},c=(e,d)=>(d=a[e])&&(b[e]=f=>new Promise((h,g,i)=>(f=d.call(a,f),i=f.done,Promise.resolve(f.value).then(k=>h({value:k,done:i}),g)))),c("next"),c("return"),b);export{x as a,y as b,w as c,z as d,A as e};
1
+ var q=Object.create;var o=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var t=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var l=(a,b)=>(b=Symbol[a])?b:Symbol.for("Symbol."+a);var x=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var v=(a,b,c,e)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of s(b))!u.call(a,d)&&d!==c&&o(a,d,{get:()=>b[d],enumerable:!(e=r(b,d))||e.enumerable});return a};var y=(a,b,c)=>(c=a!=null?q(t(a)):{},v(b||!a||!a.__esModule?o(c,"default",{value:a,enumerable:true}):c,a));var w=function(a,b){this[0]=a,this[1]=b;},z=(a,b,c)=>{var e=(h,g,i,k)=>{try{var m=c[h](g),n=(g=m.value)instanceof w,p=m.done;Promise.resolve(n?g[0]:g).then(j=>n?e(h==="return"?h:"next",g[1]?{done:j.done,value:j.value}:j,i,k):i({value:j,done:p})).catch(j=>e("throw",j,i,k));}catch(j){k(j);}},d=h=>f[h]=g=>new Promise((i,k)=>e(h,g,i,k)),f={};return c=c.apply(a,b),f[l("asyncIterator")]=()=>f,d("next"),d("throw"),d("return"),f};var A=(a,b,c)=>(b=a[l("asyncIterator")])?b.call(a):(a=a[l("iterator")](),b={},c=(e,d)=>(d=a[e])&&(b[e]=f=>new Promise((h,g,i)=>(f=d.call(a,f),i=f.done,Promise.resolve(f.value).then(k=>h({value:k,done:i}),g)))),c("next"),c("return"),b);export{x as a,y as b,w as c,z as d,A as e};
@@ -0,0 +1,3 @@
1
+ import {b,a as a$3,c,f as f$1}from'./chunk-OZQL57EF.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$5}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-MU6SADSF.js';import {a as a$4}from'./chunk-LSZZVJ6B.js';var h="scandit-progress-bar",n="aria-valuenow",f="aria-valuemin",w="aria-valuemax",a=class a extends a$1{constructor(){super();let e=this.attachShadow({mode:"open"});e.innerHTML=a$2`
2
+ <div id="scandit-progress" role="progressbar" aria-valuemin="0" aria-valuemax="100" />
3
+ `,e.append(a.createStyleElement().cloneNode(true)),this.progress=e.querySelector("#scandit-progress");}static get observedAttributes(){return ["value","min","max"]}static createStyleElement(){return a$4`:host{display:inline-block;--indeterminate-bubble-width:35%;--accent-color:#${b.toJSON()};--start-gradient-color:#${a$3.toJSON()};--end-gradient-color:#${c.toJSON()};--secondary-color:#${f$1.toJSON()};width:100%}:host [role=progressbar]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:.5rem;overflow:hidden;position:relative}:host [role=progressbar]:after,:host [role=progressbar]:before{background:var(--accent-color);border-radius:.5rem;content:" ";height:.5rem;left:0;position:absolute;top:0}:host([variant=gradient]) [role=progressbar]:after,:host([variant=gradient]) [role=progressbar]:before{background:linear-gradient(90deg,var(--start-gradient-color) 0,var(--end-gradient-color) 100%)}:host(:focus-visible){border-radius:.5rem;outline-color:var(--accent-color);outline-offset:5px}:host [role=progressbar]:not([aria-valuenow]):after{animation:indeterminate-progress-bar 2.5s ease infinite;width:var(--indeterminate-bubble-width);z-index:1}:host [role=progressbar][aria-valuenow]:after{animation:none;width:0}:host [role=progressbar][aria-valuenow]:before{background-color:var(--accent-color);border-radius:.5rem;transition:width .3s linear;width:calc(var(--aria-valuenow)*1%)}:host [role=progressbar]{background-color:var(--secondary-color);border-radius:.5rem}@keyframes indeterminate-progress-bar{0%{left:0}50%{left:calc(100% - var(--indeterminate-bubble-width))}}`}get min(){var r;let e=(r=this.getAttribute("min"))!=null?r:0;return Number(e)}get max(){var r;let e=(r=this.getAttribute("max"))!=null?r:1;return Number(e)}set max(e){e!==null&&this.setAttribute("max",String(e));}get value(){let e=this.getAttribute("value");return e==null||e===""?null:Number(e)}set value(e){if(e==null){this.removeAttribute("value");return}e>=this.min&&e<=this.max&&this.setAttribute("value",String(e));}static create(){return document.createElement(h)}static register(){a$5({[a.tag]:a});}attributeChangedCallback(){this.update();}connectedCallback(){this.update();}update(){let{min:e,max:r,value:i,progress:t}=this;if(t==null||t.setAttribute(f,e.toString()),t==null||t.setAttribute(w,r.toString()),i==null){t==null||t.removeAttribute(n),t==null||t.removeAttribute("style");return}if(i>=e&&i<=r){let v=(i-e)/(r-e)*100,l=String(v);t==null||t.setAttribute(n,l),t==null||t.setAttribute("style",`--${n}: ${l}`);}}};a.tag=h;var o=a;o.register();export{o as a};
@@ -1 +1 @@
1
- import {b}from'./chunk-QBDQQMQ5.js';import {b as b$1}from'./chunk-LA6TM76R.js';var d=(e=>(e.Nonzero="nonzero",e.Evenodd="evenodd",e))(d||{}),n=class n extends b{constructor(e){super();this._context=null;this.isNextDrawPending=!1;this.latestCommands=new Uint8Array([]);this.canvas=e,this.doDrawLoop=this.doDraw.bind(this);}get context(){if(!this._context&&(this._context=this.canvas.getContext("2d"),!this._context))throw new TypeError("CanvasRenderingContext cannot be retrieved.");return this._context}draw(e){if(this.latestCommands=e,!this.isCanvasReady()){this.postponeDraw();return}this.isNextDrawPending||(this.isNextDrawPending=!0,requestAnimationFrame(this.doDrawLoop));}updateCanvasSizeAttributes(e,s,t=window.devicePixelRatio){let i=Math.round(e*t),r=Math.round(s*t);(i!==this.canvas.width||r!==this.canvas.height)&&(this.canvas.width=i,this.canvas.height=r,this.context.scale(t,t));}startObservingCanvasResize(){if(!this.resizeObserver){if(!n.ResizeObserver)throw new Error("PrivateCanvasDrawer.ResizeObserver is not set");this.resizeObserver=new n.ResizeObserver(e=>{var r;let[s]=e,{width:t,height:i}=(r=s.contentRect)!=null?r:this.canvas;t===0||i===0||(this.updateCanvasSizeAttributes(t,i),this.latestCommands.length!==0&&(this.draw(this.latestCommands),this.latestCommands=new Uint8Array([])));}),this.resizeObserver.observe(this.canvas);}}endObservingCanvasResize(){this.resizeObserver&&this.resizeObserver.unobserve(this.canvas);}doDraw(){this.context.clearRect(0,0,this.canvas.width,this.canvas.height);let e=new b$1(this.latestCommands);for(;!e.isConsumed();){let s=e.extractCommandType();this.drawSingleCommand(s,e);}this.isNextDrawPending=!1;}postponeDraw(){this.startObservingCanvasResize();}isCanvasReady(){return this.canvas.width>0&&this.canvas.height>0}};n.ResizeObserver="ResizeObserver"in globalThis?globalThis.ResizeObserver:void 0;var h=n;export{d as a,h as b};
1
+ import {b}from'./chunk-QBDQQMQ5.js';import {b as b$1}from'./chunk-LA6TM76R.js';var d=(e=>(e.Nonzero="nonzero",e.Evenodd="evenodd",e))(d||{}),n=class n extends b{constructor(e){super();this._context=null;this.isNextDrawPending=false;this.latestCommands=new Uint8Array([]);this.canvas=e,this.doDrawLoop=this.doDraw.bind(this);}get context(){if(!this._context&&(this._context=this.canvas.getContext("2d"),!this._context))throw new TypeError("CanvasRenderingContext cannot be retrieved.");return this._context}draw(e){if(this.latestCommands=e,!this.isCanvasReady()){this.postponeDraw();return}this.isNextDrawPending||(this.isNextDrawPending=true,requestAnimationFrame(this.doDrawLoop));}updateCanvasSizeAttributes(e,s,t=window.devicePixelRatio){let i=Math.round(e*t),r=Math.round(s*t);(i!==this.canvas.width||r!==this.canvas.height)&&(this.canvas.width=i,this.canvas.height=r,this.context.scale(t,t));}startObservingCanvasResize(){if(!this.resizeObserver){if(!n.ResizeObserver)throw new Error("PrivateCanvasDrawer.ResizeObserver is not set");this.resizeObserver=new n.ResizeObserver(e=>{var r;let[s]=e,{width:t,height:i}=(r=s.contentRect)!=null?r:this.canvas;t===0||i===0||(this.updateCanvasSizeAttributes(t,i),this.latestCommands.length!==0&&(this.draw(this.latestCommands),this.latestCommands=new Uint8Array([])));}),this.resizeObserver.observe(this.canvas);}}endObservingCanvasResize(){this.resizeObserver&&this.resizeObserver.unobserve(this.canvas);}doDraw(){this.context.clearRect(0,0,this.canvas.width,this.canvas.height);let e=new b$1(this.latestCommands);for(;!e.isConsumed();){let s=e.extractCommandType();this.drawSingleCommand(s,e);}this.isNextDrawPending=false;}postponeDraw(){this.startObservingCanvasResize();}isCanvasReady(){return this.canvas.width>0&&this.canvas.height>0}};n.ResizeObserver="ResizeObserver"in globalThis?globalThis.ResizeObserver:void 0;var h=n;export{d as a,h as b};
@@ -1 +1 @@
1
- import {c,a,b}from'./chunk-JFRSUCMO.js';import {a as a$2}from'./chunk-EQRBQJYM.js';import {a as a$1}from'./chunk-7XQ3GHYH.js';import {a as a$3}from'./chunk-XR65N6EG.js';var s=class s{constructor(e){this.canUploadFile=!1;this._mounted=!1;this._loading=!1;this._htmlRoot=void 0;this._canvas=void 0;this._onInputCheck=void 0;this._onBeforeFileRead=void 0;this._onImageLoadError=void 0;this._onFileReaderError=void 0;this._onCaptureReady=void 0;this._resizedImageSizeLimit=1440;this._inputElement=void 0;this._buttonElement=void 0;this._chooseImageText="";this._settings=e;}get canvas(){return this._canvas||(this._canvas=document.createElement("canvas")),this._canvas}get canvasContext(){return this._canvasContext||(this._canvasContext=this.canvas.getContext("2d",{willReadFrequently:!0})),this._canvasContext}mount(e){var E;if(this._mounted)return;if(!document.head.querySelector(`[data-component=${s.componentName}]`)){let o=document.createElement("style");o.dataset.component=s.componentName,o.textContent=c,document.head.append(o);}let t=document.createElement("div");t.className=a.SINGLE_IMAGE_UPLOADER_CONTAINER,Object.assign(t.style,b.SINGLE_IMAGE_UPLOADER_CONTAINER_STYLE,this._settings.containerStyle),e.append(t);let{iconElement:n,iconStyle:d,informationElement:i,informationStyle:u,buttonElement:r,buttonStyle:p,onlyCameraCapture:b$1}=this._settings;Object.assign(n.style,b.SINGLE_IMAGE_UPLOADER_ICON_STYLE,d,{maxWidth:"100px",maxHeight:"100px"}),t.append(n),i.hasAttribute(s.DEFAULT_DOM_ATTRIBUTE)&&(Object.assign(i.style,b.SINGLE_IMAGE_UPLOADER_INFORMATION_STYLE,u),i.textContent=a$1.getInstance().get("core.singleImageUploader.title")),t.append(i);let a$3=document.createElement("input");a$3.type="file",a$3.accept="image/*",b$1&&(a$3.capture="environment",a$3.dataset.onlyCaptureOnMobile="environment"),a$3.addEventListener("change",o=>{this.onFileUpload(o);}),a$3.addEventListener("click",o=>{var l;(l=this._onInputCheck)==null||l.call(this,o);}),a$3.addEventListener("keydown",o=>{var l;(l=this._onInputCheck)==null||l.call(this,o);});let c$1=document.createElement("label");c$1.append(a$3),r.hasAttribute(s.DEFAULT_DOM_ATTRIBUTE)&&(Object.assign(r.style,b.SINGLE_IMAGE_UPLOADER_BUTTON_STYLE,p),r.textContent=a$1.getInstance().get("core.singleImageUploader.button")),c$1.append(r),t.append(c$1);let v=document.createRange().createContextualFragment(atob(a$2)).firstElementChild;Object.assign(v.style,{position:"absolute",bottom:"1em",right:"1em",width:"10em"}),t.append(v),this._htmlRoot=t,this._mounted=!0,this._inputElement=a$3,this._buttonElement=r,this._chooseImageText=(E=r.textContent)!=null?E:"";}unmount(){var e,t;this._mounted&&((e=this._htmlRoot)==null||e.remove(),(t=document.head.querySelector(`[data-component=${s.componentName}]`))==null||t.remove(),this._mounted=!1);}setButtonState(e){this._inputElement&&(this._inputElement.disabled=e==="disabled");}getButtonState(){return this._inputElement?this._inputElement.disabled?"disabled":"enabled":"disabled"}onInputCheck(e){this._onInputCheck=e;}onBeforeFileRead(e){this._onBeforeFileRead=e;}onImageLoadError(e){this._onImageLoadError=e;}onFileReaderError(e){this._onFileReaderError=e;}onCaptureReady(e){this._onCaptureReady=e;}onAfterImageProcessed(){this.setLoading(!1);}setLoading(e){this._buttonElement&&(this.setButtonState(e?"disabled":"enabled"),this._buttonElement.textContent=e?"...":this._chooseImageText,this._loading=e);}getResizedImageDimensions(e,t){return e<=this._resizedImageSizeLimit&&t<=this._resizedImageSizeLimit?{width:e,height:t}:e>t?{width:this._resizedImageSizeLimit,height:Math.round(t/e*this._resizedImageSizeLimit)}:{width:Math.round(e/t*this._resizedImageSizeLimit),height:this._resizedImageSizeLimit}}onImageLoad(e){var i;let{height:t,width:n}=this.getResizedImageDimensions(e.naturalWidth,e.naturalHeight);this.canvasContext.canvas.width=n,this.canvasContext.canvas.height=t,this.canvasContext.drawImage(e,0,0,n,t);let d={data:this.canvasContext.getImageData(0,0,n,t).data,width:n,height:t};(i=this._onCaptureReady)==null||i.call(this,d);}onFileReaderLoad(e,t,n){e.value="",t.result!=null&&(n.addEventListener("load",()=>{this.onImageLoad(n);},{once:!0}),n.addEventListener("error",d=>{var i;(i=this._onImageLoadError)==null||i.call(this,d),this.setLoading(!1);},{once:!0}),n.src=t.result);}onFileUpload(e){var u;this.setLoading(!0);let t=e.currentTarget,{files:n}=t;if(n==null||n.length===0){this.setLoading(!1);return}if((u=this._onBeforeFileRead)==null||u.call(this,e),!this.canUploadFile){t.value="",a$3.log(a$3.Level.Warn,"Can't upload file, no capture mode enabled."),this.setLoading(!1);return}let d=new Image,i=new FileReader;i.addEventListener("load",()=>{this.onFileReaderLoad(t,i,d);}),i.addEventListener("error",r=>{var p;(p=this._onFileReaderError)==null||p.call(this,r),this.setLoading(!1);}),i.readAsDataURL(n[0]);}};s.componentName="SingleImageUploaderView",s.DEFAULT_DOM_ATTRIBUTE="data-scandit-default";var I=s;export{I as a};
1
+ import {c,a,b}from'./chunk-JFRSUCMO.js';import {a as a$2}from'./chunk-EQRBQJYM.js';import {a as a$1}from'./chunk-7XQ3GHYH.js';import {a as a$3}from'./chunk-XR65N6EG.js';var s=class s{constructor(e){this.canUploadFile=false;this._mounted=false;this._loading=false;this._htmlRoot=void 0;this._canvas=void 0;this._onInputCheck=void 0;this._onBeforeFileRead=void 0;this._onImageLoadError=void 0;this._onFileReaderError=void 0;this._onCaptureReady=void 0;this._resizedImageSizeLimit=1440;this._inputElement=void 0;this._buttonElement=void 0;this._chooseImageText="";this._settings=e;}get canvas(){return this._canvas||(this._canvas=document.createElement("canvas")),this._canvas}get canvasContext(){return this._canvasContext||(this._canvasContext=this.canvas.getContext("2d",{willReadFrequently:true})),this._canvasContext}mount(e){var E;if(this._mounted)return;if(!document.head.querySelector(`[data-component=${s.componentName}]`)){let o=document.createElement("style");o.dataset.component=s.componentName,o.textContent=c,document.head.append(o);}let t=document.createElement("div");t.className=a.SINGLE_IMAGE_UPLOADER_CONTAINER,Object.assign(t.style,b.SINGLE_IMAGE_UPLOADER_CONTAINER_STYLE,this._settings.containerStyle),e.append(t);let{iconElement:n,iconStyle:d,informationElement:i,informationStyle:u,buttonElement:r,buttonStyle:p,onlyCameraCapture:b$1}=this._settings;Object.assign(n.style,b.SINGLE_IMAGE_UPLOADER_ICON_STYLE,d,{maxWidth:"100px",maxHeight:"100px"}),t.append(n),i.hasAttribute(s.DEFAULT_DOM_ATTRIBUTE)&&(Object.assign(i.style,b.SINGLE_IMAGE_UPLOADER_INFORMATION_STYLE,u),i.textContent=a$1.getInstance().get("core.singleImageUploader.title")),t.append(i);let a$3=document.createElement("input");a$3.type="file",a$3.accept="image/*",b$1&&(a$3.capture="environment",a$3.dataset.onlyCaptureOnMobile="environment"),a$3.addEventListener("change",o=>{this.onFileUpload(o);}),a$3.addEventListener("click",o=>{var l;(l=this._onInputCheck)==null||l.call(this,o);}),a$3.addEventListener("keydown",o=>{var l;(l=this._onInputCheck)==null||l.call(this,o);});let c$1=document.createElement("label");c$1.append(a$3),r.hasAttribute(s.DEFAULT_DOM_ATTRIBUTE)&&(Object.assign(r.style,b.SINGLE_IMAGE_UPLOADER_BUTTON_STYLE,p),r.textContent=a$1.getInstance().get("core.singleImageUploader.button")),c$1.append(r),t.append(c$1);let v=document.createRange().createContextualFragment(atob(a$2)).firstElementChild;Object.assign(v.style,{position:"absolute",bottom:"1em",right:"1em",width:"10em"}),t.append(v),this._htmlRoot=t,this._mounted=true,this._inputElement=a$3,this._buttonElement=r,this._chooseImageText=(E=r.textContent)!=null?E:"";}unmount(){var e,t;this._mounted&&((e=this._htmlRoot)==null||e.remove(),(t=document.head.querySelector(`[data-component=${s.componentName}]`))==null||t.remove(),this._mounted=false);}setButtonState(e){this._inputElement&&(this._inputElement.disabled=e==="disabled");}getButtonState(){return this._inputElement?this._inputElement.disabled?"disabled":"enabled":"disabled"}onInputCheck(e){this._onInputCheck=e;}onBeforeFileRead(e){this._onBeforeFileRead=e;}onImageLoadError(e){this._onImageLoadError=e;}onFileReaderError(e){this._onFileReaderError=e;}onCaptureReady(e){this._onCaptureReady=e;}onAfterImageProcessed(){this.setLoading(false);}setLoading(e){this._buttonElement&&(this.setButtonState(e?"disabled":"enabled"),this._buttonElement.textContent=e?"...":this._chooseImageText,this._loading=e);}getResizedImageDimensions(e,t){return e<=this._resizedImageSizeLimit&&t<=this._resizedImageSizeLimit?{width:e,height:t}:e>t?{width:this._resizedImageSizeLimit,height:Math.round(t/e*this._resizedImageSizeLimit)}:{width:Math.round(e/t*this._resizedImageSizeLimit),height:this._resizedImageSizeLimit}}onImageLoad(e){var i;let{height:t,width:n}=this.getResizedImageDimensions(e.naturalWidth,e.naturalHeight);this.canvasContext.canvas.width=n,this.canvasContext.canvas.height=t,this.canvasContext.drawImage(e,0,0,n,t);let d={data:this.canvasContext.getImageData(0,0,n,t).data,width:n,height:t};(i=this._onCaptureReady)==null||i.call(this,d);}onFileReaderLoad(e,t,n){e.value="",t.result!=null&&(n.addEventListener("load",()=>{this.onImageLoad(n);},{once:true}),n.addEventListener("error",d=>{var i;(i=this._onImageLoadError)==null||i.call(this,d),this.setLoading(false);},{once:true}),n.src=t.result);}onFileUpload(e){var u;this.setLoading(true);let t=e.currentTarget,{files:n}=t;if(n==null||n.length===0){this.setLoading(false);return}if((u=this._onBeforeFileRead)==null||u.call(this,e),!this.canUploadFile){t.value="",a$3.log(a$3.Level.Warn,"Can't upload file, no capture mode enabled."),this.setLoading(false);return}let d=new Image,i=new FileReader;i.addEventListener("load",()=>{this.onFileReaderLoad(t,i,d);}),i.addEventListener("error",r=>{var p;(p=this._onFileReaderError)==null||p.call(this,r),this.setLoading(false);}),i.readAsDataURL(n[0]);}};s.componentName="SingleImageUploaderView",s.DEFAULT_DOM_ATTRIBUTE="data-scandit-default";var I=s;export{I as a};
@@ -1,2 +1,2 @@
1
- import {a,b as b$1}from'./chunk-2Q5FZVGV.js';var B=a(k=>{(function(){var g=function(){this.init();};g.prototype={init:function(){var e=this||r;return e._counter=1e3,e._html5AudioPool=[],e.html5PoolSize=10,e._codecs={},e._howls=[],e._muted=!1,e._volume=1,e._canPlayEvent="canplaythrough",e._navigator=typeof window<"u"&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=!1,e.usingWebAudio=!0,e.autoSuspend=!0,e.ctx=null,e.autoUnlock=!0,e._setup(),e},volume:function(e){var t=this||r;if(e=parseFloat(e),t.ctx||A(),typeof e<"u"&&e>=0&&e<=1){if(t._volume=e,t._muted)return t;t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e,r.ctx.currentTime);for(var n=0;n<t._howls.length;n++)if(!t._howls[n]._webAudio)for(var o=t._howls[n]._getSoundIds(),l=0;l<o.length;l++){var s=t._howls[n]._soundById(o[l]);s&&s._node&&(s._node.volume=s._volume*e);}return t}return t._volume},mute:function(e){var t=this||r;t.ctx||A(),t._muted=e,t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e?0:t._volume,r.ctx.currentTime);for(var n=0;n<t._howls.length;n++)if(!t._howls[n]._webAudio)for(var o=t._howls[n]._getSoundIds(),l=0;l<o.length;l++){var s=t._howls[n]._soundById(o[l]);s&&s._node&&(s._node.muted=e?!0:s._muted);}return t},stop:function(){for(var e=this||r,t=0;t<e._howls.length;t++)e._howls[t].stop();return e},unload:function(){for(var e=this||r,t=e._howls.length-1;t>=0;t--)e._howls[t].unload();return e.usingWebAudio&&e.ctx&&typeof e.ctx.close<"u"&&(e.ctx.close(),e.ctx=null,A()),e},codecs:function(e){return (this||r)._codecs[e.replace(/^x-/,"")]},_setup:function(){var e=this||r;if(e.state=e.ctx&&e.ctx.state||"suspended",e._autoSuspend(),!e.usingWebAudio)if(typeof Audio<"u")try{var t=new Audio;typeof t.oncanplaythrough>"u"&&(e._canPlayEvent="canplay");}catch(n){e.noAudio=!0;}else e.noAudio=!0;try{var t=new Audio;t.muted&&(e.noAudio=!0);}catch(n){}return e.noAudio||e._setupCodecs(),e},_setupCodecs:function(){var e=this||r,t=null;try{t=typeof Audio<"u"?new Audio:null;}catch(y){return e}if(!t||typeof t.canPlayType!="function")return e;var n=t.canPlayType("audio/mpeg;").replace(/^no$/,""),o=e._navigator?e._navigator.userAgent:"",l=o.match(/OPR\/(\d+)/g),s=l&&parseInt(l[0].split("/")[1],10)<33,a=o.indexOf("Safari")!==-1&&o.indexOf("Chrome")===-1,f=o.match(/Version\/(.*?) /),m=a&&f&&parseInt(f[1],10)<15;return e._codecs={mp3:!!(!s&&(n||t.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!n,opus:!!t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(t.canPlayType('audio/wav; codecs="1"')||t.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!t.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!t.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/m4a;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(t.canPlayType("audio/x-m4b;")||t.canPlayType("audio/m4b;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(t.canPlayType("audio/x-mp4;")||t.canPlayType("audio/mp4;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!m&&t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!m&&t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!t.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(t.canPlayType("audio/x-flac;")||t.canPlayType("audio/flac;")).replace(/^no$/,"")},e},_unlockAudio:function(){var e=this||r;if(!(e._audioUnlocked||!e.ctx)){e._audioUnlocked=!1,e.autoUnlock=!1,!e._mobileUnloaded&&e.ctx.sampleRate!==44100&&(e._mobileUnloaded=!0,e.unload()),e._scratchBuffer=e.ctx.createBuffer(1,1,22050);var t=function(n){for(;e._html5AudioPool.length<e.html5PoolSize;)try{var o=new Audio;o._unlocked=!0,e._releaseHtml5Audio(o);}catch(y){e.noAudio=!0;break}for(var l=0;l<e._howls.length;l++)if(!e._howls[l]._webAudio)for(var s=e._howls[l]._getSoundIds(),a=0;a<s.length;a++){var f=e._howls[l]._soundById(s[a]);f&&f._node&&!f._node._unlocked&&(f._node._unlocked=!0,f._node.load());}e._autoResume();var m=e.ctx.createBufferSource();m.buffer=e._scratchBuffer,m.connect(e.ctx.destination),typeof m.start>"u"?m.noteOn(0):m.start(0),typeof e.ctx.resume=="function"&&e.ctx.resume(),m.onended=function(){m.disconnect(0),e._audioUnlocked=!0,document.removeEventListener("touchstart",t,!0),document.removeEventListener("touchend",t,!0),document.removeEventListener("click",t,!0),document.removeEventListener("keydown",t,!0);for(var y=0;y<e._howls.length;y++)e._howls[y]._emit("unlock");};};return document.addEventListener("touchstart",t,!0),document.addEventListener("touchend",t,!0),document.addEventListener("click",t,!0),document.addEventListener("keydown",t,!0),e}},_obtainHtml5Audio:function(){var e=this||r;if(e._html5AudioPool.length)return e._html5AudioPool.pop();var t=new Audio().play();return t&&typeof Promise<"u"&&(t instanceof Promise||typeof t.then=="function")&&t.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.");}),new Audio},_releaseHtml5Audio:function(e){var t=this||r;return e._unlocked&&t._html5AudioPool.push(e),t},_autoSuspend:function(){var e=this;if(!(!e.autoSuspend||!e.ctx||typeof e.ctx.suspend>"u"||!r.usingWebAudio)){for(var t=0;t<e._howls.length;t++)if(e._howls[t]._webAudio){for(var n=0;n<e._howls[t]._sounds.length;n++)if(!e._howls[t]._sounds[n]._paused)return e}return e._suspendTimer&&clearTimeout(e._suspendTimer),e._suspendTimer=setTimeout(function(){if(e.autoSuspend){e._suspendTimer=null,e.state="suspending";var o=function(){e.state="suspended",e._resumeAfterSuspend&&(delete e._resumeAfterSuspend,e._autoResume());};e.ctx.suspend().then(o,o);}},3e4),e}},_autoResume:function(){var e=this;if(!(!e.ctx||typeof e.ctx.resume>"u"||!r.usingWebAudio))return e.state==="running"&&e.ctx.state!=="interrupted"&&e._suspendTimer?(clearTimeout(e._suspendTimer),e._suspendTimer=null):e.state==="suspended"||e.state==="running"&&e.ctx.state==="interrupted"?(e.ctx.resume().then(function(){e.state="running";for(var t=0;t<e._howls.length;t++)e._howls[t]._emit("resume");}),e._suspendTimer&&(clearTimeout(e._suspendTimer),e._suspendTimer=null)):e.state==="suspending"&&(e._resumeAfterSuspend=!0),e}};var r=new g,i=function(e){var t=this;if(!e.src||e.src.length===0){console.error("An array of source files must be passed with any new Howl.");return}t.init(e);};i.prototype={init:function(e){var t=this;return r.ctx||A(),t._autoplay=e.autoplay||!1,t._format=typeof e.format!="string"?e.format:[e.format],t._html5=e.html5||!1,t._muted=e.mute||!1,t._loop=e.loop||!1,t._pool=e.pool||5,t._preload=typeof e.preload=="boolean"||e.preload==="metadata"?e.preload:!0,t._rate=e.rate||1,t._sprite=e.sprite||{},t._src=typeof e.src!="string"?e.src:[e.src],t._volume=e.volume!==void 0?e.volume:1,t._xhr={method:e.xhr&&e.xhr.method?e.xhr.method:"GET",headers:e.xhr&&e.xhr.headers?e.xhr.headers:null,withCredentials:e.xhr&&e.xhr.withCredentials?e.xhr.withCredentials:!1},t._duration=0,t._state="unloaded",t._sounds=[],t._endTimers={},t._queue=[],t._playLock=!1,t._onend=e.onend?[{fn:e.onend}]:[],t._onfade=e.onfade?[{fn:e.onfade}]:[],t._onload=e.onload?[{fn:e.onload}]:[],t._onloaderror=e.onloaderror?[{fn:e.onloaderror}]:[],t._onplayerror=e.onplayerror?[{fn:e.onplayerror}]:[],t._onpause=e.onpause?[{fn:e.onpause}]:[],t._onplay=e.onplay?[{fn:e.onplay}]:[],t._onstop=e.onstop?[{fn:e.onstop}]:[],t._onmute=e.onmute?[{fn:e.onmute}]:[],t._onvolume=e.onvolume?[{fn:e.onvolume}]:[],t._onrate=e.onrate?[{fn:e.onrate}]:[],t._onseek=e.onseek?[{fn:e.onseek}]:[],t._onunlock=e.onunlock?[{fn:e.onunlock}]:[],t._onresume=[],t._webAudio=r.usingWebAudio&&!t._html5,typeof r.ctx<"u"&&r.ctx&&r.autoUnlock&&r._unlockAudio(),r._howls.push(t),t._autoplay&&t._queue.push({event:"play",action:function(){t.play();}}),t._preload&&t._preload!=="none"&&t.load(),t},load:function(){var e=this,t=null;if(r.noAudio){e._emit("loaderror",null,"No audio support.");return}typeof e._src=="string"&&(e._src=[e._src]);for(var n=0;n<e._src.length;n++){var o,l;if(e._format&&e._format[n])o=e._format[n];else {if(l=e._src[n],typeof l!="string"){e._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}o=/^data:audio\/([^;,]+);/i.exec(l),o||(o=/\.([^.]+)$/.exec(l.split("?",1)[0])),o&&(o=o[1].toLowerCase());}if(o||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),o&&r.codecs(o)){t=e._src[n];break}}if(!t){e._emit("loaderror",null,"No codec support for selected audio sources.");return}return e._src=t,e._state="loading",window.location.protocol==="https:"&&t.slice(0,5)==="http:"&&(e._html5=!0,e._webAudio=!1),new u(e),e._webAudio&&d(e),e},play:function(e,t){var n=this,o=null;if(typeof e=="number")o=e,e=null;else {if(typeof e=="string"&&n._state==="loaded"&&!n._sprite[e])return null;if(typeof e>"u"&&(e="__default",!n._playLock)){for(var l=0,s=0;s<n._sounds.length;s++)n._sounds[s]._paused&&!n._sounds[s]._ended&&(l++,o=n._sounds[s]._id);l===1?e=null:o=null;}}var a=o?n._soundById(o):n._inactiveSound();if(!a)return null;if(o&&!e&&(e=a._sprite||"__default"),n._state!=="loaded"){a._sprite=e,a._ended=!1;var f=a._id;return n._queue.push({event:"play",action:function(){n.play(f);}}),f}if(o&&!a._paused)return t||n._loadQueue("play"),a._id;n._webAudio&&r._autoResume();var m=Math.max(0,a._seek>0?a._seek:n._sprite[e][0]/1e3),y=Math.max(0,(n._sprite[e][0]+n._sprite[e][1])/1e3-m),w=y*1e3/Math.abs(a._rate),T=n._sprite[e][0]/1e3,S=(n._sprite[e][0]+n._sprite[e][1])/1e3;a._sprite=e,a._ended=!1;var I=function(){a._paused=!1,a._seek=m,a._start=T,a._stop=S,a._loop=!!(a._loop||n._sprite[e][2]);};if(m>=S){n._ended(a);return}var v=a._node;if(n._webAudio){var P=function(){n._playLock=!1,I(),n._refreshBuffer(a);var x=a._muted||n._muted?0:a._volume;v.gain.setValueAtTime(x,r.ctx.currentTime),a._playStart=r.ctx.currentTime,typeof v.bufferSource.start>"u"?a._loop?v.bufferSource.noteGrainOn(0,m,86400):v.bufferSource.noteGrainOn(0,m,y):a._loop?v.bufferSource.start(0,m,86400):v.bufferSource.start(0,m,y),w!==1/0&&(n._endTimers[a._id]=setTimeout(n._ended.bind(n,a),w)),t||setTimeout(function(){n._emit("play",a._id),n._loadQueue();},0);};r.state==="running"&&r.ctx.state!=="interrupted"?P():(n._playLock=!0,n.once("resume",P),n._clearTimer(a._id));}else {var M=function(){v.currentTime=m,v.muted=a._muted||n._muted||r._muted||v.muted,v.volume=a._volume*r.volume(),v.playbackRate=a._rate;try{var x=v.play();if(x&&typeof Promise<"u"&&(x instanceof Promise||typeof x.then=="function")?(n._playLock=!0,I(),x.then(function(){n._playLock=!1,v._unlocked=!0,t?n._loadQueue():n._emit("play",a._id);}).catch(function(){n._playLock=!1,n._emit("playerror",a._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),a._ended=!0,a._paused=!0;})):t||(n._playLock=!1,I(),n._emit("play",a._id)),v.playbackRate=a._rate,v.paused){n._emit("playerror",a._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}e!=="__default"||a._loop?n._endTimers[a._id]=setTimeout(n._ended.bind(n,a),w):(n._endTimers[a._id]=function(){n._ended(a),v.removeEventListener("ended",n._endTimers[a._id],!1);},v.addEventListener("ended",n._endTimers[a._id],!1));}catch(D){n._emit("playerror",a._id,D);}};v.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(v.src=n._src,v.load());var G=window&&window.ejecta||!v.readyState&&r._navigator.isCocoonJS;if(v.readyState>=3||G)M();else {n._playLock=!0,n._state="loading";var F=function(){n._state="loaded",M(),v.removeEventListener(r._canPlayEvent,F,!1);};v.addEventListener(r._canPlayEvent,F,!1),n._clearTimer(a._id);}}return a._id},pause:function(e){var t=this;if(t._state!=="loaded"||t._playLock)return t._queue.push({event:"pause",action:function(){t.pause(e);}}),t;for(var n=t._getSoundIds(e),o=0;o<n.length;o++){t._clearTimer(n[o]);var l=t._soundById(n[o]);if(l&&!l._paused&&(l._seek=t.seek(n[o]),l._rateSeek=0,l._paused=!0,t._stopFade(n[o]),l._node))if(t._webAudio){if(!l._node.bufferSource)continue;typeof l._node.bufferSource.stop>"u"?l._node.bufferSource.noteOff(0):l._node.bufferSource.stop(0),t._cleanBuffer(l._node);}else (!isNaN(l._node.duration)||l._node.duration===1/0)&&l._node.pause();arguments[1]||t._emit("pause",l?l._id:null);}return t},stop:function(e,t){var n=this;if(n._state!=="loaded"||n._playLock)return n._queue.push({event:"stop",action:function(){n.stop(e);}}),n;for(var o=n._getSoundIds(e),l=0;l<o.length;l++){n._clearTimer(o[l]);var s=n._soundById(o[l]);s&&(s._seek=s._start||0,s._rateSeek=0,s._paused=!0,s._ended=!0,n._stopFade(o[l]),s._node&&(n._webAudio?s._node.bufferSource&&(typeof s._node.bufferSource.stop>"u"?s._node.bufferSource.noteOff(0):s._node.bufferSource.stop(0),n._cleanBuffer(s._node)):(!isNaN(s._node.duration)||s._node.duration===1/0)&&(s._node.currentTime=s._start||0,s._node.pause(),s._node.duration===1/0&&n._clearSound(s._node))),t||n._emit("stop",s._id));}return n},mute:function(e,t){var n=this;if(n._state!=="loaded"||n._playLock)return n._queue.push({event:"mute",action:function(){n.mute(e,t);}}),n;if(typeof t>"u")if(typeof e=="boolean")n._muted=e;else return n._muted;for(var o=n._getSoundIds(t),l=0;l<o.length;l++){var s=n._soundById(o[l]);s&&(s._muted=e,s._interval&&n._stopFade(s._id),n._webAudio&&s._node?s._node.gain.setValueAtTime(e?0:s._volume,r.ctx.currentTime):s._node&&(s._node.muted=r._muted?!0:e),n._emit("mute",s._id));}return n},volume:function(){var e=this,t=arguments,n,o;if(t.length===0)return e._volume;if(t.length===1||t.length===2&&typeof t[1]>"u"){var l=e._getSoundIds(),s=l.indexOf(t[0]);s>=0?o=parseInt(t[0],10):n=parseFloat(t[0]);}else t.length>=2&&(n=parseFloat(t[0]),o=parseInt(t[1],10));var a;if(typeof n<"u"&&n>=0&&n<=1){if(e._state!=="loaded"||e._playLock)return e._queue.push({event:"volume",action:function(){e.volume.apply(e,t);}}),e;typeof o>"u"&&(e._volume=n),o=e._getSoundIds(o);for(var f=0;f<o.length;f++)a=e._soundById(o[f]),a&&(a._volume=n,t[2]||e._stopFade(o[f]),e._webAudio&&a._node&&!a._muted?a._node.gain.setValueAtTime(n,r.ctx.currentTime):a._node&&!a._muted&&(a._node.volume=n*r.volume()),e._emit("volume",a._id));}else return a=o?e._soundById(o):e._sounds[0],a?a._volume:0;return e},fade:function(e,t,n,o){var l=this;if(l._state!=="loaded"||l._playLock)return l._queue.push({event:"fade",action:function(){l.fade(e,t,n,o);}}),l;e=Math.min(Math.max(0,parseFloat(e)),1),t=Math.min(Math.max(0,parseFloat(t)),1),n=parseFloat(n),l.volume(e,o);for(var s=l._getSoundIds(o),a=0;a<s.length;a++){var f=l._soundById(s[a]);if(f){if(o||l._stopFade(s[a]),l._webAudio&&!f._muted){var m=r.ctx.currentTime,y=m+n/1e3;f._volume=e,f._node.gain.setValueAtTime(e,m),f._node.gain.linearRampToValueAtTime(t,y);}l._startFadeInterval(f,e,t,n,s[a],typeof o>"u");}}return l},_startFadeInterval:function(e,t,n,o,l,s){var a=this,f=t,m=n-t,y=Math.abs(m/.01),w=Math.max(4,y>0?o/y:o),T=Date.now();e._fadeTo=n,e._interval=setInterval(function(){var S=(Date.now()-T)/o;T=Date.now(),f+=m*S,f=Math.round(f*100)/100,m<0?f=Math.max(n,f):f=Math.min(n,f),a._webAudio?e._volume=f:a.volume(f,e._id,!0),s&&(a._volume=f),(n<t&&f<=n||n>t&&f>=n)&&(clearInterval(e._interval),e._interval=null,e._fadeTo=null,a.volume(n,e._id),a._emit("fade",e._id));},w);},_stopFade:function(e){var t=this,n=t._soundById(e);return n&&n._interval&&(t._webAudio&&n._node.gain.cancelScheduledValues(r.ctx.currentTime),clearInterval(n._interval),n._interval=null,t.volume(n._fadeTo,e),n._fadeTo=null,t._emit("fade",e)),t},loop:function(){var e=this,t=arguments,n,o,l;if(t.length===0)return e._loop;if(t.length===1)if(typeof t[0]=="boolean")n=t[0],e._loop=n;else return l=e._soundById(parseInt(t[0],10)),l?l._loop:!1;else t.length===2&&(n=t[0],o=parseInt(t[1],10));for(var s=e._getSoundIds(o),a=0;a<s.length;a++)l=e._soundById(s[a]),l&&(l._loop=n,e._webAudio&&l._node&&l._node.bufferSource&&(l._node.bufferSource.loop=n,n&&(l._node.bufferSource.loopStart=l._start||0,l._node.bufferSource.loopEnd=l._stop,e.playing(s[a])&&(e.pause(s[a],!0),e.play(s[a],!0)))));return e},rate:function(){var e=this,t=arguments,n,o;if(t.length===0)o=e._sounds[0]._id;else if(t.length===1){var l=e._getSoundIds(),s=l.indexOf(t[0]);s>=0?o=parseInt(t[0],10):n=parseFloat(t[0]);}else t.length===2&&(n=parseFloat(t[0]),o=parseInt(t[1],10));var a;if(typeof n=="number"){if(e._state!=="loaded"||e._playLock)return e._queue.push({event:"rate",action:function(){e.rate.apply(e,t);}}),e;typeof o>"u"&&(e._rate=n),o=e._getSoundIds(o);for(var f=0;f<o.length;f++)if(a=e._soundById(o[f]),a){e.playing(o[f])&&(a._rateSeek=e.seek(o[f]),a._playStart=e._webAudio?r.ctx.currentTime:a._playStart),a._rate=n,e._webAudio&&a._node&&a._node.bufferSource?a._node.bufferSource.playbackRate.setValueAtTime(n,r.ctx.currentTime):a._node&&(a._node.playbackRate=n);var m=e.seek(o[f]),y=(e._sprite[a._sprite][0]+e._sprite[a._sprite][1])/1e3-m,w=y*1e3/Math.abs(a._rate);(e._endTimers[o[f]]||!a._paused)&&(e._clearTimer(o[f]),e._endTimers[o[f]]=setTimeout(e._ended.bind(e,a),w)),e._emit("rate",a._id);}}else return a=e._soundById(o),a?a._rate:e._rate;return e},seek:function(){var e=this,t=arguments,n,o;if(t.length===0)e._sounds.length&&(o=e._sounds[0]._id);else if(t.length===1){var l=e._getSoundIds(),s=l.indexOf(t[0]);s>=0?o=parseInt(t[0],10):e._sounds.length&&(o=e._sounds[0]._id,n=parseFloat(t[0]));}else t.length===2&&(n=parseFloat(t[0]),o=parseInt(t[1],10));if(typeof o>"u")return 0;if(typeof n=="number"&&(e._state!=="loaded"||e._playLock))return e._queue.push({event:"seek",action:function(){e.seek.apply(e,t);}}),e;var a=e._soundById(o);if(a)if(typeof n=="number"&&n>=0){var f=e.playing(o);f&&e.pause(o,!0),a._seek=n,a._ended=!1,e._clearTimer(o),!e._webAudio&&a._node&&!isNaN(a._node.duration)&&(a._node.currentTime=n);var m=function(){f&&e.play(o,!0),e._emit("seek",o);};if(f&&!e._webAudio){var y=function(){e._playLock?setTimeout(y,0):m();};setTimeout(y,0);}else m();}else if(e._webAudio){var w=e.playing(o)?r.ctx.currentTime-a._playStart:0,T=a._rateSeek?a._rateSeek-a._seek:0;return a._seek+(T+w*Math.abs(a._rate))}else return a._node.currentTime;return e},playing:function(e){var t=this;if(typeof e=="number"){var n=t._soundById(e);return n?!n._paused:!1}for(var o=0;o<t._sounds.length;o++)if(!t._sounds[o]._paused)return !0;return !1},duration:function(e){var t=this,n=t._duration,o=t._soundById(e);return o&&(n=t._sprite[o._sprite][1]/1e3),n},state:function(){return this._state},unload:function(){for(var e=this,t=e._sounds,n=0;n<t.length;n++)t[n]._paused||e.stop(t[n]._id),e._webAudio||(e._clearSound(t[n]._node),t[n]._node.removeEventListener("error",t[n]._errorFn,!1),t[n]._node.removeEventListener(r._canPlayEvent,t[n]._loadFn,!1),t[n]._node.removeEventListener("ended",t[n]._endFn,!1),r._releaseHtml5Audio(t[n]._node)),delete t[n]._node,e._clearTimer(t[n]._id);var o=r._howls.indexOf(e);o>=0&&r._howls.splice(o,1);var l=!0;for(n=0;n<r._howls.length;n++)if(r._howls[n]._src===e._src||e._src.indexOf(r._howls[n]._src)>=0){l=!1;break}return c&&l&&delete c[e._src],r.noAudio=!1,e._state="unloaded",e._sounds=[],e=null,null},on:function(e,t,n,o){var l=this,s=l["_on"+e];return typeof t=="function"&&s.push(o?{id:n,fn:t,once:o}:{id:n,fn:t}),l},off:function(e,t,n){var o=this,l=o["_on"+e],s=0;if(typeof t=="number"&&(n=t,t=null),t||n)for(s=0;s<l.length;s++){var a=n===l[s].id;if(t===l[s].fn&&a||!t&&a){l.splice(s,1);break}}else if(e)o["_on"+e]=[];else {var f=Object.keys(o);for(s=0;s<f.length;s++)f[s].indexOf("_on")===0&&Array.isArray(o[f[s]])&&(o[f[s]]=[]);}return o},once:function(e,t,n){var o=this;return o.on(e,t,n,1),o},_emit:function(e,t,n){for(var o=this,l=o["_on"+e],s=l.length-1;s>=0;s--)(!l[s].id||l[s].id===t||e==="load")&&(setTimeout((function(a){a.call(this,t,n);}).bind(o,l[s].fn),0),l[s].once&&o.off(e,l[s].fn,l[s].id));return o._loadQueue(e),o},_loadQueue:function(e){var t=this;if(t._queue.length>0){var n=t._queue[0];n.event===e&&(t._queue.shift(),t._loadQueue()),e||n.action();}return t},_ended:function(e){var t=this,n=e._sprite;if(!t._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime<e._stop)return setTimeout(t._ended.bind(t,e),100),t;var o=!!(e._loop||t._sprite[n][2]);if(t._emit("end",e._id),!t._webAudio&&o&&t.stop(e._id,!0).play(e._id),t._webAudio&&o){t._emit("play",e._id),e._seek=e._start||0,e._rateSeek=0,e._playStart=r.ctx.currentTime;var l=(e._stop-e._start)*1e3/Math.abs(e._rate);t._endTimers[e._id]=setTimeout(t._ended.bind(t,e),l);}return t._webAudio&&!o&&(e._paused=!0,e._ended=!0,e._seek=e._start||0,e._rateSeek=0,t._clearTimer(e._id),t._cleanBuffer(e._node),r._autoSuspend()),!t._webAudio&&!o&&t.stop(e._id,!0),t},_clearTimer:function(e){var t=this;if(t._endTimers[e]){if(typeof t._endTimers[e]!="function")clearTimeout(t._endTimers[e]);else {var n=t._soundById(e);n&&n._node&&n._node.removeEventListener("ended",t._endTimers[e],!1);}delete t._endTimers[e];}return t},_soundById:function(e){for(var t=this,n=0;n<t._sounds.length;n++)if(e===t._sounds[n]._id)return t._sounds[n];return null},_inactiveSound:function(){var e=this;e._drain();for(var t=0;t<e._sounds.length;t++)if(e._sounds[t]._ended)return e._sounds[t].reset();return new u(e)},_drain:function(){var e=this,t=e._pool,n=0,o=0;if(!(e._sounds.length<t)){for(o=0;o<e._sounds.length;o++)e._sounds[o]._ended&&n++;for(o=e._sounds.length-1;o>=0;o--){if(n<=t)return;e._sounds[o]._ended&&(e._webAudio&&e._sounds[o]._node&&e._sounds[o]._node.disconnect(0),e._sounds.splice(o,1),n--);}}},_getSoundIds:function(e){var t=this;if(typeof e>"u"){for(var n=[],o=0;o<t._sounds.length;o++)n.push(t._sounds[o]._id);return n}else return [e]},_refreshBuffer:function(e){var t=this;return e._node.bufferSource=r.ctx.createBufferSource(),e._node.bufferSource.buffer=c[t._src],e._panner?e._node.bufferSource.connect(e._panner):e._node.bufferSource.connect(e._node),e._node.bufferSource.loop=e._loop,e._loop&&(e._node.bufferSource.loopStart=e._start||0,e._node.bufferSource.loopEnd=e._stop||0),e._node.bufferSource.playbackRate.setValueAtTime(e._rate,r.ctx.currentTime),t},_cleanBuffer:function(e){var t=this,n=r._navigator&&r._navigator.vendor.indexOf("Apple")>=0;if(!e.bufferSource)return t;if(r._scratchBuffer&&e.bufferSource&&(e.bufferSource.onended=null,e.bufferSource.disconnect(0),n))try{e.bufferSource.buffer=r._scratchBuffer;}catch(o){}return e.bufferSource=null,t},_clearSound:function(e){var t=/MSIE |Trident\//.test(r._navigator&&r._navigator.userAgent);t||(e.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA");}};var u=function(e){this._parent=e,this.init();};u.prototype={init:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++r._counter,t._sounds.push(e),e.create(),e},create:function(){var e=this,t=e._parent,n=r._muted||e._muted||e._parent._muted?0:e._volume;return t._webAudio?(e._node=typeof r.ctx.createGain>"u"?r.ctx.createGainNode():r.ctx.createGain(),e._node.gain.setValueAtTime(n,r.ctx.currentTime),e._node.paused=!0,e._node.connect(r.masterGain)):r.noAudio||(e._node=r._obtainHtml5Audio(),e._errorFn=e._errorListener.bind(e),e._node.addEventListener("error",e._errorFn,!1),e._loadFn=e._loadListener.bind(e),e._node.addEventListener(r._canPlayEvent,e._loadFn,!1),e._endFn=e._endListener.bind(e),e._node.addEventListener("ended",e._endFn,!1),e._node.src=t._src,e._node.preload=t._preload===!0?"auto":t._preload,e._node.volume=n*r.volume(),e._node.load()),e},reset:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._rateSeek=0,e._paused=!0,e._ended=!0,e._sprite="__default",e._id=++r._counter,e},_errorListener:function(){var e=this;e._parent._emit("loaderror",e._id,e._node.error?e._node.error.code:0),e._node.removeEventListener("error",e._errorFn,!1);},_loadListener:function(){var e=this,t=e._parent;t._duration=Math.ceil(e._node.duration*10)/10,Object.keys(t._sprite).length===0&&(t._sprite={__default:[0,t._duration*1e3]}),t._state!=="loaded"&&(t._state="loaded",t._emit("load"),t._loadQueue()),e._node.removeEventListener(r._canPlayEvent,e._loadFn,!1);},_endListener:function(){var e=this,t=e._parent;t._duration===1/0&&(t._duration=Math.ceil(e._node.duration*10)/10,t._sprite.__default[1]===1/0&&(t._sprite.__default[1]=t._duration*1e3),t._ended(e)),e._node.removeEventListener("ended",e._endFn,!1);}};var c={},d=function(e){var t=e._src;if(c[t]){e._duration=c[t].duration,_(e);return}if(/^data:[^;]+;base64,/.test(t)){for(var n=atob(t.split(",")[1]),o=new Uint8Array(n.length),l=0;l<n.length;++l)o[l]=n.charCodeAt(l);p(o.buffer,e);}else {var s=new XMLHttpRequest;s.open(e._xhr.method,t,!0),s.withCredentials=e._xhr.withCredentials,s.responseType="arraybuffer",e._xhr.headers&&Object.keys(e._xhr.headers).forEach(function(a){s.setRequestHeader(a,e._xhr.headers[a]);}),s.onload=function(){var a=(s.status+"")[0];if(a!=="0"&&a!=="2"&&a!=="3"){e._emit("loaderror",null,"Failed loading audio file with status: "+s.status+".");return}p(s.response,e);},s.onerror=function(){e._webAudio&&(e._html5=!0,e._webAudio=!1,e._sounds=[],delete c[t],e.load());},h(s);}},h=function(e){try{e.send();}catch(t){e.onerror();}},p=function(e,t){var n=function(){t._emit("loaderror",null,"Decoding audio data failed.");},o=function(l){l&&t._sounds.length>0?(c[t._src]=l,_(t,l)):n();};typeof Promise<"u"&&r.ctx.decodeAudioData.length===1?r.ctx.decodeAudioData(e).then(o).catch(n):r.ctx.decodeAudioData(e,o,n);},_=function(e,t){t&&!e._duration&&(e._duration=t.duration),Object.keys(e._sprite).length===0&&(e._sprite={__default:[0,e._duration*1e3]}),e._state!=="loaded"&&(e._state="loaded",e._emit("load"),e._loadQueue());},A=function(){if(r.usingWebAudio){try{typeof AudioContext<"u"?r.ctx=new AudioContext:typeof webkitAudioContext<"u"?r.ctx=new webkitAudioContext:r.usingWebAudio=!1;}catch(l){r.usingWebAudio=!1;}r.ctx||(r.usingWebAudio=!1);var e=/iP(hone|od|ad)/.test(r._navigator&&r._navigator.platform),t=r._navigator&&r._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),n=t?parseInt(t[1],10):null;if(e&&n&&n<9){var o=/safari/.test(r._navigator&&r._navigator.userAgent.toLowerCase());r._navigator&&!o&&(r.usingWebAudio=!1);}r.usingWebAudio&&(r.masterGain=typeof r.ctx.createGain>"u"?r.ctx.createGainNode():r.ctx.createGain(),r.masterGain.gain.setValueAtTime(r._muted?0:r._volume,r.ctx.currentTime),r.masterGain.connect(r.ctx.destination)),r._setup();}};typeof define=="function"&&define.amd&&define([],function(){return {Howler:r,Howl:i}}),typeof k<"u"&&(k.Howler=r,k.Howl=i),typeof global<"u"?(global.HowlerGlobal=g,global.Howler=r,global.Howl=i,global.Sound=u):typeof window<"u"&&(window.HowlerGlobal=g,window.Howler=r,window.Howl=i,window.Sound=u);})();(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(r){var i=this;if(!i.ctx||!i.ctx.listener)return i;for(var u=i._howls.length-1;u>=0;u--)i._howls[u].stereo(r);return i},HowlerGlobal.prototype.pos=function(r,i,u){var c=this;if(!c.ctx||!c.ctx.listener)return c;if(i=typeof i!="number"?c._pos[1]:i,u=typeof u!="number"?c._pos[2]:u,typeof r=="number")c._pos=[r,i,u],typeof c.ctx.listener.positionX<"u"?(c.ctx.listener.positionX.setTargetAtTime(c._pos[0],Howler.ctx.currentTime,.1),c.ctx.listener.positionY.setTargetAtTime(c._pos[1],Howler.ctx.currentTime,.1),c.ctx.listener.positionZ.setTargetAtTime(c._pos[2],Howler.ctx.currentTime,.1)):c.ctx.listener.setPosition(c._pos[0],c._pos[1],c._pos[2]);else return c._pos;return c},HowlerGlobal.prototype.orientation=function(r,i,u,c,d,h){var p=this;if(!p.ctx||!p.ctx.listener)return p;var _=p._orientation;if(i=typeof i!="number"?_[1]:i,u=typeof u!="number"?_[2]:u,c=typeof c!="number"?_[3]:c,d=typeof d!="number"?_[4]:d,h=typeof h!="number"?_[5]:h,typeof r=="number")p._orientation=[r,i,u,c,d,h],typeof p.ctx.listener.forwardX<"u"?(p.ctx.listener.forwardX.setTargetAtTime(r,Howler.ctx.currentTime,.1),p.ctx.listener.forwardY.setTargetAtTime(i,Howler.ctx.currentTime,.1),p.ctx.listener.forwardZ.setTargetAtTime(u,Howler.ctx.currentTime,.1),p.ctx.listener.upX.setTargetAtTime(c,Howler.ctx.currentTime,.1),p.ctx.listener.upY.setTargetAtTime(d,Howler.ctx.currentTime,.1),p.ctx.listener.upZ.setTargetAtTime(h,Howler.ctx.currentTime,.1)):p.ctx.listener.setOrientation(r,i,u,c,d,h);else return _;return p},Howl.prototype.init=function(r){return function(i){var u=this;return u._orientation=i.orientation||[1,0,0],u._stereo=i.stereo||null,u._pos=i.pos||null,u._pannerAttr={coneInnerAngle:typeof i.coneInnerAngle<"u"?i.coneInnerAngle:360,coneOuterAngle:typeof i.coneOuterAngle<"u"?i.coneOuterAngle:360,coneOuterGain:typeof i.coneOuterGain<"u"?i.coneOuterGain:0,distanceModel:typeof i.distanceModel<"u"?i.distanceModel:"inverse",maxDistance:typeof i.maxDistance<"u"?i.maxDistance:1e4,panningModel:typeof i.panningModel<"u"?i.panningModel:"HRTF",refDistance:typeof i.refDistance<"u"?i.refDistance:1,rolloffFactor:typeof i.rolloffFactor<"u"?i.rolloffFactor:1},u._onstereo=i.onstereo?[{fn:i.onstereo}]:[],u._onpos=i.onpos?[{fn:i.onpos}]:[],u._onorientation=i.onorientation?[{fn:i.onorientation}]:[],r.call(this,i)}}(Howl.prototype.init),Howl.prototype.stereo=function(r,i){var u=this;if(!u._webAudio)return u;if(u._state!=="loaded")return u._queue.push({event:"stereo",action:function(){u.stereo(r,i);}}),u;var c=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof i>"u")if(typeof r=="number")u._stereo=r,u._pos=[r,0,0];else return u._stereo;for(var d=u._getSoundIds(i),h=0;h<d.length;h++){var p=u._soundById(d[h]);if(p)if(typeof r=="number")p._stereo=r,p._pos=[r,0,0],p._node&&(p._pannerAttr.panningModel="equalpower",(!p._panner||!p._panner.pan)&&g(p,c),c==="spatial"?typeof p._panner.positionX<"u"?(p._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),p._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),p._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):p._panner.setPosition(r,0,0):p._panner.pan.setValueAtTime(r,Howler.ctx.currentTime)),u._emit("stereo",p._id);else return p._stereo}return u},Howl.prototype.pos=function(r,i,u,c){var d=this;if(!d._webAudio)return d;if(d._state!=="loaded")return d._queue.push({event:"pos",action:function(){d.pos(r,i,u,c);}}),d;if(i=typeof i!="number"?0:i,u=typeof u!="number"?-.5:u,typeof c>"u")if(typeof r=="number")d._pos=[r,i,u];else return d._pos;for(var h=d._getSoundIds(c),p=0;p<h.length;p++){var _=d._soundById(h[p]);if(_)if(typeof r=="number")_._pos=[r,i,u],_._node&&((!_._panner||_._panner.pan)&&g(_,"spatial"),typeof _._panner.positionX<"u"?(_._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),_._panner.positionY.setValueAtTime(i,Howler.ctx.currentTime),_._panner.positionZ.setValueAtTime(u,Howler.ctx.currentTime)):_._panner.setPosition(r,i,u)),d._emit("pos",_._id);else return _._pos}return d},Howl.prototype.orientation=function(r,i,u,c){var d=this;if(!d._webAudio)return d;if(d._state!=="loaded")return d._queue.push({event:"orientation",action:function(){d.orientation(r,i,u,c);}}),d;if(i=typeof i!="number"?d._orientation[1]:i,u=typeof u!="number"?d._orientation[2]:u,typeof c>"u")if(typeof r=="number")d._orientation=[r,i,u];else return d._orientation;for(var h=d._getSoundIds(c),p=0;p<h.length;p++){var _=d._soundById(h[p]);if(_)if(typeof r=="number")_._orientation=[r,i,u],_._node&&(_._panner||(_._pos||(_._pos=d._pos||[0,0,-.5]),g(_,"spatial")),typeof _._panner.orientationX<"u"?(_._panner.orientationX.setValueAtTime(r,Howler.ctx.currentTime),_._panner.orientationY.setValueAtTime(i,Howler.ctx.currentTime),_._panner.orientationZ.setValueAtTime(u,Howler.ctx.currentTime)):_._panner.setOrientation(r,i,u)),d._emit("orientation",_._id);else return _._orientation}return d},Howl.prototype.pannerAttr=function(){var r=this,i=arguments,u,c,d;if(!r._webAudio)return r;if(i.length===0)return r._pannerAttr;if(i.length===1)if(typeof i[0]=="object")u=i[0],typeof c>"u"&&(u.pannerAttr||(u.pannerAttr={coneInnerAngle:u.coneInnerAngle,coneOuterAngle:u.coneOuterAngle,coneOuterGain:u.coneOuterGain,distanceModel:u.distanceModel,maxDistance:u.maxDistance,refDistance:u.refDistance,rolloffFactor:u.rolloffFactor,panningModel:u.panningModel}),r._pannerAttr={coneInnerAngle:typeof u.pannerAttr.coneInnerAngle<"u"?u.pannerAttr.coneInnerAngle:r._coneInnerAngle,coneOuterAngle:typeof u.pannerAttr.coneOuterAngle<"u"?u.pannerAttr.coneOuterAngle:r._coneOuterAngle,coneOuterGain:typeof u.pannerAttr.coneOuterGain<"u"?u.pannerAttr.coneOuterGain:r._coneOuterGain,distanceModel:typeof u.pannerAttr.distanceModel<"u"?u.pannerAttr.distanceModel:r._distanceModel,maxDistance:typeof u.pannerAttr.maxDistance<"u"?u.pannerAttr.maxDistance:r._maxDistance,refDistance:typeof u.pannerAttr.refDistance<"u"?u.pannerAttr.refDistance:r._refDistance,rolloffFactor:typeof u.pannerAttr.rolloffFactor<"u"?u.pannerAttr.rolloffFactor:r._rolloffFactor,panningModel:typeof u.pannerAttr.panningModel<"u"?u.pannerAttr.panningModel:r._panningModel});else return d=r._soundById(parseInt(i[0],10)),d?d._pannerAttr:r._pannerAttr;else i.length===2&&(u=i[0],c=parseInt(i[1],10));for(var h=r._getSoundIds(c),p=0;p<h.length;p++)if(d=r._soundById(h[p]),d){var _=d._pannerAttr;_={coneInnerAngle:typeof u.coneInnerAngle<"u"?u.coneInnerAngle:_.coneInnerAngle,coneOuterAngle:typeof u.coneOuterAngle<"u"?u.coneOuterAngle:_.coneOuterAngle,coneOuterGain:typeof u.coneOuterGain<"u"?u.coneOuterGain:_.coneOuterGain,distanceModel:typeof u.distanceModel<"u"?u.distanceModel:_.distanceModel,maxDistance:typeof u.maxDistance<"u"?u.maxDistance:_.maxDistance,refDistance:typeof u.refDistance<"u"?u.refDistance:_.refDistance,rolloffFactor:typeof u.rolloffFactor<"u"?u.rolloffFactor:_.rolloffFactor,panningModel:typeof u.panningModel<"u"?u.panningModel:_.panningModel};var A=d._panner;A||(d._pos||(d._pos=r._pos||[0,0,-.5]),g(d,"spatial"),A=d._panner),A.coneInnerAngle=_.coneInnerAngle,A.coneOuterAngle=_.coneOuterAngle,A.coneOuterGain=_.coneOuterGain,A.distanceModel=_.distanceModel,A.maxDistance=_.maxDistance,A.refDistance=_.refDistance,A.rolloffFactor=_.rolloffFactor,A.panningModel=_.panningModel;}return r},Sound.prototype.init=function(r){return function(){var i=this,u=i._parent;i._orientation=u._orientation,i._stereo=u._stereo,i._pos=u._pos,i._pannerAttr=u._pannerAttr,r.call(this),i._stereo?u.stereo(i._stereo):i._pos&&u.pos(i._pos[0],i._pos[1],i._pos[2],i._id);}}(Sound.prototype.init),Sound.prototype.reset=function(r){return function(){var i=this,u=i._parent;return i._orientation=u._orientation,i._stereo=u._stereo,i._pos=u._pos,i._pannerAttr=u._pannerAttr,i._stereo?u.stereo(i._stereo):i._pos?u.pos(i._pos[0],i._pos[1],i._pos[2],i._id):i._panner&&(i._panner.disconnect(0),i._panner=void 0,u._refreshBuffer(i)),r.call(this)}}(Sound.prototype.reset);var g=function(r,i){i=i||"spatial",i==="spatial"?(r._panner=Howler.ctx.createPanner(),r._panner.coneInnerAngle=r._pannerAttr.coneInnerAngle,r._panner.coneOuterAngle=r._pannerAttr.coneOuterAngle,r._panner.coneOuterGain=r._pannerAttr.coneOuterGain,r._panner.distanceModel=r._pannerAttr.distanceModel,r._panner.maxDistance=r._pannerAttr.maxDistance,r._panner.refDistance=r._pannerAttr.refDistance,r._panner.rolloffFactor=r._pannerAttr.rolloffFactor,r._panner.panningModel=r._pannerAttr.panningModel,typeof r._panner.positionX<"u"?(r._panner.positionX.setValueAtTime(r._pos[0],Howler.ctx.currentTime),r._panner.positionY.setValueAtTime(r._pos[1],Howler.ctx.currentTime),r._panner.positionZ.setValueAtTime(r._pos[2],Howler.ctx.currentTime)):r._panner.setPosition(r._pos[0],r._pos[1],r._pos[2]),typeof r._panner.orientationX<"u"?(r._panner.orientationX.setValueAtTime(r._orientation[0],Howler.ctx.currentTime),r._panner.orientationY.setValueAtTime(r._orientation[1],Howler.ctx.currentTime),r._panner.orientationZ.setValueAtTime(r._orientation[2],Howler.ctx.currentTime)):r._panner.setOrientation(r._orientation[0],r._orientation[1],r._orientation[2])):(r._panner=Howler.ctx.createStereoPanner(),r._panner.pan.setValueAtTime(r._stereo,Howler.ctx.currentTime)),r._panner.connect(r._node),r._paused||r._parent.pause(r._id,!0).play(r._id,!0);};})();});var O=b$1(B(),1),H=new Map;H.set("default",()=>import('../assets/beepSound.js'));var b=class b{constructor(r){this.resource=null;this.resource=r;}static get defaultSound(){return b._defaultSound instanceof b||(b._defaultSound=new b("default")),b._defaultSound}toJSONObject(){return this.resource!==null?{resource:this.resource}:{}}async play(){var r;if(this.audio==null&&this.resource!=null)if(H.has(this.resource)){let i=await((r=H.get(this.resource))==null?void 0:r());i!=null&&i.beepSound&&(this.audio=new O.Howl({src:i.beepSound,html5:!0}));}else this.audio=new O.Howl({src:this.resource,html5:!0});this.audio!=null&&this.audio.play();}};b._defaultSound=null;var L=b;
1
+ import {a,b as b$1}from'./chunk-2Q5FZVGV.js';var B=a(k=>{(function(){var g=function(){this.init();};g.prototype={init:function(){var e=this||r;return e._counter=1e3,e._html5AudioPool=[],e.html5PoolSize=10,e._codecs={},e._howls=[],e._muted=false,e._volume=1,e._canPlayEvent="canplaythrough",e._navigator=typeof window<"u"&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=false,e.usingWebAudio=true,e.autoSuspend=true,e.ctx=null,e.autoUnlock=true,e._setup(),e},volume:function(e){var t=this||r;if(e=parseFloat(e),t.ctx||A(),typeof e<"u"&&e>=0&&e<=1){if(t._volume=e,t._muted)return t;t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e,r.ctx.currentTime);for(var n=0;n<t._howls.length;n++)if(!t._howls[n]._webAudio)for(var o=t._howls[n]._getSoundIds(),l=0;l<o.length;l++){var s=t._howls[n]._soundById(o[l]);s&&s._node&&(s._node.volume=s._volume*e);}return t}return t._volume},mute:function(e){var t=this||r;t.ctx||A(),t._muted=e,t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e?0:t._volume,r.ctx.currentTime);for(var n=0;n<t._howls.length;n++)if(!t._howls[n]._webAudio)for(var o=t._howls[n]._getSoundIds(),l=0;l<o.length;l++){var s=t._howls[n]._soundById(o[l]);s&&s._node&&(s._node.muted=e?true:s._muted);}return t},stop:function(){for(var e=this||r,t=0;t<e._howls.length;t++)e._howls[t].stop();return e},unload:function(){for(var e=this||r,t=e._howls.length-1;t>=0;t--)e._howls[t].unload();return e.usingWebAudio&&e.ctx&&typeof e.ctx.close<"u"&&(e.ctx.close(),e.ctx=null,A()),e},codecs:function(e){return (this||r)._codecs[e.replace(/^x-/,"")]},_setup:function(){var e=this||r;if(e.state=e.ctx&&e.ctx.state||"suspended",e._autoSuspend(),!e.usingWebAudio)if(typeof Audio<"u")try{var t=new Audio;typeof t.oncanplaythrough>"u"&&(e._canPlayEvent="canplay");}catch(n){e.noAudio=true;}else e.noAudio=true;try{var t=new Audio;t.muted&&(e.noAudio=true);}catch(n){}return e.noAudio||e._setupCodecs(),e},_setupCodecs:function(){var e=this||r,t=null;try{t=typeof Audio<"u"?new Audio:null;}catch(y){return e}if(!t||typeof t.canPlayType!="function")return e;var n=t.canPlayType("audio/mpeg;").replace(/^no$/,""),o=e._navigator?e._navigator.userAgent:"",l=o.match(/OPR\/(\d+)/g),s=l&&parseInt(l[0].split("/")[1],10)<33,a=o.indexOf("Safari")!==-1&&o.indexOf("Chrome")===-1,f=o.match(/Version\/(.*?) /),m=a&&f&&parseInt(f[1],10)<15;return e._codecs={mp3:!!(!s&&(n||t.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!n,opus:!!t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(t.canPlayType('audio/wav; codecs="1"')||t.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!t.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!t.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/m4a;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(t.canPlayType("audio/x-m4b;")||t.canPlayType("audio/m4b;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(t.canPlayType("audio/x-mp4;")||t.canPlayType("audio/mp4;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!m&&t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!m&&t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!t.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(t.canPlayType("audio/x-flac;")||t.canPlayType("audio/flac;")).replace(/^no$/,"")},e},_unlockAudio:function(){var e=this||r;if(!(e._audioUnlocked||!e.ctx)){e._audioUnlocked=false,e.autoUnlock=false,!e._mobileUnloaded&&e.ctx.sampleRate!==44100&&(e._mobileUnloaded=true,e.unload()),e._scratchBuffer=e.ctx.createBuffer(1,1,22050);var t=function(n){for(;e._html5AudioPool.length<e.html5PoolSize;)try{var o=new Audio;o._unlocked=true,e._releaseHtml5Audio(o);}catch(y){e.noAudio=true;break}for(var l=0;l<e._howls.length;l++)if(!e._howls[l]._webAudio)for(var s=e._howls[l]._getSoundIds(),a=0;a<s.length;a++){var f=e._howls[l]._soundById(s[a]);f&&f._node&&!f._node._unlocked&&(f._node._unlocked=true,f._node.load());}e._autoResume();var m=e.ctx.createBufferSource();m.buffer=e._scratchBuffer,m.connect(e.ctx.destination),typeof m.start>"u"?m.noteOn(0):m.start(0),typeof e.ctx.resume=="function"&&e.ctx.resume(),m.onended=function(){m.disconnect(0),e._audioUnlocked=true,document.removeEventListener("touchstart",t,true),document.removeEventListener("touchend",t,true),document.removeEventListener("click",t,true),document.removeEventListener("keydown",t,true);for(var y=0;y<e._howls.length;y++)e._howls[y]._emit("unlock");};};return document.addEventListener("touchstart",t,true),document.addEventListener("touchend",t,true),document.addEventListener("click",t,true),document.addEventListener("keydown",t,true),e}},_obtainHtml5Audio:function(){var e=this||r;if(e._html5AudioPool.length)return e._html5AudioPool.pop();var t=new Audio().play();return t&&typeof Promise<"u"&&(t instanceof Promise||typeof t.then=="function")&&t.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.");}),new Audio},_releaseHtml5Audio:function(e){var t=this||r;return e._unlocked&&t._html5AudioPool.push(e),t},_autoSuspend:function(){var e=this;if(!(!e.autoSuspend||!e.ctx||typeof e.ctx.suspend>"u"||!r.usingWebAudio)){for(var t=0;t<e._howls.length;t++)if(e._howls[t]._webAudio){for(var n=0;n<e._howls[t]._sounds.length;n++)if(!e._howls[t]._sounds[n]._paused)return e}return e._suspendTimer&&clearTimeout(e._suspendTimer),e._suspendTimer=setTimeout(function(){if(e.autoSuspend){e._suspendTimer=null,e.state="suspending";var o=function(){e.state="suspended",e._resumeAfterSuspend&&(delete e._resumeAfterSuspend,e._autoResume());};e.ctx.suspend().then(o,o);}},3e4),e}},_autoResume:function(){var e=this;if(!(!e.ctx||typeof e.ctx.resume>"u"||!r.usingWebAudio))return e.state==="running"&&e.ctx.state!=="interrupted"&&e._suspendTimer?(clearTimeout(e._suspendTimer),e._suspendTimer=null):e.state==="suspended"||e.state==="running"&&e.ctx.state==="interrupted"?(e.ctx.resume().then(function(){e.state="running";for(var t=0;t<e._howls.length;t++)e._howls[t]._emit("resume");}),e._suspendTimer&&(clearTimeout(e._suspendTimer),e._suspendTimer=null)):e.state==="suspending"&&(e._resumeAfterSuspend=true),e}};var r=new g,i=function(e){var t=this;if(!e.src||e.src.length===0){console.error("An array of source files must be passed with any new Howl.");return}t.init(e);};i.prototype={init:function(e){var t=this;return r.ctx||A(),t._autoplay=e.autoplay||false,t._format=typeof e.format!="string"?e.format:[e.format],t._html5=e.html5||false,t._muted=e.mute||false,t._loop=e.loop||false,t._pool=e.pool||5,t._preload=typeof e.preload=="boolean"||e.preload==="metadata"?e.preload:true,t._rate=e.rate||1,t._sprite=e.sprite||{},t._src=typeof e.src!="string"?e.src:[e.src],t._volume=e.volume!==void 0?e.volume:1,t._xhr={method:e.xhr&&e.xhr.method?e.xhr.method:"GET",headers:e.xhr&&e.xhr.headers?e.xhr.headers:null,withCredentials:e.xhr&&e.xhr.withCredentials?e.xhr.withCredentials:false},t._duration=0,t._state="unloaded",t._sounds=[],t._endTimers={},t._queue=[],t._playLock=false,t._onend=e.onend?[{fn:e.onend}]:[],t._onfade=e.onfade?[{fn:e.onfade}]:[],t._onload=e.onload?[{fn:e.onload}]:[],t._onloaderror=e.onloaderror?[{fn:e.onloaderror}]:[],t._onplayerror=e.onplayerror?[{fn:e.onplayerror}]:[],t._onpause=e.onpause?[{fn:e.onpause}]:[],t._onplay=e.onplay?[{fn:e.onplay}]:[],t._onstop=e.onstop?[{fn:e.onstop}]:[],t._onmute=e.onmute?[{fn:e.onmute}]:[],t._onvolume=e.onvolume?[{fn:e.onvolume}]:[],t._onrate=e.onrate?[{fn:e.onrate}]:[],t._onseek=e.onseek?[{fn:e.onseek}]:[],t._onunlock=e.onunlock?[{fn:e.onunlock}]:[],t._onresume=[],t._webAudio=r.usingWebAudio&&!t._html5,typeof r.ctx<"u"&&r.ctx&&r.autoUnlock&&r._unlockAudio(),r._howls.push(t),t._autoplay&&t._queue.push({event:"play",action:function(){t.play();}}),t._preload&&t._preload!=="none"&&t.load(),t},load:function(){var e=this,t=null;if(r.noAudio){e._emit("loaderror",null,"No audio support.");return}typeof e._src=="string"&&(e._src=[e._src]);for(var n=0;n<e._src.length;n++){var o,l;if(e._format&&e._format[n])o=e._format[n];else {if(l=e._src[n],typeof l!="string"){e._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}o=/^data:audio\/([^;,]+);/i.exec(l),o||(o=/\.([^.]+)$/.exec(l.split("?",1)[0])),o&&(o=o[1].toLowerCase());}if(o||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),o&&r.codecs(o)){t=e._src[n];break}}if(!t){e._emit("loaderror",null,"No codec support for selected audio sources.");return}return e._src=t,e._state="loading",window.location.protocol==="https:"&&t.slice(0,5)==="http:"&&(e._html5=true,e._webAudio=false),new u(e),e._webAudio&&d(e),e},play:function(e,t){var n=this,o=null;if(typeof e=="number")o=e,e=null;else {if(typeof e=="string"&&n._state==="loaded"&&!n._sprite[e])return null;if(typeof e>"u"&&(e="__default",!n._playLock)){for(var l=0,s=0;s<n._sounds.length;s++)n._sounds[s]._paused&&!n._sounds[s]._ended&&(l++,o=n._sounds[s]._id);l===1?e=null:o=null;}}var a=o?n._soundById(o):n._inactiveSound();if(!a)return null;if(o&&!e&&(e=a._sprite||"__default"),n._state!=="loaded"){a._sprite=e,a._ended=false;var f=a._id;return n._queue.push({event:"play",action:function(){n.play(f);}}),f}if(o&&!a._paused)return t||n._loadQueue("play"),a._id;n._webAudio&&r._autoResume();var m=Math.max(0,a._seek>0?a._seek:n._sprite[e][0]/1e3),y=Math.max(0,(n._sprite[e][0]+n._sprite[e][1])/1e3-m),w=y*1e3/Math.abs(a._rate),T=n._sprite[e][0]/1e3,S=(n._sprite[e][0]+n._sprite[e][1])/1e3;a._sprite=e,a._ended=false;var I=function(){a._paused=false,a._seek=m,a._start=T,a._stop=S,a._loop=!!(a._loop||n._sprite[e][2]);};if(m>=S){n._ended(a);return}var v=a._node;if(n._webAudio){var P=function(){n._playLock=false,I(),n._refreshBuffer(a);var x=a._muted||n._muted?0:a._volume;v.gain.setValueAtTime(x,r.ctx.currentTime),a._playStart=r.ctx.currentTime,typeof v.bufferSource.start>"u"?a._loop?v.bufferSource.noteGrainOn(0,m,86400):v.bufferSource.noteGrainOn(0,m,y):a._loop?v.bufferSource.start(0,m,86400):v.bufferSource.start(0,m,y),w!==1/0&&(n._endTimers[a._id]=setTimeout(n._ended.bind(n,a),w)),t||setTimeout(function(){n._emit("play",a._id),n._loadQueue();},0);};r.state==="running"&&r.ctx.state!=="interrupted"?P():(n._playLock=true,n.once("resume",P),n._clearTimer(a._id));}else {var M=function(){v.currentTime=m,v.muted=a._muted||n._muted||r._muted||v.muted,v.volume=a._volume*r.volume(),v.playbackRate=a._rate;try{var x=v.play();if(x&&typeof Promise<"u"&&(x instanceof Promise||typeof x.then=="function")?(n._playLock=true,I(),x.then(function(){n._playLock=false,v._unlocked=true,t?n._loadQueue():n._emit("play",a._id);}).catch(function(){n._playLock=false,n._emit("playerror",a._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),a._ended=true,a._paused=true;})):t||(n._playLock=false,I(),n._emit("play",a._id)),v.playbackRate=a._rate,v.paused){n._emit("playerror",a._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}e!=="__default"||a._loop?n._endTimers[a._id]=setTimeout(n._ended.bind(n,a),w):(n._endTimers[a._id]=function(){n._ended(a),v.removeEventListener("ended",n._endTimers[a._id],false);},v.addEventListener("ended",n._endTimers[a._id],false));}catch(D){n._emit("playerror",a._id,D);}};v.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(v.src=n._src,v.load());var G=window&&window.ejecta||!v.readyState&&r._navigator.isCocoonJS;if(v.readyState>=3||G)M();else {n._playLock=true,n._state="loading";var F=function(){n._state="loaded",M(),v.removeEventListener(r._canPlayEvent,F,false);};v.addEventListener(r._canPlayEvent,F,false),n._clearTimer(a._id);}}return a._id},pause:function(e){var t=this;if(t._state!=="loaded"||t._playLock)return t._queue.push({event:"pause",action:function(){t.pause(e);}}),t;for(var n=t._getSoundIds(e),o=0;o<n.length;o++){t._clearTimer(n[o]);var l=t._soundById(n[o]);if(l&&!l._paused&&(l._seek=t.seek(n[o]),l._rateSeek=0,l._paused=true,t._stopFade(n[o]),l._node))if(t._webAudio){if(!l._node.bufferSource)continue;typeof l._node.bufferSource.stop>"u"?l._node.bufferSource.noteOff(0):l._node.bufferSource.stop(0),t._cleanBuffer(l._node);}else (!isNaN(l._node.duration)||l._node.duration===1/0)&&l._node.pause();arguments[1]||t._emit("pause",l?l._id:null);}return t},stop:function(e,t){var n=this;if(n._state!=="loaded"||n._playLock)return n._queue.push({event:"stop",action:function(){n.stop(e);}}),n;for(var o=n._getSoundIds(e),l=0;l<o.length;l++){n._clearTimer(o[l]);var s=n._soundById(o[l]);s&&(s._seek=s._start||0,s._rateSeek=0,s._paused=true,s._ended=true,n._stopFade(o[l]),s._node&&(n._webAudio?s._node.bufferSource&&(typeof s._node.bufferSource.stop>"u"?s._node.bufferSource.noteOff(0):s._node.bufferSource.stop(0),n._cleanBuffer(s._node)):(!isNaN(s._node.duration)||s._node.duration===1/0)&&(s._node.currentTime=s._start||0,s._node.pause(),s._node.duration===1/0&&n._clearSound(s._node))),t||n._emit("stop",s._id));}return n},mute:function(e,t){var n=this;if(n._state!=="loaded"||n._playLock)return n._queue.push({event:"mute",action:function(){n.mute(e,t);}}),n;if(typeof t>"u")if(typeof e=="boolean")n._muted=e;else return n._muted;for(var o=n._getSoundIds(t),l=0;l<o.length;l++){var s=n._soundById(o[l]);s&&(s._muted=e,s._interval&&n._stopFade(s._id),n._webAudio&&s._node?s._node.gain.setValueAtTime(e?0:s._volume,r.ctx.currentTime):s._node&&(s._node.muted=r._muted?true:e),n._emit("mute",s._id));}return n},volume:function(){var e=this,t=arguments,n,o;if(t.length===0)return e._volume;if(t.length===1||t.length===2&&typeof t[1]>"u"){var l=e._getSoundIds(),s=l.indexOf(t[0]);s>=0?o=parseInt(t[0],10):n=parseFloat(t[0]);}else t.length>=2&&(n=parseFloat(t[0]),o=parseInt(t[1],10));var a;if(typeof n<"u"&&n>=0&&n<=1){if(e._state!=="loaded"||e._playLock)return e._queue.push({event:"volume",action:function(){e.volume.apply(e,t);}}),e;typeof o>"u"&&(e._volume=n),o=e._getSoundIds(o);for(var f=0;f<o.length;f++)a=e._soundById(o[f]),a&&(a._volume=n,t[2]||e._stopFade(o[f]),e._webAudio&&a._node&&!a._muted?a._node.gain.setValueAtTime(n,r.ctx.currentTime):a._node&&!a._muted&&(a._node.volume=n*r.volume()),e._emit("volume",a._id));}else return a=o?e._soundById(o):e._sounds[0],a?a._volume:0;return e},fade:function(e,t,n,o){var l=this;if(l._state!=="loaded"||l._playLock)return l._queue.push({event:"fade",action:function(){l.fade(e,t,n,o);}}),l;e=Math.min(Math.max(0,parseFloat(e)),1),t=Math.min(Math.max(0,parseFloat(t)),1),n=parseFloat(n),l.volume(e,o);for(var s=l._getSoundIds(o),a=0;a<s.length;a++){var f=l._soundById(s[a]);if(f){if(o||l._stopFade(s[a]),l._webAudio&&!f._muted){var m=r.ctx.currentTime,y=m+n/1e3;f._volume=e,f._node.gain.setValueAtTime(e,m),f._node.gain.linearRampToValueAtTime(t,y);}l._startFadeInterval(f,e,t,n,s[a],typeof o>"u");}}return l},_startFadeInterval:function(e,t,n,o,l,s){var a=this,f=t,m=n-t,y=Math.abs(m/.01),w=Math.max(4,y>0?o/y:o),T=Date.now();e._fadeTo=n,e._interval=setInterval(function(){var S=(Date.now()-T)/o;T=Date.now(),f+=m*S,f=Math.round(f*100)/100,m<0?f=Math.max(n,f):f=Math.min(n,f),a._webAudio?e._volume=f:a.volume(f,e._id,true),s&&(a._volume=f),(n<t&&f<=n||n>t&&f>=n)&&(clearInterval(e._interval),e._interval=null,e._fadeTo=null,a.volume(n,e._id),a._emit("fade",e._id));},w);},_stopFade:function(e){var t=this,n=t._soundById(e);return n&&n._interval&&(t._webAudio&&n._node.gain.cancelScheduledValues(r.ctx.currentTime),clearInterval(n._interval),n._interval=null,t.volume(n._fadeTo,e),n._fadeTo=null,t._emit("fade",e)),t},loop:function(){var e=this,t=arguments,n,o,l;if(t.length===0)return e._loop;if(t.length===1)if(typeof t[0]=="boolean")n=t[0],e._loop=n;else return l=e._soundById(parseInt(t[0],10)),l?l._loop:false;else t.length===2&&(n=t[0],o=parseInt(t[1],10));for(var s=e._getSoundIds(o),a=0;a<s.length;a++)l=e._soundById(s[a]),l&&(l._loop=n,e._webAudio&&l._node&&l._node.bufferSource&&(l._node.bufferSource.loop=n,n&&(l._node.bufferSource.loopStart=l._start||0,l._node.bufferSource.loopEnd=l._stop,e.playing(s[a])&&(e.pause(s[a],true),e.play(s[a],true)))));return e},rate:function(){var e=this,t=arguments,n,o;if(t.length===0)o=e._sounds[0]._id;else if(t.length===1){var l=e._getSoundIds(),s=l.indexOf(t[0]);s>=0?o=parseInt(t[0],10):n=parseFloat(t[0]);}else t.length===2&&(n=parseFloat(t[0]),o=parseInt(t[1],10));var a;if(typeof n=="number"){if(e._state!=="loaded"||e._playLock)return e._queue.push({event:"rate",action:function(){e.rate.apply(e,t);}}),e;typeof o>"u"&&(e._rate=n),o=e._getSoundIds(o);for(var f=0;f<o.length;f++)if(a=e._soundById(o[f]),a){e.playing(o[f])&&(a._rateSeek=e.seek(o[f]),a._playStart=e._webAudio?r.ctx.currentTime:a._playStart),a._rate=n,e._webAudio&&a._node&&a._node.bufferSource?a._node.bufferSource.playbackRate.setValueAtTime(n,r.ctx.currentTime):a._node&&(a._node.playbackRate=n);var m=e.seek(o[f]),y=(e._sprite[a._sprite][0]+e._sprite[a._sprite][1])/1e3-m,w=y*1e3/Math.abs(a._rate);(e._endTimers[o[f]]||!a._paused)&&(e._clearTimer(o[f]),e._endTimers[o[f]]=setTimeout(e._ended.bind(e,a),w)),e._emit("rate",a._id);}}else return a=e._soundById(o),a?a._rate:e._rate;return e},seek:function(){var e=this,t=arguments,n,o;if(t.length===0)e._sounds.length&&(o=e._sounds[0]._id);else if(t.length===1){var l=e._getSoundIds(),s=l.indexOf(t[0]);s>=0?o=parseInt(t[0],10):e._sounds.length&&(o=e._sounds[0]._id,n=parseFloat(t[0]));}else t.length===2&&(n=parseFloat(t[0]),o=parseInt(t[1],10));if(typeof o>"u")return 0;if(typeof n=="number"&&(e._state!=="loaded"||e._playLock))return e._queue.push({event:"seek",action:function(){e.seek.apply(e,t);}}),e;var a=e._soundById(o);if(a)if(typeof n=="number"&&n>=0){var f=e.playing(o);f&&e.pause(o,true),a._seek=n,a._ended=false,e._clearTimer(o),!e._webAudio&&a._node&&!isNaN(a._node.duration)&&(a._node.currentTime=n);var m=function(){f&&e.play(o,true),e._emit("seek",o);};if(f&&!e._webAudio){var y=function(){e._playLock?setTimeout(y,0):m();};setTimeout(y,0);}else m();}else if(e._webAudio){var w=e.playing(o)?r.ctx.currentTime-a._playStart:0,T=a._rateSeek?a._rateSeek-a._seek:0;return a._seek+(T+w*Math.abs(a._rate))}else return a._node.currentTime;return e},playing:function(e){var t=this;if(typeof e=="number"){var n=t._soundById(e);return n?!n._paused:false}for(var o=0;o<t._sounds.length;o++)if(!t._sounds[o]._paused)return true;return false},duration:function(e){var t=this,n=t._duration,o=t._soundById(e);return o&&(n=t._sprite[o._sprite][1]/1e3),n},state:function(){return this._state},unload:function(){for(var e=this,t=e._sounds,n=0;n<t.length;n++)t[n]._paused||e.stop(t[n]._id),e._webAudio||(e._clearSound(t[n]._node),t[n]._node.removeEventListener("error",t[n]._errorFn,false),t[n]._node.removeEventListener(r._canPlayEvent,t[n]._loadFn,false),t[n]._node.removeEventListener("ended",t[n]._endFn,false),r._releaseHtml5Audio(t[n]._node)),delete t[n]._node,e._clearTimer(t[n]._id);var o=r._howls.indexOf(e);o>=0&&r._howls.splice(o,1);var l=true;for(n=0;n<r._howls.length;n++)if(r._howls[n]._src===e._src||e._src.indexOf(r._howls[n]._src)>=0){l=false;break}return c&&l&&delete c[e._src],r.noAudio=false,e._state="unloaded",e._sounds=[],e=null,null},on:function(e,t,n,o){var l=this,s=l["_on"+e];return typeof t=="function"&&s.push(o?{id:n,fn:t,once:o}:{id:n,fn:t}),l},off:function(e,t,n){var o=this,l=o["_on"+e],s=0;if(typeof t=="number"&&(n=t,t=null),t||n)for(s=0;s<l.length;s++){var a=n===l[s].id;if(t===l[s].fn&&a||!t&&a){l.splice(s,1);break}}else if(e)o["_on"+e]=[];else {var f=Object.keys(o);for(s=0;s<f.length;s++)f[s].indexOf("_on")===0&&Array.isArray(o[f[s]])&&(o[f[s]]=[]);}return o},once:function(e,t,n){var o=this;return o.on(e,t,n,1),o},_emit:function(e,t,n){for(var o=this,l=o["_on"+e],s=l.length-1;s>=0;s--)(!l[s].id||l[s].id===t||e==="load")&&(setTimeout((function(a){a.call(this,t,n);}).bind(o,l[s].fn),0),l[s].once&&o.off(e,l[s].fn,l[s].id));return o._loadQueue(e),o},_loadQueue:function(e){var t=this;if(t._queue.length>0){var n=t._queue[0];n.event===e&&(t._queue.shift(),t._loadQueue()),e||n.action();}return t},_ended:function(e){var t=this,n=e._sprite;if(!t._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime<e._stop)return setTimeout(t._ended.bind(t,e),100),t;var o=!!(e._loop||t._sprite[n][2]);if(t._emit("end",e._id),!t._webAudio&&o&&t.stop(e._id,true).play(e._id),t._webAudio&&o){t._emit("play",e._id),e._seek=e._start||0,e._rateSeek=0,e._playStart=r.ctx.currentTime;var l=(e._stop-e._start)*1e3/Math.abs(e._rate);t._endTimers[e._id]=setTimeout(t._ended.bind(t,e),l);}return t._webAudio&&!o&&(e._paused=true,e._ended=true,e._seek=e._start||0,e._rateSeek=0,t._clearTimer(e._id),t._cleanBuffer(e._node),r._autoSuspend()),!t._webAudio&&!o&&t.stop(e._id,true),t},_clearTimer:function(e){var t=this;if(t._endTimers[e]){if(typeof t._endTimers[e]!="function")clearTimeout(t._endTimers[e]);else {var n=t._soundById(e);n&&n._node&&n._node.removeEventListener("ended",t._endTimers[e],false);}delete t._endTimers[e];}return t},_soundById:function(e){for(var t=this,n=0;n<t._sounds.length;n++)if(e===t._sounds[n]._id)return t._sounds[n];return null},_inactiveSound:function(){var e=this;e._drain();for(var t=0;t<e._sounds.length;t++)if(e._sounds[t]._ended)return e._sounds[t].reset();return new u(e)},_drain:function(){var e=this,t=e._pool,n=0,o=0;if(!(e._sounds.length<t)){for(o=0;o<e._sounds.length;o++)e._sounds[o]._ended&&n++;for(o=e._sounds.length-1;o>=0;o--){if(n<=t)return;e._sounds[o]._ended&&(e._webAudio&&e._sounds[o]._node&&e._sounds[o]._node.disconnect(0),e._sounds.splice(o,1),n--);}}},_getSoundIds:function(e){var t=this;if(typeof e>"u"){for(var n=[],o=0;o<t._sounds.length;o++)n.push(t._sounds[o]._id);return n}else return [e]},_refreshBuffer:function(e){var t=this;return e._node.bufferSource=r.ctx.createBufferSource(),e._node.bufferSource.buffer=c[t._src],e._panner?e._node.bufferSource.connect(e._panner):e._node.bufferSource.connect(e._node),e._node.bufferSource.loop=e._loop,e._loop&&(e._node.bufferSource.loopStart=e._start||0,e._node.bufferSource.loopEnd=e._stop||0),e._node.bufferSource.playbackRate.setValueAtTime(e._rate,r.ctx.currentTime),t},_cleanBuffer:function(e){var t=this,n=r._navigator&&r._navigator.vendor.indexOf("Apple")>=0;if(!e.bufferSource)return t;if(r._scratchBuffer&&e.bufferSource&&(e.bufferSource.onended=null,e.bufferSource.disconnect(0),n))try{e.bufferSource.buffer=r._scratchBuffer;}catch(o){}return e.bufferSource=null,t},_clearSound:function(e){var t=/MSIE |Trident\//.test(r._navigator&&r._navigator.userAgent);t||(e.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA");}};var u=function(e){this._parent=e,this.init();};u.prototype={init:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._paused=true,e._ended=true,e._sprite="__default",e._id=++r._counter,t._sounds.push(e),e.create(),e},create:function(){var e=this,t=e._parent,n=r._muted||e._muted||e._parent._muted?0:e._volume;return t._webAudio?(e._node=typeof r.ctx.createGain>"u"?r.ctx.createGainNode():r.ctx.createGain(),e._node.gain.setValueAtTime(n,r.ctx.currentTime),e._node.paused=true,e._node.connect(r.masterGain)):r.noAudio||(e._node=r._obtainHtml5Audio(),e._errorFn=e._errorListener.bind(e),e._node.addEventListener("error",e._errorFn,false),e._loadFn=e._loadListener.bind(e),e._node.addEventListener(r._canPlayEvent,e._loadFn,false),e._endFn=e._endListener.bind(e),e._node.addEventListener("ended",e._endFn,false),e._node.src=t._src,e._node.preload=t._preload===true?"auto":t._preload,e._node.volume=n*r.volume(),e._node.load()),e},reset:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._rateSeek=0,e._paused=true,e._ended=true,e._sprite="__default",e._id=++r._counter,e},_errorListener:function(){var e=this;e._parent._emit("loaderror",e._id,e._node.error?e._node.error.code:0),e._node.removeEventListener("error",e._errorFn,false);},_loadListener:function(){var e=this,t=e._parent;t._duration=Math.ceil(e._node.duration*10)/10,Object.keys(t._sprite).length===0&&(t._sprite={__default:[0,t._duration*1e3]}),t._state!=="loaded"&&(t._state="loaded",t._emit("load"),t._loadQueue()),e._node.removeEventListener(r._canPlayEvent,e._loadFn,false);},_endListener:function(){var e=this,t=e._parent;t._duration===1/0&&(t._duration=Math.ceil(e._node.duration*10)/10,t._sprite.__default[1]===1/0&&(t._sprite.__default[1]=t._duration*1e3),t._ended(e)),e._node.removeEventListener("ended",e._endFn,false);}};var c={},d=function(e){var t=e._src;if(c[t]){e._duration=c[t].duration,_(e);return}if(/^data:[^;]+;base64,/.test(t)){for(var n=atob(t.split(",")[1]),o=new Uint8Array(n.length),l=0;l<n.length;++l)o[l]=n.charCodeAt(l);p(o.buffer,e);}else {var s=new XMLHttpRequest;s.open(e._xhr.method,t,true),s.withCredentials=e._xhr.withCredentials,s.responseType="arraybuffer",e._xhr.headers&&Object.keys(e._xhr.headers).forEach(function(a){s.setRequestHeader(a,e._xhr.headers[a]);}),s.onload=function(){var a=(s.status+"")[0];if(a!=="0"&&a!=="2"&&a!=="3"){e._emit("loaderror",null,"Failed loading audio file with status: "+s.status+".");return}p(s.response,e);},s.onerror=function(){e._webAudio&&(e._html5=true,e._webAudio=false,e._sounds=[],delete c[t],e.load());},h(s);}},h=function(e){try{e.send();}catch(t){e.onerror();}},p=function(e,t){var n=function(){t._emit("loaderror",null,"Decoding audio data failed.");},o=function(l){l&&t._sounds.length>0?(c[t._src]=l,_(t,l)):n();};typeof Promise<"u"&&r.ctx.decodeAudioData.length===1?r.ctx.decodeAudioData(e).then(o).catch(n):r.ctx.decodeAudioData(e,o,n);},_=function(e,t){t&&!e._duration&&(e._duration=t.duration),Object.keys(e._sprite).length===0&&(e._sprite={__default:[0,e._duration*1e3]}),e._state!=="loaded"&&(e._state="loaded",e._emit("load"),e._loadQueue());},A=function(){if(r.usingWebAudio){try{typeof AudioContext<"u"?r.ctx=new AudioContext:typeof webkitAudioContext<"u"?r.ctx=new webkitAudioContext:r.usingWebAudio=false;}catch(l){r.usingWebAudio=false;}r.ctx||(r.usingWebAudio=false);var e=/iP(hone|od|ad)/.test(r._navigator&&r._navigator.platform),t=r._navigator&&r._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),n=t?parseInt(t[1],10):null;if(e&&n&&n<9){var o=/safari/.test(r._navigator&&r._navigator.userAgent.toLowerCase());r._navigator&&!o&&(r.usingWebAudio=false);}r.usingWebAudio&&(r.masterGain=typeof r.ctx.createGain>"u"?r.ctx.createGainNode():r.ctx.createGain(),r.masterGain.gain.setValueAtTime(r._muted?0:r._volume,r.ctx.currentTime),r.masterGain.connect(r.ctx.destination)),r._setup();}};typeof define=="function"&&define.amd&&define([],function(){return {Howler:r,Howl:i}}),typeof k<"u"&&(k.Howler=r,k.Howl=i),typeof global<"u"?(global.HowlerGlobal=g,global.Howler=r,global.Howl=i,global.Sound=u):typeof window<"u"&&(window.HowlerGlobal=g,window.Howler=r,window.Howl=i,window.Sound=u);})();(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(r){var i=this;if(!i.ctx||!i.ctx.listener)return i;for(var u=i._howls.length-1;u>=0;u--)i._howls[u].stereo(r);return i},HowlerGlobal.prototype.pos=function(r,i,u){var c=this;if(!c.ctx||!c.ctx.listener)return c;if(i=typeof i!="number"?c._pos[1]:i,u=typeof u!="number"?c._pos[2]:u,typeof r=="number")c._pos=[r,i,u],typeof c.ctx.listener.positionX<"u"?(c.ctx.listener.positionX.setTargetAtTime(c._pos[0],Howler.ctx.currentTime,.1),c.ctx.listener.positionY.setTargetAtTime(c._pos[1],Howler.ctx.currentTime,.1),c.ctx.listener.positionZ.setTargetAtTime(c._pos[2],Howler.ctx.currentTime,.1)):c.ctx.listener.setPosition(c._pos[0],c._pos[1],c._pos[2]);else return c._pos;return c},HowlerGlobal.prototype.orientation=function(r,i,u,c,d,h){var p=this;if(!p.ctx||!p.ctx.listener)return p;var _=p._orientation;if(i=typeof i!="number"?_[1]:i,u=typeof u!="number"?_[2]:u,c=typeof c!="number"?_[3]:c,d=typeof d!="number"?_[4]:d,h=typeof h!="number"?_[5]:h,typeof r=="number")p._orientation=[r,i,u,c,d,h],typeof p.ctx.listener.forwardX<"u"?(p.ctx.listener.forwardX.setTargetAtTime(r,Howler.ctx.currentTime,.1),p.ctx.listener.forwardY.setTargetAtTime(i,Howler.ctx.currentTime,.1),p.ctx.listener.forwardZ.setTargetAtTime(u,Howler.ctx.currentTime,.1),p.ctx.listener.upX.setTargetAtTime(c,Howler.ctx.currentTime,.1),p.ctx.listener.upY.setTargetAtTime(d,Howler.ctx.currentTime,.1),p.ctx.listener.upZ.setTargetAtTime(h,Howler.ctx.currentTime,.1)):p.ctx.listener.setOrientation(r,i,u,c,d,h);else return _;return p},Howl.prototype.init=function(r){return function(i){var u=this;return u._orientation=i.orientation||[1,0,0],u._stereo=i.stereo||null,u._pos=i.pos||null,u._pannerAttr={coneInnerAngle:typeof i.coneInnerAngle<"u"?i.coneInnerAngle:360,coneOuterAngle:typeof i.coneOuterAngle<"u"?i.coneOuterAngle:360,coneOuterGain:typeof i.coneOuterGain<"u"?i.coneOuterGain:0,distanceModel:typeof i.distanceModel<"u"?i.distanceModel:"inverse",maxDistance:typeof i.maxDistance<"u"?i.maxDistance:1e4,panningModel:typeof i.panningModel<"u"?i.panningModel:"HRTF",refDistance:typeof i.refDistance<"u"?i.refDistance:1,rolloffFactor:typeof i.rolloffFactor<"u"?i.rolloffFactor:1},u._onstereo=i.onstereo?[{fn:i.onstereo}]:[],u._onpos=i.onpos?[{fn:i.onpos}]:[],u._onorientation=i.onorientation?[{fn:i.onorientation}]:[],r.call(this,i)}}(Howl.prototype.init),Howl.prototype.stereo=function(r,i){var u=this;if(!u._webAudio)return u;if(u._state!=="loaded")return u._queue.push({event:"stereo",action:function(){u.stereo(r,i);}}),u;var c=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof i>"u")if(typeof r=="number")u._stereo=r,u._pos=[r,0,0];else return u._stereo;for(var d=u._getSoundIds(i),h=0;h<d.length;h++){var p=u._soundById(d[h]);if(p)if(typeof r=="number")p._stereo=r,p._pos=[r,0,0],p._node&&(p._pannerAttr.panningModel="equalpower",(!p._panner||!p._panner.pan)&&g(p,c),c==="spatial"?typeof p._panner.positionX<"u"?(p._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),p._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),p._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):p._panner.setPosition(r,0,0):p._panner.pan.setValueAtTime(r,Howler.ctx.currentTime)),u._emit("stereo",p._id);else return p._stereo}return u},Howl.prototype.pos=function(r,i,u,c){var d=this;if(!d._webAudio)return d;if(d._state!=="loaded")return d._queue.push({event:"pos",action:function(){d.pos(r,i,u,c);}}),d;if(i=typeof i!="number"?0:i,u=typeof u!="number"?-0.5:u,typeof c>"u")if(typeof r=="number")d._pos=[r,i,u];else return d._pos;for(var h=d._getSoundIds(c),p=0;p<h.length;p++){var _=d._soundById(h[p]);if(_)if(typeof r=="number")_._pos=[r,i,u],_._node&&((!_._panner||_._panner.pan)&&g(_,"spatial"),typeof _._panner.positionX<"u"?(_._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),_._panner.positionY.setValueAtTime(i,Howler.ctx.currentTime),_._panner.positionZ.setValueAtTime(u,Howler.ctx.currentTime)):_._panner.setPosition(r,i,u)),d._emit("pos",_._id);else return _._pos}return d},Howl.prototype.orientation=function(r,i,u,c){var d=this;if(!d._webAudio)return d;if(d._state!=="loaded")return d._queue.push({event:"orientation",action:function(){d.orientation(r,i,u,c);}}),d;if(i=typeof i!="number"?d._orientation[1]:i,u=typeof u!="number"?d._orientation[2]:u,typeof c>"u")if(typeof r=="number")d._orientation=[r,i,u];else return d._orientation;for(var h=d._getSoundIds(c),p=0;p<h.length;p++){var _=d._soundById(h[p]);if(_)if(typeof r=="number")_._orientation=[r,i,u],_._node&&(_._panner||(_._pos||(_._pos=d._pos||[0,0,-0.5]),g(_,"spatial")),typeof _._panner.orientationX<"u"?(_._panner.orientationX.setValueAtTime(r,Howler.ctx.currentTime),_._panner.orientationY.setValueAtTime(i,Howler.ctx.currentTime),_._panner.orientationZ.setValueAtTime(u,Howler.ctx.currentTime)):_._panner.setOrientation(r,i,u)),d._emit("orientation",_._id);else return _._orientation}return d},Howl.prototype.pannerAttr=function(){var r=this,i=arguments,u,c,d;if(!r._webAudio)return r;if(i.length===0)return r._pannerAttr;if(i.length===1)if(typeof i[0]=="object")u=i[0],typeof c>"u"&&(u.pannerAttr||(u.pannerAttr={coneInnerAngle:u.coneInnerAngle,coneOuterAngle:u.coneOuterAngle,coneOuterGain:u.coneOuterGain,distanceModel:u.distanceModel,maxDistance:u.maxDistance,refDistance:u.refDistance,rolloffFactor:u.rolloffFactor,panningModel:u.panningModel}),r._pannerAttr={coneInnerAngle:typeof u.pannerAttr.coneInnerAngle<"u"?u.pannerAttr.coneInnerAngle:r._coneInnerAngle,coneOuterAngle:typeof u.pannerAttr.coneOuterAngle<"u"?u.pannerAttr.coneOuterAngle:r._coneOuterAngle,coneOuterGain:typeof u.pannerAttr.coneOuterGain<"u"?u.pannerAttr.coneOuterGain:r._coneOuterGain,distanceModel:typeof u.pannerAttr.distanceModel<"u"?u.pannerAttr.distanceModel:r._distanceModel,maxDistance:typeof u.pannerAttr.maxDistance<"u"?u.pannerAttr.maxDistance:r._maxDistance,refDistance:typeof u.pannerAttr.refDistance<"u"?u.pannerAttr.refDistance:r._refDistance,rolloffFactor:typeof u.pannerAttr.rolloffFactor<"u"?u.pannerAttr.rolloffFactor:r._rolloffFactor,panningModel:typeof u.pannerAttr.panningModel<"u"?u.pannerAttr.panningModel:r._panningModel});else return d=r._soundById(parseInt(i[0],10)),d?d._pannerAttr:r._pannerAttr;else i.length===2&&(u=i[0],c=parseInt(i[1],10));for(var h=r._getSoundIds(c),p=0;p<h.length;p++)if(d=r._soundById(h[p]),d){var _=d._pannerAttr;_={coneInnerAngle:typeof u.coneInnerAngle<"u"?u.coneInnerAngle:_.coneInnerAngle,coneOuterAngle:typeof u.coneOuterAngle<"u"?u.coneOuterAngle:_.coneOuterAngle,coneOuterGain:typeof u.coneOuterGain<"u"?u.coneOuterGain:_.coneOuterGain,distanceModel:typeof u.distanceModel<"u"?u.distanceModel:_.distanceModel,maxDistance:typeof u.maxDistance<"u"?u.maxDistance:_.maxDistance,refDistance:typeof u.refDistance<"u"?u.refDistance:_.refDistance,rolloffFactor:typeof u.rolloffFactor<"u"?u.rolloffFactor:_.rolloffFactor,panningModel:typeof u.panningModel<"u"?u.panningModel:_.panningModel};var A=d._panner;A||(d._pos||(d._pos=r._pos||[0,0,-0.5]),g(d,"spatial"),A=d._panner),A.coneInnerAngle=_.coneInnerAngle,A.coneOuterAngle=_.coneOuterAngle,A.coneOuterGain=_.coneOuterGain,A.distanceModel=_.distanceModel,A.maxDistance=_.maxDistance,A.refDistance=_.refDistance,A.rolloffFactor=_.rolloffFactor,A.panningModel=_.panningModel;}return r},Sound.prototype.init=function(r){return function(){var i=this,u=i._parent;i._orientation=u._orientation,i._stereo=u._stereo,i._pos=u._pos,i._pannerAttr=u._pannerAttr,r.call(this),i._stereo?u.stereo(i._stereo):i._pos&&u.pos(i._pos[0],i._pos[1],i._pos[2],i._id);}}(Sound.prototype.init),Sound.prototype.reset=function(r){return function(){var i=this,u=i._parent;return i._orientation=u._orientation,i._stereo=u._stereo,i._pos=u._pos,i._pannerAttr=u._pannerAttr,i._stereo?u.stereo(i._stereo):i._pos?u.pos(i._pos[0],i._pos[1],i._pos[2],i._id):i._panner&&(i._panner.disconnect(0),i._panner=void 0,u._refreshBuffer(i)),r.call(this)}}(Sound.prototype.reset);var g=function(r,i){i=i||"spatial",i==="spatial"?(r._panner=Howler.ctx.createPanner(),r._panner.coneInnerAngle=r._pannerAttr.coneInnerAngle,r._panner.coneOuterAngle=r._pannerAttr.coneOuterAngle,r._panner.coneOuterGain=r._pannerAttr.coneOuterGain,r._panner.distanceModel=r._pannerAttr.distanceModel,r._panner.maxDistance=r._pannerAttr.maxDistance,r._panner.refDistance=r._pannerAttr.refDistance,r._panner.rolloffFactor=r._pannerAttr.rolloffFactor,r._panner.panningModel=r._pannerAttr.panningModel,typeof r._panner.positionX<"u"?(r._panner.positionX.setValueAtTime(r._pos[0],Howler.ctx.currentTime),r._panner.positionY.setValueAtTime(r._pos[1],Howler.ctx.currentTime),r._panner.positionZ.setValueAtTime(r._pos[2],Howler.ctx.currentTime)):r._panner.setPosition(r._pos[0],r._pos[1],r._pos[2]),typeof r._panner.orientationX<"u"?(r._panner.orientationX.setValueAtTime(r._orientation[0],Howler.ctx.currentTime),r._panner.orientationY.setValueAtTime(r._orientation[1],Howler.ctx.currentTime),r._panner.orientationZ.setValueAtTime(r._orientation[2],Howler.ctx.currentTime)):r._panner.setOrientation(r._orientation[0],r._orientation[1],r._orientation[2])):(r._panner=Howler.ctx.createStereoPanner(),r._panner.pan.setValueAtTime(r._stereo,Howler.ctx.currentTime)),r._panner.connect(r._node),r._paused||r._parent.pause(r._id,true).play(r._id,true);};})();});var O=b$1(B(),1),H=new Map;H.set("default",()=>import('../assets/beepSound.js'));var b=class b{constructor(r){this.resource=null;this.resource=r;}static get defaultSound(){return b._defaultSound instanceof b||(b._defaultSound=new b("default")),b._defaultSound}toJSONObject(){return this.resource!==null?{resource:this.resource}:{}}async play(){var r;if(this.audio==null&&this.resource!=null)if(H.has(this.resource)){let i=await((r=H.get(this.resource))==null?void 0:r());i!=null&&i.beepSound&&(this.audio=new O.Howl({src:i.beepSound,html5:true}));}else this.audio=new O.Howl({src:this.resource,html5:true});this.audio!=null&&this.audio.play();}};b._defaultSound=null;var L=b;
2
2
  export{L as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-O7TZTIHO.js';function u(t){return t.endsWith("ms")?Number.parseFloat(t):t.endsWith("s")?Number.parseFloat(t)*1e3:0}function c(t){let e=getComputedStyle(t),r=e.transitionDuration.split(",").map(n=>u(n)),i=e.transitionDelay.split(",").map(n=>u(n)),o=r.map((n,s)=>{let m=i[s];return n+m});return Math.max(...o)}async function l(t){let{promise:e,resolve:r,reject:i}=new a,o=c(t),n=setTimeout(()=>{i(new Error("Transition timeout"));},o+50);return t.addEventListener("transitionend",s=>{clearTimeout(n),r(s);},{once:!0}),e}export{l as a};
1
+ import {a}from'./chunk-O7TZTIHO.js';function u(t){return t.endsWith("ms")?Number.parseFloat(t):t.endsWith("s")?Number.parseFloat(t)*1e3:0}function c(t){let e=getComputedStyle(t),r=e.transitionDuration.split(",").map(n=>u(n)),i=e.transitionDelay.split(",").map(n=>u(n)),o=r.map((n,s)=>{let m=i[s];return n+m});return Math.max(...o)}async function l(t){let{promise:e,resolve:r,reject:i}=new a,o=c(t),n=setTimeout(()=>{i(new Error("Transition timeout"));},o+50);return t.addEventListener("transitionend",s=>{clearTimeout(n),r(s);},{once:true}),e}export{l as a};
@@ -1 +1 @@
1
- var u=class e{constructor(t,i){this._x=t,this._y=i;}get x(){return this._x}get y(){return this._y}static mirrorX(t,i){let r=t.x-i.width;return r*=-1,new e(r,t.y)}static fromJSON(t){return new e(t.x,t.y)}toJSONObject(){return {x:this.x,y:this.y}}equals(t){return this.x===t.x&&this.y===t.y}},m=class e{constructor(t,i,r,o){this._topLeft=t,this._topRight=i,this._bottomRight=r,this._bottomLeft=o;}get topLeft(){return this._topLeft}get topRight(){return this._topRight}get bottomRight(){return this._bottomRight}get bottomLeft(){return this._bottomLeft}static fromJSON(t){return new e(u.fromJSON(t.topLeft),u.fromJSON(t.topRight),u.fromJSON(t.bottomRight),u.fromJSON(t.bottomLeft))}toJSONObject(){return {topLeft:this.topLeft.toJSONObject(),topRight:this.topRight.toJSONObject(),bottomLeft:this.bottomLeft.toJSONObject(),bottomRight:this.bottomRight.toJSONObject()}}},W=(i=>(i.Pixel="pixel",i.Fraction="fraction",i))(W||{}),n=class e{constructor(t,i){this._value=t,this._unit=i;}get value(){return this._value}get unit(){return this._unit}static fromJSON(t){return new e(t.value,t.unit)}toJSONObject(){return {unit:this.unit,value:this.value}}},S=class e{constructor(t,i){this._x=t,this._y=i;}static get zero(){return new e(new n(0,"pixel"),new n(0,"pixel"))}get x(){return this._x}get y(){return this._y}static fromJSON(t){return new e(n.fromJSON(t.x),n.fromJSON(t.y))}toJSONObject(){return {x:this.x.toJSONObject(),y:this.y.toJSONObject()}}},g=class{constructor(t,i){this._origin=t,this._size=i;}get origin(){return this._origin}get size(){return this._size}toJSONObject(){return {origin:this.origin.toJSONObject(),size:this.size.toJSONObject()}}},N=class{constructor(t,i){this._origin=t,this._size=i;}get origin(){return this._origin}get size(){return this._size}toJSONObject(){return {origin:this._origin.toJSONObject(),size:this._size.toJSONObject()}}},l=class e{constructor(t,i){this._width=t,this._height=i;}get width(){return this._width}get height(){return this._height}static fromJSON(t){return new e(n.fromJSON(t.width),n.fromJSON(t.height))}isSameAs(t){return JSON.stringify(this.toJSONObject())===JSON.stringify(t.toJSONObject())}toJSONObject(){return {width:this.width.toJSONObject(),height:this.height.toJSONObject()}}},d=class e{constructor(t,i){this._width=t,this._height=i;}get width(){return this._width}get height(){return this._height}static fromJSON(t){return new e(t.width,t.height)}toJSONObject(){return {height:this.height,width:this.width}}},p=class{constructor(t,i){this._size=t,this._aspect=i;}get size(){return this._size}get aspect(){return this._aspect}},f=(o=>(o.WidthAndHeight="widthAndHeight",o.WidthAndAspectRatio="widthAndAspectRatio",o.HeightAndAspectRatio="heightAndAspectRatio",o.ShorterDimensionAndAspectRatio="shorterDimensionAndAspectRatio",o))(f||{}),O=class e{constructor(){this._shorterDimensionAndAspectRatio=null;}get widthAndHeight(){return this._widthAndHeight}get widthAndAspectRatio(){return this._widthAndAspectRatio}get heightAndAspectRatio(){return this._heightAndAspectRatio}get shorterDimensionAndAspectRatio(){return this._shorterDimensionAndAspectRatio}get sizingMode(){return this.widthAndAspectRatio?"widthAndAspectRatio":this.heightAndAspectRatio?"heightAndAspectRatio":this.shorterDimensionAndAspectRatio?"shorterDimensionAndAspectRatio":"widthAndHeight"}static sizeWithWidthAndHeight(t){let i=new e;return i._widthAndHeight=t,i}static sizeWithWidthAndAspectRatio(t,i){let r=new e;return r._widthAndAspectRatio=new p(t,i),r}static sizeWithHeightAndAspectRatio(t,i){let r=new e;return r._heightAndAspectRatio=new p(t,i),r}static sizeWithShorterDimensionAndAspectRatio(t,i){let r=new e;return r._shorterDimensionAndAspectRatio=new p(t,i),r}static fromJSON(t){if(t.width&&t.height)return e.sizeWithWidthAndHeight(new l(n.fromJSON(t.width),n.fromJSON(t.height)));if(t.width&&typeof t.aspect=="number")return e.sizeWithWidthAndAspectRatio(n.fromJSON(t.width),t.aspect);if(t.height&&typeof t.aspect=="number")return e.sizeWithHeightAndAspectRatio(n.fromJSON(t.height),t.aspect);if(t.shorterDimension&&typeof t.aspect=="number")return e.sizeWithShorterDimensionAndAspectRatio(n.fromJSON(t.shorterDimension),t.aspect);throw new Error(`SizeWithUnitAndAspectJSON is malformed: ${JSON.stringify(t)}`)}toJSONObject(){var t,i,r,o,s,c,h,b;switch(this.sizingMode){case"widthAndAspectRatio":return {width:(t=this.widthAndAspectRatio)==null?void 0:t.size.toJSONObject(),aspect:(i=this.widthAndAspectRatio)==null?void 0:i.aspect};case"heightAndAspectRatio":return {height:(r=this.heightAndAspectRatio)==null?void 0:r.size.toJSONObject(),aspect:(o=this.heightAndAspectRatio)==null?void 0:o.aspect};case"shorterDimensionAndAspectRatio":return {shorterDimension:(s=this.shorterDimensionAndAspectRatio)==null?void 0:s.size.toJSONObject(),aspect:(c=this.shorterDimensionAndAspectRatio)==null?void 0:c.aspect};default:return {width:(h=this.widthAndHeight)==null?void 0:h.width.toJSONObject(),height:(b=this.widthAndHeight)==null?void 0:b.height.toJSONObject()}}}},J=class e{constructor(t,i,r,o){this._left=t,this._top=i,this._right=r,this._bottom=o;}static get zero(){return new e(new n(0,"pixel"),new n(0,"pixel"),new n(0,"pixel"),new n(0,"pixel"))}get left(){return this._left}get right(){return this._right}get top(){return this._top}get bottom(){return this._bottom}static fromJSON(t){return new e(n.fromJSON(t.left),n.fromJSON(t.top),n.fromJSON(t.right),n.fromJSON(t.bottom))}toJSONObject(){return {left:this.left.toJSONObject(),right:this.right.toJSONObject(),top:this.top.toJSONObject(),bottom:this.bottom.toJSONObject()}}},A=class e{constructor(t){this.hexadecimalString=t;}get redComponent(){return this.hexadecimalString.slice(0,2)}get greenComponent(){return this.hexadecimalString.slice(2,4)}get blueComponent(){return this.hexadecimalString.slice(4,6)}get alphaComponent(){return this.hexadecimalString.slice(6,8)}get red(){return e.hexToNumber(this.redComponent)}get green(){return e.hexToNumber(this.greenComponent)}get blue(){return e.hexToNumber(this.blueComponent)}get alpha(){return e.hexToNumber(this.alphaComponent)}static fromHex(t){return new e(e.normalizeHex(t))}static fromRGBA(t,i,r,o=1){let s=[t,i,r,e.normalizeAlpha(o)].reduce((c,h)=>c+e.numberToHex(h),"");return new e(s)}static areEquals(t,i){return t==null||i==null?!1:t.hexadecimalString===i.hexadecimalString}static hexToNumber(t){return Number.parseInt(t,16)}static fromJSON(t){return e.fromHex(t)}static numberToHex(t){let r=Math.round(t).toString(16);return r.length===1&&(r=`0${r}`),r.toUpperCase()}static normalizeHex(t){let i=t;return i.startsWith("#")&&(i=i.slice(1)),i.length<6&&(i=[...i].map(r=>r+r).join("")),i.length===6&&(i+="FF"),i.toUpperCase()}static normalizeAlpha(t){return t>0&&t<=1?255*t:t}withAlpha(t){let i=this.hexadecimalString.slice(0,6)+e.numberToHex(e.normalizeAlpha(t));return e.fromHex(i)}toJSON(){return this.hexadecimalString}},U=(s=>(s.Unknown="unknown",s.Portrait="portrait",s.PortraitUpsideDown="portraitUpsideDown",s.LandscapeRight="landscapeRight",s.LandscapeLeft="landscapeLeft",s))(U||{}),z=(h=>(h.None="none",h.Horizontal="horizontal",h.LeftToRight="leftToRight",h.RightToLeft="rightToLeft",h.Vertical="vertical",h.TopToBottom="topToBottom",h.BottomToTop="bottomToTop",h))(z||{}),x=(a=>(a.TopLeft="topLeft",a.TopCenter="topCenter",a.TopRight="topRight",a.CenterLeft="centerLeft",a.Center="center",a.CenterRight="centerRight",a.BottomLeft="bottomLeft",a.BottomCenter="bottomCenter",a.BottomRight="bottomRight",a))(x||{});export{u as a,m as b,W as c,n as d,S as e,g as f,N as g,l as h,d as i,p as j,f as k,O as l,J as m,A as n,U as o,z as p,x as q};
1
+ var u=class e{constructor(t,i){this._x=t,this._y=i;}get x(){return this._x}get y(){return this._y}static mirrorX(t,i){let r=t.x-i.width;return r*=-1,new e(r,t.y)}static fromJSON(t){return new e(t.x,t.y)}toJSONObject(){return {x:this.x,y:this.y}}equals(t){return this.x===t.x&&this.y===t.y}},m=class e{constructor(t,i,r,o){this._topLeft=t,this._topRight=i,this._bottomRight=r,this._bottomLeft=o;}get topLeft(){return this._topLeft}get topRight(){return this._topRight}get bottomRight(){return this._bottomRight}get bottomLeft(){return this._bottomLeft}static fromJSON(t){return new e(u.fromJSON(t.topLeft),u.fromJSON(t.topRight),u.fromJSON(t.bottomRight),u.fromJSON(t.bottomLeft))}toJSONObject(){return {topLeft:this.topLeft.toJSONObject(),topRight:this.topRight.toJSONObject(),bottomLeft:this.bottomLeft.toJSONObject(),bottomRight:this.bottomRight.toJSONObject()}}},W=(i=>(i.Pixel="pixel",i.Fraction="fraction",i))(W||{}),n=class e{constructor(t,i){this._value=t,this._unit=i;}get value(){return this._value}get unit(){return this._unit}static fromJSON(t){return new e(t.value,t.unit)}toJSONObject(){return {unit:this.unit,value:this.value}}},S=class e{constructor(t,i){this._x=t,this._y=i;}static get zero(){return new e(new n(0,"pixel"),new n(0,"pixel"))}get x(){return this._x}get y(){return this._y}static fromJSON(t){return new e(n.fromJSON(t.x),n.fromJSON(t.y))}toJSONObject(){return {x:this.x.toJSONObject(),y:this.y.toJSONObject()}}},g=class{constructor(t,i){this._origin=t,this._size=i;}get origin(){return this._origin}get size(){return this._size}toJSONObject(){return {origin:this.origin.toJSONObject(),size:this.size.toJSONObject()}}},N=class{constructor(t,i){this._origin=t,this._size=i;}get origin(){return this._origin}get size(){return this._size}toJSONObject(){return {origin:this._origin.toJSONObject(),size:this._size.toJSONObject()}}},l=class e{constructor(t,i){this._width=t,this._height=i;}get width(){return this._width}get height(){return this._height}static fromJSON(t){return new e(n.fromJSON(t.width),n.fromJSON(t.height))}isSameAs(t){return JSON.stringify(this.toJSONObject())===JSON.stringify(t.toJSONObject())}toJSONObject(){return {width:this.width.toJSONObject(),height:this.height.toJSONObject()}}},d=class e{constructor(t,i){this._width=t,this._height=i;}get width(){return this._width}get height(){return this._height}static fromJSON(t){return new e(t.width,t.height)}toJSONObject(){return {height:this.height,width:this.width}}},p=class{constructor(t,i){this._size=t,this._aspect=i;}get size(){return this._size}get aspect(){return this._aspect}},f=(o=>(o.WidthAndHeight="widthAndHeight",o.WidthAndAspectRatio="widthAndAspectRatio",o.HeightAndAspectRatio="heightAndAspectRatio",o.ShorterDimensionAndAspectRatio="shorterDimensionAndAspectRatio",o))(f||{}),O=class e{constructor(){this._shorterDimensionAndAspectRatio=null;}get widthAndHeight(){return this._widthAndHeight}get widthAndAspectRatio(){return this._widthAndAspectRatio}get heightAndAspectRatio(){return this._heightAndAspectRatio}get shorterDimensionAndAspectRatio(){return this._shorterDimensionAndAspectRatio}get sizingMode(){return this.widthAndAspectRatio?"widthAndAspectRatio":this.heightAndAspectRatio?"heightAndAspectRatio":this.shorterDimensionAndAspectRatio?"shorterDimensionAndAspectRatio":"widthAndHeight"}static sizeWithWidthAndHeight(t){let i=new e;return i._widthAndHeight=t,i}static sizeWithWidthAndAspectRatio(t,i){let r=new e;return r._widthAndAspectRatio=new p(t,i),r}static sizeWithHeightAndAspectRatio(t,i){let r=new e;return r._heightAndAspectRatio=new p(t,i),r}static sizeWithShorterDimensionAndAspectRatio(t,i){let r=new e;return r._shorterDimensionAndAspectRatio=new p(t,i),r}static fromJSON(t){if(t.width&&t.height)return e.sizeWithWidthAndHeight(new l(n.fromJSON(t.width),n.fromJSON(t.height)));if(t.width&&typeof t.aspect=="number")return e.sizeWithWidthAndAspectRatio(n.fromJSON(t.width),t.aspect);if(t.height&&typeof t.aspect=="number")return e.sizeWithHeightAndAspectRatio(n.fromJSON(t.height),t.aspect);if(t.shorterDimension&&typeof t.aspect=="number")return e.sizeWithShorterDimensionAndAspectRatio(n.fromJSON(t.shorterDimension),t.aspect);throw new Error(`SizeWithUnitAndAspectJSON is malformed: ${JSON.stringify(t)}`)}toJSONObject(){var t,i,r,o,s,c,h,b;switch(this.sizingMode){case "widthAndAspectRatio":return {width:(t=this.widthAndAspectRatio)==null?void 0:t.size.toJSONObject(),aspect:(i=this.widthAndAspectRatio)==null?void 0:i.aspect};case "heightAndAspectRatio":return {height:(r=this.heightAndAspectRatio)==null?void 0:r.size.toJSONObject(),aspect:(o=this.heightAndAspectRatio)==null?void 0:o.aspect};case "shorterDimensionAndAspectRatio":return {shorterDimension:(s=this.shorterDimensionAndAspectRatio)==null?void 0:s.size.toJSONObject(),aspect:(c=this.shorterDimensionAndAspectRatio)==null?void 0:c.aspect};default:return {width:(h=this.widthAndHeight)==null?void 0:h.width.toJSONObject(),height:(b=this.widthAndHeight)==null?void 0:b.height.toJSONObject()}}}},J=class e{constructor(t,i,r,o){this._left=t,this._top=i,this._right=r,this._bottom=o;}static get zero(){return new e(new n(0,"pixel"),new n(0,"pixel"),new n(0,"pixel"),new n(0,"pixel"))}get left(){return this._left}get right(){return this._right}get top(){return this._top}get bottom(){return this._bottom}static fromJSON(t){return new e(n.fromJSON(t.left),n.fromJSON(t.top),n.fromJSON(t.right),n.fromJSON(t.bottom))}toJSONObject(){return {left:this.left.toJSONObject(),right:this.right.toJSONObject(),top:this.top.toJSONObject(),bottom:this.bottom.toJSONObject()}}},A=class e{constructor(t){this.hexadecimalString=t;}get redComponent(){return this.hexadecimalString.slice(0,2)}get greenComponent(){return this.hexadecimalString.slice(2,4)}get blueComponent(){return this.hexadecimalString.slice(4,6)}get alphaComponent(){return this.hexadecimalString.slice(6,8)}get red(){return e.hexToNumber(this.redComponent)}get green(){return e.hexToNumber(this.greenComponent)}get blue(){return e.hexToNumber(this.blueComponent)}get alpha(){return e.hexToNumber(this.alphaComponent)}static fromHex(t){return new e(e.normalizeHex(t))}static fromRGBA(t,i,r,o=1){let s=[t,i,r,e.normalizeAlpha(o)].reduce((c,h)=>c+e.numberToHex(h),"");return new e(s)}static areEquals(t,i){return t==null||i==null?false:t.hexadecimalString===i.hexadecimalString}static hexToNumber(t){return Number.parseInt(t,16)}static fromJSON(t){return e.fromHex(t)}static numberToHex(t){let r=Math.round(t).toString(16);return r.length===1&&(r=`0${r}`),r.toUpperCase()}static normalizeHex(t){let i=t;return i.startsWith("#")&&(i=i.slice(1)),i.length<6&&(i=[...i].map(r=>r+r).join("")),i.length===6&&(i+="FF"),i.toUpperCase()}static normalizeAlpha(t){return t>0&&t<=1?255*t:t}withAlpha(t){let i=this.hexadecimalString.slice(0,6)+e.numberToHex(e.normalizeAlpha(t));return e.fromHex(i)}toJSON(){return this.hexadecimalString}},U=(s=>(s.Unknown="unknown",s.Portrait="portrait",s.PortraitUpsideDown="portraitUpsideDown",s.LandscapeRight="landscapeRight",s.LandscapeLeft="landscapeLeft",s))(U||{}),z=(h=>(h.None="none",h.Horizontal="horizontal",h.LeftToRight="leftToRight",h.RightToLeft="rightToLeft",h.Vertical="vertical",h.TopToBottom="topToBottom",h.BottomToTop="bottomToTop",h))(z||{}),x=(a=>(a.TopLeft="topLeft",a.TopCenter="topCenter",a.TopRight="topRight",a.CenterLeft="centerLeft",a.Center="center",a.CenterRight="centerRight",a.BottomLeft="bottomLeft",a.BottomCenter="bottomCenter",a.BottomRight="bottomRight",a))(x||{});export{u as a,m as b,W as c,n as d,S as e,g as f,N as g,l as h,d as i,p as j,f as k,O as l,J as m,A as n,U as o,z as p,x as q};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-NMX4VHW2.js';import {a}from'./chunk-LSZZVJ6B.js';function r(){let e=a`@keyframes scandit-rotation{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.${a$1.CONTAINER_CLASS_NAME}{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;overflow:hidden;position:relative;width:100%}.${a$1.CONTAINER_CLASS_NAME}:before{animation:scandit-rotation 1s linear infinite;background-color:#fff;content:" ";height:1px;left:0;opacity:0;pointer-events:none;position:absolute;top:0;width:1px}`,o=a`.${a$1.PAINTBOARDS_CONTAINER_CLASS_NAME}{height:inherit;position:relative;width:100%}.${a$1.PAINTBOARD_CLASS_NAME}{aspect-ratio:16/9;background-color:#000;height:100%;min-height:1px;min-width:1px;position:relative;width:100%}.${a$1.PAINTBOARD_CLASS_NAME}.${a$1.PAINTBOARD_CLASS_NAME_STATE_ON}{aspect-ratio:auto}.${a$1.PAINTBOARD_CLASS_NAME} video{display:block;height:100%;object-fit:cover;transition:opacity .3s;width:100%}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.MIRRORED_CLASS_NAME}{transform:scaleX(-1)}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.CAMERA_RECOVERY_CLASS_NAME}{background-color:#000;cursor:pointer;z-index:5}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.CAMERA_RECOVERY_CLASS_NAME},.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.ERROR_CLASS_NAME}{align-items:center;color:#fff;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.ERROR_CLASS_NAME}{background-color:rgba(0,0,0,.5);text-align:center;z-index:6}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.HINT_CONTAINER_CLASS_NAME}{bottom:5vh;display:grid;pointer-events:none;position:absolute;top:5vh;width:100%}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.HINT_CLASS_NAME}{background-color:#fff;color:#000;padding:10px;width:fit-content}.${a$1.CAMERA_RECOVERY_CLASS_NAME}[hidden],.${a$1.ERROR_CLASS_NAME}[hidden],.${a$1.HINT_CLASS_NAME}[hidden]{display:none}.${a$1.PAINTBOARD_CLASS_NAME} canvas{height:100%;left:0;object-fit:cover;pointer-events:none;position:absolute;top:0;transition:opacity .3s;width:100%}`,i=a`.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME}{-webkit-tap-highlight-color:rgba(255,255,255,0);align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;width:100%}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME} label{align-items:center;cursor:pointer;display:flex;flex-direction:column;justify-content:center}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME} label input[type=file]{position:absolute;top:-9999px}.${a$1.PAINTBOARD_CLASS_NAME}.${a$1.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME} label button{pointer-events:none}`,n=a`.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.CONTROLS_CLASS_NAME}{display:flex;height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.CONTROL_WIDGET_CLASS_NAME}-${a$1.TORCH_SWITCH_CONTROL_CLASS_NAME}{left:16px;top:24px}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.CONTROL_WIDGET_CLASS_NAME}-${a$1.CAMERA_SWITCH_CONTROL_CLASS_NAME}{right:16px;top:24px}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.CONTROL_WIDGET_CLASS_NAME}-${a$1.CAMERA_FOV_SWITCH_CONTROL_CLASS_NAME}{bottom:24px;right:24px}.${a$1.CONTROL_WIDGET_CLASS_NAME}{background-color:transparent;background-repeat:no-repeat;border:none;cursor:pointer;height:32px;pointer-events:all;position:absolute;width:32px}.${a$1.CONTROL_WIDGET_CLASS_NAME}+.${a$1.CONTROL_WIDGET_CLASS_NAME}{margin-left:16px}`,_=a`.${a$1.FROZEN_FRAME}{height:100%;left:0;object-fit:cover;opacity:1;position:absolute;top:0;width:100%}.${a$1.FROZEN_FRAME}[hidden]{opacity:0;pointer-events:none;visibility:hidden}`;return [e,o,n,i,_]}export{r as a};
1
+ import {a}from'./chunk-NMX4VHW2.js';import {a as a$1}from'./chunk-LSZZVJ6B.js';function r(){let e=a$1`@keyframes scandit-rotation{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.${a.CONTAINER_CLASS_NAME}{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;overflow:hidden;position:relative;width:100%}.${a.CONTAINER_CLASS_NAME}:before{animation:scandit-rotation 1s linear infinite;background-color:#fff;content:" ";height:1px;left:0;opacity:0;pointer-events:none;position:absolute;top:0;width:1px}`,o=a$1`.${a.PAINTBOARDS_CONTAINER_CLASS_NAME}{height:inherit;position:relative;width:100%}.${a.PAINTBOARD_CLASS_NAME}{aspect-ratio:16/9;background-color:#000;height:100%;min-height:1px;min-width:1px;position:relative;width:100%}.${a.PAINTBOARD_CLASS_NAME}.${a.PAINTBOARD_CLASS_NAME_STATE_ON}{aspect-ratio:auto}.${a.PAINTBOARD_CLASS_NAME} video{display:block;height:100%;object-fit:cover;transition:opacity .3s;width:100%}.${a.PAINTBOARD_CLASS_NAME} .${a.MIRRORED_CLASS_NAME}{transform:scaleX(-1)}.${a.PAINTBOARD_CLASS_NAME} .${a.CAMERA_RECOVERY_CLASS_NAME}{background-color:#000;cursor:pointer;z-index:5}.${a.PAINTBOARD_CLASS_NAME} .${a.CAMERA_RECOVERY_CLASS_NAME},.${a.PAINTBOARD_CLASS_NAME} .${a.ERROR_CLASS_NAME}{align-items:center;color:#fff;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.${a.PAINTBOARD_CLASS_NAME} .${a.ERROR_CLASS_NAME}{background-color:rgba(0,0,0,.5);text-align:center;z-index:6}.${a.PAINTBOARD_CLASS_NAME} .${a.HINT_CONTAINER_CLASS_NAME}{bottom:5vh;display:grid;pointer-events:none;position:absolute;top:5vh;width:100%}.${a.PAINTBOARD_CLASS_NAME} .${a.HINT_CLASS_NAME}{background-color:#fff;color:#000;padding:10px;width:fit-content}.${a.CAMERA_RECOVERY_CLASS_NAME}[hidden],.${a.ERROR_CLASS_NAME}[hidden],.${a.HINT_CLASS_NAME}[hidden]{display:none}.${a.PAINTBOARD_CLASS_NAME} canvas{height:100%;left:0;object-fit:cover;pointer-events:none;position:absolute;top:0;transition:opacity .3s;width:100%}`,i=a$1`.${a.PAINTBOARD_CLASS_NAME} .${a.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME}{-webkit-tap-highlight-color:rgba(255,255,255,0);align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;width:100%}.${a.PAINTBOARD_CLASS_NAME} .${a.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME} label{align-items:center;cursor:pointer;display:flex;flex-direction:column;justify-content:center}.${a.PAINTBOARD_CLASS_NAME} .${a.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME} label input[type=file]{position:absolute;top:-9999px}.${a.PAINTBOARD_CLASS_NAME}.${a.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME} label button{pointer-events:none}`,n=a$1`.${a.PAINTBOARD_CLASS_NAME} .${a.CONTROLS_CLASS_NAME}{display:flex;height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.${a.PAINTBOARD_CLASS_NAME} .${a.CONTROL_WIDGET_CLASS_NAME}-${a.TORCH_SWITCH_CONTROL_CLASS_NAME}{left:16px;top:24px}.${a.PAINTBOARD_CLASS_NAME} .${a.CONTROL_WIDGET_CLASS_NAME}-${a.CAMERA_SWITCH_CONTROL_CLASS_NAME}{right:16px;top:24px}.${a.PAINTBOARD_CLASS_NAME} .${a.CONTROL_WIDGET_CLASS_NAME}-${a.CAMERA_FOV_SWITCH_CONTROL_CLASS_NAME}{bottom:24px;right:24px}.${a.CONTROL_WIDGET_CLASS_NAME}{background-color:transparent;background-repeat:no-repeat;border:none;cursor:pointer;height:32px;pointer-events:all;position:absolute;width:32px}.${a.CONTROL_WIDGET_CLASS_NAME}+.${a.CONTROL_WIDGET_CLASS_NAME}{margin-left:16px}`,_=a$1`.${a.FROZEN_FRAME}{height:100%;left:0;object-fit:cover;opacity:1;position:absolute;top:0;width:100%}.${a.FROZEN_FRAME}[hidden]{opacity:0;pointer-events:none;visibility:hidden}`;return [e,o,n,i,_]}export{r as a};
@@ -0,0 +1,5 @@
1
+ import {s}from'./chunk-OZQL57EF.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$2}from'./chunk-3A4KLILV.js';import {a}from'./chunk-MU6SADSF.js';import {a as a$3}from'./chunk-LSZZVJ6B.js';import {n}from'./chunk-77BBIAZE.js';var d=a`
2
+ <div role="listitem">
3
+ <slot></slot>
4
+ </div>
5
+ `,r=class r extends a$1{constructor(){super();let e=this.attachShadow({mode:"open"});e.innerHTML=d,e.append(r.createStyleElement().cloneNode(true));}set backgroundColor(e){this.style.setProperty("--background-color",`#${e.toJSON()}`);}get backgroundColor(){return n.fromHex(this.style.getPropertyValue("--background-color"))}static create(){return document.createElement(r.tag)}static register(){a$2({[r.tag]:r});}static createStyleElement(){return a$3`:host{--corner-radius:0.75rem;--border-color:#${s.toJSON()};--background-color:#ffffffe6;backdrop-filter:saturate(180%) blur(20px);background-color:var(--background-color);border-radius:var(--corner-radius);box-shadow:0 2px 6px 0 rgba(18,22,25,.15);display:block;font-family:SF Pro Text,sans-serif;max-height:100px;min-height:5rem;min-width:200px}:host([with-border]) div{border:1px solid var(--border-color);border-radius:var(--corner-radius)}`}};r.tag="scandit-basic-card";var t=r;t.register();export{t as a};
@@ -1 +1 @@
1
- import {d}from'./chunk-E3TDSWVQ.js';import {n}from'./chunk-77BBIAZE.js';var i=class e{constructor(r=d.Brush.fillColor,o=d.Brush.strokeColor,s=d.Brush.strokeWidth){this.fill={color:r},this.stroke={color:o,width:s};}static get transparent(){let r=n.fromRGBA(255,255,255,0);return new e(r,r,0)}get fillColor(){return this.fill.color}get strokeColor(){return this.stroke.color}get strokeWidth(){return this.stroke.width}static areEquals(r,o){return r==null||o==null?!1:n.areEquals(r.fill.color,o.fill.color)&&n.areEquals(r.stroke.color,o.stroke.color)&&r.stroke.width===o.stroke.width}toJSONObject(){return {fill:{color:this.fillColor.toJSON()},stroke:{width:this.strokeWidth,color:this.strokeColor.toJSON()}}}static fromJSONObject(r){return new e(n.fromJSON(r.fill.color),n.fromJSON(r.stroke.color),r.stroke.width)}};export{i as a};
1
+ import {d}from'./chunk-E3TDSWVQ.js';import {n}from'./chunk-77BBIAZE.js';var i=class e{constructor(r=d.Brush.fillColor,o=d.Brush.strokeColor,s=d.Brush.strokeWidth){this.fill={color:r},this.stroke={color:o,width:s};}static get transparent(){let r=n.fromRGBA(255,255,255,0);return new e(r,r,0)}get fillColor(){return this.fill.color}get strokeColor(){return this.stroke.color}get strokeWidth(){return this.stroke.width}static areEquals(r,o){return r==null||o==null?false:n.areEquals(r.fill.color,o.fill.color)&&n.areEquals(r.stroke.color,o.stroke.color)&&r.stroke.width===o.stroke.width}toJSONObject(){return {fill:{color:this.fillColor.toJSON()},stroke:{width:this.strokeWidth,color:this.strokeColor.toJSON()}}}static fromJSONObject(r){return new e(n.fromJSON(r.fill.color),n.fromJSON(r.stroke.color),r.stroke.width)}};export{i as a};
@@ -1,2 +1,2 @@
1
- function l(t,s=location){let n=t.endsWith("/")?t:`${t}/`;if(/^https?:\/\//.test(n))return n;let r=n.split("/").filter(a=>a.length>0).join("/"),e=r===""?"/":`/${r}/`;return s.protocol==="file:"||s.origin==="null"?`${s.href.split("/").slice(0,-1).join("/")}${e}`:`${s.origin}${e}`}function c(t){return /^https?:\/\/(?:[^./]*\.)*cdn.jsdelivr.net\//.test(t)?{result:!0,cdnBaseURL:"https://cdn.jsdelivr.net/npm/"}:/^https?:\/\/(?:[^./]*\.)*unpkg.com\//.test(t)?{result:!0,cdnBaseURL:"https://unpkg.com/"}:{result:!1,cdnBaseURL:""}}function o(t){let i=/@scandit\/web-datacapture-[a-z]+/i.exec(t);return i?i[0]:null}function u(t,s,i){let n=s,r=c(n);if(r.result){let a=o(n);a!=null&&(n=`${r.cdnBaseURL}${a}@${t}/sdc-lib/`);}let e=i.replace(".wasm","");return r.result?{jsURI:`${n}${e}.js`,wasmURI:`${n}${e}.wasm`}:{jsURI:`${n}${e}.js?v=${t}`,wasmURI:`${n}${e}.wasm?v=${t}`}}
1
+ function l(t,s=location){let n=t.endsWith("/")?t:`${t}/`;if(/^https?:\/\//.test(n))return n;let r=n.split("/").filter(a=>a.length>0).join("/"),e=r===""?"/":`/${r}/`;return s.protocol==="file:"||s.origin==="null"?`${s.href.split("/").slice(0,-1).join("/")}${e}`:`${s.origin}${e}`}function c(t){return /^https?:\/\/(?:[^./]*\.)*cdn.jsdelivr.net\//.test(t)?{result:true,cdnBaseURL:"https://cdn.jsdelivr.net/npm/"}:/^https?:\/\/(?:[^./]*\.)*unpkg.com\//.test(t)?{result:true,cdnBaseURL:"https://unpkg.com/"}:{result:false,cdnBaseURL:""}}function o(t){let i=/@scandit\/web-datacapture-[a-z]+/i.exec(t);return i?i[0]:null}function u(t,s,i){let n=s,r=c(n);if(r.result){let a=o(n);a!=null&&(n=`${r.cdnBaseURL}${a}@${t}/sdc-lib/`);}let e=i.replace(".wasm","");return r.result?{jsURI:`${n}${e}.js`,wasmURI:`${n}${e}.wasm`}:{jsURI:`${n}${e}.js?v=${t}`,wasmURI:`${n}${e}.wasm?v=${t}`}}
2
2
  export{l as a,c as b,o as c,u as d};