scanbot-web-sdk 6.0.0-dev.1 → 6.0.0-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/barcode-scanner-view.d.ts +10 -10
- package/@types/consume-type.d.ts +8 -0
- package/@types/core/bridge/common.d.ts +24 -0
- package/@types/core/bridge/compiled/BarcodeConfigs.d.ts +973 -0
- package/@types/core/bridge/compiled/BarcodeScannerTypes.d.ts +185 -0
- package/@types/core/bridge/compiled/BarcodeTypes.d.ts +183 -0
- package/@types/core/bridge/compiled/CheckRecognizerTypes.d.ts +29 -0
- package/@types/core/bridge/compiled/CommonFieldType.d.ts +59 -0
- package/@types/core/bridge/compiled/DocumentDetectorTypes.d.ts +196 -0
- package/@types/core/bridge/compiled/DocumentQualityAnalyzerTypes.d.ts +105 -0
- package/@types/core/bridge/compiled/EhicTypes.d.ts +218 -0
- package/@types/core/bridge/compiled/FrameUtilities.d.ts +18 -0
- package/@types/core/bridge/compiled/GDRTypes.d.ts +38 -0
- package/@types/core/bridge/compiled/GenericDocument.d.ts +236 -0
- package/@types/core/bridge/compiled/GenericDocumentRecognizerConfigs.d.ts +183 -0
- package/@types/core/bridge/compiled/GenericDocumentRecognizerTypes.d.ts +105 -0
- package/@types/core/bridge/compiled/GenericDocumentTypes.d.ts +38 -0
- package/@types/core/bridge/compiled/GenericTextLineScannerTypes.d.ts +165 -0
- package/@types/core/bridge/compiled/Geometry.d.ts +49 -0
- package/@types/core/bridge/compiled/ImageProcessorTypes.d.ts +13 -0
- package/@types/core/bridge/compiled/LicensePlateScannerTypes.d.ts +67 -0
- package/@types/core/bridge/compiled/MRZTypes.d.ts +52 -0
- package/@types/core/bridge/compiled/MedicalCertificateTypes.d.ts +306 -0
- package/@types/core/bridge/compiled/OcrElements.d.ts +129 -0
- package/@types/core/bridge/compiled/ParametricFilters.d.ts +188 -0
- package/@types/core/bridge/compiled/PdfConfig.d.ts +197 -0
- package/@types/core/bridge/compiled/TiffTypes.d.ts +183 -0
- package/@types/core/bridge/utils.d.ts +7 -0
- package/@types/core/bridge/worker-bridge.d.ts +920 -0
- package/@types/core/worker/ScanbotSDK.Core-simd-threads.d.ts +0 -0
- package/@types/core/worker/ScanbotSDK.Core-simd.d.ts +0 -0
- package/@types/core/worker/ScanbotSDK.Core.d.ts +86 -0
- package/@types/core-types.d.ts +25 -0
- package/@types/cropping-view.d.ts +4 -2
- package/@types/document-scanner-view.d.ts +7 -5
- package/@types/generic-document-recognizer-view.d.ts +22 -0
- package/@types/index.d.ts +49 -21
- package/@types/interfaces/i-document-scanner-handle.d.ts +2 -2
- package/@types/interfaces/i-generic-document-recognizer-scanner-handle.d.ts +3 -0
- package/@types/model/barcode/barcode-result.d.ts +16 -8
- package/@types/model/barcode/barcode.d.ts +4 -14
- package/@types/model/camera-info.d.ts +3 -2
- package/@types/model/configuration/barcode-scanner-configuration.d.ts +15 -8
- package/@types/model/configuration/cropping-view-configuration.d.ts +7 -1
- package/@types/model/configuration/document-scanner-configuration.d.ts +6 -27
- package/@types/model/configuration/generic-document-recognizer-configuration.d.ts +9 -0
- package/@types/model/configuration/initialization-options.d.ts +10 -1
- package/@types/model/configuration/mrz-scanner-configuration.d.ts +4 -3
- package/@types/model/configuration/scanner-configuration.d.ts +8 -0
- package/@types/model/configuration/selection-overlay-configuration.d.ts +4 -4
- package/@types/model/configuration/text-data-scanner-configuration.d.ts +3 -6
- package/@types/model/configuration/view-finder-scanner-configuration.d.ts +3 -2
- package/@types/model/configuration/vin-scanner-configuration.d.ts +2 -1
- package/@types/model/error/media-error.d.ts +1 -0
- package/@types/model/response/cropping-result.d.ts +2 -1
- package/@types/scanbot-sdk.d.ts +510 -28
- package/@types/service/document-quality-analyzer.d.ts +7 -5
- package/@types/service/generic-document-recognizer.d.ts +13 -0
- package/@types/service/ocr-engine.d.ts +8 -5
- package/@types/service/pdf-generator.d.ts +7 -95
- package/@types/service/public-utils.d.ts +1 -1
- package/@types/service/simple-mrz-recognizer.d.ts +7 -5
- package/@types/service/text-data-recognizer.d.ts +7 -4
- package/@types/service/tiff-generator.d.ts +12 -10
- package/@types/ui2/common.d.ts +8 -0
- package/@types/ui2/configuration/ActionBarConfiguration.d.ts +30 -30
- package/@types/ui2/configuration/ArTrackingOverlayConfiguration.d.ts +220 -220
- package/@types/ui2/configuration/BarcodeInfoMapping.d.ts +52 -52
- package/@types/ui2/configuration/BarcodeItemMapper.d.ts +2 -2
- package/@types/ui2/configuration/BarcodeRecognizerConfiguration.d.ts +38 -181
- package/@types/ui2/configuration/BarcodeScannerConfiguration.d.ts +172 -188
- package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +1 -0
- package/@types/ui2/configuration/BarcodeScannerUIResult.d.ts +29 -0
- package/@types/ui2/configuration/BarcodeTextLocalization.d.ts +102 -107
- package/@types/ui2/configuration/BarcodeTypes.d.ts +1 -0
- package/@types/ui2/configuration/BarcodeUseCase.d.ts +5 -1
- package/@types/ui2/configuration/CameraConfiguration.d.ts +44 -45
- package/@types/ui2/configuration/CameraPermission.d.ts +33 -48
- package/@types/ui2/configuration/Common.d.ts +190 -227
- package/@types/ui2/configuration/CommonFieldType.d.ts +1 -0
- package/@types/ui2/configuration/FindAndPickScanningModeUseCase.d.ts +366 -14
- package/@types/ui2/configuration/GenericDocument.d.ts +1 -0
- package/@types/ui2/configuration/Geometry.d.ts +1 -0
- package/@types/ui2/configuration/MultipleScanningModeUseCase.d.ts +489 -489
- package/@types/ui2/configuration/ScanbotAlertDialog.d.ts +27 -27
- package/@types/ui2/configuration/SingleScanningModeUseCase.d.ts +170 -170
- package/@types/ui2/configuration/TopBarConfiguration.d.ts +36 -52
- package/@types/ui2/configuration/UserGuidanceConfiguration.d.ts +16 -16
- package/@types/ui2/configuration/ViewFinderConfiguration.d.ts +49 -46
- package/@types/ui2/configuration.d.ts +3 -2
- package/@types/ui2/controllers/barcode-scanner-controller.d.ts +2 -2
- package/@types/ui2/controllers/multiple-scanning-mode-controller.d.ts +6 -3
- package/@types/ui2/controllers/single-scanning-mode-controller.d.ts +6 -3
- package/@types/ui2/model/counted-barcodes.d.ts +17 -23
- package/@types/ui2/scanbot-sdk-ui.d.ts +2 -2
- package/@types/ui2/scanbot-ui-library.d.ts +3 -2
- package/@types/ui2/utils/barcode-mapper/expected-barcode-mapper.d.ts +13 -0
- package/@types/ui2/utils/barcode-mapper/i-barcode-mapper.d.ts +18 -0
- package/@types/ui2/utils/{barcode-mapper.d.ts → barcode-mapper/user-barcode-mapper.d.ts} +11 -11
- package/@types/ui2/utils/camera-config.d.ts +2 -2
- package/@types/ui2/utils/find-and-pick.ts/expected-barcode-counter.d.ts +7 -0
- package/@types/ui2/utils/styled-badge.d.ts +1 -1
- package/@types/ui2/utils/styled-input.d.ts +1 -1
- package/@types/ui2/views/action-button/action-button-container.d.ts +2 -0
- package/@types/ui2/views/ar/ar-badge.d.ts +18 -0
- package/@types/ui2/views/ar/ar-overlay-barcode-info.d.ts +5 -1
- package/@types/ui2/views/ar/vertical-positions.d.ts +12 -0
- package/@types/ui2/views/barcode-info/barcode-info.d.ts +3 -1
- package/@types/ui2/views/barcode-scanner.d.ts +6 -5
- package/@types/ui2/views/dialog/base/confirmation-dialog.d.ts +20 -0
- package/@types/ui2/views/dialog/find-and-pick-submit-dialog.d.ts +10 -0
- package/@types/ui2/views/drawer/barcode-result-drawer.d.ts +1 -1
- package/@types/ui2/views/drawer/counting-button.d.ts +1 -1
- package/@types/ui2/views/drawer/subviews/barcode-drawer-empty-state.d.ts +1 -1
- package/@types/ui2/views/drawer/subviews/barcode-list-item.d.ts +5 -4
- package/@types/ui2/views/drawer/subviews/barcode-list.d.ts +8 -1
- package/@types/ui2/views/drawer/subviews/drawer-header-content.d.ts +1 -1
- package/@types/ui2/views/form/dialog-button.d.ts +2 -2
- package/@types/utils/barcode-utils.d.ts +10 -0
- package/@types/utils/browser-cameras.d.ts +92 -0
- package/@types/utils/dto/MagneticLine.d.ts +4 -4
- package/@types/utils/dto/Point.d.ts +2 -2
- package/@types/utils/dto/Polygon.d.ts +2 -1
- package/@types/utils/image-utils.d.ts +1 -0
- package/@types/utils/react/usePromise.d.ts +3 -1
- package/@types/utils/stats.d.ts +4 -0
- package/@types/utils/utils.d.ts +1 -1
- package/@types/utils/video-stream.d.ts +4 -3
- package/@types/utils/video-to-image-data/two-d-video-to-image-data.d.ts +8 -0
- package/@types/utils/video-to-image-data/video-to-image-data.d.ts +5 -0
- package/@types/utils/video-to-image-data/webgl-video-to-image-data.d.ts +21 -0
- package/@types/view/action-bar/bottom-action-bar.d.ts +2 -2
- package/@types/view/barcode-calculation/barcode-calculation-popup-list.d.ts +2 -2
- package/@types/view/barcode-calculation/barcode-calculation-popup.d.ts +4 -4
- package/@types/view/barcode-calculation/scanned-image-with-overlay.d.ts +2 -2
- package/@types/view/barcode-polygon/animated-barcode-selection-overlay.d.ts +7 -5
- package/@types/view/barcode-polygon/barcode-overlay.d.ts +3 -3
- package/@types/view/barcode-polygon/barcode-polygon-label.d.ts +2 -2
- package/@types/view/cropping/draggable-base-container.d.ts +8 -2
- package/@types/view/cropping/draggable-handles-component.d.ts +9 -2
- package/@types/view/scanbot-camera-view.d.ts +9 -3
- package/@types/view/view-finder.d.ts +1 -0
- package/@types/worker/worker-bridge.d.ts +906 -5
- package/Libraries.txt +307 -174
- package/README.md +3 -3
- package/bundle/ScanbotSDK.min.js +5 -5
- package/bundle/ScanbotSDK.ui2.min.js +108 -161
- package/bundle/ScanbotSDK.ui2.min.js.LICENSE.txt +0 -18
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
- package/package.json +4 -3
- package/ui.d.ts +3 -0
- package/ui.js +2 -0
- package/webpack/fileLoader.js +3 -5
- package/@types/core/compiled/ParametricFilters.d.ts +0 -181
- package/@types/core/utils.d.ts +0 -1
- package/@types/core/worker-bridge.d.ts +0 -20
- package/@types/model/barcode/barcode-format.d.ts +0 -1
- package/@types/model/barcode/engine-mode.d.ts +0 -1
- package/@types/model/configuration/document-quality-analyzer-configuration.d.ts +0 -13
- package/@types/model/document/contour-detection-result.d.ts +0 -11
- package/@types/model/document/detection-status.d.ts +0 -11
- package/@types/model/document/document-detection-result.d.ts +0 -8
- package/@types/model/filter-types.d.ts +0 -6
- package/@types/model/generic-text-line-recognizer/text-data-scanner-result.d.ts +0 -6
- package/@types/model/mrz/mrz-result.d.ts +0 -41
- package/@types/model/response/document-quality-analyzer-result.d.ts +0 -8
- package/@types/service/image-processor.d.ts +0 -35
- package/@types/ui2/configuration/BarcodeItem.d.ts +0 -30
- package/@types/ui2/configuration/BarcodeResult.d.ts +0 -14
- package/@types/ui2/configuration/utils.d.ts +0 -6
- package/@types/utils/networking.d.ts +0 -7
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- /package/@types/ui2/views/dialog/{styled-dialog.d.ts → base/styled-dialog.d.ts} +0 -0
package/bundle/ScanbotSDK.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! For license information please see ScanbotSDK.min.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(window,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=89)}([function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"e",(function(){return l}));var o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var r=function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)};function a(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n}Object.create;function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function l(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i<r;i++)!o&&i in e||(o||(o=Array.prototype.slice.call(e,0,i)),o[i]=e[i]);return t.concat(o||Array.prototype.slice.call(e))}Object.create},function(t,e,n){"use strict";n.r(e),n.d(e,"Component",(function(){return S})),n.d(e,"Fragment",(function(){return A})),n.d(e,"createContext",(function(){return G})),n.d(e,"createElement",(function(){return v})),n.d(e,"createRef",(function(){return b})),n.d(e,"useCallback",(function(){return pt})),n.d(e,"useContext",(function(){return mt})),n.d(e,"useDebugValue",(function(){return gt})),n.d(e,"useEffect",(function(){return ut})),n.d(e,"useErrorBoundary",(function(){return vt})),n.d(e,"useId",(function(){return yt})),n.d(e,"useImperativeHandle",(function(){return ft})),n.d(e,"useLayoutEffect",(function(){return ct})),n.d(e,"useMemo",(function(){return ht})),n.d(e,"useReducer",(function(){return lt})),n.d(e,"useRef",(function(){return dt})),n.d(e,"useState",(function(){return st})),n.d(e,"Children",(function(){return Dt})),n.d(e,"PureComponent",(function(){return Pt})),n.d(e,"StrictMode",(function(){return Ae})),n.d(e,"Suspense",(function(){return Ft})),n.d(e,"SuspenseList",(function(){return Nt})),n.d(e,"__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",(function(){return ce})),n.d(e,"cloneElement",(function(){return me})),n.d(e,"createFactory",(function(){return fe})),n.d(e,"createPortal",(function(){return Yt})),n.d(e,"default",(function(){return Pe})),n.d(e,"findDOMNode",(function(){return ve})),n.d(e,"flushSync",(function(){return be})),n.d(e,"forwardRef",(function(){return kt})),n.d(e,"hydrate",(function(){return te})),n.d(e,"isElement",(function(){return xe})),n.d(e,"isFragment",(function(){return pe})),n.d(e,"isValidElement",(function(){return he})),n.d(e,"lazy",(function(){return zt})),n.d(e,"memo",(function(){return Lt})),n.d(e,"render",(function(){return Jt})),n.d(e,"startTransition",(function(){return Se})),n.d(e,"unmountComponentAtNode",(function(){return ge})),n.d(e,"unstable_batchedUpdates",(function(){return ye})),n.d(e,"useDeferredValue",(function(){return Ce})),n.d(e,"useInsertionEffect",(function(){return we})),n.d(e,"useSyncExternalStore",(function(){return Oe})),n.d(e,"useTransition",(function(){return _e})),n.d(e,"version",(function(){return de}));var o,i,r,a,s,l,u,c,d={},f=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,p=Array.isArray;function m(t,e){for(var n in e)t[n]=e[n];return t}function g(t){var e=t.parentNode;e&&e.removeChild(t)}function v(t,e,n){var i,r,a,s={};for(a in e)"key"==a?i=e[a]:"ref"==a?r=e[a]:s[a]=e[a];if(arguments.length>2&&(s.children=arguments.length>3?o.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===s[a]&&(s[a]=t.defaultProps[a]);return y(t,s,i,r,null)}function y(t,e,n,o,a){var s={type:t,props:e,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==a?++r:a,__i:-1,__u:0};return null==a&&null!=i.vnode&&i.vnode(s),s}function b(){return{current:null}}function A(t){return t.children}function S(t,e){this.props=t,this.context=e}function C(t,e){if(null==e)return t.__?C(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?C(t):null}function _(t,e,n){var o,r=t.__v,a=r.__e,s=t.__P;if(s)return(o=m({},r)).__v=r.__v+1,i.vnode&&i.vnode(o),W(s,o,r,t.__n,void 0!==s.ownerSVGElement,32&r.__u?[a]:null,e,null==a?C(r):a,!!(32&r.__u),n),o.__v=r.__v,o.__.__k[o.__i]=o,o.__d=void 0,o.__e!=a&&w(o),o}function w(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return w(t)}}function x(t){(!t.__d&&(t.__d=!0)&&a.push(t)&&!O.__r++||s!==i.debounceRendering)&&((s=i.debounceRendering)||l)(O)}function O(){var t,e,n,o=[],r=[];for(a.sort(u);t=a.shift();)t.__d&&(n=a.length,e=_(t,o,r)||e,0===n||a.length>n?(I(o,e,r),r.length=o.length=0,e=void 0,a.sort(u)):e&&i.__c&&i.__c(e,f));e&&I(o,e,r),O.__r=0}function E(t,e,n,o,i,r,a,s,l,u,c){var h,p,m,g,v,y=o&&o.__k||f,b=e.length;for(n.__d=l,P(n,e,y),l=n.__d,h=0;h<b;h++)null!=(m=n.__k[h])&&"boolean"!=typeof m&&"function"!=typeof m&&(p=-1===m.__i?d:y[m.__i]||d,m.__i=h,W(t,m,p,i,r,a,s,l,u,c),g=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&F(p.ref,null,m),c.push(m.ref,m.__c||g,m)),null==v&&null!=g&&(v=g),65536&m.__u||p.__k===m.__k?l=L(m,l,t):"function"==typeof m.type&&void 0!==m.__d?l=m.__d:g&&(l=g.nextSibling),m.__d=void 0,m.__u&=-196609);n.__d=l,n.__e=v}function P(t,e,n){var o,i,r,a,s,l=e.length,u=n.length,c=u,d=0;for(t.__k=[],o=0;o<l;o++)null!=(i=t.__k[o]=null==(i=e[o])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?y(null,i,null,null,i):p(i)?y(A,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?y(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=t,i.__b=t.__b+1,s=T(i,n,a=o+d,c),i.__i=s,r=null,-1!==s&&(c--,(r=n[s])&&(r.__u|=131072)),null==r||null===r.__v?(-1==s&&d--,"function"!=typeof i.type&&(i.__u|=65536)):s!==a&&(s===a+1?d++:s>a?c>l-a?d+=s-a:d--:d=s<a&&s==a-1?s-a:0,s!==o+d&&(i.__u|=65536))):(r=n[o])&&null==r.key&&r.__e&&0==(131072&r.__u)&&(r.__e==t.__d&&(t.__d=C(r)),V(r,r,!1),n[o]=null,c--);if(c)for(o=0;o<u;o++)null!=(r=n[o])&&0==(131072&r.__u)&&(r.__e==t.__d&&(t.__d=C(r)),V(r,r))}function L(t,e,n){var o,i;if("function"==typeof t.type){for(o=t.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=t,e=L(o[i],e,n));return e}t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function B(t,e){return e=e||[],null==t||"boolean"==typeof t||(p(t)?t.some((function(t){B(t,e)})):e.push(t)),e}function T(t,e,n,o){var i=t.key,r=t.type,a=n-1,s=n+1,l=e[n];if(null===l||l&&i==l.key&&r===l.type)return n;if(o>(null!=l&&0==(131072&l.__u)?1:0))for(;a>=0||s<e.length;){if(a>=0){if((l=e[a])&&0==(131072&l.__u)&&i==l.key&&r===l.type)return a;a--}if(s<e.length){if((l=e[s])&&0==(131072&l.__u)&&i==l.key&&r===l.type)return s;s++}}return-1}function k(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||h.test(e)?n:n+"px"}function M(t,e,n,o,i){var r;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof o&&(t.style.cssText=o=""),o)for(e in o)n&&e in n||k(t.style,e,"");if(n)for(e in n)o&&n[e]===o[e]||k(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])r=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?o?n.u=o.u:(n.u=Date.now(),t.addEventListener(e,r?j:D,r)):t.removeEventListener(e,r?j:D,r);else{if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==e&&"height"!==e&&"href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&"rowSpan"!==e&&"colSpan"!==e&&"role"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function D(t){if(this.l){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(i.event?i.event(t):t)}}function j(t){if(this.l)return this.l[t.type+!0](i.event?i.event(t):t)}function W(t,e,n,o,r,a,s,l,u,c){var d,f,h,g,v,y,b,C,_,w,x,O,P,L,B,T=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(u=!!(32&n.__u),a=[l=e.__e=n.__e]),(d=i.__b)&&d(e);t:if("function"==typeof T)try{if(C=e.props,_=(d=T.contextType)&&o[d.__c],w=d?_?_.props.value:d.__:o,n.__c?b=(f=e.__c=n.__c).__=f.__E:("prototype"in T&&T.prototype.render?e.__c=f=new T(C,w):(e.__c=f=new S(C,w),f.constructor=T,f.render=z),_&&_.sub(f),f.props=C,f.state||(f.state={}),f.context=w,f.__n=o,h=f.__d=!0,f.__h=[],f._sb=[]),null==f.__s&&(f.__s=f.state),null!=T.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=m({},f.__s)),m(f.__s,T.getDerivedStateFromProps(C,f.__s))),g=f.props,v=f.state,f.__v=e,h)null==T.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==T.getDerivedStateFromProps&&C!==g&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(C,w),!f.__e&&(null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(C,f.__s,w)||e.__v===n.__v)){for(e.__v!==n.__v&&(f.props=C,f.state=f.__s,f.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),x=0;x<f._sb.length;x++)f.__h.push(f._sb[x]);f._sb=[],f.__h.length&&s.push(f);break t}null!=f.componentWillUpdate&&f.componentWillUpdate(C,f.__s,w),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(g,v,y)}))}if(f.context=w,f.props=C,f.__P=t,f.__e=!1,O=i.__r,P=0,"prototype"in T&&T.prototype.render){for(f.state=f.__s,f.__d=!1,O&&O(e),d=f.render(f.props,f.state,f.context),L=0;L<f._sb.length;L++)f.__h.push(f._sb[L]);f._sb=[]}else do{f.__d=!1,O&&O(e),d=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++P<25);f.state=f.__s,null!=f.getChildContext&&(o=m(m({},o),f.getChildContext())),h||null==f.getSnapshotBeforeUpdate||(y=f.getSnapshotBeforeUpdate(g,v)),E(t,p(B=null!=d&&d.type===A&&null==d.key?d.props.children:d)?B:[B],e,n,o,r,a,s,l,u,c),f.base=e.__e,e.__u&=-161,f.__h.length&&s.push(f),b&&(f.__E=f.__=null)}catch(t){e.__v=null,u||null!=a?(e.__e=l,e.__u|=u?160:32,a[a.indexOf(l)]=null):(e.__e=n.__e,e.__k=n.__k),i.__e(t,e,n)}else null==a&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=R(n.__e,e,n,o,r,a,s,u,c);(d=i.diffed)&&d(e)}function I(t,e,n){for(var o=0;o<n.length;o++)F(n[o],n[++o],n[++o]);i.__c&&i.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){i.__e(t,e.__v)}}))}function R(t,e,n,i,r,a,s,l,u){var c,f,h,m,v,y,b,A=n.props,S=e.props,_=e.type;if("svg"===_&&(r=!0),null!=a)for(c=0;c<a.length;c++)if((v=a[c])&&"setAttribute"in v==!!_&&(_?v.localName===_:3===v.nodeType)){t=v,a[c]=null;break}if(null==t){if(null===_)return document.createTextNode(S);t=r?document.createElementNS("http://www.w3.org/2000/svg",_):document.createElement(_,S.is&&S),a=null,l=!1}if(null===_)A===S||l&&t.data===S||(t.data=S);else{if(a=a&&o.call(t.childNodes),A=n.props||d,!l&&null!=a)for(A={},c=0;c<t.attributes.length;c++)A[(v=t.attributes[c]).name]=v.value;for(c in A)v=A[c],"children"==c||("dangerouslySetInnerHTML"==c?h=v:"key"===c||c in S||M(t,c,null,v,r));for(c in S)v=S[c],"children"==c?m=v:"dangerouslySetInnerHTML"==c?f=v:"value"==c?y=v:"checked"==c?b=v:"key"===c||l&&"function"!=typeof v||A[c]===v||M(t,c,v,A[c],r);if(f)l||h&&(f.__html===h.__html||f.__html===t.innerHTML)||(t.innerHTML=f.__html),e.__k=[];else if(h&&(t.innerHTML=""),E(t,p(m)?m:[m],e,n,i,r&&"foreignObject"!==_,a,s,a?a[0]:n.__k&&C(n,0),l,u),null!=a)for(c=a.length;c--;)null!=a[c]&&g(a[c]);l||(c="value",void 0!==y&&(y!==t[c]||"progress"===_&&!y||"option"===_&&y!==A[c])&&M(t,c,y,A[c],!1),c="checked",void 0!==b&&b!==t[c]&&M(t,c,b,A[c],!1))}return t}function F(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){i.__e(t,n)}}function V(t,e,n){var o,r;if(i.unmount&&i.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||F(o,null,e)),null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(t){i.__e(t,e)}o.base=o.__P=null,t.__c=void 0}if(o=t.__k)for(r=0;r<o.length;r++)o[r]&&V(o[r],e,n||"function"!=typeof t.type);n||null==t.__e||g(t.__e),t.__=t.__e=t.__d=void 0}function z(t,e,n){return this.constructor(t,n)}function N(t,e,n){var r,a,s,l;i.__&&i.__(t,e),a=(r="function"==typeof n)?null:n&&n.__k||e.__k,s=[],l=[],W(e,t=(!r&&n||e).__k=v(A,null,[t]),a||d,d,void 0!==e.ownerSVGElement,!r&&n?[n]:a?null:e.firstChild?o.call(e.childNodes):null,s,!r&&n?n:a?a.__e:e.firstChild,r,l),t.__d=void 0,I(s,t,l)}function U(t,e){N(t,e,U)}function H(t,e,n){var i,r,a,s,l=m({},t.props);for(a in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)"key"==a?i=e[a]:"ref"==a?r=e[a]:l[a]=void 0===e[a]&&void 0!==s?s[a]:e[a];return arguments.length>2&&(l.children=arguments.length>3?o.call(arguments,2):n),y(t.type,l,i||t.key,r||t.ref,null)}function G(t,e){var n={__c:e="__cC"+c++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,o;return this.getChildContext||(n=[],(o={})[e]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some((function(t){t.__e=!0,x(t)}))},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}o=f.slice,i={__e:function(t,e,n,o){for(var i,r,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(t)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,o||{}),a=i.__d),a)return i.__E=i}catch(e){t=e}throw t}},r=0,S.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof t&&(t=t(m({},n),this.props)),t&&m(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),x(this))},S.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),x(this))},S.prototype.render=A,a=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(t,e){return t.__v.__b-e.__v.__b},O.__r=0,c=0;var Y,Q,X,Z,$=0,q=[],K=[],J=i,tt=J.__b,et=J.__r,nt=J.diffed,ot=J.__c,it=J.unmount,rt=J.__;function at(t,e){J.__h&&J.__h(Q,t,$||e),$=0;var n=Q.__H||(Q.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:K}),n.__[t]}function st(t){return $=1,lt(xt,t)}function lt(t,e,n){var o=at(Y++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):xt(void 0,e),function(t){var e=o.__N?o.__N[0]:o.__[0],n=o.t(e,t);e!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=Q,!Q.u)){var i=function(t,e,n){if(!o.__c.__H)return!0;var i=o.__c.__H.__.filter((function(t){return!!t.__c}));if(i.every((function(t){return!t.__N})))return!r||r.call(this,t,e,n);var a=!1;return i.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(a=!0)}})),!(!a&&o.__c.props===t)&&(!r||r.call(this,t,e,n))};Q.u=!0;var r=Q.shouldComponentUpdate,a=Q.componentWillUpdate;Q.componentWillUpdate=function(t,e,n){if(this.__e){var o=r;r=void 0,i(t,e,n),r=o}a&&a.call(this,t,e,n)},Q.shouldComponentUpdate=i}return o.__N||o.__}function ut(t,e){var n=at(Y++,3);!J.__s&&wt(n.__H,e)&&(n.__=t,n.i=e,Q.__H.__h.push(n))}function ct(t,e){var n=at(Y++,4);!J.__s&&wt(n.__H,e)&&(n.__=t,n.i=e,Q.__h.push(n))}function dt(t){return $=5,ht((function(){return{current:t}}),[])}function ft(t,e,n){$=6,ct((function(){return"function"==typeof t?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0}),null==n?n:n.concat(t))}function ht(t,e){var n=at(Y++,7);return wt(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function pt(t,e){return $=8,ht((function(){return t}),e)}function mt(t){var e=Q.context[t.__c],n=at(Y++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(Q)),e.props.value):t.__}function gt(t,e){J.useDebugValue&&J.useDebugValue(e?e(t):t)}function vt(t){var e=at(Y++,10),n=st();return e.__=t,Q.componentDidCatch||(Q.componentDidCatch=function(t,o){e.__&&e.__(t,o),n[1](t)}),[n[0],function(){n[1](void 0)}]}function yt(){var t=at(Y++,11);if(!t.__){for(var e=Q.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function bt(){for(var t;t=q.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Ct),t.__H.__h.forEach(_t),t.__H.__h=[]}catch(e){t.__H.__h=[],J.__e(e,t.__v)}}J.__b=function(t){Q=null,tt&&tt(t)},J.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),rt&&rt(t,e)},J.__r=function(t){et&&et(t),Y=0;var e=(Q=t.__c).__H;e&&(X===Q?(e.__h=[],Q.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=K,t.__N=t.i=void 0}))):(e.__h.forEach(Ct),e.__h.forEach(_t),e.__h=[],Y=0)),X=Q},J.diffed=function(t){nt&&nt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==q.push(e)&&Z===J.requestAnimationFrame||((Z=J.requestAnimationFrame)||St)(bt)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==K&&(t.__=t.__V),t.i=void 0,t.__V=K}))),X=Q=null},J.__c=function(t,e){e.some((function(t){try{t.__h.forEach(Ct),t.__h=t.__h.filter((function(t){return!t.__||_t(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],J.__e(n,t.__v)}})),ot&&ot(t,e)},J.unmount=function(t){it&&it(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{Ct(t)}catch(t){e=t}})),n.__H=void 0,e&&J.__e(e,n.__v))};var At="function"==typeof requestAnimationFrame;function St(t){var e,n=function(){clearTimeout(o),At&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,100);At&&(e=requestAnimationFrame(n))}function Ct(t){var e=Q,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),Q=e}function _t(t){var e=Q;t.__c=t.__(),Q=e}function wt(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function xt(t,e){return"function"==typeof e?e(t):e}function Ot(t,e){for(var n in e)t[n]=e[n];return t}function Et(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var o in e)if("__source"!==o&&t[o]!==e[o])return!0;return!1}function Pt(t,e){this.props=t,this.context=e}function Lt(t,e){function n(t){var n=this.props.ref,o=n==t.ref;return!o&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!o:Et(this.props,t)}function o(e){return this.shouldComponentUpdate=n,v(t,e)}return o.displayName="Memo("+(t.displayName||t.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(Pt.prototype=new S).isPureReactComponent=!0,Pt.prototype.shouldComponentUpdate=function(t,e){return Et(this.props,t)||Et(this.state,e)};var Bt=i.__b;i.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Bt&&Bt(t)};var Tt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function kt(t){function e(e){var n=Ot({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=Tt,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var Mt=function(t,e){return null==t?null:B(B(t).map(e))},Dt={map:Mt,forEach:Mt,count:function(t){return t?B(t).length:0},only:function(t){var e=B(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:B},jt=i.__e;i.__e=function(t,e,n,o){if(t.then)for(var i,r=e;r=r.__;)if((i=r.__c)&&i.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e);jt(t,e,n,o)};var Wt=i.unmount;function It(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=Ot({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return It(t,e,n)}))),t}function Rt(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return Rt(t,e,n)})),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Ft(){this.__u=0,this.t=null,this.__b=null}function Vt(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function zt(t){var e,n,o;function i(i){if(e||(e=t()).then((function(t){n=t.default||t}),(function(t){o=t})),o)throw o;if(!n)throw e;return v(n,i)}return i.displayName="Lazy",i.__f=!0,i}function Nt(){this.u=null,this.o=null}i.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Wt&&Wt(t)},(Ft.prototype=new S).__c=function(t,e){var n=e.__c,o=this;null==o.t&&(o.t=[]),o.t.push(n);var i=Vt(o.__v),r=!1,a=function(){r||(r=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--o.__u){if(o.state.__a){var t=o.state.__a;o.__v.__k[0]=Rt(t,t.__c.__P,t.__c.__O)}var e;for(o.setState({__a:o.__b=null});e=o.t.pop();)e.forceUpdate()}};o.__u++||32&e.__u||o.setState({__a:o.__b=o.__v.__k[0]}),t.then(a,a)},Ft.prototype.componentWillUnmount=function(){this.t=[]},Ft.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=It(this.__b,n,o.__O=o.__P)}this.__b=null}var i=e.__a&&v(A,null,t.fallback);return i&&(i.__u&=-33),[v(A,null,e.__a?null:t.children),i]};var Ut=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function Ht(t){return this.getChildContext=function(){return t.context},t.children}function Gt(t){var e=this,n=t.i;e.componentWillUnmount=function(){N(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,n){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),N(v(Ht,{context:e.context},t.__v),e.l)}function Yt(t,e){var n=v(Gt,{__v:t,i:e});return n.containerInfo=e,n}(Nt.prototype=new S).__a=function(t){var e=this,n=Vt(e.__v),o=e.o.get(t);return o[0]++,function(i){var r=function(){e.props.revealOrder?(o.push(i),Ut(e,t,o)):i()};n?n(r):r()}},Nt.prototype.render=function(t){this.u=null,this.o=new Map;var e=B(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},Nt.prototype.componentDidUpdate=Nt.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){Ut(t,n,e)}))};var Qt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Xt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Zt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,$t=/[A-Z0-9]/g,qt="undefined"!=typeof document,Kt=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};function Jt(t,e,n){return null==e.__k&&(e.textContent=""),N(t,e),"function"==typeof n&&n(),t?t.__c:null}function te(t,e,n){return U(t,e),"function"==typeof n&&n(),t?t.__c:null}S.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(S.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var ee=i.event;function ne(){}function oe(){return this.cancelBubble}function ie(){return this.defaultPrevented}i.event=function(t){return ee&&(t=ee(t)),t.persist=ne,t.isPropagationStopped=oe,t.isDefaultPrevented=ie,t.nativeEvent=t};var re,ae={enumerable:!1,configurable:!0,get:function(){return this.class}},se=i.vnode;i.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,o={};for(var i in e){var r=e[i];if(!("value"===i&&"defaultValue"in e&&null==r||qt&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var a=i.toLowerCase();"defaultValue"===i&&"value"in e&&null==e.value?i="value":"download"===i&&!0===r?r="":"translate"===a&&"no"===r?r=!1:"ondoubleclick"===a?i="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||Kt(e.type)?"onfocus"===a?i="onfocusin":"onblur"===a?i="onfocusout":Zt.test(i)?i=a:-1===n.indexOf("-")&&Xt.test(i)?i=i.replace($t,"-$&").toLowerCase():null===r&&(r=void 0):a=i="oninput","oninput"===a&&o[i=a]&&(i="oninputCapture"),o[i]=r}}"select"==n&&o.multiple&&Array.isArray(o.value)&&(o.value=B(e.children).forEach((function(t){t.props.selected=-1!=o.value.indexOf(t.props.value)}))),"select"==n&&null!=o.defaultValue&&(o.value=B(e.children).forEach((function(t){t.props.selected=o.multiple?-1!=o.defaultValue.indexOf(t.props.value):o.defaultValue==t.props.value}))),e.class&&!e.className?(o.class=e.class,Object.defineProperty(o,"className",ae)):(e.className&&!e.class||e.class&&e.className)&&(o.class=o.className=e.className),t.props=o}(t),t.$$typeof=Qt,se&&se(t)};var le=i.__r;i.__r=function(t){le&&le(t),re=t.__c};var ue=i.diffed;i.diffed=function(t){ue&&ue(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value),re=null};var ce={ReactCurrentDispatcher:{current:{readContext:function(t){return re.__n[t.__c].props.value}}}},de="17.0.2";function fe(t){return v.bind(null,t)}function he(t){return!!t&&t.$$typeof===Qt}function pe(t){return he(t)&&t.type===A}function me(t){return he(t)?H.apply(null,arguments):t}function ge(t){return!!t.__k&&(N(null,t),!0)}function ve(t){return t&&(t.base||1===t.nodeType&&t)||null}var ye=function(t,e){return t(e)},be=function(t,e){return t(e)},Ae=A;function Se(t){t()}function Ce(t){return t}function _e(){return[!1,Se]}var we=ct,xe=he;function Oe(t,e){var n=e(),o=st({h:{__:n,v:e}}),i=o[0].h,r=o[1];return ct((function(){i.__=n,i.v=e,Ee(i)&&r({h:i})}),[t,n,e]),ut((function(){return Ee(i)&&r({h:i}),t((function(){Ee(i)&&r({h:i})}))}),[t]),n}function Ee(t){var e,n,o=t.v,i=t.__;try{var r=o();return!((e=i)===(n=r)&&(0!==e||1/e==1/n)||e!=e&&n!=n)}catch(t){return!0}}var Pe={useState:st,useId:yt,useReducer:lt,useEffect:ut,useLayoutEffect:ct,useInsertionEffect:ct,useTransition:_e,useDeferredValue:Ce,useSyncExternalStore:Oe,startTransition:Se,useRef:dt,useImperativeHandle:ft,useMemo:ht,useCallback:pt,useContext:mt,useDebugValue:gt,version:"17.0.2",Children:Dt,render:Jt,hydrate:te,unmountComponentAtNode:ge,createPortal:Yt,createElement:v,createContext:G,createFactory:fe,cloneElement:me,createRef:b,Fragment:A,isValidElement:he,isElement:he,isFragment:pe,findDOMNode:ve,Component:S,PureComponent:Pt,memo:Lt,forwardRef:kt,flushSync:be,unstable_batchedUpdates:ye,StrictMode:A,Suspense:Ft,SuspenseList:Nt,lazy:zt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ce}},function(t,e){t.exports=window["@mui"]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Timeouts=e.Vibration=e.Sound=e.ButtonConfiguration=e.BadgedButton=e.RoundButton=e.AspectRatio=e.ForegroundStyle=e.BackgroundStyle=e.PolygonStyle=e.IconStyle=e.StyledText=e.Palette=void 0;const o=n(6);class i extends o.PartiallyConstructible{constructor(t={}){super(),this.sbColorPrimary="#C8193C",this.sbColorPrimaryDisabled="#F5F5F5",this.sbColorNegative="#FF3737",this.sbColorPositive="#4EFFB4",this.sbColorWarning="#FFCE5C",this.sbColorSecondary="#FFEDEE",this.sbColorSecondaryDisabled="#F5F5F5",this.sbColorOnPrimary="#FFFFFF",this.sbColorOnSecondary="#C8193C",this.sbColorSurface="#FFFFFF",this.sbColorOutline="#EFEFEF",this.sbColorOnSurfaceVariant="#707070",this.sbColorOnSurface="#000000",this.sbColorSurfaceLow="#00000026",this.sbColorSurfaceHigh="#0000007A",this.sbColorModalOverlay="#000000A3",void 0!==t.sbColorPrimary&&(this.sbColorPrimary=t.sbColorPrimary),void 0!==t.sbColorPrimaryDisabled&&(this.sbColorPrimaryDisabled=t.sbColorPrimaryDisabled),void 0!==t.sbColorNegative&&(this.sbColorNegative=t.sbColorNegative),void 0!==t.sbColorPositive&&(this.sbColorPositive=t.sbColorPositive),void 0!==t.sbColorWarning&&(this.sbColorWarning=t.sbColorWarning),void 0!==t.sbColorSecondary&&(this.sbColorSecondary=t.sbColorSecondary),void 0!==t.sbColorSecondaryDisabled&&(this.sbColorSecondaryDisabled=t.sbColorSecondaryDisabled),void 0!==t.sbColorOnPrimary&&(this.sbColorOnPrimary=t.sbColorOnPrimary),void 0!==t.sbColorOnSecondary&&(this.sbColorOnSecondary=t.sbColorOnSecondary),void 0!==t.sbColorSurface&&(this.sbColorSurface=t.sbColorSurface),void 0!==t.sbColorOutline&&(this.sbColorOutline=t.sbColorOutline),void 0!==t.sbColorOnSurfaceVariant&&(this.sbColorOnSurfaceVariant=t.sbColorOnSurfaceVariant),void 0!==t.sbColorOnSurface&&(this.sbColorOnSurface=t.sbColorOnSurface),void 0!==t.sbColorSurfaceLow&&(this.sbColorSurfaceLow=t.sbColorSurfaceLow),void 0!==t.sbColorSurfaceHigh&&(this.sbColorSurfaceHigh=t.sbColorSurfaceHigh),void 0!==t.sbColorModalOverlay&&(this.sbColorModalOverlay=t.sbColorModalOverlay)}}e.Palette=i;class r extends o.PartiallyConstructible{constructor(t={}){super(),this.visible=!0,this.text="",this.color="#FFFFFF",this.useShadow=!1,void 0!==t.visible&&(this.visible=t.visible),void 0!==t.text&&(this.text=t.text),void 0!==t.color&&(this.color=t.color),void 0!==t.useShadow&&(this.useShadow=t.useShadow)}}e.StyledText=r;class a extends o.PartiallyConstructible{constructor(t={}){super(),this.visible=!0,this.color="#FFFFFF",void 0!==t.visible&&(this.visible=t.visible),void 0!==t.color&&(this.color=t.color)}}e.IconStyle=a;class s extends o.PartiallyConstructible{constructor(t={}){super(),this.strokeColor="#FFFFFFFF",this.fillColor="#30FFFFFF",this.strokeWidth=2,this.cornerRadius=0,void 0!==t.strokeColor&&(this.strokeColor=t.strokeColor),void 0!==t.fillColor&&(this.fillColor=t.fillColor),void 0!==t.strokeWidth&&(this.strokeWidth=t.strokeWidth),void 0!==t.cornerRadius&&(this.cornerRadius=t.cornerRadius)}}e.PolygonStyle=s;class l extends o.PartiallyConstructible{constructor(t={}){super(),this.strokeColor="#FFFFFFFF",this.fillColor="#FFFFFF30",this.strokeWidth=2,void 0!==t.strokeColor&&(this.strokeColor=t.strokeColor),void 0!==t.fillColor&&(this.fillColor=t.fillColor),void 0!==t.strokeWidth&&(this.strokeWidth=t.strokeWidth)}}e.BackgroundStyle=l;class u extends o.PartiallyConstructible{constructor(t={}){super(),this.iconVisible=!0,this.color="#FFFFFF",this.useShadow=!1,void 0!==t.iconVisible&&(this.iconVisible=t.iconVisible),void 0!==t.color&&(this.color=t.color),void 0!==t.useShadow&&(this.useShadow=t.useShadow)}}e.ForegroundStyle=u;class c extends o.PartiallyConstructible{constructor(t={}){super(),this.width=1,this.height=1,void 0!==t.width&&(this.width=t.width),void 0!==t.height&&(this.height=t.height)}}e.AspectRatio=c;class d extends o.PartiallyConstructible{constructor(t={}){super(),this.visible=!0,this.backgroundColor="#0000007A",this.foregroundColor="#FFFFFF",this.activeBackgroundColor="#FFCE5C",this.activeForegroundColor="#1C1B1F",void 0!==t.visible&&(this.visible=t.visible),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.foregroundColor&&(this.foregroundColor=t.foregroundColor),void 0!==t.activeBackgroundColor&&(this.activeBackgroundColor=t.activeBackgroundColor),void 0!==t.activeForegroundColor&&(this.activeForegroundColor=t.activeForegroundColor)}}e.RoundButton=d;class f extends o.PartiallyConstructible{constructor(t={}){super(),this.badgeBackgroundColor="#FFFFFF",this.badgeForegroundColor="#C8193C",this.visible=!0,this.backgroundColor="#0000007A",this.foregroundColor="#FFFFFF",this.activeBackgroundColor="#FFCE5C",this.activeForegroundColor="#1C1B1F",void 0!==t.badgeBackgroundColor&&(this.badgeBackgroundColor=t.badgeBackgroundColor),void 0!==t.badgeForegroundColor&&(this.badgeForegroundColor=t.badgeForegroundColor),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.foregroundColor&&(this.foregroundColor=t.foregroundColor),void 0!==t.activeBackgroundColor&&(this.activeBackgroundColor=t.activeBackgroundColor),void 0!==t.activeForegroundColor&&(this.activeForegroundColor=t.activeForegroundColor)}}e.BadgedButton=f;class h extends o.PartiallyConstructible{constructor(t={}){super(),this.visible=!0,this.text="",this.background=new l({}),this.foreground=new u({}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.text&&(this.text=t.text),void 0!==t.background&&(this.background=new l(t.background)),void 0!==t.foreground&&(this.foreground=new u(t.foreground))}}e.ButtonConfiguration=h;class p extends o.PartiallyConstructible{constructor(t={}){super(),this.successBeepEnabled=!0,this.soundType="MODERN_BEEP",void 0!==t.successBeepEnabled&&(this.successBeepEnabled=t.successBeepEnabled),void 0!==t.soundType&&(this.soundType=t.soundType)}}e.Sound=p;class m extends o.PartiallyConstructible{constructor(t={}){super(),this.enabled=!1,void 0!==t.enabled&&(this.enabled=t.enabled)}}e.Vibration=m;class g extends o.PartiallyConstructible{constructor(t={}){super(),this.autoCancelTimeout=0,this.initialScanDelay=0,void 0!==t.autoCancelTimeout&&(this.autoCancelTimeout=t.autoCancelTimeout),void 0!==t.initialScanDelay&&(this.initialScanDelay=t.initialScanDelay)}}e.Timeouts=g},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SBTheme=e.createSBPaletteContextValue=e.SBPaletteContext=void 0;const i=n(1),r=n(17),a=o(n(24));function s(t){return{getColorValue:e=>{if(e){if(e.startsWith("?")){const n=e.slice(1);if(n in t)return t[n];a.default.debugWarn(`Color ${n} not found in palette`)}return e}a.default.debugWarn("Color is missing")}}}e.SBPaletteContext=(0,i.createContext)(null),e.createSBPaletteContextValue=s;class l{static setPalette(t){this.palette=t}static setBarcodeTextLocalization(t){this.barcodeTextLocalization=t}static getColorValue(t){return s(l.palette).getColorValue(t)}static getLocalizedBarcodeText(t){if(t.startsWith("?")){const e=t.slice(1);if(e in l.barcodeTextLocalization)return l.barcodeTextLocalization[e];a.default.debugWarn(`Barcode text localization key ${e} not found in localization`)}return t}}e.SBTheme=l,l.palette=(new r.BarcodeScannerConfiguration).palette,l.barcodeTextLocalization=(new r.BarcodeScannerConfiguration).localization},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Point=void 0;const o=n(58);class i{constructor(t,e){this.x=t,this.y=e}static toPolygon(t,e){return[i.scaleDownTo(t[0],e),i.scaleDownTo(t[1],e),i.scaleDownTo(t[2],e),i.scaleDownTo(t[3],e)]}static scaleToPoint(t,e,n,o){return new i(o*(t.x-e),o*(t.y-n))}static scaleListToHtmlElement(t,e,n){return t.map((t=>i.scaleToHtmlElement(t,e,n)))}static scaleToHtmlElement(t,e,n){return new i(t.x*(n.clientWidth/e.width),t.y*(n.clientHeight/e.height))}static scaleUpTo(t,e){return new i(t.x*e.width,t.y*e.height)}static scaleDownTo(t,e){return new i(t.x/e.width,t.y/e.height)}static fromHtmlElement(t){return new i(t.offsetLeft,t.offsetTop)}static withScale(t,e,n){return new i(t/n,e/n)}static fromCoordinates(t,e,n,o){if(!t||!e)return new i(0,0);const r=new i(t,e);return o=null!=o?o:1,1===(n=n?n%4:0)?i.withScale(r.y,-r.x,o):2===n?i.withScale(-r.x,-r.y,o):3===n?i.withScale(-r.y,r.x,o):i.withScale(r.x,r.y,o)}static centerOf(t){const e=t.reduce(((t,e)=>t+e.x),0)/t.length,n=t.reduce(((t,e)=>t+e.y),0)/t.length;return new i(e,n)}static smallerSizeOfQuad(t){const e=Math.max(...t.map((t=>t.x)))-Math.min(...t.map((t=>t.x))),n=Math.max(...t.map((t=>t.y)))-Math.min(...t.map((t=>t.y)));return Math.min(e,n)}static empty(){return new i(0,0)}static centerX(t){if(t)return(i.highestX(t)+i.lowestX(t))/2}static highestX(t){if(t)return Math.max(...t.map((t=>t.x)))}static lowestX(t){if(t)return Math.min(...t.map((t=>t.x)))}static lowestY(t){if(t)return Math.min(...t.map((t=>t.y)))}static highestY(t){if(t)return Math.max(...t.map((t=>t.y)))}static width(t){if(t)return i.highestX(t)-i.lowestX(t)}static left(t){if(t)return t.reduce(((t,e)=>t.x<e.x?t:e))}static right(t){if(t)return t.reduce(((t,e)=>t.x>e.x?t:e))}static toSvgString(t){if(void 0!==t)return t.map((t=>`${t.x.toFixed(2)},${t.y.toFixed(2)}`)).join(" ")}static toSvgPathStringWithRoundedCorners(t,e=0){if(void 0===t)return;function n(t,e,n){const o=Math.atan2(t.y-e.y,t.x-e.x);return{x:t.x-n*Math.cos(o),y:t.y-n*Math.sin(o)}}let o="";const r=n(t[0],t[1],i.distance(t[0],t[1])/2);o+=`M ${r.x} ${r.y}`;for(let r=0;r<t.length;r++){const a=t[r],s=t[(r+1)%t.length],l=t[(r+2)%t.length],u=n(s,l,i.distance(s,l)/2),c=Math.abs(Math.atan2(s.y-a.y,s.x-a.x)-Math.atan2(s.y-l.y,s.x-l.x)),d=c>Math.PI?2*Math.PI-c:c,f=Math.min(Math.sqrt(Math.pow(s.x-a.x,2)+Math.pow(s.y-a.y,2)),Math.sqrt(Math.pow(s.x-l.x,2)+Math.pow(s.y-l.y,2))),h=Math.min(e,f*Math.tan(d/2)/2),p=Math.abs(h/Math.tan(d/2)),m=(s.x-a.x)*(s.y-l.y)-(s.x-l.x)*(s.y-a.y)<0?1:0,g=n(s,a,p),v=n(s,l,p);o+=` L${g.x} ${g.y}`,o+=` A${h} ${h} 0 0 ${m} ${v.x} ${v.y}`,o+=` L${u.x} ${u.y}`}return o+" Z"}static distance(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}static subtract(t,e){return new i(t.x-e.x,t.y-e.y)}static add(t,e){return new i(t.x+e.x,t.y+e.y)}static multiply(t,e){return new i(t.x*e,t.y*e)}static cross(t,e){return t.x*e.y-t.y*e.x}static clamp(t,e){return new i((0,o.clamp)(t.x,0,e.width),(0,o.clamp)(t.y,0,e.height))}}e.Point=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartiallyConstructible=void 0;e.PartiallyConstructible=class{}},,,function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.StyledText=e.styledTextStyle=e.Props=void 0;const i=o(n(1)),r=n(4);function a(t){return{color:r.SBTheme.getColorValue(t.color),textShadow:t.useShadow?"1px 1px 2px":""}}e.Props=class{},e.styledTextStyle=a,e.StyledText=function(t){return t.config.visible?i.default.createElement("span",{ref:t.innerRef,style:Object.assign(Object.assign({},t.style),a(t.config))},r.SBTheme.getLocalizedBarcodeText(t.config.text)):null}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArOverlayFindAndPickConfiguration=e.FindAndPickBadgeConfiguration=e.FindAndPickArOverlayPolygonConfiguration=e.ArOverlayGeneralConfiguration=e.BadgeStyle=e.BarcodeItemConfiguration=e.ArOverlayPolygonConfiguration=void 0;const o=n(3),i=n(6),r=n(3),a=n(3);class s extends i.PartiallyConstructible{constructor(t={}){super(),this.visible=!0,this.deselected=new r.PolygonStyle({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:2,cornerRadius:2}),this.selected=new r.PolygonStyle({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:2,cornerRadius:2}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.deselected&&(this.deselected=new r.PolygonStyle(t.deselected)),void 0!==t.selected&&(this.selected=new r.PolygonStyle(t.selected))}}e.ArOverlayPolygonConfiguration=s;class l extends i.PartiallyConstructible{constructor(t={}){super(),this.imageVisible=!0,this.titleSelected=new a.StyledText({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.subtitleSelected=new a.StyledText({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.titleDeselected=new a.StyledText({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.subtitleDeselected=new a.StyledText({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.backgroundSelected=new r.PolygonStyle({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:0,cornerRadius:10}),this.backgroundDeselected=new r.PolygonStyle({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:0,cornerRadius:10}),void 0!==t.imageVisible&&(this.imageVisible=t.imageVisible),void 0!==t.titleSelected&&(this.titleSelected=new a.StyledText(t.titleSelected)),void 0!==t.subtitleSelected&&(this.subtitleSelected=new a.StyledText(t.subtitleSelected)),void 0!==t.titleDeselected&&(this.titleDeselected=new a.StyledText(t.titleDeselected)),void 0!==t.subtitleDeselected&&(this.subtitleDeselected=new a.StyledText(t.subtitleDeselected)),void 0!==t.backgroundSelected&&(this.backgroundSelected=new r.PolygonStyle(t.backgroundSelected)),void 0!==t.backgroundDeselected&&(this.backgroundDeselected=new r.PolygonStyle(t.backgroundDeselected))}}e.BarcodeItemConfiguration=l;class u extends i.PartiallyConstructible{constructor(t={}){if(super(),this.visible=!0,this.foregroundColor="?sbColorOnSurface",void 0!==t.visible&&(this.visible=t.visible),void 0===t.background)throw new Error("background must be present in constructor argument");this.background=new o.BackgroundStyle(t.background),void 0!==t.foregroundColor&&(this.foregroundColor=t.foregroundColor)}}e.BadgeStyle=u;class c extends i.PartiallyConstructible{constructor(t={}){super(),this.visible=!1,this.counterBadge=new u({background:new o.BackgroundStyle({}),foregroundColor:"?sbColorOnSurface"}),this.automaticSelectionEnabled=!1,this.barcodeItemInfoPosition="BELOW",this.polygon=new s({visible:!0,deselected:new r.PolygonStyle({}),selected:new r.PolygonStyle({})}),this.barcodeItemConfiguration=new l({imageVisible:!0,titleSelected:new a.StyledText({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new a.StyledText({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),titleDeselected:new a.StyledText({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleDeselected:new a.StyledText({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),backgroundSelected:new r.PolygonStyle({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new r.PolygonStyle({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:1,cornerRadius:5})}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.counterBadge&&(this.counterBadge=new u(t.counterBadge)),void 0!==t.automaticSelectionEnabled&&(this.automaticSelectionEnabled=t.automaticSelectionEnabled),void 0!==t.barcodeItemInfoPosition&&(this.barcodeItemInfoPosition=t.barcodeItemInfoPosition),void 0!==t.polygon&&(this.polygon=new s(t.polygon)),void 0!==t.barcodeItemConfiguration&&(this.barcodeItemConfiguration=new l(t.barcodeItemConfiguration))}}e.ArOverlayGeneralConfiguration=c;class d extends i.PartiallyConstructible{constructor(t={}){super(),this.visible=!0,this.partiallyScanned=new r.PolygonStyle({strokeColor:"?sbColorWarning",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),this.rejected=new r.PolygonStyle({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),this.completed=new r.PolygonStyle({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.partiallyScanned&&(this.partiallyScanned=new r.PolygonStyle(t.partiallyScanned)),void 0!==t.rejected&&(this.rejected=new r.PolygonStyle(t.rejected)),void 0!==t.completed&&(this.completed=new r.PolygonStyle(t.completed))}}e.FindAndPickArOverlayPolygonConfiguration=d;class f extends i.PartiallyConstructible{constructor(t={}){super(),this.partiallyScanned=new u({visible:!0,background:new o.BackgroundStyle({strokeColor:"#FFFFFF30",fillColor:"?sbColorWarning",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),this.rejected=new u({visible:!0,background:new o.BackgroundStyle({strokeColor:"#FFFFFF30",fillColor:"?sbColorNegative",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),this.completed=new u({visible:!0,background:new o.BackgroundStyle({strokeColor:"#FFFFFF30",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),void 0!==t.partiallyScanned&&(this.partiallyScanned=new u(t.partiallyScanned)),void 0!==t.rejected&&(this.rejected=new u(t.rejected)),void 0!==t.completed&&(this.completed=new u(t.completed))}}e.FindAndPickBadgeConfiguration=f;class h extends i.PartiallyConstructible{constructor(t={}){super(),this.visible=!1,this.automaticSelectionEnabled=!0,this.polygon=new d({}),this.badge=new f({}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.automaticSelectionEnabled&&(this.automaticSelectionEnabled=t.automaticSelectionEnabled),void 0!==t.polygon&&(this.polygon=new d(t.polygon)),void 0!==t.badge&&(this.badge=new f(t.badge))}}e.ArOverlayFindAndPickConfiguration=h},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return Y})),n.d(e,"c",(function(){return tt})),n.d(e,"d",(function(){return nt})),n.d(e,"e",(function(){return et})),n.d(e,"f",(function(){return K})),n.d(e,"g",(function(){return J}));var o="-ms-",i="-moz-",r="-webkit-",a="comm",s="rule",l="decl",u="@keyframes",c=Math.abs,d=String.fromCharCode,f=Object.assign;function h(t){return t.trim()}function p(t,e){return(t=e.exec(t))?t[0]:t}function m(t,e,n){return t.replace(e,n)}function g(t,e,n){return t.indexOf(e,n)}function v(t,e){return 0|t.charCodeAt(e)}function y(t,e,n){return t.slice(e,n)}function b(t){return t.length}function A(t){return t.length}function S(t,e){return e.push(t),t}function C(t,e){return t.map(e).join("")}function _(t,e){return t.filter((function(t){return!p(t,e)}))}var w=1,x=1,O=0,E=0,P=0,L="";function B(t,e,n,o,i,r,a,s){return{value:t,root:e,parent:n,type:o,props:i,children:r,line:w,column:x,length:a,return:"",siblings:s}}function T(t,e){return f(B("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}function k(t){for(;t.root;)t=T(t.root,{children:[t]});S(t,t.siblings)}function M(){return P=E<O?v(L,E++):0,x++,10===P&&(x=1,w++),P}function D(){return v(L,E)}function j(){return E}function W(t,e){return y(L,t,e)}function I(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function R(t){return w=x=1,O=b(L=t),E=0,[]}function F(t){return L="",t}function V(t){return h(W(E-1,U(91===t?t+2:40===t?t+1:t)))}function z(t){for(;(P=D())&&P<33;)M();return I(t)>2||I(P)>3?"":" "}function N(t,e){for(;--e&&M()&&!(P<48||P>102||P>57&&P<65||P>70&&P<97););return W(t,j()+(e<6&&32==D()&&32==M()))}function U(t){for(;M();)switch(P){case t:return E;case 34:case 39:34!==t&&39!==t&&U(P);break;case 40:41===t&&U(t);break;case 92:M()}return E}function H(t,e){for(;M()&&t+P!==57&&(t+P!==84||47!==D()););return"/*"+W(e,E-1)+"*"+d(47===t?t:M())}function G(t){for(;!I(D());)M();return W(t,E)}function Y(t){return F(Q("",null,null,null,[""],t=R(t),0,[0],t))}function Q(t,e,n,o,i,r,a,s,l){for(var u=0,f=0,h=a,p=0,y=0,A=0,C=1,_=1,O=1,B=0,T="",k=i,W=r,I=o,R=T;_;)switch(A=B,B=M()){case 40:if(108!=A&&58==v(R,h-1)){-1!=g(R+=m(V(B),"&","&\f"),"&\f",c(u?s[u-1]:0))&&(O=-1);break}case 34:case 39:case 91:R+=V(B);break;case 9:case 10:case 13:case 32:R+=z(A);break;case 92:R+=N(j()-1,7);continue;case 47:switch(D()){case 42:case 47:S(Z(H(M(),j()),e,n,l),l);break;default:R+="/"}break;case 123*C:s[u++]=b(R)*O;case 125*C:case 59:case 0:switch(B){case 0:case 125:_=0;case 59+f:-1==O&&(R=m(R,/\f/g,"")),y>0&&b(R)-h&&S(y>32?$(R+";",o,n,h-1,l):$(m(R," ","")+";",o,n,h-2,l),l);break;case 59:R+=";";default:if(S(I=X(R,e,n,u,f,i,s,T,k=[],W=[],h,r),r),123===B)if(0===f)Q(R,e,I,I,k,r,h,s,W);else switch(99===p&&110===v(R,3)?100:p){case 100:case 108:case 109:case 115:Q(t,I,I,o&&S(X(t,I,I,0,0,i,s,T,i,k=[],h,W),W),i,W,h,s,o?k:W);break;default:Q(R,I,I,I,[""],W,0,s,W)}}u=f=y=0,C=O=1,T=R="",h=a;break;case 58:h=1+b(R),y=A;default:if(C<1)if(123==B)--C;else if(125==B&&0==C++&&125==(P=E>0?v(L,--E):0,x--,10===P&&(x=1,w--),P))continue;switch(R+=d(B),B*C){case 38:O=f>0?1:(R+="\f",-1);break;case 44:s[u++]=(b(R)-1)*O,O=1;break;case 64:45===D()&&(R+=V(M())),p=D(),f=h=b(T=R+=G(j())),B++;break;case 45:45===A&&2==b(R)&&(C=0)}}return r}function X(t,e,n,o,i,r,a,l,u,d,f,p){for(var g=i-1,v=0===i?r:[""],b=A(v),S=0,C=0,_=0;S<o;++S)for(var w=0,x=y(t,g+1,g=c(C=a[S])),O=t;w<b;++w)(O=h(C>0?v[w]+" "+x:m(x,/&\f/g,v[w])))&&(u[_++]=O);return B(t,e,n,0===i?s:l,u,d,f,p)}function Z(t,e,n,o){return B(t,e,n,a,d(P),y(t,2,-2),0,o)}function $(t,e,n,o,i){return B(t,e,n,l,y(t,0,o),y(t,o+1,-1),o,i)}function q(t,e,n){switch(function(t,e){return 45^v(t,0)?(((e<<2^v(t,0))<<2^v(t,1))<<2^v(t,2))<<2^v(t,3):0}(t,e)){case 5103:return r+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return r+t+t;case 4789:return i+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return r+t+i+t+o+t+t;case 5936:switch(v(t,e+11)){case 114:return r+t+o+m(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return r+t+o+m(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return r+t+o+m(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return r+t+o+t+t;case 6165:return r+t+o+"flex-"+t+t;case 5187:return r+t+m(t,/(\w+).+(:[^]+)/,r+"box-$1$2"+o+"flex-$1$2")+t;case 5443:return r+t+o+"flex-item-"+m(t,/flex-|-self/g,"")+(p(t,/flex-|baseline/)?"":o+"grid-row-"+m(t,/flex-|-self/g,""))+t;case 4675:return r+t+o+"flex-line-pack"+m(t,/align-content|flex-|-self/g,"")+t;case 5548:return r+t+o+m(t,"shrink","negative")+t;case 5292:return r+t+o+m(t,"basis","preferred-size")+t;case 6060:return r+"box-"+m(t,"-grow","")+r+t+o+m(t,"grow","positive")+t;case 4554:return r+m(t,/([^-])(transform)/g,"$1"+r+"$2")+t;case 6187:return m(m(m(t,/(zoom-|grab)/,r+"$1"),/(image-set)/,r+"$1"),t,"")+t;case 5495:case 3959:return m(t,/(image-set\([^]*)/,r+"$1$`$1");case 4968:return m(m(t,/(.+:)(flex-)?(.*)/,r+"box-pack:$3"+o+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+r+t+t;case 4200:if(!p(t,/flex-|baseline/))return o+"grid-column-align"+y(t,e)+t;break;case 2592:case 3360:return o+m(t,"template-","")+t;case 4384:case 3616:return n&&n.some((function(t,n){return e=n,p(t.props,/grid-\w+-end/)}))?~g(t+(n=n[e].value),"span",0)?t:o+m(t,"-start","")+t+o+"grid-row-span:"+(~g(n,"span",0)?p(n,/\d+/):+p(n,/\d+/)-+p(t,/\d+/))+";":o+m(t,"-start","")+t;case 4896:case 4128:return n&&n.some((function(t){return p(t.props,/grid-\w+-start/)}))?t:o+m(m(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return m(t,/(.+)-inline(.+)/,r+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(b(t)-1-e>6)switch(v(t,e+1)){case 109:if(45!==v(t,e+4))break;case 102:return m(t,/(.+:)(.+)-([^]+)/,"$1"+r+"$2-$3$1"+i+(108==v(t,e+3)?"$3":"$2-$3"))+t;case 115:return~g(t,"stretch",0)?q(m(t,"stretch","fill-available"),e,n)+t:t}break;case 5152:case 5920:return m(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(e,n,i,r,a,s,l){return o+n+":"+i+l+(r?o+n+"-span:"+(a?s:+s-+i)+l:"")+t}));case 4949:if(121===v(t,e+6))return m(t,":",":"+r)+t;break;case 6444:switch(v(t,45===v(t,14)?18:11)){case 120:return m(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+r+(45===v(t,14)?"inline-":"")+"box$3$1"+r+"$2$3$1"+o+"$2box$3")+t;case 100:return m(t,":",":"+o)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return m(t,"scroll-","scroll-snap-")+t}return t}function K(t,e){for(var n="",o=0;o<t.length;o++)n+=e(t[o],o,t,e)||"";return n}function J(t,e,n,o){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case l:return t.return=t.return||t.value;case a:return"";case u:return t.return=t.value+"{"+K(t.children,o)+"}";case s:if(!b(t.value=t.props.join(",")))return""}return b(n=K(t.children,o))?t.return=t.value+"{"+n+"}":""}function tt(t){var e=A(t);return function(n,o,i,r){for(var a="",s=0;s<e;s++)a+=t[s](n,o,i,r)||"";return a}}function et(t){return function(e){e.root||(e=e.return)&&t(e)}}function nt(t,e,n,i){if(t.length>-1&&!t.return)switch(t.type){case l:return void(t.return=q(t.value,t.length,n));case u:return K([T(t,{value:m(t.value,"@","@"+r)})],i);case s:if(t.length)return C(n=t.props,(function(e){switch(p(e,i=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":k(T(t,{props:[m(e,/:(read-\w+)/,":-moz-$1")]})),k(T(t,{props:[e]})),f(t,{props:_(n,i)});break;case"::placeholder":k(T(t,{props:[m(e,/:(plac\w+)/,":"+r+"input-$1")]})),k(T(t,{props:[m(e,/:(plac\w+)/,":-moz-$1")]})),k(T(t,{props:[m(e,/:(plac\w+)/,o+"input-$1")]})),k(T(t,{props:[e]})),f(t,{props:_(n,i)})}return""}))}}},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.ImageUtils=void 0;const i=n(21),r=n(22);class a{static toDataUrl(t){return new Promise(((e,n)=>{const o=new Blob([t],{type:"image/jpeg"}),i=new FileReader;i.onload=()=>e(i.result),i.onerror=()=>n(i.error),i.readAsDataURL(o)}))}static getObjectFitSize(t,e,n=!0){const o=e.width/e.height,r=t.width/t.height;let a=0,s=0;(n?o>r:o<r)?(a=t.width,s=a/o):(s=t.height,a=s*o);const l=(t.width-a)/2,u=(t.height-s)/2;return new i.Frame(l,u,a,s)}static loadFromUrl(t){return new Promise(((e,n)=>{const i=document.createElement("img");i.src=t,i.onload=()=>o(this,void 0,void 0,(function*(){const t=document.createElement("canvas");t.width=i.width,t.height=i.height;const n=t.getContext("2d");n.drawImage(i,0,0);const o=n.getImageData(0,0,i.width,i.height);e(o)})),i.onerror=n}))}static saveImageData(t){const e=this.createImageDataCanvas(t),n=" ("+t.width+"x"+t.height+")";e.toBlob((t=>this.saveBlob(t,r.Utils.uuid()+n+".png")))}static createImageDataCanvas(t){const e=document.createElement("canvas");return e.className="scanbot-sdk-canvas-element",e.width=t.width,e.height=t.height,e.getContext("2d").putImageData(t,0,0),e}static saveBlob(t,e){let n=document.createElement("a");n.setAttribute("download",e);let o=URL.createObjectURL(t);n.setAttribute("href",o),n.click()}static convertImageDataWrapperToImageData(t){if(t)return new ImageData(t.data,t.width,t.height)}static wrapperToBase64(t){return a.createImageDataCanvas(a.convertImageDataWrapperToImageData(t)).toDataURL("image/png")}}e.ImageUtils=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Size=void 0;const o=n(5);class i{constructor(t,e){this.width=t,this.height=e}isPortrait(){return this.height>this.width}ratio(t){return t?this.height/this.width:this.width/this.height}ratioDiff(t,e){return this.ratio(e)/t.ratio(e)}static isEmpty(t){return!t||(0===t.width||0===t.height)}static toPolygon(t){return[new o.Point(0,0),new o.Point(t.width,0),new o.Point(t.width,t.height),new o.Point(0,t.height)]}static fromHtmlElement(t){return t?new i(t.clientWidth,t.clientHeight):new i(0,0)}static fromJson(t){return new i(t.width,t.height)}static subtractFrom(t,e){return new i(t.width-e,t.height-e)}static empty(){return new i(0,0)}}e.Size=i},function(t,e,n){"use strict";n.r(e),n.d(e,"createDomMotionComponent",(function(){return da})),n.d(e,"motion",(function(){return ca})),n.d(e,"m",(function(){return fa})),n.d(e,"AnimatePresence",(function(){return ya})),n.d(e,"AnimateSharedLayout",(function(){return Pa})),n.d(e,"MotionConfig",(function(){return La})),n.d(e,"LazyMotion",(function(){return Ba})),n.d(e,"domAnimation",(function(){return ka})),n.d(e,"domMax",(function(){return Ma})),n.d(e,"useMotionValue",(function(){return Da})),n.d(e,"useMotionTemplate",(function(){return Ia})),n.d(e,"MotionValue",(function(){return ko})),n.d(e,"motionValue",(function(){return Mo})),n.d(e,"resolveMotionValue",(function(){return Ut})),n.d(e,"useTransform",(function(){return Va})),n.d(e,"useSpring",(function(){return Na})),n.d(e,"useVelocity",(function(){return Ua})),n.d(e,"useElementScroll",(function(){return Xa})),n.d(e,"useViewportScroll",(function(){return Ka})),n.d(e,"useReducedMotion",(function(){return Ja})),n.d(e,"animationControls",(function(){return ts})),n.d(e,"useAnimation",(function(){return es})),n.d(e,"animate",(function(){return ba})),n.d(e,"animateVisualElement",(function(){return Go})),n.d(e,"useCycle",(function(){return os})),n.d(e,"transform",(function(){return Fa})),n.d(e,"isValidMotionProp",(function(){return _t})),n.d(e,"useIsPresent",(function(){return v})),n.d(e,"usePresence",(function(){return g})),n.d(e,"DragControls",(function(){return is})),n.d(e,"useDragControls",(function(){return as})),n.d(e,"useDomEvent",(function(){return Kt})),n.d(e,"createMotionComponent",(function(){return j})),n.d(e,"addScaleCorrection",(function(){return V})),n.d(e,"snapshotViewportBox",(function(){return Wi})),n.d(e,"createCrossfader",(function(){return Aa})),n.d(e,"visualElement",(function(){return zr})),n.d(e,"batchLayout",(function(){return er})),n.d(e,"flushLayout",(function(){return nr})),n.d(e,"MotionConfigContext",(function(){return d})),n.d(e,"PresenceContext",(function(){return p})),n.d(e,"LayoutGroupContext",(function(){return C})),n.d(e,"VisibilityAction",(function(){return ur})),n.d(e,"FramerTreeLayoutContext",(function(){return Lr})),n.d(e,"SharedLayoutContext",(function(){return Pr})),n.d(e,"createBatcher",(function(){return Or})),n.d(e,"FlatTree",(function(){return Vr})),n.d(e,"useDeprecatedAnimatedState",(function(){return cs})),n.d(e,"useDeprecatedInvertedScale",(function(){return fs}));var o=n(0),i=n(1),r=function(t){return{isEnabled:function(e){return t.some((function(t){return!!e[t]}))}}},a={measureLayout:r(["layout","layoutId","drag","_layoutResetTransform"]),animation:r(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag"]),exit:r(["exit"]),drag:r(["drag","dragControls"]),focus:r(["whileFocus"]),hover:r(["whileHover","onHoverStart","onHoverEnd"]),tap:r(["whileTap","onTap","onTapStart","onTapCancel"]),pan:r(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),layoutAnimation:r(["layout","layoutId"])};function s(t){for(var e in t){var n=t[e];null!==n&&(a[e].Component=n)}}var l=Object(i.createContext)({strict:!1}),u=Object.keys(a),c=u.length;var d=Object(i.createContext)({transformPagePoint:function(t){return t},isStatic:!1}),f=Object(i.createContext)({});function h(){return Object(i.useContext)(f).visualElement}var p=Object(i.createContext)(null);function m(t){var e=Object(i.useRef)(null);return null===e.current&&(e.current=t()),e.current}function g(){var t=Object(i.useContext)(p);if(null===t)return[!0,null];var e=t.isPresent,n=t.onExitComplete,o=t.register,r=S();Object(i.useEffect)((function(){return o(r)}),[]);return!e&&n?[!1,function(){return null==n?void 0:n(r)}]:[!0]}function v(){return y(Object(i.useContext)(p))}function y(t){return null===t||t.isPresent}var b=0,A=function(){return b++},S=function(){return m(A)},C=Object(i.createContext)(null),_="undefined"!=typeof window,w=_?i.useLayoutEffect:i.useEffect;function x(t,e,n,r){var a=Object(i.useContext)(d),s=Object(i.useContext)(l),u=h(),c=Object(i.useContext)(p),f=function(t){var e=t.layoutId,n=Object(i.useContext)(C);return n&&void 0!==e?n+"-"+e:e}(n),m=Object(i.useRef)(void 0);r||(r=s.renderer),!m.current&&r&&(m.current=r(t,{visualState:e,parent:u,props:Object(o.a)(Object(o.a)({},n),{layoutId:f}),presenceId:null==c?void 0:c.id,blockInitialAnimation:!1===(null==c?void 0:c.initial)}));var g=m.current;return w((function(){g&&(g.setProps(Object(o.a)(Object(o.a)(Object(o.a)({},a),n),{layoutId:f})),g.isPresent=y(c),g.isPresenceRoot=!u||u.presenceId!==(null==c?void 0:c.id),g.syncRender())})),Object(i.useEffect)((function(){var t;g&&(null===(t=g.animationState)||void 0===t||t.animateChanges())})),w((function(){return function(){return null==g?void 0:g.notifyUnmount()}}),[]),g}function O(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function E(t){return Array.isArray(t)}function P(t){return"string"==typeof t||E(t)}function L(t,e,n,o,i){var r;return void 0===o&&(o={}),void 0===i&&(i={}),"string"==typeof e&&(e=null===(r=t.variants)||void 0===r?void 0:r[e]),"function"==typeof e?e(null!=n?n:t.custom,o,i):e}function B(t,e,n){var o=t.getProps();return L(o,e,null!=n?n:o.custom,function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.get()})),e}(t),function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.getVelocity()})),e}(t))}function T(t){var e;return"function"==typeof(null===(e=t.animate)||void 0===e?void 0:e.start)||P(t.initial)||P(t.animate)||P(t.whileHover)||P(t.whileDrag)||P(t.whileTap)||P(t.whileFocus)||P(t.exit)}function k(t){return Boolean(T(t)||t.variants)}function M(t,e){var n=function(t,e){if(T(t)){var n=t.initial,o=t.animate;return{initial:!1===n||P(n)?n:void 0,animate:P(o)?o:void 0}}return!1!==t.inherit?e:{}}(t,Object(i.useContext)(f)),o=n.initial,r=n.animate;return Object(i.useMemo)((function(){return{initial:o,animate:r}}),e?[D(o),D(r)]:[])}function D(t){return Array.isArray(t)?t.join(" "):t}function j(t){var e=t.preloadedFeatures,n=t.createVisualElement,r=t.useRender,h=t.useVisualState,p=t.Component;return e&&s(e),Object(i.forwardRef)((function(t,e){var s=Object(i.useContext)(d).isStatic,m=null,g=M(t,s),v=h(t,s);return!s&&_&&(g.visualElement=x(p,v,t,n),m=function(t,e,n){var r=[];if(Object(i.useContext)(l),!e)return null;for(var s=0;s<c;s++){var d=u[s],f=a[d],h=f.isEnabled,p=f.Component;h(t)&&p&&r.push(i.createElement(p,Object(o.a)({key:d},t,{visualElement:e})))}return r}(t,g.visualElement)),i.createElement(i.Fragment,null,i.createElement(f.Provider,{value:g},r(p,t,function(t,e,n){return Object(i.useCallback)((function(o){var i;o&&(null===(i=t.mount)||void 0===i||i.call(t,o)),e&&(o?e.mount(o):e.unmount()),n&&("function"==typeof n?n(o):O(n)&&(n.current=o))}),[e])}(v,g.visualElement,e),v,s)),m)}))}function W(t){function e(e,n){return void 0===n&&(n={}),j(t(e,n))}var n=new Map;return new Proxy(e,{get:function(t,o){return n.has(o)||n.set(o,e(o)),n.get(o)}})}var I=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function R(t){return"string"==typeof t&&!t.includes("-")&&!!(I.indexOf(t)>-1||/[A-Z]/.test(t))}var F={};function V(t){for(var e in t)F[e]=t[e]}var z=["","X","Y","Z"],N=["transformPerspective","x","y","z"];function U(t,e){return N.indexOf(t)-N.indexOf(e)}["translate","scale","rotate","skew"].forEach((function(t){return z.forEach((function(e){return N.push(t+e)}))}));var H=new Set(N);function G(t){return H.has(t)}var Y=new Set(["originX","originY","originZ"]);function Q(t){return Y.has(t)}function X(t,e){var n=e.layout,o=e.layoutId;return G(t)||Q(t)||(n||void 0!==o)&&(!!F[t]||"opacity"===t)}var Z=function(t){return null!==t&&"object"==typeof t&&t.getVelocity},$={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function q(t){return t.startsWith("--")}var K=function(t,e){return e&&"number"==typeof t?e.transform(t):t},J=function(t,e){return function(n){return Math.max(Math.min(n,e),t)}},tt=function(t){return t%1?Number(t.toFixed(5)):t},et=/(-)?([\d]*\.?[\d])+/g,nt=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,ot=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function it(t){return"string"==typeof t}var rt=function(t){return{test:function(e){return it(e)&&e.endsWith(t)&&1===e.split(" ").length},parse:parseFloat,transform:function(e){return""+e+t}}},at=rt("deg"),st=rt("%"),lt=rt("px"),ut=rt("vh"),ct=rt("vw"),dt=Object(o.a)(Object(o.a)({},st),{parse:function(t){return st.parse(t)/100},transform:function(t){return st.transform(100*t)}}),ft={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},ht=Object(o.a)(Object(o.a)({},ft),{transform:J(0,1)}),pt=Object(o.a)(Object(o.a)({},ft),{default:1}),mt=Object(o.a)(Object(o.a)({},ft),{transform:Math.round}),gt={borderWidth:lt,borderTopWidth:lt,borderRightWidth:lt,borderBottomWidth:lt,borderLeftWidth:lt,borderRadius:lt,radius:lt,borderTopLeftRadius:lt,borderTopRightRadius:lt,borderBottomRightRadius:lt,borderBottomLeftRadius:lt,width:lt,maxWidth:lt,height:lt,maxHeight:lt,size:lt,top:lt,right:lt,bottom:lt,left:lt,padding:lt,paddingTop:lt,paddingRight:lt,paddingBottom:lt,paddingLeft:lt,margin:lt,marginTop:lt,marginRight:lt,marginBottom:lt,marginLeft:lt,rotate:at,rotateX:at,rotateY:at,rotateZ:at,scale:pt,scaleX:pt,scaleY:pt,scaleZ:pt,skew:at,skewX:at,skewY:at,distance:lt,translateX:lt,translateY:lt,translateZ:lt,x:lt,y:lt,z:lt,perspective:lt,transformPerspective:lt,opacity:ht,originX:dt,originY:dt,originZ:lt,zIndex:mt,fillOpacity:ht,strokeOpacity:ht,numOctaves:mt};function vt(t,e,n,o,i,r,a,s){var l,u=t.style,c=t.vars,d=t.transform,f=t.transformKeys,h=t.transformOrigin;f.length=0;var p=!1,m=!1,g=!0;for(var v in e){var y=e[v];if(q(v))c[v]=y;else{var b=gt[v],A=K(y,b);if(G(v)){if(p=!0,d[v]=A,f.push(v),!g)continue;y!==(null!==(l=b.default)&&void 0!==l?l:0)&&(g=!1)}else if(Q(v))h[v]=A,m=!0;else if((null==n?void 0:n.isHydrated)&&(null==o?void 0:o.isHydrated)&&F[v]){var S=F[v].process(y,o,n),C=F[v].applyTo;if(C)for(var _=C.length,w=0;w<_;w++)u[C[w]]=S;else u[v]=S}else u[v]=A}}o&&n&&a&&s?(u.transform=a(o.deltaFinal,o.treeScale,p?d:void 0),r&&(u.transform=r(d,u.transform)),u.transformOrigin=s(o)):(p&&(u.transform=function(t,e,n,o){var i=t.transform,r=t.transformKeys,a=e.enableHardwareAcceleration,s=void 0===a||a,l=e.allowTransformNone,u=void 0===l||l,c="";r.sort(U);for(var d=!1,f=r.length,h=0;h<f;h++){var p=r[h];c+=($[p]||p)+"("+i[p]+") ","z"===p&&(d=!0)}return!d&&s?c+="translateZ(0)":c=c.trim(),o?c=o(i,n?"":c):u&&n&&(c="none"),c}(t,i,g,r)),m&&(u.transformOrigin=function(t){var e=t.originX,n=void 0===e?"50%":e,o=t.originY,i=void 0===o?"50%":o,r=t.originZ;return n+" "+i+" "+(void 0===r?0:r)}(h)))}var yt=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function bt(t,e,n){for(var o in e)Z(e[o])||X(o,n)||(t[o]=e[o])}function At(t,e,n){var r={};return bt(r,t.style||{},t),Object.assign(r,function(t,e,n){var r=t.transformTemplate;return Object(i.useMemo)((function(){var t={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};vt(t,e,void 0,void 0,{enableHardwareAcceleration:!n},r);var i=t.vars,a=t.style;return Object(o.a)(Object(o.a)({},i),a)}),[e])}(t,e,n)),t.transformValues&&(r=t.transformValues(r)),r}function St(t,e,n){var o={},i=At(t,e,n);return Boolean(t.drag)&&(o.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),o.style=i,o}var Ct=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","_layoutResetTransform","onLayoutAnimationComplete","onViewportBoxUpdate","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover"]);function _t(t){return Ct.has(t)}var wt=function(t){return!_t(t)};try{var xt=n(177).default;wt=function(t){return t.startsWith("on")?!_t(t):xt(t)}}catch(t){}function Ot(t,e,n){return"string"==typeof t?t:lt.transform(e+n*t)}var Et=function(t,e){return lt.transform(t*e)},Pt={offset:"stroke-dashoffset",array:"stroke-dasharray"},Lt={offset:"strokeDashoffset",array:"strokeDasharray"};function Bt(t,e,n,i,r,a,s,l){var u=e.attrX,c=e.attrY,d=e.originX,f=e.originY,h=e.pathLength,p=e.pathSpacing,m=void 0===p?1:p,g=e.pathOffset,v=void 0===g?0:g;vt(t,Object(o.d)(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,i,r,a,s,l),t.attrs=t.style,t.style={};var y=t.attrs,b=t.style,A=t.dimensions,S=t.totalPathLength;y.transform&&(A&&(b.transform=y.transform),delete y.transform),A&&(void 0!==d||void 0!==f||b.transform)&&(b.transformOrigin=function(t,e,n){return Ot(e,t.x,t.width)+" "+Ot(n,t.y,t.height)}(A,void 0!==d?d:.5,void 0!==f?f:.5)),void 0!==u&&(y.x=u),void 0!==c&&(y.y=c),void 0!==S&&void 0!==h&&function(t,e,n,o,i,r){void 0===o&&(o=1),void 0===i&&(i=0),void 0===r&&(r=!0);var a=r?Pt:Lt;t[a.offset]=Et(-i,e);var s=Et(n,e),l=Et(o,e);t[a.array]=s+" "+l}(y,S,h,m,v,!1)}var Tt=function(){return Object(o.a)(Object(o.a)({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}})};function kt(t,e){var n=Object(i.useMemo)((function(){var n=Tt();return Bt(n,e,void 0,void 0,{enableHardwareAcceleration:!1},t.transformTemplate),Object(o.a)(Object(o.a)({},n.attrs),{style:Object(o.a)({},n.style)})}),[e]);if(t.style){var r={};bt(r,t.style,t),n.style=Object(o.a)(Object(o.a)({},r),n.style)}return n}function Mt(t){void 0===t&&(t=!1);return function(e,n,r,a,s){var l=a.latestValues,u=(R(e)?kt:St)(n,l,s),c=function(t,e,n){var o={};for(var i in t)(wt(i)||!0===n&&_t(i)||!e&&!_t(i))&&(o[i]=t[i]);return o}(n,"string"==typeof e,t),d=Object(o.a)(Object(o.a)(Object(o.a)({},c),u),{ref:r});return Object(i.createElement)(e,d)}}var Dt=/([a-z])([A-Z])/g,jt=function(t){return t.replace(Dt,"$1-$2").toLowerCase()};function Wt(t,e){var n=e.style,o=e.vars;for(var i in Object.assign(t.style,n),o)t.style.setProperty(i,o[i])}var It=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform"]);function Rt(t,e){for(var n in Wt(t,e),e.attrs)t.setAttribute(It.has(n)?n:jt(n),e.attrs[n])}function Ft(t){var e=t.style,n={};for(var o in e)(Z(e[o])||X(o,t))&&(n[o]=e[o]);return n}function Vt(t){var e=Ft(t);for(var n in t){if(Z(t[n]))e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e}function zt(t){return"object"==typeof t&&"function"==typeof t.start}var Nt=function(t){return Array.isArray(t)};function Ut(t){var e,n=Z(t)?t.get():t;return e=n,Boolean(e&&"object"==typeof e&&e.mix&&e.toValue)?n.toValue():n}function Ht(t,e,n,o){var i=t.scrapeMotionValuesFromProps,r=t.createRenderState,a=t.onMount,s={latestValues:Yt(e,n,o,i),renderState:r()};return a&&(s.mount=function(t){return a(e,t,s)}),s}var Gt=function(t){return function(e,n){var o=Object(i.useContext)(f),r=Object(i.useContext)(p);return n?Ht(t,e,o,r):m((function(){return Ht(t,e,o,r)}))}};function Yt(t,e,n,i){var r={},a=!1===(null==n?void 0:n.initial),s=i(t);for(var l in s)r[l]=Ut(s[l]);var u=t.initial,c=t.animate,d=T(t),f=k(t);e&&f&&!d&&!1!==t.inherit&&(null!=u||(u=e.initial),null!=c||(c=e.animate));var h=a||!1===u?c:u;h&&"boolean"!=typeof h&&!zt(h)&&(Array.isArray(h)?h:[h]).forEach((function(e){var n=L(t,e);if(n){var i=n.transitionEnd;n.transition;var a=Object(o.d)(n,["transitionEnd","transition"]);for(var s in a)r[s]=a[s];for(var s in i)r[s]=i[s]}}));return r}var Qt={useVisualState:Gt({scrapeMotionValuesFromProps:Vt,createRenderState:Tt,onMount:function(t,e,n){var o=n.renderState,i=n.latestValues;try{o.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){o.dimensions={x:0,y:0,width:0,height:0}}"path"===e.tagName&&(o.totalPathLength=e.getTotalLength()),Bt(o,i,void 0,void 0,{enableHardwareAcceleration:!1},t.transformTemplate),Rt(e,o)}})};var Xt,Zt={useVisualState:Gt({scrapeMotionValuesFromProps:Ft,createRenderState:yt})};function $t(t,e,n,i){var r=e.forwardMotionProps,a=void 0!==r&&r,s=R(t)?Qt:Zt;return Object(o.a)(Object(o.a)({},s),{preloadedFeatures:n,useRender:Mt(a),createVisualElement:i,Component:t})}function qt(t,e,n,o){return t.addEventListener(e,n,o),function(){return t.removeEventListener(e,n,o)}}function Kt(t,e,n,o){Object(i.useEffect)((function(){var i=t.current;if(n&&i)return qt(i,e,n,o)}),[t,e,n,o])}function Jt(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function te(t){return!!t.touches}!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.Exit="exit"}(Xt||(Xt={}));var ee={pageX:0,pageY:0};function ne(t,e){void 0===e&&(e="page");var n=t.touches[0]||t.changedTouches[0]||ee;return{x:n[e+"X"],y:n[e+"Y"]}}function oe(t,e){return void 0===e&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}function ie(t,e){return void 0===e&&(e="page"),{point:te(t)?ne(t,e):oe(t,e)}}var re=function(t,e){void 0===e&&(e=!1);var n,o=function(e){return t(e,ie(e))};return e?(n=o,function(t){var e=t instanceof MouseEvent;(!e||e&&0===t.button)&&n(t)}):o},ae={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},se={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function le(t){return _&&null===window.onpointerdown?t:_&&null===window.ontouchstart?se[t]:_&&null===window.onmousedown?ae[t]:t}function ue(t,e,n,o){return qt(t,le(e),re(n,"pointerdown"===e),o)}function ce(t,e,n,o){return Kt(t,le(e),n&&re(n,"pointerdown"===e),o)}function de(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var fe=de("dragHorizontal"),he=de("dragVertical");function pe(t){var e=!1;if("y"===t)e=he();else if("x"===t)e=fe();else{var n=fe(),o=he();n&&o?e=function(){n(),o()}:(n&&n(),o&&o())}return e}function me(){var t=pe(!0);return!t||(t(),!1)}function ge(t,e,n){return function(o,i){var r;Jt(o)&&!me()&&(null==n||n(o,i),null===(r=t.animationState)||void 0===r||r.setActive(Xt.Hover,e))}}var ve=function(t,e){return!!e&&(t===e||ve(t,e.parentElement))};function ye(t){return Object(i.useEffect)((function(){return function(){return t()}}),[])}var be=function(t,e){return function(n){return e(t(n))}},Ae=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(be)};var Se=function(t){return function(e){return t(e),null}},Ce={tap:Se((function(t){var e=t.onTap,n=t.onTapStart,o=t.onTapCancel,r=t.whileTap,a=t.visualElement,s=e||n||o||r,l=Object(i.useRef)(!1),u=Object(i.useRef)(null);function c(){var t;null===(t=u.current)||void 0===t||t.call(u),u.current=null}function d(){var t;return c(),l.current=!1,null===(t=a.animationState)||void 0===t||t.setActive(Xt.Tap,!1),!me()}function f(t,n){d()&&(ve(a.getInstance(),t.target)?null==e||e(t,n):null==o||o(t,n))}function h(t,e){d()&&(null==o||o(t,e))}ce(a,"pointerdown",s?function(t,e){var o;c(),l.current||(l.current=!0,u.current=Ae(ue(window,"pointerup",f),ue(window,"pointercancel",h)),null==n||n(t,e),null===(o=a.animationState)||void 0===o||o.setActive(Xt.Tap,!0))}:void 0),ye(c)})),focus:Se((function(t){var e=t.whileFocus,n=t.visualElement;Kt(n,"focus",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(Xt.Focus,!0)}:void 0),Kt(n,"blur",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(Xt.Focus,!1)}:void 0)})),hover:Se((function(t){var e=t.onHoverStart,n=t.onHoverEnd,o=t.whileHover,i=t.visualElement;ce(i,"pointerenter",e||o?ge(i,!0,e):void 0),ce(i,"pointerleave",n||o?ge(i,!1,n):void 0)}))};function _e(t,e){if(!Array.isArray(e))return!1;var n=e.length;if(n!==t.length)return!1;for(var o=0;o<n;o++)if(e[o]!==t[o])return!1;return!0}var we=function(t,e,n){return Math.min(Math.max(n,t),e)},xe=.001;function Oe(t){var e,n,o=t.duration,i=void 0===o?800:o,r=t.bounce,a=void 0===r?.25:r,s=t.velocity,l=void 0===s?0:s,u=t.mass,c=void 0===u?1:u,d=1-a;d=we(.05,1,d),i=we(.01,10,i/1e3),d<1?(e=function(t){var e=t*d,n=e*i,o=e-l,r=Ee(t,d),a=Math.exp(-n);return xe-o/r*a},n=function(t){var n=t*d*i,o=n*l+l,r=Math.pow(d,2)*Math.pow(t,2)*i,a=Math.exp(-n),s=Ee(Math.pow(t,2),d);return(-e(t)+xe>0?-1:1)*((o-r)*a)/s}):(e=function(t){return Math.exp(-t*i)*((t-l)*i+1)-.001},n=function(t){return Math.exp(-t*i)*(i*i*(l-t))});var f=function(t,e,n){for(var o=n,i=1;i<12;i++)o-=t(o)/e(o);return o}(e,n,5/i);if(i*=1e3,isNaN(f))return{stiffness:100,damping:10,duration:i};var h=Math.pow(f,2)*c;return{stiffness:h,damping:2*d*Math.sqrt(c*h),duration:i}}function Ee(t,e){return t*Math.sqrt(1-e*e)}var Pe=["duration","bounce"],Le=["stiffness","damping","mass"];function Be(t,e){return e.some((function(e){return void 0!==t[e]}))}function Te(t){var e=t.from,n=void 0===e?0:e,i=t.to,r=void 0===i?1:i,a=t.restSpeed,s=void 0===a?2:a,l=t.restDelta,u=Object(o.d)(t,["from","to","restSpeed","restDelta"]),c={done:!1,value:n},d=function(t){var e=Object(o.a)({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!Be(t,Le)&&Be(t,Pe)){var n=Oe(t);(e=Object(o.a)(Object(o.a)(Object(o.a)({},e),n),{velocity:0,mass:1})).isResolvedFromDuration=!0}return e}(u),f=d.stiffness,h=d.damping,p=d.mass,m=d.velocity,g=d.duration,v=d.isResolvedFromDuration,y=ke,b=ke;function A(){var t=m?-m/1e3:0,e=r-n,o=h/(2*Math.sqrt(f*p)),i=Math.sqrt(f/p)/1e3;if(null!=l||(l=Math.abs(r-n)<=1?.01:.4),o<1){var a=Ee(i,o);y=function(n){var s=Math.exp(-o*i*n);return r-s*((t+o*i*e)/a*Math.sin(a*n)+e*Math.cos(a*n))},b=function(n){var r=Math.exp(-o*i*n);return o*i*r*(Math.sin(a*n)*(t+o*i*e)/a+e*Math.cos(a*n))-r*(Math.cos(a*n)*(t+o*i*e)-a*e*Math.sin(a*n))}}else if(1===o)y=function(n){return r-Math.exp(-i*n)*(e+(t+i*e)*n)};else{var s=i*Math.sqrt(o*o-1);y=function(n){var a=Math.exp(-o*i*n),l=Math.min(s*n,300);return r-a*((t+o*i*e)*Math.sinh(l)+s*e*Math.cosh(l))/s}}}return A(),{next:function(t){var e=y(t);if(v)c.done=t>=g;else{var n=1e3*b(t),o=Math.abs(n)<=s,i=Math.abs(r-e)<=l;c.done=o&&i}return c.value=c.done?r:e,c},flipTarget:function(){var t;m=-m,n=(t=[r,n])[0],r=t[1],A()}}}Te.needsInterpolation=function(t,e){return"string"==typeof t||"string"==typeof e};var ke=function(t){return 0},Me=function(t,e,n){var o=e-t;return 0===o?1:(n-t)/o},De=function(t,e,n){return-n*t+n*e+t},je=function(t,e){return function(n){return Boolean(it(n)&&ot.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e))}},We=function(t,e,n){return function(o){var i;if(!it(o))return o;var r=o.match(et),a=r[0],s=r[1],l=r[2],u=r[3];return(i={})[t]=parseFloat(a),i[e]=parseFloat(s),i[n]=parseFloat(l),i.alpha=void 0!==u?parseFloat(u):1,i}},Ie=J(0,255),Re=Object(o.a)(Object(o.a)({},ft),{transform:function(t){return Math.round(Ie(t))}}),Fe={test:je("rgb","red"),parse:We("red","green","blue"),transform:function(t){var e=t.red,n=t.green,o=t.blue,i=t.alpha,r=void 0===i?1:i;return"rgba("+Re.transform(e)+", "+Re.transform(n)+", "+Re.transform(o)+", "+tt(ht.transform(r))+")"}};var Ve={test:je("#"),parse:function(t){var e="",n="",o="",i="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),o=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),o=t.substr(3,1),i=t.substr(4,1),e+=e,n+=n,o+=o,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:i?parseInt(i,16)/255:1}},transform:Fe.transform},ze={test:je("hsl","hue"),parse:We("hue","saturation","lightness"),transform:function(t){var e=t.hue,n=t.saturation,o=t.lightness,i=t.alpha,r=void 0===i?1:i;return"hsla("+Math.round(e)+", "+st.transform(tt(n))+", "+st.transform(tt(o))+", "+tt(ht.transform(r))+")"}},Ne=function(t,e,n){var o=t*t,i=e*e;return Math.sqrt(Math.max(0,n*(i-o)+o))},Ue=[Ve,Fe,ze],He=function(t){return Ue.find((function(e){return e.test(t)}))},Ge=function(t){return"'"+t+"' is not an animatable color. Use the equivalent color code instead."},Ye=function(t,e){var n=He(t),i=He(e);Ge(t),Ge(e),n.transform,i.transform;var r=n.parse(t),a=i.parse(e),s=Object(o.a)({},r),l=n===ze?De:Ne;return function(t){for(var e in s)"alpha"!==e&&(s[e]=l(r[e],a[e],t));return s.alpha=De(r.alpha,a.alpha,t),n.transform(s)}},Qe={test:function(t){return Fe.test(t)||Ve.test(t)||ze.test(t)},parse:function(t){return Fe.test(t)?Fe.parse(t):ze.test(t)?ze.parse(t):Ve.parse(t)},transform:function(t){return it(t)?t:t.hasOwnProperty("red")?Fe.transform(t):ze.transform(t)}},Xe="${c}",Ze="${n}";function $e(t){var e=[],n=0,o=t.match(nt);o&&(n=o.length,t=t.replace(nt,Xe),e.push.apply(e,o.map(Qe.parse)));var i=t.match(et);return i&&(t=t.replace(et,Ze),e.push.apply(e,i.map(ft.parse))),{values:e,numColors:n,tokenised:t}}function qe(t){return $e(t).values}function Ke(t){var e=$e(t),n=e.values,o=e.numColors,i=e.tokenised,r=n.length;return function(t){for(var e=i,n=0;n<r;n++)e=e.replace(n<o?Xe:Ze,n<o?Qe.transform(t[n]):tt(t[n]));return e}}var Je=function(t){return"number"==typeof t?0:t};var tn={test:function(t){var e,n,o,i;return isNaN(t)&&it(t)&&(null!==(n=null===(e=t.match(et))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(i=null===(o=t.match(nt))||void 0===o?void 0:o.length)&&void 0!==i?i:0)>0},parse:qe,createTransformer:Ke,getAnimatableNone:function(t){var e=qe(t);return Ke(t)(e.map(Je))}},en=function(t){return"number"==typeof t};function nn(t,e){return en(t)?function(n){return De(t,e,n)}:Qe.test(t)?Ye(t,e):sn(t,e)}var on=function(t,e){var n=Object(o.e)([],t),i=n.length,r=t.map((function(t,n){return nn(t,e[n])}));return function(t){for(var e=0;e<i;e++)n[e]=r[e](t);return n}},rn=function(t,e){var n=Object(o.a)(Object(o.a)({},t),e),i={};for(var r in n)void 0!==t[r]&&void 0!==e[r]&&(i[r]=nn(t[r],e[r]));return function(t){for(var e in i)n[e]=i[e](t);return n}};function an(t){for(var e=tn.parse(t),n=e.length,o=0,i=0,r=0,a=0;a<n;a++)o||"number"==typeof e[a]?o++:void 0!==e[a].hue?r++:i++;return{parsed:e,numNumbers:o,numRGB:i,numHSL:r}}var sn=function(t,e){var n=tn.createTransformer(e),o=an(t),i=an(e);return o.numHSL===i.numHSL&&o.numRGB===i.numRGB&&(o.numNumbers,i.numNumbers),Ae(on(o.parsed,i.parsed),n)},ln=function(t,e){return function(n){return De(t,e,n)}};function un(t,e,n){for(var o,i=[],r=n||("number"==typeof(o=t[0])?ln:"string"==typeof o?Qe.test(o)?Ye:sn:Array.isArray(o)?on:"object"==typeof o?rn:void 0),a=t.length-1,s=0;s<a;s++){var l=r(t[s],t[s+1]);if(e){var u=Array.isArray(e)?e[s]:e;l=Ae(u,l)}i.push(l)}return i}function cn(t,e,n){var o=void 0===n?{}:n,i=o.clamp,r=void 0===i||i,a=o.ease,s=o.mixer,l=t.length;e.length,!a||!Array.isArray(a)||a.length,t[0]>t[l-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());var u=un(e,a,s),c=2===l?function(t,e){var n=t[0],o=t[1],i=e[0];return function(t){return i(Me(n,o,t))}}(t,u):function(t,e){var n=t.length,o=n-1;return function(i){var r=0,a=!1;if(i<=t[0]?a=!0:i>=t[o]&&(r=o-1,a=!0),!a){for(var s=1;s<n&&!(t[s]>i||s===o);s++);r=s-1}var l=Me(t[r],t[r+1],i);return e[r](l)}}(t,u);return r?function(e){return c(we(t[0],t[l-1],e))}:c}var dn,fn=function(t){return function(e){return 1-t(1-e)}},hn=function(t){return function(e){return e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2}},pn=function(t){return function(e){return e*e*((t+1)*e-t)}},mn=function(t){return t},gn=(dn=2,function(t){return Math.pow(t,dn)}),vn=fn(gn),yn=hn(gn),bn=function(t){return 1-Math.sin(Math.acos(t))},An=fn(bn),Sn=hn(An),Cn=pn(1.525),_n=fn(Cn),wn=hn(Cn),xn=function(t){var e=pn(t);return function(t){return(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))}}(1.525),On=function(t){if(1===t||0===t)return t;var e=t*t;return t<.36363636363636365?7.5625*e:t<.7272727272727273?9.075*e-9.9*t+3.4:t<.9?12.066481994459833*e-19.63545706371191*t+8.898060941828255:10.8*t*t-20.52*t+10.72},En=fn(On);function Pn(t,e){return t.map((function(){return e||yn})).splice(0,t.length-1)}function Ln(t){var e=t.from,n=void 0===e?0:e,o=t.to,i=void 0===o?1:o,r=t.ease,a=t.offset,s=t.duration,l=void 0===s?300:s,u={done:!1,value:n},c=Array.isArray(i)?i:[n,i],d=function(t,e){return t.map((function(t){return t*e}))}(a&&a.length===c.length?a:function(t){var e=t.length;return t.map((function(t,n){return 0!==n?n/(e-1):0}))}(c),l);function f(){return cn(d,c,{ease:Array.isArray(r)?r:Pn(c,r)})}var h=f();return{next:function(t){return u.value=h(t),u.done=t>=l,u},flipTarget:function(){c.reverse(),h=f()}}}var Bn={keyframes:Ln,spring:Te,decay:function(t){var e=t.velocity,n=void 0===e?0:e,o=t.from,i=void 0===o?0:o,r=t.power,a=void 0===r?.8:r,s=t.timeConstant,l=void 0===s?350:s,u=t.restDelta,c=void 0===u?.5:u,d=t.modifyTarget,f={done:!1,value:i},h=a*n,p=i+h,m=void 0===d?p:d(p);return m!==p&&(h=m-i),{next:function(t){var e=-h*Math.exp(-t/l);return f.done=!(e>c||e<-c),f.value=f.done?m:m+e,f},flipTarget:function(){}}}};var Tn=1/60*1e3,kn="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},Mn="undefined"!=typeof window?function(t){return window.requestAnimationFrame(t)}:function(t){return setTimeout((function(){return t(kn())}),Tn)};var Dn=!0,jn=!1,Wn=!1,In={delta:0,timestamp:0},Rn=["read","update","preRender","render","postRender"],Fn=Rn.reduce((function(t,e){return t[e]=function(t){var e=[],n=[],o=0,i=!1,r=new WeakSet,a={schedule:function(t,a,s){void 0===a&&(a=!1),void 0===s&&(s=!1);var l=s&&i,u=l?e:n;return a&&r.add(t),-1===u.indexOf(t)&&(u.push(t),l&&i&&(o=e.length)),t},cancel:function(t){var e=n.indexOf(t);-1!==e&&n.splice(e,1),r.delete(t)},process:function(s){var l;if(i=!0,e=(l=[n,e])[0],(n=l[1]).length=0,o=e.length)for(var u=0;u<o;u++){var c=e[u];c(s),r.has(c)&&(a.schedule(c),t())}i=!1}};return a}((function(){return jn=!0})),t}),{}),Vn=Rn.reduce((function(t,e){var n=Fn[e];return t[e]=function(t,e,o){return void 0===e&&(e=!1),void 0===o&&(o=!1),jn||Gn(),n.schedule(t,e,o)},t}),{}),zn=Rn.reduce((function(t,e){return t[e]=Fn[e].cancel,t}),{}),Nn=Rn.reduce((function(t,e){return t[e]=function(){return Fn[e].process(In)},t}),{}),Un=function(t){return Fn[t].process(In)},Hn=function(t){jn=!1,In.delta=Dn?Tn:Math.max(Math.min(t-In.timestamp,40),1),In.timestamp=t,Wn=!0,Rn.forEach(Un),Wn=!1,jn&&(Dn=!1,Mn(Hn))},Gn=function(){jn=!0,Dn=!0,Wn||Mn(Hn)},Yn=function(){return In},Qn=Vn;function Xn(t,e,n){return void 0===n&&(n=0),t-e-n}var Zn=function(t){var e=function(e){var n=e.delta;return t(n)};return{start:function(){return Qn.update(e,!0)},stop:function(){return zn.update(e)}}};function $n(t){var e,n,i,r,a,s=t.from,l=t.autoplay,u=void 0===l||l,c=t.driver,d=void 0===c?Zn:c,f=t.elapsed,h=void 0===f?0:f,p=t.repeat,m=void 0===p?0:p,g=t.repeatType,v=void 0===g?"loop":g,y=t.repeatDelay,b=void 0===y?0:y,A=t.onPlay,S=t.onStop,C=t.onComplete,_=t.onRepeat,w=t.onUpdate,x=Object(o.d)(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),O=x.to,E=0,P=x.duration,L=!1,B=!0,T=function(t){if(Array.isArray(t.to))return Ln;if(Bn[t.type])return Bn[t.type];var e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Ln:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Te:Ln}(x);(null===(n=(e=T).needsInterpolation)||void 0===n?void 0:n.call(e,s,O))&&(a=cn([0,100],[s,O],{clamp:!1}),s=0,O=100);var k=T(Object(o.a)(Object(o.a)({},x),{from:s,to:O}));function M(){E++,"reverse"===v?h=function(t,e,n,o){return void 0===n&&(n=0),void 0===o&&(o=!0),o?Xn(e+-t,e,n):e-(t-e)+n}(h,P,b,B=E%2==0):(h=Xn(h,P,b),"mirror"===v&&k.flipTarget()),L=!1,_&&_()}function D(t){if(B||(t=-t),h+=t,!L){var e=k.next(Math.max(0,h));r=e.value,a&&(r=a(r)),L=B?e.done:h<=0}null==w||w(r),L&&(0===E&&(null!=P||(P=h)),E<m?function(t,e,n,o){return o?t>=e+n:t<=-n}(h,P,b,B)&&M():(i.stop(),C&&C()))}return u&&(null==A||A(),(i=d(D)).start()),{stop:function(){null==S||S(),i.stop()}}}function qn(t,e){return e?t*(1e3/e):0}var Kn=function(t){return 1e3*t},Jn=function(t,e){return 1-3*e+3*t},to=function(t,e){return 3*e-6*t},eo=function(t){return 3*t},no=function(t,e,n){return((Jn(e,n)*t+to(e,n))*t+eo(e))*t},oo=function(t,e,n){return 3*Jn(e,n)*t*t+2*to(e,n)*t+eo(e)};var io=.1;function ro(t,e,n,o){if(t===e&&n===o)return mn;for(var i=new Float32Array(11),r=0;r<11;++r)i[r]=no(r*io,t,n);function a(e){for(var o=0,r=1;10!==r&&i[r]<=e;++r)o+=io;--r;var a=o+(e-i[r])/(i[r+1]-i[r])*io,s=oo(a,t,n);return s>=.001?function(t,e,n,o){for(var i=0;i<8;++i){var r=oo(e,n,o);if(0===r)return e;e-=(no(e,n,o)-t)/r}return e}(e,a,t,n):0===s?a:function(t,e,n,o,i){var r,a,s=0;do{(r=no(a=e+(n-e)/2,o,i)-t)>0?n=a:e=a}while(Math.abs(r)>1e-7&&++s<10);return a}(e,o,o+io,t,n)}return function(t){return 0===t||1===t?t:no(a(t),e,o)}}var ao={linear:mn,easeIn:gn,easeInOut:yn,easeOut:vn,circIn:bn,circInOut:Sn,circOut:An,backIn:Cn,backInOut:wn,backOut:_n,anticipate:xn,bounceIn:En,bounceInOut:function(t){return t<.5?.5*(1-On(1-2*t)):.5*On(2*t-1)+.5},bounceOut:On},so=function(t){if(Array.isArray(t)){t.length;var e=Object(o.c)(t,4);return ro(e[0],e[1],e[2],e[3])}return"string"==typeof t?ao[t]:t},lo=function(t,e){return"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!tn.test(e)||e.startsWith("url(")))},uo=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},co=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},fo=function(){return{type:"keyframes",ease:"linear",duration:.3}},ho=function(t){return{type:"keyframes",duration:.8,values:t}},po={x:uo,y:uo,z:uo,rotate:uo,rotateX:uo,rotateY:uo,rotateZ:uo,scaleX:co,scaleY:co,scale:co,opacity:fo,backgroundColor:fo,color:fo,default:co},mo=new Set(["brightness","contrast","saturate","opacity"]);function go(t){var e=t.slice(0,-1).split("("),n=e[0],o=e[1];if("drop-shadow"===n)return t;var i=(o.match(et)||[])[0];if(!i)return t;var r=o.replace(i,""),a=mo.has(n)?1:0;return i!==o&&(a*=100),n+"("+a+r+")"}var vo=/([a-z-]*)\(.*?\)/g,yo=Object(o.a)(Object(o.a)({},tn),{getAnimatableNone:function(t){var e=t.match(vo);return e?e.map(go).join(" "):t}}),bo=Object(o.a)(Object(o.a)({},gt),{color:Qe,backgroundColor:Qe,outlineColor:Qe,fill:Qe,stroke:Qe,borderColor:Qe,borderTopColor:Qe,borderRightColor:Qe,borderBottomColor:Qe,borderLeftColor:Qe,filter:yo,WebkitFilter:yo}),Ao=function(t){return bo[t]};function So(t,e){var n,o=Ao(t);return o!==yo&&(o=tn),null===(n=o.getAnimatableNone)||void 0===n?void 0:n.call(o,e)}function Co(t){var e=t.ease,n=t.times,i=t.yoyo,r=t.flip,a=t.loop,s=Object(o.d)(t,["ease","times","yoyo","flip","loop"]),l=Object(o.a)({},s);return n&&(l.offset=n),s.duration&&(l.duration=Kn(s.duration)),s.repeatDelay&&(l.repeatDelay=Kn(s.repeatDelay)),e&&(l.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(e)?e.map(so):so(e)),"tween"===s.type&&(l.type="keyframes"),(i||a||r)&&(!0,i?l.repeatType="reverse":a?l.repeatType="loop":r&&(l.repeatType="mirror"),l.repeat=a||i||r||s.repeat),"spring"!==s.type&&(l.type="keyframes"),l}function _o(t,e,n){var i,r,a,s;return Array.isArray(e.to)&&(null!==(i=t.duration)&&void 0!==i||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=Object(o.e)([],Object(o.c)(t.to)),t.to[0]=t.from)}(e),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=Object(o.d)(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=Object(o.a)(Object(o.a)({},t),(r=n,a=e.to,s=Nt(a)?ho:po[r]||po.default,Object(o.a)({to:a},s(a))))),Object(o.a)(Object(o.a)({},e),Co(t))}function wo(t,e,n,i,r){var a,s=Eo(i,t),l=null!==(a=s.from)&&void 0!==a?a:e.get(),u=lo(t,n);"none"===l&&u&&"string"==typeof n?l=So(t,n):xo(l)&&"string"==typeof n?l=Oo(n):!Array.isArray(n)&&xo(n)&&"string"==typeof l&&(n=Oo(l));var c=lo(t,l);return c&&u&&!1!==s.type?function(){var i={from:l,to:n,velocity:e.getVelocity(),onComplete:r,onUpdate:function(t){return e.set(t)}};return"inertia"===s.type||"decay"===s.type?function(t){var e,n=t.from,i=void 0===n?0:n,r=t.velocity,a=void 0===r?0:r,s=t.min,l=t.max,u=t.power,c=void 0===u?.8:u,d=t.timeConstant,f=void 0===d?750:d,h=t.bounceStiffness,p=void 0===h?500:h,m=t.bounceDamping,g=void 0===m?10:m,v=t.restDelta,y=void 0===v?1:v,b=t.modifyTarget,A=t.driver,S=t.onUpdate,C=t.onComplete;function _(t){return void 0!==s&&t<s||void 0!==l&&t>l}function w(t){return void 0===s?l:void 0===l||Math.abs(s-t)<Math.abs(l-t)?s:l}function x(t){null==e||e.stop(),e=$n(Object(o.a)(Object(o.a)({},t),{driver:A,onUpdate:function(e){var n;null==S||S(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:C}))}function O(t){x(Object(o.a)({type:"spring",stiffness:p,damping:g,restDelta:y},t))}if(_(i))O({from:i,velocity:a,to:w(i)});else{var E=c*a+i;"undefined"!=typeof b&&(E=b(E));var P,L,B=w(E),T=B===s?-1:1;x({type:"decay",from:i,velocity:a,timeConstant:f,power:c,restDelta:y,modifyTarget:b,onUpdate:_(E)?function(t){P=L,L=t,a=qn(t-P,Yn().delta),(1===T&&t>B||-1===T&&t<B)&&O({from:t,to:B,velocity:a})}:void 0})}return{stop:function(){return null==e?void 0:e.stop()}}}(Object(o.a)(Object(o.a)({},i),s)):$n(Object(o.a)(Object(o.a)({},_o(s,i,t)),{onUpdate:function(t){var e;i.onUpdate(t),null===(e=s.onUpdate)||void 0===e||e.call(s,t)},onComplete:function(){var t;i.onComplete(),null===(t=s.onComplete)||void 0===t||t.call(s)}}))}:function(){var t;return e.set(n),r(),null===(t=null==s?void 0:s.onComplete)||void 0===t||t.call(s),{stop:function(){}}}}function xo(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Oo(t){return"number"==typeof t?0:So("",t)}function Eo(t,e){return t[e]||t.default||t}function Po(t,e,n,o){return void 0===o&&(o={}),e.start((function(i){var r,a,s=wo(t,e,n,o,i),l=function(t,e){var n;return null!==(n=(Eo(t,e)||{}).delay)&&void 0!==n?n:0}(o,t),u=function(){return a=s()};return l?r=setTimeout(u,Kn(l)):u(),function(){clearTimeout(r),null==a||a.stop()}}))}function Lo(t,e){-1===t.indexOf(e)&&t.push(e)}function Bo(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var To=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(t){var e=this;return Lo(this.subscriptions,t),function(){return Bo(e.subscriptions,t)}},t.prototype.notify=function(t,e,n){var o=this.subscriptions.length;if(o)if(1===o)this.subscriptions[0](t,e,n);else for(var i=0;i<o;i++){var r=this.subscriptions[i];r&&r(t,e,n)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),ko=function(){function t(t){var e,n=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new To,this.velocityUpdateSubscribers=new To,this.renderSubscribers=new To,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),n.prev=n.current,n.current=t;var o=Yn(),i=o.delta,r=o.timestamp;n.lastUpdated!==r&&(n.timeDelta=i,n.lastUpdated=r,Qn.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),e&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return Qn.postRender(n.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,e){void 0===e&&(e=!0),e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?qn(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var e=this;return this.stop(),new Promise((function(n){e.hasAnimated=!0,e.stopAnimation=t(n)})).then((function(){return e.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function Mo(t){return new ko(t)}var Do=function(t){return function(e){return e.test(t)}},jo=[ft,lt,st,at,ct,ut,{test:function(t){return"auto"===t},parse:function(t){return t}}],Wo=function(t){return jo.find(Do(t))},Io=Object(o.e)(Object(o.e)([],Object(o.c)(jo)),[Qe,tn]),Ro=function(t){return Io.find(Do(t))};function Fo(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Mo(n))}function Vo(t,e){var n=B(t,e),i=n?t.makeTargetAnimatable(n,!1):{},r=i.transitionEnd,a=void 0===r?{}:r;i.transition;var s,l=Object(o.d)(i,["transitionEnd","transition"]);for(var u in l=Object(o.a)(Object(o.a)({},l),a)){Fo(t,u,(s=l[u],Nt(s)?s[s.length-1]||0:s))}}function zo(t,e){Object(o.e)([],Object(o.c)(e)).reverse().forEach((function(n){var o,i=t.getVariant(n);i&&Vo(t,i),null===(o=t.variantChildren)||void 0===o||o.forEach((function(t){zo(t,e)}))}))}function No(t,e,n){var o,i,r,a,s=Object.keys(e).filter((function(e){return!t.hasValue(e)})),l=s.length;if(l)for(var u=0;u<l;u++){var c=s[u],d=e[c],f=null;Array.isArray(d)&&(f=d[0]),null===f&&(f=null!==(i=null!==(o=n[c])&&void 0!==o?o:t.readValue(c))&&void 0!==i?i:e[c]),null!=f&&("string"==typeof f&&/^\-?\d*\.?\d+$/.test(f)?f=parseFloat(f):!Ro(f)&&tn.test(d)&&(f=So(c,d)),t.addValue(c,Mo(f)),null!==(r=(a=n)[c])&&void 0!==r||(a[c]=f),t.setBaseTarget(c,f))}}function Uo(t,e){if(e)return(e[t]||e.default||e).from}function Ho(t,e,n){var o,i,r={};for(var a in t)r[a]=null!==(o=Uo(a,e))&&void 0!==o?o:null===(i=n.getValue(a))||void 0===i?void 0:i.get();return r}function Go(t,e,n){var o;if(void 0===n&&(n={}),t.notifyAnimationStart(),Array.isArray(e)){var i=e.map((function(e){return Yo(t,e,n)}));o=Promise.all(i)}else if("string"==typeof e)o=Yo(t,e,n);else{var r="function"==typeof e?B(t,e,n.custom):e;o=Qo(t,r,n)}return o.then((function(){return t.notifyAnimationComplete(e)}))}function Yo(t,e,n){var i;void 0===n&&(n={});var r=B(t,e,n.custom),a=(r||{}).transition,s=void 0===a?t.getDefaultTransition()||{}:a;n.transitionOverride&&(s=n.transitionOverride);var l=r?function(){return Qo(t,r,n)}:function(){return Promise.resolve()},u=(null===(i=t.variantChildren)||void 0===i?void 0:i.size)?function(i){void 0===i&&(i=0);var r=s.delayChildren,a=void 0===r?0:r,l=s.staggerChildren,u=s.staggerDirection;return function(t,e,n,i,r,a){void 0===n&&(n=0);void 0===i&&(i=0);void 0===r&&(r=1);var s=[],l=(t.variantChildren.size-1)*i,u=1===r?function(t){return void 0===t&&(t=0),t*i}:function(t){return void 0===t&&(t=0),l-t*i};return Array.from(t.variantChildren).sort(Xo).forEach((function(t,i){s.push(Yo(t,e,Object(o.a)(Object(o.a)({},a),{delay:n+u(i)})).then((function(){return t.notifyAnimationComplete(e)})))})),Promise.all(s)}(t,e,a+i,l,u,n)}:function(){return Promise.resolve()},c=s.when;if(c){var d=Object(o.c)("beforeChildren"===c?[l,u]:[u,l],2),f=d[0],h=d[1];return f().then(h)}return Promise.all([l(),u(n.delay)])}function Qo(t,e,n){var i,r=void 0===n?{}:n,a=r.delay,s=void 0===a?0:a,l=r.transitionOverride,u=r.type,c=t.makeTargetAnimatable(e),d=c.transition,f=void 0===d?t.getDefaultTransition():d,h=c.transitionEnd,p=Object(o.d)(c,["transition","transitionEnd"]);l&&(f=l);var m=[],g=u&&(null===(i=t.animationState)||void 0===i?void 0:i.getState()[u]);for(var v in p){var y=t.getValue(v),b=p[v];if(!(!y||void 0===b||g&&Zo(g,v))){var A=Po(v,y,b,Object(o.a)({delay:s},f));m.push(A)}}return Promise.all(m).then((function(){h&&Vo(t,h)}))}function Xo(t,e){return t.sortNodePosition(e)}function Zo(t,e){var n=t.protectedKeys,o=t.needsAnimating,i=n.hasOwnProperty(e)&&!0!==o[e];return o[e]=!1,i}var $o=[Xt.Animate,Xt.Hover,Xt.Tap,Xt.Drag,Xt.Focus,Xt.Exit],qo=Object(o.e)([],Object(o.c)($o)).reverse(),Ko=$o.length;function Jo(t){var e,n=function(t){return function(e){return Promise.all(e.map((function(e){var n=e.animation,o=e.options;return Go(t,n,o)})))}}(t),i=((e={})[Xt.Animate]=ti(!0),e[Xt.Hover]=ti(),e[Xt.Tap]=ti(),e[Xt.Drag]=ti(),e[Xt.Focus]=ti(),e[Xt.Exit]=ti(),e),r={},a=!0,s=function(e,n){var i=B(t,n);if(i){i.transition;var r=i.transitionEnd,a=Object(o.d)(i,["transition","transitionEnd"]);e=Object(o.a)(Object(o.a)(Object(o.a)({},e),a),r)}return e};function l(e,l){for(var u,c=t.getProps(),d=t.getVariantContext(!0)||{},f=[],h=new Set,p={},m=1/0,g=function(n){var r=qo[n],g=i[r],v=null!==(u=c[r])&&void 0!==u?u:d[r],y=P(v),b=r===l?g.isActive:null;!1===b&&(m=n);var A=v===d[r]&&v!==c[r]&&y;if(A&&a&&t.manuallyAnimateOnMount&&(A=!1),g.protectedKeys=Object(o.a)({},p),!g.isActive&&null===b||!v&&!g.prevProp||zt(v)||"boolean"==typeof v)return"continue";var S=function(t,e){if("string"==typeof e)return e!==t;if(E(e))return!_e(e,t);return!1}(g.prevProp,v)||r===l&&g.isActive&&!A&&y||n>m&&y,C=Array.isArray(v)?v:[v],_=C.reduce(s,{});!1===b&&(_={});var w=g.prevResolvedValues,x=void 0===w?{}:w,O=Object(o.a)(Object(o.a)({},x),_),L=function(t){S=!0,h.delete(t),g.needsAnimating[t]=!0};for(var B in O){var T=_[B],k=x[B];p.hasOwnProperty(B)||(T!==k?Nt(T)&&Nt(k)?_e(T,k)?g.protectedKeys[B]=!0:L(B):void 0!==T?L(B):h.add(B):void 0!==T&&h.has(B)?L(B):g.protectedKeys[B]=!0)}g.prevProp=v,g.prevResolvedValues=_,g.isActive&&(p=Object(o.a)(Object(o.a)({},p),_)),a&&t.blockInitialAnimation&&(S=!1),S&&!A&&f.push.apply(f,Object(o.e)([],Object(o.c)(C.map((function(t){return{animation:t,options:Object(o.a)({type:r},e)}})))))},v=0;v<Ko;v++)g(v);if(r=Object(o.a)({},p),h.size){var y={};h.forEach((function(e){var n=t.getBaseTarget(e);void 0!==n&&(y[e]=n)})),f.push({animation:y})}var b=Boolean(f.length);return a&&!1===c.initial&&!t.manuallyAnimateOnMount&&(b=!1),a=!1,b?n(f):Promise.resolve()}return{isAnimated:function(t){return void 0!==r[t]},animateChanges:l,setActive:function(e,n,o){var r;return i[e].isActive===n?Promise.resolve():(null===(r=t.variantChildren)||void 0===r||r.forEach((function(t){var o;return null===(o=t.animationState)||void 0===o?void 0:o.setActive(e,n)})),i[e].isActive=n,l(o,e))},setAnimateFunction:function(e){n=e(t)},getState:function(){return i}}}function ti(t){return void 0===t&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var ei={animation:Se((function(t){var e=t.visualElement,n=t.animate;e.animationState||(e.animationState=Jo(e)),zt(n)&&Object(i.useEffect)((function(){return n.subscribe(e)}),[n])})),exit:Se((function(t){var e=t.custom,n=t.visualElement,r=Object(o.c)(g(),2),a=r[0],s=r[1],l=Object(i.useContext)(p);Object(i.useEffect)((function(){var t,o,i=null===(t=n.animationState)||void 0===t?void 0:t.setActive(Xt.Exit,!a,{custom:null!==(o=null==l?void 0:l.custom)&&void 0!==o?o:e});!a&&(null==i||i.then(s))}),[a])}))},ni=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},oi=function(t){return ni(t)&&t.hasOwnProperty("z")},ii=function(t,e){return Math.abs(t-e)};function ri(t,e){if(en(t)&&en(e))return ii(t,e);if(ni(t)&&ni(e)){var n=ii(t.x,e.x),o=ii(t.y,e.y),i=oi(t)&&oi(e)?ii(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(o,2)+Math.pow(i,2))}}var ai=function(){function t(t,e,n){var i=this,r=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(i.lastMoveEvent&&i.lastMoveEventInfo){var t=ui(i.lastMoveEventInfo,i.history),e=null!==i.startEvent,n=ri(t.offset,{x:0,y:0})>=3;if(e||n){var r=t.point,a=Yn().timestamp;i.history.push(Object(o.a)(Object(o.a)({},r),{timestamp:a}));var s=i.handlers,l=s.onStart,u=s.onMove;e||(l&&l(i.lastMoveEvent,t),i.startEvent=i.lastMoveEvent),u&&u(i.lastMoveEvent,t)}}},this.handlePointerMove=function(t,e){i.lastMoveEvent=t,i.lastMoveEventInfo=si(e,i.transformPagePoint),Jt(t)&&0===t.buttons?i.handlePointerUp(t,e):Qn.update(i.updatePoint,!0)},this.handlePointerUp=function(t,e){i.end();var n=i.handlers,o=n.onEnd,r=n.onSessionEnd,a=ui(si(e,i.transformPagePoint),i.history);i.startEvent&&o&&o(t,a),r&&r(t,a)},!(te(t)&&t.touches.length>1)){this.handlers=e,this.transformPagePoint=r;var a=si(ie(t),this.transformPagePoint),s=a.point,l=Yn().timestamp;this.history=[Object(o.a)(Object(o.a)({},s),{timestamp:l})];var u=e.onSessionStart;u&&u(t,ui(a,this.history)),this.removeListeners=Ae(ue(window,"pointermove",this.handlePointerMove),ue(window,"pointerup",this.handlePointerUp),ue(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),zn.update(this.updatePoint)},t}();function si(t,e){return e?{point:e(t.point)}:t}function li(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ui(t,e){var n=t.point;return{point:n,delta:li(n,di(e)),offset:li(n,ci(e)),velocity:fi(e,.1)}}function ci(t){return t[0]}function di(t){return t[t.length-1]}function fi(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,o=null,i=di(t);n>=0&&(o=t[n],!(i.timestamp-o.timestamp>Kn(e)));)n--;if(!o)return{x:0,y:0};var r=(i.timestamp-o.timestamp)/1e3;if(0===r)return{x:0,y:0};var a={x:(i.x-o.x)/r,y:(i.y-o.y)/r};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function hi(t){return t}function pi(t){var e=t.top;return{x:{min:t.left,max:t.right},y:{min:e,max:t.bottom}}}function mi(){return{x:{min:0,max:1},y:{min:0,max:1}}}var gi={translate:0,scale:1,origin:0,originPoint:0};function vi(){return{x:Object(o.a)({},gi),y:Object(o.a)({},gi)}}function yi(t){return[t("x"),t("y")]}function bi(t,e,n){var o=e.min,i=e.max;return void 0!==o&&t<o?t=n?De(o,t,n.min):Math.max(t,o):void 0!==i&&t>i&&(t=n?De(i,t,n.max):Math.min(t,i)),t}function Ai(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Si(t,e){var n,i=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&(i=(n=Object(o.c)([r,i],2))[0],r=n[1]),{min:t.min+i,max:t.min+r}}function Ci(t,e,n){return{min:_i(t,e),max:_i(t,n)}}function _i(t,e){var n;return"number"==typeof t?t:null!==(n=t[e])&&void 0!==n?n:0}function wi(t,e){return pi(function(t,e){var n=t.top,o=t.left,i=t.bottom,r=t.right;void 0===e&&(e=hi);var a=e({x:o,y:n}),s=e({x:r,y:i});return{top:a.y,left:a.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}function xi(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=.01),ri(t,e)<n}function Oi(t){return t.max-t.min}function Ei(t,e){var n=.5,o=Oi(t),i=Oi(e);return i>o?n=Me(e.min,e.max-o,t.min):o>i&&(n=Me(t.min,t.max-i,e.min)),we(0,1,n)}function Pi(t,e,n,o){void 0===o&&(o=.5),t.origin=o,t.originPoint=De(e.min,e.max,t.origin),t.scale=Oi(n)/Oi(e),xi(t.scale,1,1e-4)&&(t.scale=1),t.translate=De(n.min,n.max,t.origin)-t.originPoint,xi(t.translate)&&(t.translate=0)}function Li(t,e,n,o){Pi(t.x,e.x,n.x,Bi(o.originX)),Pi(t.y,e.y,n.y,Bi(o.originY))}function Bi(t){return"number"==typeof t?t:.5}function Ti(t,e,n){t.min=n.min+e.min,t.max=t.min+Oi(e)}var ki=function(t,e){return t.depth-e.depth};function Mi(t){return t.projection.isEnabled||t.shouldResetTransform()}function Di(t,e){void 0===e&&(e=[]);var n=t.parent;return n&&Di(n,e),Mi(t)&&e.push(t),e}function ji(t){if(!t.shouldResetTransform()){var e,n=t.getLayoutState();t.notifyBeforeLayoutMeasure(n.layout),n.isHydrated=!0,n.layout=t.measureViewportBox(),n.layoutCorrected=(e=n.layout,{x:Object(o.a)({},e.x),y:Object(o.a)({},e.y)}),t.notifyLayoutMeasure(n.layout,t.prevViewportBox||n.layout),Qn.update((function(){return t.rebaseProjectionTarget()}))}}function Wi(t){t.shouldResetTransform()||(t.prevViewportBox=t.measureViewportBox(!1),t.rebaseProjectionTarget(!1,t.prevViewportBox))}function Ii(t,e){return{min:e.min-t.min,max:e.max-t.min}}function Ri(t,e){return{x:Ii(t.x,e.x),y:Ii(t.y,e.y)}}function Fi(t,e){var n=t.getLayoutId(),o=e.getLayoutId();return n!==o||void 0===o&&t!==e}function Vi(t){var e=t.getProps(),n=e.drag,o=e._dragX;return n&&!o}function zi(t,e){t.min=e.min,t.max=e.max}function Ni(t,e,n){return n+e*(t-n)}function Ui(t,e,n,o,i){return void 0!==i&&(t=Ni(t,i,o)),Ni(t,n,o)+e}function Hi(t,e,n,o,i){void 0===e&&(e=0),void 0===n&&(n=1),t.min=Ui(t.min,e,n,o,i),t.max=Ui(t.max,e,n,o,i)}function Gi(t,e){var n=e.x,o=e.y;Hi(t.x,n.translate,n.scale,n.originPoint),Hi(t.y,o.translate,o.scale,o.originPoint)}function Yi(t,e,n,i){var r=Object(o.c)(i,3),a=r[0],s=r[1],l=r[2];t.min=e.min,t.max=e.max;var u=void 0!==n[l]?n[l]:.5,c=De(e.min,e.max,u);Hi(t,n[a],n[s],c,n.scale)}var Qi=["x","scaleX","originX"],Xi=["y","scaleY","originY"];function Zi(t,e,n){Yi(t.x,e.x,n,Qi),Yi(t.y,e.y,n,Xi)}function $i(t,e,n,o,i){return t=Ni(t-=e,1/n,o),void 0!==i&&(t=Ni(t,1/i,o)),t}function qi(t,e,n){var i=Object(o.c)(n,3),r=i[0],a=i[1],s=i[2];!function(t,e,n,o,i){void 0===e&&(e=0),void 0===n&&(n=1),void 0===o&&(o=.5);var r=De(t.min,t.max,o)-e;t.min=$i(t.min,e,n,r,i),t.max=$i(t.max,e,n,r,i)}(t,e[r],e[a],e[s],e.scale)}function Ki(t,e){qi(t.x,e,Qi),qi(t.y,e,Xi)}var Ji=new Set;function tr(t,e,n){t[n]||(t[n]=[]),t[n].push(e)}function er(t){return Ji.add(t),function(){return Ji.delete(t)}}function nr(){if(Ji.size){var t=0,e=[[]],n=[],o=function(n){return tr(e,n,t)},i=function(e){tr(n,e,t),t++};Ji.forEach((function(e){e(o,i),t=0})),Ji.clear();for(var r=n.length,a=0;a<=r;a++)e[a]&&e[a].forEach(ir),n[a]&&n[a].forEach(ir)}}var or,ir=function(t){return t()},rr=new WeakMap,ar=function(){function t(t){var e=t.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.elastic={x:{min:0,max:1},y:{min:0,max:1}},this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=e,this.visualElement.enableLayoutProjection(),rr.set(e,this)}return t.prototype.start=function(t,e){var n=this,i=void 0===e?{}:e,r=i.snapToCursor,a=void 0!==r&&r,s=i.cursorProgress,l=this.props.transformPagePoint;this.panSession=new ai(t,{onSessionStart:function(t){var e;n.stopMotion();var i=function(t){return ie(t,"client")}(t).point;null===(e=n.cancelLayout)||void 0===e||e.call(n),n.cancelLayout=er((function(t,e){var r=Di(n.visualElement),l=function(t){var e=[],n=function(t){Mi(t)&&e.push(t),t.children.forEach(n)};return t.children.forEach(n),e.sort(ki)}(n.visualElement),u=Object(o.e)(Object(o.e)([],Object(o.c)(r)),Object(o.c)(l)),c=!1;n.isLayoutDrag()&&n.visualElement.lockProjectionTarget(),e((function(){u.forEach((function(t){return t.resetTransform()}))})),t((function(){ji(n.visualElement),l.forEach(ji)})),e((function(){u.forEach((function(t){return t.restoreTransform()})),a&&(c=n.snapToCursor(i))})),t((function(){Boolean(n.getAxisMotionValue("x")&&!n.isExternalDrag())||n.visualElement.rebaseProjectionTarget(!0,n.visualElement.measureViewportBox(!1)),n.visualElement.scheduleUpdateLayoutProjection();var t=n.visualElement.projection;yi((function(e){if(!c){var o=t.target[e],r=o.min,a=o.max;n.cursorProgress[e]=s?s[e]:Me(r,a,i[e])}var l=n.getAxisMotionValue(e);l&&(n.originPoint[e]=l.get())}))})),e((function(){Nn.update(),Nn.preRender(),Nn.render(),Nn.postRender()})),t((function(){return n.resolveDragConstraints()}))}))},onStart:function(t,e){var o,i,r,a=n.props,s=a.drag,l=a.dragPropagation;(!s||l||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=pe(s),n.openGlobalLock))&&(nr(),n.isDragging=!0,n.currentDirection=null,null===(i=(o=n.props).onDragStart)||void 0===i||i.call(o,t,e),null===(r=n.visualElement.animationState)||void 0===r||r.setActive(Xt.Drag,!0))},onMove:function(t,e){var o,i,r,a,s=n.props,l=s.dragPropagation,u=s.dragDirectionLock;if(l||n.openGlobalLock){var c=e.offset;if(u&&null===n.currentDirection)return n.currentDirection=function(t,e){void 0===e&&(e=10);var n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(c),void(null!==n.currentDirection&&(null===(i=(o=n.props).onDirectionLock)||void 0===i||i.call(o,n.currentDirection)));n.updateAxis("x",e.point,c),n.updateAxis("y",e.point,c),null===(a=(r=n.props).onDrag)||void 0===a||a.call(r,t,e),or=t}},onSessionEnd:function(t,e){return n.stop(t,e)}},{transformPagePoint:l})},t.prototype.resolveDragConstraints=function(){var t=this,e=this.props,n=e.dragConstraints,o=e.dragElastic,i=this.visualElement.getLayoutState().layoutCorrected;this.constraints=!!n&&(O(n)?this.resolveRefConstraints(i,n):function(t,e){var n=e.top,o=e.left,i=e.bottom,r=e.right;return{x:Ai(t.x,o,r),y:Ai(t.y,n,i)}}(i,n)),this.elastic=function(t){return!1===t?t=0:!0===t&&(t=.35),{x:Ci(t,"left","right"),y:Ci(t,"top","bottom")}}(o),this.constraints&&!this.hasMutatedConstraints&&yi((function(e){t.getAxisMotionValue(e)&&(t.constraints[e]=function(t,e){var n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i[e],t.constraints[e]))}))},t.prototype.resolveRefConstraints=function(t,e){var n=this.props,o=n.onMeasureDragConstraints,i=n.transformPagePoint,r=e.current;this.constraintsBox=wi(r,i);var a=function(t,e){return{x:Si(t.x,e.x),y:Si(t.y,e.y)}}(t,this.constraintsBox);if(o){var s=o(function(t){var e=t.x,n=t.y;return{top:n.min,bottom:n.max,left:e.min,right:e.max}}(a));this.hasMutatedConstraints=!!s,s&&(a=pi(s))}return a},t.prototype.cancelDrag=function(){var t,e;this.visualElement.unlockProjectionTarget(),null===(t=this.cancelLayout)||void 0===t||t.call(this),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(e=this.visualElement.animationState)||void 0===e||e.setActive(Xt.Drag,!1)},t.prototype.stop=function(t,e){var n,o,i;null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var a=e.velocity;this.animateDragEnd(a),null===(i=(o=this.props).onDragEnd)||void 0===i||i.call(o,t,e)}},t.prototype.snapToCursor=function(t){var e=this;return yi((function(n){if(sr(n,e.props.drag,e.currentDirection)){var o=e.getAxisMotionValue(n);if(!o)return e.cursorProgress[n]=.5,!0;var i=e.visualElement.getLayoutState().layout,r=i[n].max-i[n].min,a=i[n].min+r/2,s=t[n]-a;e.originPoint[n]=t[n],o.set(s)}})).includes(!0)},t.prototype.updateAxis=function(t,e,n){if(sr(t,this.props.drag,this.currentDirection))return this.getAxisMotionValue(t)?this.updateAxisMotionValue(t,n):this.updateVisualElementAxis(t,e)},t.prototype.updateAxisMotionValue=function(t,e){var n=this.getAxisMotionValue(t);if(e&&n){var o=this.originPoint[t]+e[t],i=this.constraints?bi(o,this.constraints[t],this.elastic[t]):o;n.set(i)}},t.prototype.updateVisualElementAxis=function(t,e){var n,o=this.visualElement.getLayoutState().layout[t],i=o.max-o.min,r=this.cursorProgress[t],a=function(t,e,n,o,i){var r=t-e*n;return o?bi(r,o,i):r}(e[t],i,r,null===(n=this.constraints)||void 0===n?void 0:n[t],this.elastic[t]);this.visualElement.setProjectionTargetAxis(t,a,a+i)},t.prototype.setProps=function(t){var e=t.drag,n=void 0!==e&&e,i=t.dragDirectionLock,r=void 0!==i&&i,a=t.dragPropagation,s=void 0!==a&&a,l=t.dragConstraints,u=void 0!==l&&l,c=t.dragElastic,d=void 0===c?.35:c,f=t.dragMomentum,h=void 0===f||f,p=Object(o.d)(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=Object(o.a)({drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:u,dragElastic:d,dragMomentum:h},p)},t.prototype.getAxisMotionValue=function(t){var e=this.props,n=e.layout,o=e.layoutId,i="_drag"+t.toUpperCase();return this.props[i]?this.props[i]:n||void 0!==o?void 0:this.visualElement.getValue(t,0)},t.prototype.isLayoutDrag=function(){return!this.getAxisMotionValue("x")},t.prototype.isExternalDrag=function(){var t=this.props,e=t._dragX,n=t._dragY;return e||n},t.prototype.animateDragEnd=function(t){var e=this,n=this.props,i=n.drag,r=n.dragMomentum,a=n.dragElastic,s=n.dragTransition,l=function(t,e){void 0===e&&(e=!0);var n,o=t.getProjectionParent();return!!o&&(e?Ki(n=Ri(o.projection.target,t.projection.target),o.getLatestValues()):n=Ri(o.getLayoutState().layout,t.getLayoutState().layout),yi((function(e){return t.setProjectionTargetAxis(e,n[e].min,n[e].max,!0)})),!0)}(this.visualElement,this.isLayoutDrag()&&!this.isExternalDrag()),u=this.constraints||{};if(l&&Object.keys(u).length&&this.isLayoutDrag()){var c=this.visualElement.getProjectionParent();if(c){var d=Ri(c.projection.targetFinal,u);yi((function(t){var e=d[t],n=e.min,o=e.max;u[t]={min:isNaN(n)?void 0:n,max:isNaN(o)?void 0:o}}))}}var f=yi((function(n){var c;if(sr(n,i,e.currentDirection)){var d=null!==(c=null==u?void 0:u[n])&&void 0!==c?c:{},f=a?200:1e6,h=a?40:1e7,p=Object(o.a)(Object(o.a)({type:"inertia",velocity:r?t[n]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10},s),d);return e.getAxisMotionValue(n)?e.startAxisValueAnimation(n,p):e.visualElement.startLayoutAnimation(n,p,l)}}));return Promise.all(f).then((function(){var t,n;null===(n=(t=e.props).onDragTransitionEnd)||void 0===n||n.call(t)}))},t.prototype.stopMotion=function(){var t=this;yi((function(e){var n=t.getAxisMotionValue(e);n?n.stop():t.visualElement.stopLayoutAnimation()}))},t.prototype.startAxisValueAnimation=function(t,e){var n=this.getAxisMotionValue(t);if(n){var o=n.get();return n.set(o),n.set(o),Po(t,n,0,e)}},t.prototype.scalePoint=function(){var t=this,e=this.props,n=e.drag;if(O(e.dragConstraints)&&this.constraintsBox){this.stopMotion();var o={x:0,y:0};yi((function(e){o[e]=Ei(t.visualElement.projection.target[e],t.constraintsBox[e])})),this.updateConstraints((function(){yi((function(e){if(sr(e,n,null)){var i=function(t,e,n){var o=t.max-t.min,i=De(e.min,e.max-o,n);return{min:i,max:i+o}}(t.visualElement.projection.target[e],t.constraintsBox[e],o[e]),r=i.min,a=i.max;t.visualElement.setProjectionTargetAxis(e,r,a)}}))})),setTimeout(nr,1)}},t.prototype.updateConstraints=function(t){var e=this;this.cancelLayout=er((function(n,o){var i=Di(e.visualElement);o((function(){return i.forEach((function(t){return t.resetTransform()}))})),n((function(){return ji(e.visualElement)})),o((function(){return i.forEach((function(t){return t.restoreTransform()}))})),n((function(){e.resolveDragConstraints()})),t&&o(t)}))},t.prototype.mount=function(t){var e=this,n=ue(t.getInstance(),"pointerdown",(function(t){var n=e.props,o=n.drag,i=n.dragListener;o&&(void 0===i||i)&&e.start(t)})),o=qt(window,"resize",(function(){e.scalePoint()})),i=t.onLayoutUpdate((function(){e.isDragging&&e.resolveDragConstraints()})),r=t.prevDragCursor;return r&&this.start(or,{cursorProgress:r}),function(){null==n||n(),null==o||o(),null==i||i(),e.cancelDrag()}},t}();function sr(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}var lr,ur,cr={pan:Se((function(t){var e=t.onPan,n=t.onPanStart,o=t.onPanEnd,r=t.onPanSessionStart,a=t.visualElement,s=e||n||o||r,l=Object(i.useRef)(null),u=Object(i.useContext)(d).transformPagePoint,c={onSessionStart:r,onStart:n,onMove:e,onEnd:function(t,e){l.current=null,o&&o(t,e)}};Object(i.useEffect)((function(){null!==l.current&&l.current.updateHandlers(c)})),ce(a,"pointerdown",s&&function(t){l.current=new ai(t,c,{transformPagePoint:u})}),ye((function(){return l.current&&l.current.end()}))})),drag:Se((function(t){var e=t.dragControls,n=t.visualElement,r=Object(i.useContext)(d).transformPagePoint,a=m((function(){return new ar({visualElement:n})}));a.setProps(Object(o.a)(Object(o.a)({},t),{transformPagePoint:r})),Object(i.useEffect)((function(){return e&&e.subscribe(a)}),[a]),Object(i.useEffect)((function(){return a.mount(n)}),[])}))};function dr(t){return"string"==typeof t&&t.startsWith("var(--")}!function(t){t[t.Entering=0]="Entering",t[t.Present=1]="Present",t[t.Exiting=2]="Exiting"}(lr||(lr={})),function(t){t[t.Hide=0]="Hide",t[t.Show=1]="Show"}(ur||(ur={}));var fr=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function hr(t,e,n){void 0===n&&(n=1);var i=Object(o.c)(function(t){var e=fr.exec(t);if(!e)return[,];var n=Object(o.c)(e,3);return[n[1],n[2]]}(t),2),r=i[0],a=i[1];if(r){var s=window.getComputedStyle(e).getPropertyValue(r);return s?s.trim():dr(a)?hr(a,e,n+1):a}}function pr(t,e){return t/(e.max-e.min)*100}var mr="_$css";var gr={process:function(t,e,n){var o=n.target;if("string"==typeof t){if(!lt.test(t))return t;t=parseFloat(t)}return pr(t,o.x)+"% "+pr(t,o.y)+"%"}},vr={borderRadius:Object(o.a)(Object(o.a)({},gr),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:gr,borderTopRightRadius:gr,borderBottomLeftRadius:gr,borderBottomRightRadius:gr,boxShadow:{process:function(t,e){var n=e.delta,o=e.treeScale,i=t,r=t.includes("var("),a=[];r&&(t=t.replace(fr,(function(t){return a.push(t),mr})));var s=tn.parse(t);if(s.length>5)return i;var l=tn.createTransformer(t),u="number"!=typeof s[0]?1:0,c=n.x.scale*o.x,d=n.y.scale*o.y;s[0+u]/=c,s[1+u]/=d;var f=De(c,d,.5);"number"==typeof s[2+u]&&(s[2+u]/=f),"number"==typeof s[3+u]&&(s[3+u]/=f);var h=l(s);if(r){var p=0;h=h.replace(mr,(function(){var t=a[p];return p++,t}))}return h}}},yr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.frameTarget={x:{min:0,max:1},y:{min:0,max:1}},e.currentAnimationTarget={x:{min:0,max:1},y:{min:0,max:1}},e.isAnimating={x:!1,y:!1},e.stopAxisAnimation={x:void 0,y:void 0},e.isAnimatingTree=!1,e.animate=function(t,n,i){void 0===i&&(i={});var r=i.originBox,a=i.targetBox,s=i.visibilityAction,l=i.shouldStackAnimate,u=i.onComplete,c=i.prevParent,d=Object(o.d)(i,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),f=e.props,h=f.visualElement,p=f.layout;if(!1===l)return e.isAnimatingTree=!1,e.safeToRemove();if(!e.isAnimatingTree||!0===l){l&&(e.isAnimatingTree=!0),n=r||n,t=a||t;var m=!1,g=h.getProjectionParent();if(g){var v=g.prevViewportBox,y=g.getLayoutState().layout;c&&(a&&(y=c.getLayoutState().layout),r&&!Fi(c,g)&&c.prevViewportBox&&(v=c.prevViewportBox)),v&&wr(c,r,a)&&(m=!0,n=Ri(v,n),t=Ri(y,t))}var b=br(n,t),A=yi((function(i){var r,a;if("position"===p){var l=t[i].max-t[i].min;n[i].max=n[i].min+l}if(!h.projection.isTargetLocked)return void 0===s?b?e.animateAxis(i,t[i],n[i],Object(o.a)(Object(o.a)({},d),{isRelative:m})):(null===(a=(r=e.stopAxisAnimation)[i])||void 0===a||a.call(r),h.setProjectionTargetAxis(i,t[i].min,t[i].max,m)):void h.setVisibility(s===ur.Show)}));return h.syncRender(),Promise.all(A).then((function(){e.isAnimatingTree=!1,u&&u(),h.notifyLayoutAnimationComplete()}))}},e}return Object(o.b)(e,t),e.prototype.componentDidMount=function(){var t=this,e=this.props.visualElement;e.animateMotionValue=Po,e.enableLayoutProjection(),this.unsubLayoutReady=e.onLayoutUpdate(this.animate),e.layoutSafeToRemove=function(){return t.safeToRemove()},V(vr)},e.prototype.componentWillUnmount=function(){var t=this;this.unsubLayoutReady(),yi((function(e){var n,o;return null===(o=(n=t.stopAxisAnimation)[e])||void 0===o?void 0:o.call(n)}))},e.prototype.animateAxis=function(t,e,n,o){var i,r,a=this,s=void 0===o?{}:o,l=s.transition,u=s.isRelative;if(!this.isAnimating[t]||!Cr(e,this.currentAnimationTarget[t])){null===(r=(i=this.stopAxisAnimation)[t])||void 0===r||r.call(i),this.isAnimating[t]=!0;var c=this.props.visualElement,d=this.frameTarget[t],f=c.getProjectionAnimationProgress()[t];f.clearListeners(),f.set(0),f.set(0);var h=function(){var o=f.get()/1e3;!function(t,e,n,o){t.min=De(e.min,n.min,o),t.max=De(e.max,n.max,o)}(d,n,e,o),c.setProjectionTargetAxis(t,d.min,d.max,u)};h();var p=f.onChange(h);this.stopAxisAnimation[t]=function(){a.isAnimating[t]=!1,f.stop(),p()},this.currentAnimationTarget[t]=e;var m=l||c.getDefaultTransition()||_r;return Po("x"===t?"layoutX":"layoutY",f,1e3,m&&Eo(m,"layout")).then(this.stopAxisAnimation[t])}},e.prototype.safeToRemove=function(){var t,e;null===(e=(t=this.props).safeToRemove)||void 0===e||e.call(t)},e.prototype.render=function(){return null},e}(i.Component);function br(t,e){return!(Sr(t)||Sr(e)||Cr(t.x,e.x)&&Cr(t.y,e.y))}var Ar={min:0,max:0};function Sr(t){return Cr(t.x,Ar)&&Cr(t.y,Ar)}function Cr(t,e){return t.min===e.min&&t.max===e.max}var _r={duration:.45,ease:[.4,0,.1,1]};function wr(t,e,n){return t||!t&&!(e||n)}var xr={layoutReady:function(t){return t.notifyLayoutReady()}};function Or(){var t=new Set;return{add:function(e){return t.add(e)},flush:function(e){var n=void 0===e?xr:e,i=n.layoutReady,r=n.parent;er((function(e,n){var a=Array.from(t).sort(ki),s=r?Di(r):[];n((function(){Object(o.e)(Object(o.e)([],Object(o.c)(s)),Object(o.c)(a)).forEach((function(t){return t.resetTransform()}))})),e((function(){a.forEach(ji)})),n((function(){s.forEach((function(t){return t.restoreTransform()})),a.forEach(i)})),e((function(){a.forEach((function(t){t.isPresent&&(t.presence=lr.Present)}))})),n((function(){Nn.preRender(),Nn.render()})),e((function(){Qn.postRender((function(){return a.forEach(Er)})),t.clear()}))})),nr()}}}function Er(t){t.prevViewportBox=t.projection.target}var Pr=Object(i.createContext)(Or()),Lr=Object(i.createContext)(Or());function Br(t){return!!t.forceUpdate}var Tr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(o.b)(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.syncLayout,n=t.framerSyncLayout,o=t.visualElement;Br(e)&&e.register(o),Br(n)&&n.register(o),o.onUnmount((function(){Br(e)&&e.remove(o),Br(n)&&n.remove(o)}))},e.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,e=t.syncLayout,n=t.visualElement;return Br(e)?e.syncUpdate():(Wi(n),e.add(n)),null},e.prototype.componentDidUpdate=function(){var t=this.props.syncLayout;Br(t)||t.flush()},e.prototype.render=function(){return null},e}(i.default.Component);var kr={measureLayout:function(t){var e=Object(i.useContext)(Pr),n=Object(i.useContext)(Lr);return i.default.createElement(Tr,Object(o.a)({},t,{syncLayout:e,framerSyncLayout:n}))},layoutAnimation:function(t){var e=Object(o.c)(g(),2)[1];return i.createElement(yr,Object(o.a)({},t,{safeToRemove:e}))}};function Mr(){return{isHydrated:!1,layout:{x:{min:0,max:1},y:{min:0,max:1}},layoutCorrected:{x:{min:0,max:1},y:{min:0,max:1}},treeScale:{x:1,y:1},delta:vi(),deltaFinal:vi(),deltaTransform:""}}var Dr=Mr();function jr(t,e,n){var o=t.x,i=t.y,r="translate3d("+o.translate/e.x+"px, "+i.translate/e.y+"px, 0) ";if(n){var a=n.rotate,s=n.rotateX,l=n.rotateY;a&&(r+="rotate("+a+") "),s&&(r+="rotateX("+s+") "),l&&(r+="rotateY("+l+") ")}return r+="scale("+o.scale+", "+i.scale+")",n||r!==Ir?r:""}function Wr(t){var e=t.deltaFinal;return 100*e.x.origin+"% "+100*e.y.origin+"% 0"}var Ir=jr(Dr.delta,Dr.treeScale,{x:1,y:1}),Rr=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];function Fr(t,e,n,o){var i,r,a=t.delta,s=t.layout,l=t.layoutCorrected,u=t.treeScale,c=e.target;r=s,zi((i=l).x,r.x),zi(i.y,r.y),function(t,e,n){var o=n.length;if(o){var i,r;e.x=e.y=1;for(var a=0;a<o;a++)r=(i=n[a]).getLayoutState().delta,e.x*=r.x.scale,e.y*=r.y.scale,Gi(t,r),Vi(i)&&Zi(t,t,i.getLatestValues())}}(l,u,n),Li(a,l,c,o)}var Vr=function(){function t(){this.children=[],this.isDirty=!1}return t.prototype.add=function(t){Lo(this.children,t),this.isDirty=!0},t.prototype.remove=function(t){Bo(this.children,t),this.isDirty=!0},t.prototype.forEach=function(t){this.isDirty&&this.children.sort(ki),this.isDirty=!1,this.children.forEach(t)},t}();var zr=function(t){var e=t.treeType,n=void 0===e?"":e,i=t.build,r=t.getBaseTarget,a=t.makeTargetAnimatable,s=t.measureViewportBox,l=t.render,u=t.readValueFromInstance,c=t.resetTransform,d=t.restoreTransform,f=t.removeValueFromRenderState,h=t.sortNodePosition,p=t.scrapeMotionValuesFromProps;return function(t,e){var m=t.parent,g=t.props,v=t.presenceId,y=t.blockInitialAnimation,b=t.visualState;void 0===e&&(e={});var A,S,C,_,w,x,O=b.latestValues,E=b.renderState,L=function(){var t=Rr.map((function(){return new To})),e={},n={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){return Rr.forEach((function(o){var i;null===(i=e[o])||void 0===i||i.call(e);var r="on"+o,a=t[r];a&&(e[o]=n[r](a))}))}};return t.forEach((function(t,e){n["on"+Rr[e]]=function(e){return t.add(e)},n["notify"+Rr[e]]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.notify.apply(t,Object(o.e)([],Object(o.c)(e)))}})),n}(),B={isEnabled:!1,isHydrated:!1,isTargetLocked:!1,target:{x:{min:0,max:1},y:{min:0,max:1}},targetFinal:{x:{min:0,max:1},y:{min:0,max:1}}},M=B,D=O,j=Mr(),W=!1,I=new Map,R=new Map,F={},V=Object(o.a)({},O);function z(){A&&(q.isProjectionReady()&&(Zi(M.targetFinal,M.target,D),Li(j.deltaFinal,j.layoutCorrected,M.targetFinal,O)),N(),l(A,E))}function N(){var t=O;if(_&&_.isActive()){var n=_.getCrossfadeState(q);n&&(t=n)}i(q,E,t,M,j,e,g)}function U(){L.notifyUpdate(O)}function H(){q.layoutTree.forEach(Ur)}var G=p(g);for(var Y in G){var Q=G[Y];void 0!==O[Y]&&Z(Q)&&Q.set(O[Y],!1)}var X=T(g),$=k(g),q=Object(o.a)(Object(o.a)({treeType:n,current:null,depth:m?m.depth+1:0,parent:m,children:new Set,path:m?Object(o.e)(Object(o.e)([],Object(o.c)(m.path)),[m]):[],layoutTree:m?m.layoutTree:new Vr,presenceId:v,projection:B,variantChildren:$?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==m?void 0:m.isMounted()),blockInitialAnimation:y,isMounted:function(){return Boolean(A)},mount:function(t){A=q.current=t,q.pointTo(q),$&&m&&!X&&(x=null==m?void 0:m.addVariantChild(q)),null==m||m.children.add(q)},unmount:function(){zn.update(U),zn.render(z),zn.preRender(q.updateLayoutProjection),R.forEach((function(t){return t()})),q.stopLayoutAnimation(),q.layoutTree.remove(q),null==x||x(),null==m||m.children.delete(q),null==C||C(),L.clearAllListeners()},addVariantChild:function(t){var e,n=q.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),function(){return n.variantChildren.delete(t)}},sortNodePosition:function(t){return h&&n===t.treeType?h(q.getInstance(),t.getInstance()):0},getClosestVariantNode:function(){return $?q:null==m?void 0:m.getClosestVariantNode()},scheduleUpdateLayoutProjection:m?m.scheduleUpdateLayoutProjection:function(){return Qn.preRender(q.updateTreeLayoutProjection,!1,!0)},getLayoutId:function(){return g.layoutId},getInstance:function(){return A},getStaticValue:function(t){return O[t]},setStaticValue:function(t,e){return O[t]=e},getLatestValues:function(){return O},setVisibility:function(t){q.isVisible!==t&&(q.isVisible=t,q.scheduleRender())},makeTargetAnimatable:function(t,e){return void 0===e&&(e=!0),a(q,t,g,e)},addValue:function(t,e){q.hasValue(t)&&q.removeValue(t),I.set(t,e),O[t]=e.get(),function(t,e){var n=e.onChange((function(e){O[t]=e,g.onUpdate&&Qn.update(U,!1,!0)})),o=e.onRenderRequest(q.scheduleRender);R.set(t,(function(){n(),o()}))}(t,e)},removeValue:function(t){var e;I.delete(t),null===(e=R.get(t))||void 0===e||e(),R.delete(t),delete O[t],f(t,E)},hasValue:function(t){return I.has(t)},getValue:function(t,e){var n=I.get(t);return void 0===n&&void 0!==e&&(n=Mo(e),q.addValue(t,n)),n},forEachValue:function(t){return I.forEach(t)},readValue:function(t){var n;return null!==(n=O[t])&&void 0!==n?n:u(A,t,e)},setBaseTarget:function(t,e){V[t]=e},getBaseTarget:function(t){if(r){var e=r(g,t);if(void 0!==e&&!Z(e))return e}return V[t]}},L),{build:function(){return N(),E},scheduleRender:function(){Qn.render(z,!1,!0)},syncRender:z,setProps:function(t){g=t,L.updatePropListeners(t),F=function(t,e,n){var o;for(var i in e){var r=e[i],a=n[i];if(Z(r))t.addValue(i,r);else if(Z(a))t.addValue(i,Mo(r));else if(a!==r)if(t.hasValue(i)){var s=t.getValue(i);!s.hasAnimated&&s.set(r)}else t.addValue(i,Mo(null!==(o=t.getStaticValue(i))&&void 0!==o?o:r))}for(var i in n)void 0===e[i]&&t.removeValue(i);return e}(q,p(g),F)},getProps:function(){return g},getVariant:function(t){var e;return null===(e=g.variants)||void 0===e?void 0:e[t]},getDefaultTransition:function(){return g.transition},getVariantContext:function(t){if(void 0===t&&(t=!1),t)return null==m?void 0:m.getVariantContext();if(!X){var e=(null==m?void 0:m.getVariantContext())||{};return void 0!==g.initial&&(e.initial=g.initial),e}for(var n={},o=0;o<Yr;o++){var i=Gr[o],r=g[i];(P(r)||!1===r)&&(n[i]=r)}return n},enableLayoutProjection:function(){B.isEnabled=!0,q.layoutTree.add(q)},lockProjectionTarget:function(){B.isTargetLocked=!0},unlockProjectionTarget:function(){q.stopLayoutAnimation(),B.isTargetLocked=!1},getLayoutState:function(){return j},setCrossfader:function(t){_=t},isProjectionReady:function(){return B.isEnabled&&B.isHydrated&&j.isHydrated},startLayoutAnimation:function(t,e,n){void 0===n&&(n=!1);var o=q.getProjectionAnimationProgress()[t],i=n?B.relativeTarget[t]:B.target[t],r=i.min,a=i.max-r;return o.clearListeners(),o.set(r),o.set(r),o.onChange((function(e){q.setProjectionTargetAxis(t,e,e+a,n)})),q.animateMotionValue(t,o,0,e)},stopLayoutAnimation:function(){yi((function(t){return q.getProjectionAnimationProgress()[t].stop()}))},measureViewportBox:function(t){void 0===t&&(t=!0);var n=s(A,e);return t||Ki(n,O),n},getProjectionAnimationProgress:function(){return w||(w={x:Mo(0),y:Mo(0)}),w},setProjectionTargetAxis:function(t,e,n,o){var i;void 0===o&&(o=!1),o?(B.relativeTarget||(B.relativeTarget={x:{min:0,max:1},y:{min:0,max:1}}),i=B.relativeTarget[t]):(B.relativeTarget=void 0,i=B.target[t]),B.isHydrated=!0,i.min=e,i.max=n,W=!0,L.notifySetAxisTarget()},rebaseProjectionTarget:function(t,e){void 0===e&&(e=j.layout);var n=q.getProjectionAnimationProgress(),o=n.x,i=n.y,r=!(B.relativeTarget||B.isTargetLocked||o.isAnimating()||i.isAnimating());(t||r)&&yi((function(t){var n=e[t],o=n.min,i=n.max;q.setProjectionTargetAxis(t,o,i)}))},notifyLayoutReady:function(t){!function(t){var e=t.getProjectionParent();if(e){var n=Ri(e.getLayoutState().layout,t.getLayoutState().layout);yi((function(e){t.setProjectionTargetAxis(e,n[e].min,n[e].max,!0)}))}else t.rebaseProjectionTarget()}(q),q.notifyLayoutUpdate(j.layout,q.prevViewportBox||j.layout,t)},resetTransform:function(){return c(q,A,g)},restoreTransform:function(){return d(A,E)},updateLayoutProjection:function(){if(q.isProjectionReady()){var t=j.delta,e=j.treeScale,n=e.x,o=e.y,i=j.deltaTransform;Fr(j,M,q.path,O),W&&q.notifyViewportBoxUpdate(M.target,t),W=!1;var r=jr(t,e);r===i&&n===e.x&&o===e.y||q.scheduleRender(),j.deltaTransform=r}},updateTreeLayoutProjection:function(){q.layoutTree.forEach(Nr),Qn.preRender(H,!1,!0)},getProjectionParent:function(){if(void 0===S){for(var t=!1,e=q.path.length-1;e>=0;e--){var n=q.path[e];if(n.projection.isEnabled){t=n;break}}S=t}return S},resolveRelativeTargetBox:function(){var t=q.getProjectionParent();if(B.relativeTarget&&t&&(function(t,e){Ti(t.target.x,t.relativeTarget.x,e.target.x),Ti(t.target.y,t.relativeTarget.y,e.target.y)}(B,t.projection),Vi(t))){var e=B.target;Zi(e,e,t.getLatestValues())}},shouldResetTransform:function(){return Boolean(g._layoutResetTransform)},pointTo:function(t){M=t.projection,D=t.getLatestValues(),null==C||C(),C=Ae(t.onSetAxisTarget(q.scheduleUpdateLayoutProjection),t.onLayoutAnimationComplete((function(){var t;q.isPresent?q.presence=lr.Present:null===(t=q.layoutSafeToRemove)||void 0===t||t.call(q)})))},isPresent:!0,presence:lr.Entering});return q}};function Nr(t){t.resolveRelativeTargetBox()}function Ur(t){t.updateLayoutProjection()}var Hr,Gr=Object(o.e)(["initial"],Object(o.c)($o)),Yr=Gr.length,Qr=new Set(["width","height","top","left","right","bottom","x","y"]),Xr=function(t){return Qr.has(t)},Zr=function(t,e){t.set(e,!1),t.set(e)},$r=function(t){return t===ft||t===lt};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Hr||(Hr={}));var qr=function(t,e){return parseFloat(t.split(", ")[e])},Kr=function(t,e){return function(n,o){var i=o.transform;if("none"===i||!i)return 0;var r=i.match(/^matrix3d\((.+)\)$/);if(r)return qr(r[1],e);var a=i.match(/^matrix\((.+)\)$/);return a?qr(a[1],t):0}},Jr=new Set(["x","y","z"]),ta=N.filter((function(t){return!Jr.has(t)}));var ea={width:function(t){var e=t.x;return e.max-e.min},height:function(t){var e=t.y;return e.max-e.min},top:function(t,e){var n=e.top;return parseFloat(n)},left:function(t,e){var n=e.left;return parseFloat(n)},bottom:function(t,e){var n=t.y,o=e.top;return parseFloat(o)+(n.max-n.min)},right:function(t,e){var n=t.x,o=e.left;return parseFloat(o)+(n.max-n.min)},x:Kr(4,13),y:Kr(5,14)},na=function(t,e,n,i){void 0===n&&(n={}),void 0===i&&(i={}),e=Object(o.a)({},e),i=Object(o.a)({},i);var r=Object.keys(e).filter(Xr),a=[],s=!1,l=[];if(r.forEach((function(o){var r=t.getValue(o);if(t.hasValue(o)){var u,c=n[o],d=e[o],f=Wo(c);if(Nt(d))for(var h=d.length,p=null===d[0]?1:0;p<h;p++)u?Wo(d[p]):(u=Wo(d[p]))===f||$r(f)&&$r(u);else u=Wo(d);if(f!==u)if($r(f)&&$r(u)){var m=r.get();"string"==typeof m&&r.set(parseFloat(m)),"string"==typeof d?e[o]=parseFloat(d):Array.isArray(d)&&u===lt&&(e[o]=d.map(parseFloat))}else(null==f?void 0:f.transform)&&(null==u?void 0:u.transform)&&(0===c||0===d)?0===c?r.set(u.transform(c)):e[o]=f.transform(d):(s||(a=function(t){var e=[];return ta.forEach((function(n){var o=t.getValue(n);void 0!==o&&(e.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))})),e.length&&t.syncRender(),e}(t),s=!0),l.push(o),i[o]=void 0!==i[o]?i[o]:e[o],Zr(r,d))}})),l.length){var u=function(t,e,n){var o=e.measureViewportBox(),i=e.getInstance(),r=getComputedStyle(i),a=r.display,s={top:r.top,left:r.left,bottom:r.bottom,right:r.right,transform:r.transform};"none"===a&&e.setStaticValue("display",t.display||"block"),e.syncRender();var l=e.measureViewportBox();return n.forEach((function(n){var i=e.getValue(n);Zr(i,ea[n](o,s)),t[n]=ea[n](l,r)})),t}(e,t,l);return a.length&&a.forEach((function(e){var n=Object(o.c)(e,2),i=n[0],r=n[1];t.getValue(i).set(r)})),t.syncRender(),{target:u,transitionEnd:i}}return{target:e,transitionEnd:i}};function oa(t,e,n,o){return function(t){return Object.keys(t).some(Xr)}(e)?na(t,e,n,o):{target:e,transitionEnd:o}}var ia=function(t,e,n,i){var r=function(t,e,n){var i,r=Object(o.d)(e,[]),a=t.getInstance();if(!(a instanceof HTMLElement))return{target:r,transitionEnd:n};for(var s in n&&(n=Object(o.a)({},n)),t.forEachValue((function(t){var e=t.get();if(dr(e)){var n=hr(e,a);n&&t.set(n)}})),r){var l=r[s];if(dr(l)){var u=hr(l,a);u&&(r[s]=u,n&&(null!==(i=n[s])&&void 0!==i||(n[s]=l)))}}return{target:r,transitionEnd:n}}(t,e,i);return oa(t,e=r.target,n,i=r.transitionEnd)};var ra={treeType:"dom",readValueFromInstance:function(t,e){if(G(e)){var n=Ao(e);return n&&n.default||0}var o,i=(o=t,window.getComputedStyle(o));return(q(e)?i.getPropertyValue(e):i[e])||0},sortNodePosition:function(t,e){return 2&t.compareDocumentPosition(e)?1:-1},getBaseTarget:function(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]},measureViewportBox:function(t,e){return wi(t,e.transformPagePoint)},resetTransform:function(t,e,n){var o=n.transformTemplate;e.style.transform=o?o({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var n=e.vars,o=e.style;delete n[t],delete o[t]},makeTargetAnimatable:function(t,e,n,i){var r=n.transformValues;void 0===i&&(i=!0);var a=e.transition,s=e.transitionEnd,l=Object(o.d)(e,["transition","transitionEnd"]),u=Ho(l,a||{},t);if(r&&(s&&(s=r(s)),l&&(l=r(l)),u&&(u=r(u))),i){No(t,l,u);var c=ia(t,l,u,s);s=c.transitionEnd,l=c.target}return Object(o.a)({transition:a,transitionEnd:s},l)},scrapeMotionValuesFromProps:Ft,build:function(t,e,n,o,i,r,a){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden");var s=o.isEnabled&&i.isHydrated;vt(e,n,o,i,r,a.transformTemplate,s?jr:void 0,s?Wr:void 0)},render:Wt},aa=zr(ra),sa=zr(Object(o.a)(Object(o.a)({},ra),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var n;return G(e)?(null===(n=Ao(e))||void 0===n?void 0:n.default)||0:(e=It.has(e)?e:jt(e),t.getAttribute(e))},scrapeMotionValuesFromProps:Vt,build:function(t,e,n,o,i,r,a){var s=o.isEnabled&&i.isHydrated;Bt(e,n,o,i,r,a.transformTemplate,s?jr:void 0,s?Wr:void 0)},render:Rt})),la=function(t,e){return R(t)?sa(e,{enableHardwareAcceleration:!1}):aa(e,{enableHardwareAcceleration:!0})},ua=Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)({},ei),Ce),cr),kr),ca=W((function(t,e){return $t(t,e,ua,la)}));function da(t){return j($t(t,{forwardMotionProps:!1},ua,la))}var fa=W($t);var ha=0;function pa(){var t=ha;return ha++,t}var ma=function(t){var e=t.children,n=t.initial,o=t.isPresent,r=t.onExitComplete,a=t.custom,s=t.presenceAffectsLayout,l=m(ga),u=m(pa),c=Object(i.useMemo)((function(){return{id:u,initial:n,isPresent:o,custom:a,onExitComplete:function(t){l.set(t,!0);var e=!0;l.forEach((function(t){t||(e=!1)})),e&&(null==r||r())},register:function(t){return l.set(t,!1),function(){return l.delete(t)}}}}),s?void 0:[o]);return Object(i.useMemo)((function(){l.forEach((function(t,e){return l.set(e,!1)}))}),[o]),i.useEffect((function(){!o&&!l.size&&(null==r||r())}),[o]),i.createElement(p.Provider,{value:c},e)};function ga(){return new Map}function va(t){return t.key||""}var ya=function(t){var e=t.children,n=t.custom,r=t.initial,a=void 0===r||r,s=t.onExitComplete,l=t.exitBeforeEnter,u=t.presenceAffectsLayout,c=void 0===u||u,d=function(){var t=Object(i.useRef)(!1),e=Object(o.c)(Object(i.useState)(0),2),n=e[0],r=e[1];return ye((function(){return t.current=!0})),Object(i.useCallback)((function(){!t.current&&r(n+1)}),[n])}(),f=Object(i.useContext)(Pr);Br(f)&&(d=f.forceUpdate);var h=Object(i.useRef)(!0),p=function(t){var e=[];return i.Children.forEach(t,(function(t){Object(i.isValidElement)(t)&&e.push(t)})),e}(e),m=Object(i.useRef)(p),g=Object(i.useRef)(new Map).current,v=Object(i.useRef)(new Set).current;if(function(t,e){t.forEach((function(t){var n=va(t);e.set(n,t)}))}(p,g),h.current)return h.current=!1,i.createElement(i.Fragment,null,p.map((function(t){return i.createElement(ma,{key:va(t),isPresent:!0,initial:!!a&&void 0,presenceAffectsLayout:c},t)})));for(var y=Object(o.e)([],Object(o.c)(p)),b=m.current.map(va),A=p.map(va),S=b.length,C=0;C<S;C++){var _=b[C];-1===A.indexOf(_)?v.add(_):v.delete(_)}return l&&v.size&&(y=[]),v.forEach((function(t){if(-1===A.indexOf(t)){var e=g.get(t);if(e){var o=b.indexOf(t);y.splice(o,0,i.createElement(ma,{key:va(e),isPresent:!1,onExitComplete:function(){g.delete(t),v.delete(t);var e=m.current.findIndex((function(e){return e.key===t}));m.current.splice(e,1),v.size||(m.current=p,d(),s&&s())},custom:n,presenceAffectsLayout:c},e))}}})),y=y.map((function(t){var e=t.key;return v.has(e)?t:i.createElement(ma,{key:va(t),isPresent:!0,presenceAffectsLayout:c},t)})),m.current=y,i.createElement(i.Fragment,null,v.size?y:y.map((function(t){return Object(i.cloneElement)(t)})))};function ba(t,e,n){void 0===n&&(n={});var o=Z(t)?t:Mo(t);return Po("",o,e,n),{stop:function(){return o.stop()}}}function Aa(){var t=Mo(1),e={lead:void 0,follow:void 0,crossfadeOpacity:!1,preserveFollowOpacity:!1},n=Object(o.a)({},e),i={},r={},a=!1,s=null,l=0;function u(n,i){var r=e.lead,l=e.follow;a=!0,s=null;var u=!1,c=function(){u=!0,r&&r.scheduleRender(),l&&l.scheduleRender()},d=function(){a=!1,s=Yn().timestamp};return i=i&&Eo(i,"crossfade"),ba(t,n,Object(o.a)(Object(o.a)({},i),{onUpdate:c,onComplete:function(){u?d():(t.set(n),Qn.read(d)),c()}}))}function c(){var n,o,a=Yn().timestamp,s=e.lead,u=e.follow;if(a!==l&&s){l=a;var c=s.getLatestValues();Object.assign(i,c);var d=u?u.getLatestValues():e.prevValues;Object.assign(r,d);var f=t.get(),h=null!==(n=c.opacity)&&void 0!==n?n:1,p=null!==(o=null==d?void 0:d.opacity)&&void 0!==o?o:1;e.crossfadeOpacity&&u?(i.opacity=De(!1!==u.isVisible?0:p,h,Sa(f)),r.opacity=e.preserveFollowOpacity?p:De(p,0,Ca(f))):u||(i.opacity=De(p,h,f)),function(t,e,n,o,i,r){for(var a=0;a<xa;a++){var s="border"+wa[a]+"Radius",l=Oa(o,s),u=Oa(n,s);if((void 0!==l||void 0!==u)&&(l||(l=0),u||(u=0),"number"==typeof l&&"number"==typeof u)){var c=Math.max(De(l,u,r),0);t[s]=e[s]=c}}if(o.rotate||n.rotate){var d=De(o.rotate||0,n.rotate||0,r);t.rotate=e.rotate=d}!i&&n.backgroundColor&&o.backgroundColor&&(t.backgroundColor=e.backgroundColor=Ye(o.backgroundColor,n.backgroundColor)(r))}(i,r,c,d||{},Boolean(u),f)}}return{isActive:function(){return i&&(a||Yn().timestamp===s)},fromLead:function(t){return u(0,t)},toLead:function(o){var i=0;return e.prevValues||e.follow?n.lead===e.follow&&n.follow===e.lead&&(i=1-t.get()):i=1,t.set(i),u(1,o)},reset:function(){return t.set(1)},stop:function(){return t.stop()},getCrossfadeState:function(t){return c(),t===e.lead?i:t===e.follow?r:void 0},setOptions:function(t){n=e,e=t,i={},r={}},getLatestValues:function(){return i}}}var Sa=_a(0,.5,An),Ca=_a(.5,.95,mn);function _a(t,e,n){return function(o){return o<t?0:o>e?1:n(Me(t,e,o))}}var wa=["TopLeft","TopRight","BottomLeft","BottomRight"],xa=wa.length;function Oa(t,e){var n;return null!==(n=t[e])&&void 0!==n?n:t.borderRadius}function Ea(){var t,e,n,i=new Set,r={leadIsExiting:!1},a=Object(o.a)({},r),s=Aa(),l=!1;return{add:function(t){t.setCrossfader(s),i.add(t),n&&(t.prevDragCursor=n),r.lead||(r.lead=t)},remove:function(t){i.delete(t)},getLead:function(){return r.lead},updateSnapshot:function(){if(r.lead){t=s.isActive()?s.getLatestValues():r.lead.getLatestValues(),e=r.lead.prevViewportBox;var o=rr.get(r.lead);o&&o.isDragging&&(n=o.cursorProgress)}},clearSnapshot:function(){n=e=void 0},updateLeadAndFollow:function(){var e,n,u;a=Object(o.a)({},r);for(var c=Array.from(i),d=c.length;d--;d>=0){var f=c[d];if(n&&(null!=u||(u=f)),null!=n||(n=f),n&&u)break}r.lead=n,r.follow=u,r.leadIsExiting=(null===(e=r.lead)||void 0===e?void 0:e.presence)===lr.Exiting,s.setOptions({lead:n,follow:u,prevValues:t,crossfadeOpacity:(null==u?void 0:u.isPresenceRoot)||(null==n?void 0:n.isPresenceRoot)}),r.lead===a.follow||a.lead===r.lead&&a.leadIsExiting===r.leadIsExiting||(l=!0)},animate:function(t,n){var o;if(void 0===n&&(n=!1),t===r.lead){n?t.pointTo(r.lead):t.setVisibility(!0);var i={},a=null===(o=r.follow)||void 0===o?void 0:o.getProjectionParent();if(a&&(i.prevParent=a),t.presence===lr.Entering?i.originBox=r.follow?r.follow.prevViewportBox:e:t.presence===lr.Exiting&&(i.targetBox=function(){var t;return null===(t=r.follow)||void 0===t?void 0:t.getLayoutState().layout}()),l){l=!1;var u=t.getDefaultTransition();t.presence===lr.Entering?s.toLead(u):s.fromLead(u)}t.notifyLayoutReady(i)}else n?r.lead&&t.pointTo(r.lead):t.setVisibility(!1)}}}var Pa=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.children=new Set,e.stacks=new Map,e.hasMounted=!1,e.updateScheduled=!1,e.renderScheduled=!1,e.syncContext=Object(o.a)(Object(o.a)({},Or()),{syncUpdate:function(t){return e.scheduleUpdate(t)},forceUpdate:function(){e.syncContext=Object(o.a)({},e.syncContext),e.scheduleUpdate(!0)},register:function(t){return e.addChild(t)},remove:function(t){return e.removeChild(t)}}),e}return Object(o.b)(e,t),e.prototype.componentDidMount=function(){this.hasMounted=!0},e.prototype.componentDidUpdate=function(){this.startLayoutAnimation()},e.prototype.shouldComponentUpdate=function(){return this.renderScheduled=!0,!0},e.prototype.startLayoutAnimation=function(){var t=this;this.renderScheduled=this.updateScheduled=!1;var e=this.props.type;this.children.forEach((function(t){t.isPresent?t.presence!==lr.Entering&&(t.presence=t.presence===lr.Exiting?lr.Entering:lr.Present):t.presence=lr.Exiting})),this.updateStacks();var n={layoutReady:function(n){void 0!==n.getLayoutId()?t.getStack(n).animate(n,"crossfade"===e):n.notifyLayoutReady()},parent:this.context.visualElement};this.children.forEach((function(e){return t.syncContext.add(e)})),this.syncContext.flush(n),this.stacks.forEach((function(t){return t.clearSnapshot()}))},e.prototype.updateStacks=function(){this.stacks.forEach((function(t){return t.updateLeadAndFollow()}))},e.prototype.scheduleUpdate=function(t){void 0===t&&(t=!1),!t&&this.updateScheduled||(this.updateScheduled=!0,this.children.forEach((function(t){!function(t){for(var e=!1,n={},o=0;o<z.length;o++){var i="rotate"+z[o];t.hasValue(i)&&0!==t.getStaticValue(i)&&(e=!0,n[i]=t.getStaticValue(i),t.setStaticValue(i,0))}if(e){for(var i in t.syncRender(),n)t.setStaticValue(i,n[i]);t.scheduleRender()}}(t),t.shouldResetTransform()&&t.resetTransform()})),this.children.forEach(Wi),this.stacks.forEach((function(t){return t.updateSnapshot()})),!t&&this.renderScheduled||(this.renderScheduled=!0,this.forceUpdate()))},e.prototype.addChild=function(t){this.children.add(t),this.addToStack(t),t.presence=this.hasMounted?lr.Entering:lr.Present},e.prototype.removeChild=function(t){this.scheduleUpdate(),this.children.delete(t),this.removeFromStack(t)},e.prototype.addToStack=function(t){var e=this.getStack(t);null==e||e.add(t)},e.prototype.removeFromStack=function(t){var e=this.getStack(t);null==e||e.remove(t)},e.prototype.getStack=function(t){var e=t.getLayoutId();if(void 0!==e)return!this.stacks.has(e)&&this.stacks.set(e,Ea()),this.stacks.get(e)},e.prototype.render=function(){return i.createElement(Pr.Provider,{value:this.syncContext},this.props.children)},e.contextType=f,e}(i.Component);function La(t){var e=t.children,n=Object(o.d)(t,["children"]);(n=Object(o.a)(Object(o.a)({},Object(i.useContext)(d)),n)).isStatic=m((function(){return n.isStatic}));var r="object"==typeof n.transition?n.transition.toString():"",a=Object(i.useMemo)((function(){return n}),[r,n.transformPagePoint]);return i.createElement(d.Provider,{value:a},e)}function Ba(t){var e=t.children,n=t.features,r=t.strict,a=void 0!==r&&r,u=Object(o.c)(Object(i.useState)(!Ta(n)),2)[1],c=Object(i.useRef)(void 0);if(!Ta(n)){var d=n.renderer,f=Object(o.d)(n,["renderer"]);c.current=d,s(f)}return Object(i.useEffect)((function(){Ta(n)&&n().then((function(t){var e=t.renderer;s(Object(o.d)(t,["renderer"])),c.current=e,u(!0)}))}),[]),i.createElement(l.Provider,{value:{renderer:c.current,strict:a}},e)}function Ta(t){return"function"==typeof t}var ka=Object(o.a)(Object(o.a)({renderer:la},ei),Ce),Ma=Object(o.a)(Object(o.a)(Object(o.a)({},ka),cr),kr);function Da(t){var e=m((function(){return Mo(t)}));if(Object(i.useContext)(d).isStatic){var n=Object(o.c)(Object(i.useState)(t),2)[1];Object(i.useEffect)((function(){return e.onChange(n)}),[])}return e}function ja(t,e){Object(i.useEffect)((function(){if(Z(t))return t.onChange(e)}),[e])}function Wa(t,e){var n=Da(e()),o=function(){return n.set(e())};return o(),function(t,e){Object(i.useEffect)((function(){var n=t.map((function(t){return t.onChange(e)}));return function(){return n.forEach((function(t){return t()}))}}))}(t,(function(){return Qn.update(o,!1,!0)})),n}function Ia(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=t.length;function i(){for(var n="",i=0;i<o;i++){n+=t[i],e[i]&&(n+=e[i].get())}return n}return Wa(e,i)}var Ra=function(t){return function(t){return"object"==typeof t&&t.mix}(t)?t.mix:void 0};function Fa(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=!Array.isArray(t[0]),i=n?0:-1,r=t[0+i],a=t[1+i],s=t[2+i],l=t[3+i],u=cn(a,s,Object(o.a)({mixer:Ra(s[0])},l));return n?u(r):u}function Va(t,e,n,i){var r="function"==typeof e?e:Fa(e,n,i);return Array.isArray(t)?za(t,r):za([t],(function(t){var e=Object(o.c)(t,1)[0];return r(e)}))}function za(t,e){var n=m((function(){return[]}));return Wa(t,(function(){n.length=0;for(var o=t.length,i=0;i<o;i++)n[i]=t[i].get();return e(n)}))}function Na(t,e){void 0===e&&(e={});var n=Object(i.useContext)(d).isStatic,r=Object(i.useRef)(null),a=Da(Z(t)?t.get():t);return Object(i.useMemo)((function(){return a.attach((function(t,i){return n?i(t):(r.current&&r.current.stop(),r.current=$n(Object(o.a)(Object(o.a)({from:a.get(),to:t,velocity:a.getVelocity()},e),{onUpdate:i})),a.get())}))}),Object.values(e)),ja(t,(function(t){return a.set(parseFloat(t))})),a}function Ua(t){var e=Da(t.getVelocity());return Object(i.useEffect)((function(){return t.velocityUpdateSubscribers.add((function(t){e.set(t)}))}),[t]),e}function Ha(){return{scrollX:Mo(0),scrollY:Mo(0),scrollXProgress:Mo(0),scrollYProgress:Mo(0)}}function Ga(t,e,n){n.set(t&&e?t/e:0)}function Ya(t,e){var n=function(){var n=e(),o=n.xOffset,i=n.yOffset,r=n.xMaxOffset,a=n.yMaxOffset;t.scrollX.set(o),t.scrollY.set(i),Ga(o,r,t.scrollXProgress),Ga(i,a,t.scrollYProgress)};return n(),n}var Qa;function Xa(t){var e=m(Ha);return w((function(){var n=t.current;if(n){var o=Ya(e,function(t){return function(){return{xOffset:t.scrollLeft,yOffset:t.scrollTop,xMaxOffset:t.scrollWidth-t.offsetWidth,yMaxOffset:t.scrollHeight-t.offsetHeight}}}(n)),i=qt(n,"scroll",o,{passive:!0}),r=qt(n,"resize",o);return function(){i&&i(),r&&r()}}}),[]),e}function Za(){return{xOffset:window.pageXOffset,yOffset:window.pageYOffset,xMaxOffset:document.body.clientWidth-window.innerWidth,yMaxOffset:document.body.clientHeight-window.innerHeight}}var $a,qa=!1;function Ka(){return Qa||(Qa=Ha()),w((function(){!qa&&function(){if(qa=!0,"undefined"!=typeof window){var t=Ya(Qa,Za);qt(window,"scroll",t,{passive:!0}),qt(window,"resize",t)}}()}),[]),Qa}function Ja(){!$a&&function(){if($a=Mo(null),"undefined"!=typeof window)if(window.matchMedia){var t=window.matchMedia("(prefers-reduced-motion)"),e=function(){return $a.set(t.matches)};t.addListener(e),e()}else $a.set(!1)}();var t=Object(o.c)(Object(i.useState)($a.get()),2),e=t[0],n=t[1];return ja($a,n),e}function ts(){var t=!1,e=[],n=new Set,i={subscribe:function(t){return n.add(t),function(){n.delete(t)}},start:function(o,i){if(t){var r=[];return n.forEach((function(t){r.push(Go(t,o,{transitionOverride:i}))})),Promise.all(r)}return new Promise((function(t){e.push({animation:[o,i],resolve:t})}))},set:function(t){return n.forEach((function(e){!function(t,e){Array.isArray(e)?zo(t,e):"string"==typeof e?zo(t,[e]):Vo(t,e)}(e,t)}))},stop:function(){n.forEach((function(t){!function(t){t.forEachValue((function(t){return t.stop()}))}(t)}))},mount:function(){return t=!0,e.forEach((function(t){var e=t.animation,n=t.resolve;i.start.apply(i,Object(o.e)([],Object(o.c)(e))).then(n)})),function(){t=!1,i.stop()}}};return i}function es(){var t=m(ts);return Object(i.useEffect)(t.mount,[]),t}var ns=function(t,e,n){var o=e-t;return((n-t)%o+o)%o+t};function os(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Object(i.useRef)(0),r=Object(o.c)(Object(i.useState)(t[n.current]),2),a=r[0],s=r[1];return[a,function(e){n.current="number"!=typeof e?ns(0,t.length,n.current+1):e,s(t[n.current])}]}var is=function(){function t(){this.componentControls=new Set}return t.prototype.subscribe=function(t){var e=this;return this.componentControls.add(t),function(){return e.componentControls.delete(t)}},t.prototype.start=function(t,e){this.componentControls.forEach((function(n){n.start(t.nativeEvent||t,e)}))},t.prototype.updateConstraints=function(t){void 0===t&&(t=!0),this.componentControls.forEach((function(t){t.updateConstraints()})),t&&nr()},t}(),rs=function(){return new is};function as(){return m(rs)}var ss=function(){return{}},ls=zr({build:function(){},measureViewportBox:mi,resetTransform:function(){},restoreTransform:function(){},removeValueFromRenderState:function(){},render:function(){},scrapeMotionValuesFromProps:ss,readValueFromInstance:function(t,e,n){return n.initialState[e]||0},makeTargetAnimatable:function(t,e){var n=e.transition,i=e.transitionEnd,r=Object(o.d)(e,["transition","transitionEnd"]);return No(t,r,Ho(r,n||{},t)),Object(o.a)({transition:n,transitionEnd:i},r)}}),us=Gt({scrapeMotionValuesFromProps:ss,createRenderState:ss});function cs(t){var e=Object(o.c)(Object(i.useState)(t),2),n=e[0],r=e[1],a=us({},!1),s=m((function(){return ls({props:{},visualState:a},{initialState:t})}));return Object(i.useEffect)((function(){return s.mount({}),s.unmount()}),[]),Object(i.useEffect)((function(){s.setProps({onUpdate:function(t){return r(Object(o.a)({},t))}})})),[n,m((function(){return function(t){return Go(s,t)}}))]}var ds=function(t){return t>.001?1/t:1e5};function fs(t){var e=Da(1),n=Da(1),o=h();return!0,t?(e=t.scaleX||e,n=t.scaleY||n):o&&(e=o.getValue("scaleX",1),n=o.getValue("scaleY",1)),{scaleX:Va(e,ds),scaleY:Va(n,ds)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScannerConfiguration=void 0;const o=n(54);class i extends o.BaseConfiguration{constructor(t){super(),this.mirrored=!1,this.spinnerColor="black",this.backgroundColor="black",this.videoConstraints={width:{ideal:t.width},height:{ideal:t.height},facingMode:"environment",resizeMode:"none",experimental:{focusMode:"continous",focusDistance:0}}}static mapVideoConstraints(t,e){t.videoConstraints&&this.mapValues(t.videoConstraints,e.videoConstraints)}}e.ScannerConfiguration=i,i.DEFAULT_VIDEO_RESOLUTION_4K={width:3840,height:2160},i.DEFAULT_VIDEO_RESOLUTION_HD={width:1920,height:1080},i.DEFAULT_ACCEPTED_ANGLE_SCORE=75,i.DEFAULT_ACCEPTED_SIZE_SCORE=75},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationBarSizeContext=void 0;const s=n(2),l=r(n(1)),u=a(n(2)),c=n(69),d=n(38),f=n(9),h=n(4),p=n(40);d.TopBarConfiguration;e.NavigationBarSizeContext=l.default.createContext(null),e.default=function(t){const n=t.mode,o="HIDDEN"===n?0:48;(0,l.useEffect)((()=>{if("HIDDEN"===n)return;const e=document.createElement("meta");return e.name="theme-color",e.content=h.SBTheme.getColorValue(t.backgroundColor),document.head.appendChild(e),()=>{document.head.removeChild(e)}}),[n]);const i="SOLID"===n?0:o,r={height:o,remainingVisibleBodyHeight:"SOLID"===n?`calc(100 * ${c.dvhCssValue} - ${o}px)`:`calc(100 * ${c.dvhCssValue})`,minTopPaddingForContent:i,minTopPaddingForViewFinder:10+i},a="SOLID"===n?{backgroundColor:h.SBTheme.getColorValue(t.backgroundColor)}:{backgroundImage:`linear-gradient(to bottom, ${h.SBTheme.getColorValue(t.backgroundColor)}, #00000000)`,position:"absolute",backgroundColor:"transparent"};return l.default.createElement(l.default.Fragment,null,"HIDDEN"!==n&&l.default.createElement(s.AppBar,{position:"static",elevation:0,sx:Object.assign({zIndex:1e5,height:o,minHeight:o},a)},l.default.createElement(s.Toolbar,{variant:"dense",sx:{height:o,minHeight:o}},l.default.createElement(s.Box,{sx:{flex:1}},t.cancelButton.visible&&l.default.createElement(l.default.Fragment,null,l.default.createElement(p.StyledButton,Object.assign({onClick:t.onBackPress,icon:t.cancelButton.foreground.iconVisible&&l.default.createElement(u.default,{sx:{fontSize:12,mr:"5px"}})},t.cancelButton)))),l.default.createElement(s.Box,null,l.default.createElement(s.Typography,{variant:"h6",noWrap:!0,component:"div",fontSize:18,fontWeight:600},l.default.createElement(f.StyledText,{config:t.title}))),l.default.createElement(s.Box,{sx:{flex:1}}))),l.default.createElement(e.NavigationBarSizeContext.Provider,{value:r},t.children))}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(37),e),i(n(59),e),i(n(38),e),i(n(60),e),i(n(61),e),i(n(3),e),i(n(39),e),i(n(63),e),i(n(18),e),i(n(102),e),i(n(64),e),i(n(65),e),i(n(10),e),i(n(103),e),i(n(67),e),i(n(104),e),i(n(62),e),i(n(105),e),i(n(66),e),i(n(106),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeInfoMapping=e.BarcodeMappedData=e.BarcodeItemErrorState=void 0;const o=n(3),i=n(6),r=n(3);class a extends i.PartiallyConstructible{constructor(t={}){super(),this.title=new r.StyledText({text:"Connection Error!",color:"?sbColorOnSurface"}),this.subtitle=new r.StyledText({text:"There was an issue and the data requested was not fetched. You could try again or discard this result to start a new scan.",color:"?sbColorOnSurfaceVariant"}),this.retryButton=new o.ButtonConfiguration({}),this.cancelButton=new o.ButtonConfiguration({}),void 0!==t.title&&(this.title=new r.StyledText(t.title)),void 0!==t.subtitle&&(this.subtitle=new r.StyledText(t.subtitle)),void 0!==t.retryButton&&(this.retryButton=new o.ButtonConfiguration(t.retryButton)),void 0!==t.cancelButton&&(this.cancelButton=new o.ButtonConfiguration(t.cancelButton))}}e.BarcodeItemErrorState=a;class s extends i.PartiallyConstructible{constructor(t={}){if(super(),void 0===t.title)throw new Error("title must be present in constructor argument");if(this.title=t.title,void 0===t.subtitle)throw new Error("subtitle must be present in constructor argument");if(this.subtitle=t.subtitle,void 0===t.barcodeImage)throw new Error("barcodeImage must be present in constructor argument");this.barcodeImage=t.barcodeImage}}e.BarcodeMappedData=s;class l extends i.PartiallyConstructible{constructor(t={}){super(),this.barcodeItemMapper=null,this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.loadingMessage=new r.StyledText({text:"Loading message for barcode info mapping.",color:"?sbColorPrimary"}),this.errorState=new a({}),void 0!==t.barcodeItemMapper&&(this.barcodeItemMapper=null!=t.barcodeItemMapper?t.barcodeItemMapper:null),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0!==t.modalOverlayColor&&(this.modalOverlayColor=t.modalOverlayColor),void 0!==t.loadingMessage&&(this.loadingMessage=new r.StyledText(t.loadingMessage)),void 0!==t.errorState&&(this.errorState=new a(t.errorState))}}e.BarcodeInfoMapping=l},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeMapper=e.BarcodeMapperContext=void 0;const i=n(12),r=n(1),a=n(116);e.BarcodeMapperContext=(0,r.createContext)(null);e.BarcodeMapper=class{constructor(t,e){this.barcodeItemMapper=t,this.onError=e,this.cache=new Map,this.cacheEntryPendingRetries=[],this.hash=t=>JSON.stringify(this.mapBarcodeToBarcodeItem(t,1))}mapBarcodeToBarcodeItem(t,e){return{count:e,rawBytes:t.rawBytes,type:t.format,text:t.text,parsedDocument:t.parsedText}}getBarcodeMappedData(t){const e=this.hash(t),n=this.mapBarcodeToBarcodeItem(t,1);if(!this.cache.has(e)){let r;r=this.barcodeItemMapper?this.barcodeItemMapper(n):(()=>o(this,void 0,void 0,(function*(){return{title:t.text,subtitle:t.format,barcodeImage:yield i.ImageUtils.toDataUrl(t.barcodeImage)}})))(),this.cache.set(e,r)}return this.cache.get(e)}useBarcodeMappedData(t){const e=(0,r.useRef)(!1),n=t&&this.getBarcodeMappedData(t),o=(0,a.usePromise)(n);if((0,r.useEffect)((()=>{o&&o.error&&(e.current=!1,this.cacheEntryPendingRetries.push((()=>{this.cache.delete(this.hash(t)),e.current=!0})),this.onError((()=>{for(const t of this.cacheEntryPendingRetries)t();this.cacheEntryPendingRetries.length=0}),(()=>{e.current=!0})))}),[o&&o.error]),!o)return null;let i;return i=o.value?"LOADED":o.error&&!e.current?"RETRY_DIALOG_OPEN":o.error?"FAILED":"LOADING",{value:o.value,state:i}}}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const l=n(90),u=n(51),c=n(53),d=n(93),f=s(n(94)),h=s(n(95)),p=s(n(56)),m=n(12),g=n(50),v=n(36),y=s(n(96)),b=s(n(98)),A=s(n(99)),S=n(101),C=n(107),_=n(108),w=s(n(109)),x=s(n(68)),O=n(55),E=r(n(110)),P=s(n(24)),L=s(n(111));class B{static get UI(){if(!g.Constants.BUILD_WITH_UI)throw new Error("UI components are not included in Scanbot.min.js. Please use ScanbotSDK.ui2.min.js instead.");return B._ui2}static initialize(t){var e;return a(this,void 0,void 0,(function*(){const n=new B,o=t.engine||B.defaultEnginePath,i=!!t.allowThreads,r=null!==(e=t.requestSuffix)&&void 0!==e?e:`?${n.version}`,a=[t.licenseKey,o,window.location.hostname,g.Constants.CDN_PATH+g.Constants.DEFAULT_WASM_FOLDER,{captureConsole:!1,allowThreads:i,profileTfjsKernels:!1,requestSuffix:r}];return n.bridge=new l.WorkerBridge(o,{allowSimd:!0,allowThreads:i,requestSuffix:r},a),B.instance=n,window.scanbotSdk=n,P.default.initialize(t.verboseLogging),t.allowThreads&&!(0,u.areThreadsAvailable)()&&(P.default.debugWarn("Threads are not available in this environment. The SDK will run in single-threaded mode."),window.hasOwnProperty("crossOriginIsolated")&&!window.crossOriginIsolated&&P.default.debugWarn("The site is not cross-origin isolated. This prevents multithreading in the ScanbotSDK. To enable multithreading, you need to set the 'Cross-Origin-Opener-Policy' and 'Cross-Origin-Embedder-Policy' http headers. See our documentation for details.")),n}))}createDocumentScanner(t){return a(this,void 0,void 0,(function*(){let e;try{const o=n(156);return e=yield o.default.create(t),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}createMrzScanner(t){var e;return a(this,void 0,void 0,(function*(){let o;try{const i=n(163),r=new y.default(this,this.bridge.postByTransferringArgs("createMRZRecognizer",[null==t?void 0:t.accumulatedFrameVerificationConfiguration]),!0),a=null!==(e=i.default)&&void 0!==e?e:i;return o=yield a.create(t,r),yield this.licenseCheck(),o}catch(t){throw o&&o.dispose(),t}}))}createBarcodeScanner(t){var e;return a(this,void 0,void 0,(function*(){let o;try{const i=n(73),r=null!==(e=i.default)&&void 0!==e?e:i;return o=yield r.create(t),yield this.licenseCheck(),o}catch(t){throw o&&o.dispose(),t}}))}openCroppingView(t){return a(this,void 0,void 0,(function*(){yield this.licenseCheck();const e=n(165);return yield e.default.create(t)}))}createTextDataScanner(t){return a(this,void 0,void 0,(function*(){try{const e=[{languages:(t=S.TextDataScannerConfiguration.fromJson(t)).supportedLanguages,ocrResolutionLimit:t.ocrResolutionLimit,validatorPreset:t.validatorPreset}],n=yield this.createGenericTextLineScanner(t,t.onTextDetected,e);return yield this.licenseCheck(),n}catch(t){throw t}}))}createVINScanner(t){return a(this,void 0,void 0,(function*(){let e;try{t=C.VINScannerConfiguration.fromJson(t);const n="VehicleIdentificationNumber",o=[{ocrResolutionLimit:t.ocrResolutionLimit,validatorPreset:n}],i=e=>{""!==e.text&&t.onTextDetected(e)};return e=yield this.createGenericTextLineScanner(t,i,o),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}toDataUrl(t){return a(this,void 0,void 0,(function*(){return x.default.throwIfMissingBuffer(t),yield m.ImageUtils.toDataUrl(t)}))}applyFilter(t,e){return a(this,void 0,void 0,(function*(){return yield this.licenseCheck(),x.default.throwIfMissingBuffer(t),yield this.bridge.postByCopyingArgs("applyFilter",[t,e])}))}rotateImageCcw(t,e){return a(this,void 0,void 0,(function*(){return x.default.throwIfMissingBuffer(t),yield this.bridge.postByCopyingArgs("rotateImageCcw",[t,e])}))}cropAndRotateImageCcw(t,e,n){return a(this,void 0,void 0,(function*(){return x.default.throwIfMissingBuffer(t),x.default.throwIfMissing(e,"Polygon may not be null"),yield this.bridge.postByCopyingArgs("cropAndRotateImageCcw",[t,e,n])}))}detectDocument(t,e,n){return a(this,void 0,void 0,(function*(){yield this.licenseCheck(),x.default.throwIfMissingBuffer(t);const o=yield this.bridge.postByTransferringArgs("createDocumentDetector",[{useCombinedDetector:!1,acceptedAngleScore:e||c.DocumentScannerConfiguration.DEFAULT_ACCEPTED_ANGLE_SCORE,acceptedSizeScore:n||c.DocumentScannerConfiguration.DEFAULT_ACCEPTED_SIZE_SCORE}]);return yield this.bridge.postByCopyingArgs("documentDetectorDetect",[o,t])}))}detectAndCropDocument(t){return a(this,void 0,void 0,(function*(){return yield this.licenseCheck(),x.default.throwIfMissingBuffer(t),yield this.bridge.postByCopyingArgs("detectAndCropDocument",[t])}))}detectBarcodes(t,e,n,o){return a(this,void 0,void 0,(function*(){return yield this.licenseCheck(),x.default.throwIfMissingBuffer(t),new Promise((i=>{const r=document.createElement("canvas"),s=document.createElement("img");s.src=t,s.onload=()=>a(this,void 0,void 0,(function*(){r.width=s.width,r.height=s.height;const t=r.getContext("2d");t.drawImage(s,0,0);const a=t.getImageData(0,0,s.width,s.height),{result:l,originalImage:u}=yield this.bridge.postByTransferringArgs("recognizeBarcodes",[a,{engineMode:e,barcodeFormats:n,returnBarcodeImage:o}]);i(v.BarcodeResult.fromWorker(l,m.ImageUtils.convertImageDataWrapperToImageData(u)))}))}))}))}createSimpleMRZRecognizer(){return a(this,void 0,void 0,(function*(){return new y.default(this,yield this.bridge.postByTransferringArgs("createMRZRecognizer",[]),!1)}))}createOcrEngine(t){return a(this,void 0,void 0,(function*(){return new b.default(this,yield this.bridge.postByCopyingArgs("createOcrEngine",[t]))}))}createDocumentQualityAnalyzer(t){return a(this,void 0,void 0,(function*(){const e=yield this.bridge.postByTransferringArgs("createDocumentQualityAnalyzer",[null!=t?t:{}]);return new w.default(this,e)}))}createImageProcessor(t){return a(this,void 0,void 0,(function*(){x.default.throwIfMissingBuffer(t);const e=yield this.bridge.postByCopyingArgs("imageProcessorCreate",[t]);return new O.ImageProcessor(this,e)}))}getLicenseInfo(){return a(this,void 0,void 0,(function*(){const t=yield this.bridge.postByTransferringArgs("getLicenseInfo",[]);return d.LicenseInfo.fromJson(t)}))}beginPdf(t={}){return a(this,void 0,void 0,(function*(){return yield this.licenseCheck(),new f.default(this,yield this.bridge.postByCopyingArgs("beginPdf",[t]))}))}beginTiff(t={}){return a(this,void 0,void 0,(function*(){return yield this.licenseCheck(),new h.default(this,yield this.bridge.postByCopyingArgs("beginTiff",[t]))}))}get version(){return g.Constants.VERSION}get utils(){return this._utils||(this._utils=new p.default),this._utils}release(t,e){return a(this,void 0,void 0,(function*(){t&&(console.log("Releasing object: "+e||!1),yield this.bridge.postByTransferringArgs("releaseObject",[t]))}))}licenseCheck(){return a(this,void 0,void 0,(function*(){const t=yield this.getLicenseInfo();if(!t.isValid())throw console.error(`LicenseError: ${t.status}`),new _.LicenseError(t)}))}createGenericTextLineScanner(t,e,o){var i;return a(this,void 0,void 0,(function*(){const r=n(176),a=null!==(i=r.default)&&void 0!==i?i:r,s=this.bridge.postByCopyingArgs("createGenericTextLineScanner",o),l=new A.default(this,s);return yield a.create(t,e,l)}))}}B.defaultEnginePath="",B._ui2=g.Constants.BUILD_WITH_UI?L.default:void 0,B.imageFilters=E,e.default=B},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Frame=void 0;class o{constructor(t,e,n,o){this.x=t,this.y=e,this.width=n,this.height=o}scaleDown(t){return new o(this.x/t,this.y/t,this.width/t,this.height/t)}bottom(){return this.y+this.height}static withSize(t,e){return new o(0,0,t,e)}static empty(){return new o(0,0,0,0)}static fromRect(t){return t?new o(t.x,t.y,t.width,t.height):o.empty()}static fromPoint(t,e){return new o(t.x-e/2,t.y-e/2,e,e)}static fromDOMRect(t){return new o(t.x,t.y,t.width,t.height)}}e.Frame=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=void 0;e.Utils=class{static toPixelSize(t){return t+"px"}static containsString(t,e){return!!t&&-1!==t.indexOf(e)}static copy(t){return JSON.parse(JSON.stringify(t))}static getProperty(t,e){let n;return t&&t.hasOwnProperty(e)&&(n=t[e]),n}static uuid(){let t="";const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=e.length;for(let o=0;o<5;o++)t+=e.charAt(Math.floor(Math.random()*n));return t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewFinderScannerConfiguration=void 0;const o=n(15),i=n(17);class r extends o.ScannerConfiguration{constructor(t){super(t);const e=new i.BarcodeScannerConfiguration;this.finder=e.viewFinder,this.userGuidance=e.userGuidance}static mapFinderConfiguration(t,e){var n,i;o.ScannerConfiguration.mapValuesDeep(null!==(n=e.finder)&&void 0!==n?n:{},t.finder),o.ScannerConfiguration.mapValuesDeep(null!==(i=e.userGuidance)&&void 0!==i?i:{},t.userGuidance)}}e.ViewFinderScannerConfiguration=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=class{static initialize(t=!1){this.verbose=t}static debug(t){this.verbose&&console.log("ScanbotSDK:",t)}static debugWarn(t){this.verbose&&console.warn("ScanbotSDK:",t)}}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.DialogButton=void 0;const a=r(n(1)),s=n(17),l=n(2),u=n(9),c=n(4),d=r(n(2));s.ButtonConfiguration;e.DialogButton=function(t){const e=(0,a.useContext)(c.SBPaletteContext).getColorValue;if(!t.visible)return null;const n=d[t.icon];return a.default.createElement(l.Button,{onClick:t.onClick,type:t.type,style:Object.assign(Object.assign({},t.style),{border:"1px solid "+e(t.background.strokeColor),borderWidth:t.background.strokeWidth,backgroundColor:e(t.background.fillColor)})},t.foreground.iconVisible&&t.icon&&a.default.createElement(n,{sx:{color:e(t.foreground.color),pr:2}}),a.default.createElement(u.StyledText,{config:{visible:!0,text:t.text,color:t.foreground.color,useShadow:t.foreground.useShadow}}))}},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ScannerView=e.ScanbotCameraState=e.ScanbotCameraProps=void 0;const r=i(n(1)),a=n(1),s=i(n(20)),l=n(74),u=i(n(120));e.ScanbotCameraProps=class{};class c{constructor(){this.videoReady=!1,this.sdkReady=!1}}e.ScanbotCameraState=c;class d extends r.default.Component{constructor(t){super(t),this.onVideoReady=()=>{this.setState({videoReady:!0},(()=>{const{onSuccess:t}=this.props;t&&t(this)}))},this.onVideoError=t=>{if(!0===this.state.videoReady){const{onError:e}=this.props.configuration;e?e(t):console.error(t)}else{const{onFailure:e}=this.props;e&&e(t),this.dispose()}},this.state=new c,this.bridge.awaitInitialized().then((()=>{this.setState({sdkReady:!0})}))}get bridge(){return s.default.instance.bridge}dispose(){const{container:t}=this.props;t&&(0,a.render)(null,t)}componentDidMount(){this.disposed=!1}componentWillUnmount(){this.disposed=!0}isSupported(){return"localhost"===location.hostname||"https:"===location.protocol}swapCameraFacing(t){this.camera.swapCameraFacing(t)}switchCamera(t,e){return o(this,void 0,void 0,(function*(){this.camera.switchCamera(t,e)}))}getActiveCameraInfo(){return this.camera.getActiveCameraInfo()}fetchAvailableCameras(){return o(this,void 0,void 0,(function*(){return new Promise(((t,e)=>{var n;if(null===(n=navigator.mediaDevices)||void 0===n?void 0:n.enumerateDevices){let n=[];navigator.mediaDevices.enumerateDevices().then((e=>{e.forEach((t=>{"videoinput"===t.kind&&t.deviceId&&n.push({deviceId:t.deviceId,label:t.label})})),t(n)})).catch((t=>{e(l.MediaError.mediaDeviceNotFound())}))}else e(l.MediaError.enumerateDevicesFailed())}))}))}renderSpinner(t){return this.state.videoReady&&this.state.sdkReady?null:r.default.createElement("div",{"data-sb-spinner":"1",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:500}},r.default.createElement(u.default,{color:t}))}setTorchState(t){return this.camera.setTorchState(t)}}e.ScannerView=d,d.DEFAULT_DETECTION_RESOLUTION=600,d.DETECTION_RESULTION_4K=3840},function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"ServerStyleSheet",(function(){return ne})),n.d(e,"StyleSheetConsumer",(function(){return Et})),n.d(e,"StyleSheetContext",(function(){return Ot})),n.d(e,"StyleSheetManager",(function(){return Bt})),n.d(e,"ThemeConsumer",(function(){return zt})),n.d(e,"ThemeContext",(function(){return Vt})),n.d(e,"ThemeProvider",(function(){return Ut})),n.d(e,"__PRIVATE__",(function(){return oe})),n.d(e,"createGlobalStyle",(function(){return Jt})),n.d(e,"css",(function(){return Xt})),n.d(e,"default",(function(){return qt})),n.d(e,"isStyledComponent",(function(){return Z})),n.d(e,"keyframes",(function(){return te})),n.d(e,"styled",(function(){return qt})),n.d(e,"useTheme",(function(){return Nt})),n.d(e,"version",(function(){return f})),n.d(e,"withTheme",(function(){return ee}));var o=n(0),i=(n(88),n(1)),r=n(86),a=n.n(r),s=n(11),l=n(87),u="undefined"!=typeof t&&void 0!==t.env&&(t.env.REACT_APP_SC_ATTR||t.env.SC_ATTR)||"data-styled",c="active",d="data-styled-version",f="6.1.8",h="/*!sc*/\n",p="undefined"!=typeof window&&"HTMLElement"in window,m=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof t&&void 0!==t.env&&void 0!==t.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==t.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==t.env.REACT_APP_SC_DISABLE_SPEEDY&&t.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof t&&void 0!==t.env&&void 0!==t.env.SC_DISABLE_SPEEDY&&""!==t.env.SC_DISABLE_SPEEDY&&("false"!==t.env.SC_DISABLE_SPEEDY&&t.env.SC_DISABLE_SPEEDY)),g={},v=(new Set,Object.freeze([])),y=Object.freeze({});function b(t,e,n){return void 0===n&&(n=y),t.theme!==n.theme&&t.theme||e||n.theme}var A=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),S=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,C=/(^-|-$)/g;function _(t){return t.replace(S,"-").replace(C,"")}var w=/(a)(d)/gi,x=function(t){return String.fromCharCode(t+(t>25?39:97))};function O(t){var e,n="";for(e=Math.abs(t);e>52;e=e/52|0)n=x(e%52)+n;return(x(e%52)+n).replace(w,"$1-$2")}var E,P=function(t,e){for(var n=e.length;n;)t=33*t^e.charCodeAt(--n);return t},L=function(t){return P(5381,t)};function B(t){return O(L(t)>>>0)}function T(t){return t.displayName||t.name||"Component"}function k(t){return"string"==typeof t&&!0}var M="function"==typeof Symbol&&Symbol.for,D=M?Symbol.for("react.memo"):60115,j=M?Symbol.for("react.forward_ref"):60112,W={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},I={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},R={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},F=((E={})[j]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},E[D]=R,E);function V(t){return("type"in(e=t)&&e.type.$$typeof)===D?R:"$$typeof"in t?F[t.$$typeof]:W;var e}var z=Object.defineProperty,N=Object.getOwnPropertyNames,U=Object.getOwnPropertySymbols,H=Object.getOwnPropertyDescriptor,G=Object.getPrototypeOf,Y=Object.prototype;function Q(t,e,n){if("string"!=typeof e){if(Y){var o=G(e);o&&o!==Y&&Q(t,o,n)}var i=N(e);U&&(i=i.concat(U(e)));for(var r=V(t),a=V(e),s=0;s<i.length;++s){var l=i[s];if(!(l in I||n&&n[l]||a&&l in a||r&&l in r)){var u=H(e,l);try{z(t,l,u)}catch(t){}}}}return t}function X(t){return"function"==typeof t}function Z(t){return"object"==typeof t&&"styledComponentId"in t}function $(t,e){return t&&e?"".concat(t," ").concat(e):t||e||""}function q(t,e){if(0===t.length)return"";for(var n=t[0],o=1;o<t.length;o++)n+=e?e+t[o]:t[o];return n}function K(t){return null!==t&&"object"==typeof t&&t.constructor.name===Object.name&&!("props"in t&&t.$$typeof)}function J(t,e,n){if(void 0===n&&(n=!1),!n&&!K(t)&&!Array.isArray(t))return e;if(Array.isArray(e))for(var o=0;o<e.length;o++)t[o]=J(t[o],e[o]);else if(K(e))for(var o in e)t[o]=J(t[o],e[o]);return t}function tt(t,e){Object.defineProperty(t,"toString",{value:e})}function et(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(e.length>0?" Args: ".concat(e.join(", ")):""))}var nt=function(){function t(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return t.prototype.indexOfGroup=function(t){for(var e=0,n=0;n<t;n++)e+=this.groupSizes[n];return e},t.prototype.insertRules=function(t,e){if(t>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,i=o;t>=i;)if((i<<=1)<0)throw et(16,"".concat(t));this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var r=o;r<i;r++)this.groupSizes[r]=0}for(var a=this.indexOfGroup(t+1),s=(r=0,e.length);r<s;r++)this.tag.insertRule(a,e[r])&&(this.groupSizes[t]++,a++)},t.prototype.clearGroup=function(t){if(t<this.length){var e=this.groupSizes[t],n=this.indexOfGroup(t),o=n+e;this.groupSizes[t]=0;for(var i=n;i<o;i++)this.tag.deleteRule(n)}},t.prototype.getGroup=function(t){var e="";if(t>=this.length||0===this.groupSizes[t])return e;for(var n=this.groupSizes[t],o=this.indexOfGroup(t),i=o+n,r=o;r<i;r++)e+="".concat(this.tag.getRule(r)).concat(h);return e},t}(),ot=new Map,it=new Map,rt=1,at=function(t){if(ot.has(t))return ot.get(t);for(;it.has(rt);)rt++;var e=rt++;return ot.set(t,e),it.set(e,t),e},st=function(t,e){rt=e+1,ot.set(t,e),it.set(e,t)},lt="style[".concat(u,"][").concat(d,'="').concat(f,'"]'),ut=new RegExp("^".concat(u,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),ct=function(t,e,n){for(var o,i=n.split(","),r=0,a=i.length;r<a;r++)(o=i[r])&&t.registerName(e,o)},dt=function(t,e){for(var n,o=(null!==(n=e.textContent)&&void 0!==n?n:"").split(h),i=[],r=0,a=o.length;r<a;r++){var s=o[r].trim();if(s){var l=s.match(ut);if(l){var u=0|parseInt(l[1],10),c=l[2];0!==u&&(st(c,u),ct(t,c,l[3]),t.getTag().insertRules(u,i)),i.length=0}else i.push(s)}}};function ft(){return n.nc}var ht=function(t){var e=document.head,n=t||e,o=document.createElement("style"),i=function(t){var e=Array.from(t.querySelectorAll("style[".concat(u,"]")));return e[e.length-1]}(n),r=void 0!==i?i.nextSibling:null;o.setAttribute(u,c),o.setAttribute(d,f);var a=ft();return a&&o.setAttribute("nonce",a),n.insertBefore(o,r),o},pt=function(){function t(t){this.element=ht(t),this.element.appendChild(document.createTextNode("")),this.sheet=function(t){if(t.sheet)return t.sheet;for(var e=document.styleSheets,n=0,o=e.length;n<o;n++){var i=e[n];if(i.ownerNode===t)return i}throw et(17)}(this.element),this.length=0}return t.prototype.insertRule=function(t,e){try{return this.sheet.insertRule(e,t),this.length++,!0}catch(t){return!1}},t.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},t.prototype.getRule=function(t){var e=this.sheet.cssRules[t];return e&&e.cssText?e.cssText:""},t}(),mt=function(){function t(t){this.element=ht(t),this.nodes=this.element.childNodes,this.length=0}return t.prototype.insertRule=function(t,e){if(t<=this.length&&t>=0){var n=document.createTextNode(e);return this.element.insertBefore(n,this.nodes[t]||null),this.length++,!0}return!1},t.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},t.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},t}(),gt=function(){function t(t){this.rules=[],this.length=0}return t.prototype.insertRule=function(t,e){return t<=this.length&&(this.rules.splice(t,0,e),this.length++,!0)},t.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},t.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},t}(),vt=p,yt={isServer:!p,useCSSOMInjection:!m},bt=function(){function t(t,e,n){void 0===t&&(t=y),void 0===e&&(e={});var i=this;this.options=Object(o.a)(Object(o.a)({},yt),t),this.gs=e,this.names=new Map(n),this.server=!!t.isServer,!this.server&&p&&vt&&(vt=!1,function(t){for(var e=document.querySelectorAll(lt),n=0,o=e.length;n<o;n++){var i=e[n];i&&i.getAttribute(u)!==c&&(dt(t,i),i.parentNode&&i.parentNode.removeChild(i))}}(this)),tt(this,(function(){return function(t){for(var e=t.getTag(),n=e.length,o="",i=function(n){var i=function(t){return it.get(t)}(n);if(void 0===i)return"continue";var r=t.names.get(i),a=e.getGroup(n);if(void 0===r||0===a.length)return"continue";var s="".concat(u,".g").concat(n,'[id="').concat(i,'"]'),l="";void 0!==r&&r.forEach((function(t){t.length>0&&(l+="".concat(t,","))})),o+="".concat(a).concat(s,'{content:"').concat(l,'"}').concat(h)},r=0;r<n;r++)i(r);return o}(i)}))}return t.registerId=function(t){return at(t)},t.prototype.reconstructWithOptions=function(e,n){return void 0===n&&(n=!0),new t(Object(o.a)(Object(o.a)({},this.options),e),this.gs,n&&this.names||void 0)},t.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(t=function(t){var e=t.useCSSOMInjection,n=t.target;return t.isServer?new gt(n):e?new pt(n):new mt(n)}(this.options),new nt(t)));var t},t.prototype.hasNameForId=function(t,e){return this.names.has(t)&&this.names.get(t).has(e)},t.prototype.registerName=function(t,e){if(at(t),this.names.has(t))this.names.get(t).add(e);else{var n=new Set;n.add(e),this.names.set(t,n)}},t.prototype.insertRules=function(t,e,n){this.registerName(t,e),this.getTag().insertRules(at(t),n)},t.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},t.prototype.clearRules=function(t){this.getTag().clearGroup(at(t)),this.clearNames(t)},t.prototype.clearTag=function(){this.tag=void 0},t}(),At=/&/g,St=/^\s*\/\/.*$/gm;function Ct(t,e){return t.map((function(t){return"rule"===t.type&&(t.value="".concat(e," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(e," ")),t.props=t.props.map((function(t){return"".concat(e," ").concat(t)}))),Array.isArray(t.children)&&"@keyframes"!==t.type&&(t.children=Ct(t.children,e)),t}))}function _t(t){var e,n,o,i=void 0===t?y:t,r=i.options,a=void 0===r?y:r,l=i.plugins,u=void 0===l?v:l,c=function(t,o,i){return i.startsWith(n)&&i.endsWith(n)&&i.replaceAll(n,"").length>0?".".concat(e):t},d=u.slice();d.push((function(t){t.type===s.a&&t.value.includes("&")&&(t.props[0]=t.props[0].replace(At,n).replace(o,c))})),a.prefix&&d.push(s.d),d.push(s.g);var f=function(t,i,r,l){void 0===i&&(i=""),void 0===r&&(r=""),void 0===l&&(l="&"),e=l,n=i,o=new RegExp("\\".concat(n,"\\b"),"g");var u=t.replace(St,""),c=s.b(r||i?"".concat(r," ").concat(i," { ").concat(u," }"):u);a.namespace&&(c=Ct(c,a.namespace));var f=[];return s.f(c,s.c(d.concat(s.e((function(t){return f.push(t)}))))),f};return f.hash=u.length?u.reduce((function(t,e){return e.name||et(15),P(t,e.name)}),5381).toString():"",f}var wt=new bt,xt=_t(),Ot=i.default.createContext({shouldForwardProp:void 0,styleSheet:wt,stylis:xt}),Et=Ot.Consumer,Pt=i.default.createContext(void 0);function Lt(){return Object(i.useContext)(Ot)}function Bt(t){var e=Object(i.useState)(t.stylisPlugins),n=e[0],o=e[1],r=Lt().styleSheet,s=Object(i.useMemo)((function(){var e=r;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e}),[t.disableCSSOMInjection,t.sheet,t.target,r]),l=Object(i.useMemo)((function(){return _t({options:{namespace:t.namespace,prefix:t.enableVendorPrefixes},plugins:n})}),[t.enableVendorPrefixes,t.namespace,n]);Object(i.useEffect)((function(){a()(n,t.stylisPlugins)||o(t.stylisPlugins)}),[t.stylisPlugins]);var u=Object(i.useMemo)((function(){return{shouldForwardProp:t.shouldForwardProp,styleSheet:s,stylis:l}}),[t.shouldForwardProp,s,l]);return i.default.createElement(Ot.Provider,{value:u},i.default.createElement(Pt.Provider,{value:l},t.children))}var Tt=function(){function t(t,e){var n=this;this.inject=function(t,e){void 0===e&&(e=xt);var o=n.name+e.hash;t.hasNameForId(n.id,o)||t.insertRules(n.id,o,e(n.rules,o,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=e,tt(this,(function(){throw et(12,String(n.name))}))}return t.prototype.getName=function(t){return void 0===t&&(t=xt),this.name+t.hash},t}(),kt=function(t){return t>="A"&&t<="Z"};function Mt(t){for(var e="",n=0;n<t.length;n++){var o=t[n];if(1===n&&"-"===o&&"-"===t[0])return t;kt(o)?e+="-"+o.toLowerCase():e+=o}return e.startsWith("ms-")?"-"+e:e}var Dt=function(t){return null==t||!1===t||""===t},jt=function(t){var e,n,i=[];for(var r in t){var a=t[r];t.hasOwnProperty(r)&&!Dt(a)&&(Array.isArray(a)&&a.isCss||X(a)?i.push("".concat(Mt(r),":"),a,";"):K(a)?i.push.apply(i,Object(o.e)(Object(o.e)(["".concat(r," {")],jt(a),!1),["}"],!1)):i.push("".concat(Mt(r),": ").concat((e=r,null==(n=a)||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||e in l.a||e.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return i};function Wt(t,e,n,o){return Dt(t)?[]:Z(t)?[".".concat(t.styledComponentId)]:X(t)?!X(i=t)||i.prototype&&i.prototype.isReactComponent||!e?[t]:Wt(t(e),e,n,o):t instanceof Tt?n?(t.inject(n,o),[t.getName(o)]):[t]:K(t)?jt(t):Array.isArray(t)?Array.prototype.concat.apply(v,t.map((function(t){return Wt(t,e,n,o)}))):[t.toString()];var i}function It(t){for(var e=0;e<t.length;e+=1){var n=t[e];if(X(n)&&!Z(n))return!1}return!0}var Rt=L(f),Ft=function(){function t(t,e,n){this.rules=t,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&It(t),this.componentId=e,this.baseHash=P(Rt,e),this.baseStyle=n,bt.registerId(e)}return t.prototype.generateAndInjectStyles=function(t,e,n){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,e,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&e.hasNameForId(this.componentId,this.staticRulesId))o=$(o,this.staticRulesId);else{var i=q(Wt(this.rules,t,e,n)),r=O(P(this.baseHash,i)>>>0);if(!e.hasNameForId(this.componentId,r)){var a=n(i,".".concat(r),void 0,this.componentId);e.insertRules(this.componentId,r,a)}o=$(o,r),this.staticRulesId=r}else{for(var s=P(this.baseHash,n.hash),l="",u=0;u<this.rules.length;u++){var c=this.rules[u];if("string"==typeof c)l+=c;else if(c){var d=q(Wt(c,t,e,n));s=P(s,d+u),l+=d}}if(l){var f=O(s>>>0);e.hasNameForId(this.componentId,f)||e.insertRules(this.componentId,f,n(l,".".concat(f),void 0,this.componentId)),o=$(o,f)}}return o},t}(),Vt=i.default.createContext(void 0),zt=Vt.Consumer;function Nt(){var t=Object(i.useContext)(Vt);if(!t)throw et(18);return t}function Ut(t){var e=i.default.useContext(Vt),n=Object(i.useMemo)((function(){return function(t,e){if(!t)throw et(14);if(X(t))return t(e);if(Array.isArray(t)||"object"!=typeof t)throw et(8);return e?Object(o.a)(Object(o.a)({},e),t):t}(t.theme,e)}),[t.theme,e]);return t.children?i.default.createElement(Vt.Provider,{value:n},t.children):null}var Ht={};new Set;function Gt(t,e,n){var r=Z(t),a=t,s=!k(t),l=e.attrs,u=void 0===l?v:l,c=e.componentId,d=void 0===c?function(t,e){var n="string"!=typeof t?"sc":_(t);Ht[n]=(Ht[n]||0)+1;var o="".concat(n,"-").concat(B(f+n+Ht[n]));return e?"".concat(e,"-").concat(o):o}(e.displayName,e.parentComponentId):c,h=e.displayName,p=void 0===h?function(t){return k(t)?"styled.".concat(t):"Styled(".concat(T(t),")")}(t):h,m=e.displayName&&e.componentId?"".concat(_(e.displayName),"-").concat(e.componentId):e.componentId||d,g=r&&a.attrs?a.attrs.concat(u).filter(Boolean):u,S=e.shouldForwardProp;if(r&&a.shouldForwardProp){var C=a.shouldForwardProp;if(e.shouldForwardProp){var w=e.shouldForwardProp;S=function(t,e){return C(t,e)&&w(t,e)}}else S=C}var x=new Ft(n,m,r?a.componentStyle:void 0);function O(t,e){return function(t,e,n){var r=t.attrs,a=t.componentStyle,s=t.defaultProps,l=t.foldedComponentIds,u=t.styledComponentId,c=t.target,d=i.default.useContext(Vt),f=Lt(),h=t.shouldForwardProp||f.shouldForwardProp,p=b(e,d,s)||y,m=function(t,e,n){for(var i,r=Object(o.a)(Object(o.a)({},e),{className:void 0,theme:n}),a=0;a<t.length;a+=1){var s=X(i=t[a])?i(r):i;for(var l in s)r[l]="className"===l?$(r[l],s[l]):"style"===l?Object(o.a)(Object(o.a)({},r[l]),s[l]):s[l]}return e.className&&(r.className=$(r.className,e.className)),r}(r,e,p),g=m.as||c,v={};for(var S in m)void 0===m[S]||"$"===S[0]||"as"===S||"theme"===S&&m.theme===p||("forwardedAs"===S?v.as=m.forwardedAs:h&&!h(S,g)||(v[S]=m[S]));var C=function(t,e){var n=Lt();return t.generateAndInjectStyles(e,n.styleSheet,n.stylis)}(a,m),_=$(l,u);return C&&(_+=" "+C),m.className&&(_+=" "+m.className),v[k(g)&&!A.has(g)?"class":"className"]=_,v.ref=n,Object(i.createElement)(g,v)}(E,t,e)}O.displayName=p;var E=i.default.forwardRef(O);return E.attrs=g,E.componentStyle=x,E.displayName=p,E.shouldForwardProp=S,E.foldedComponentIds=r?$(a.foldedComponentIds,a.styledComponentId):"",E.styledComponentId=m,E.target=r?a.target:t,Object.defineProperty(E,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var o=0,i=e;o<i.length;o++)J(t,i[o],!0);return t}({},a.defaultProps,t):t}}),tt(E,(function(){return".".concat(E.styledComponentId)})),s&&Q(E,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),E}function Yt(t,e){for(var n=[t[0]],o=0,i=e.length;o<i;o+=1)n.push(e[o],t[o+1]);return n}var Qt=function(t){return Object.assign(t,{isCss:!0})};function Xt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(X(t)||K(t))return Qt(Wt(Yt(v,Object(o.e)([t],e,!0))));var i=t;return 0===e.length&&1===i.length&&"string"==typeof i[0]?Wt(i):Qt(Wt(Yt(i,e)))}function Zt(t,e,n){if(void 0===n&&(n=y),!e)throw et(1,e);var i=function(i){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];return t(e,n,Xt.apply(void 0,Object(o.e)([i],r,!1)))};return i.attrs=function(i){return Zt(t,e,Object(o.a)(Object(o.a)({},n),{attrs:Array.prototype.concat(n.attrs,i).filter(Boolean)}))},i.withConfig=function(i){return Zt(t,e,Object(o.a)(Object(o.a)({},n),i))},i}var $t=function(t){return Zt(Gt,t)},qt=$t;A.forEach((function(t){qt[t]=$t(t)}));var Kt=function(){function t(t,e){this.rules=t,this.componentId=e,this.isStatic=It(t),bt.registerId(this.componentId+1)}return t.prototype.createStyles=function(t,e,n,o){var i=o(q(Wt(this.rules,e,n,o)),""),r=this.componentId+t;n.insertRules(r,r,i)},t.prototype.removeStyles=function(t,e){e.clearRules(this.componentId+t)},t.prototype.renderStyles=function(t,e,n,o){t>2&&bt.registerId(this.componentId+t),this.removeStyles(t,n),this.createStyles(t,e,n,o)},t}();function Jt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=Xt.apply(void 0,Object(o.e)([t],e,!1)),a="sc-global-".concat(B(JSON.stringify(r))),s=new Kt(r,a),l=function(t){var e=Lt(),n=i.default.useContext(Vt),o=i.default.useRef(e.styleSheet.allocateGSInstance(a)).current;return e.styleSheet.server&&u(o,t,e.styleSheet,n,e.stylis),i.default.useLayoutEffect((function(){if(!e.styleSheet.server)return u(o,t,e.styleSheet,n,e.stylis),function(){return s.removeStyles(o,e.styleSheet)}}),[o,t,e.styleSheet,n,e.stylis]),null};function u(t,e,n,i,r){if(s.isStatic)s.renderStyles(t,g,n,r);else{var a=Object(o.a)(Object(o.a)({},e),{theme:b(e,i,l.defaultProps)});s.renderStyles(t,a,n,r)}}return i.default.memo(l)}function te(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i=q(Xt.apply(void 0,Object(o.e)([t],e,!1))),r=B(i);return new Tt(r,i)}function ee(t){var e=i.default.forwardRef((function(e,n){var r=b(e,i.default.useContext(Vt),t.defaultProps);return i.default.createElement(t,Object(o.a)({},e,{theme:r,ref:n}))}));return e.displayName="WithTheme(".concat(T(t),")"),Q(e,t)}var ne=function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=ft(),o=q([n&&'nonce="'.concat(n,'"'),"".concat(u,'="true"'),"".concat(d,'="').concat(f,'"')].filter(Boolean)," ");return"<style ".concat(o,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw et(2);return t._emitSheetCSS()},this.getStyleElement=function(){var e;if(t.sealed)throw et(2);var n=((e={})[u]="",e[d]=f,e.dangerouslySetInnerHTML={__html:t.instance.toString()},e),r=ft();return r&&(n.nonce=r),[i.default.createElement("style",Object(o.a)({},n,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new bt({isServer:!0}),this.sealed=!1}return t.prototype.collectStyles=function(t){if(this.sealed)throw et(2);return i.default.createElement(Bt,{sheet:this.instance},t)},t.prototype.interleaveWithNodeStream=function(t){throw et(3)},t}(),oe={StyleSheet:bt,mainSheet:wt};"__sc-".concat(u,"__")}.call(this,n(52))},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const r=i(n(1)),a=i(n(121)),s=n(13),l=n(21),u=i(n(24));class c extends r.default.Component{constructor(t){super(t),this.videoLoaded=!1,this.reloadCanvas=!0,this.swapCameraEnabled=!0,this.activeCamera=void 0,this.save=!1,this.onStreamChanged=t=>{this.video.srcObject=t,this.updateCameraInfo(t),this.video.addEventListener("resize",(t=>{this.reloadCanvas=!0}),!1),this.video.addEventListener("loadeddata",(t=>{this.videoLoaded=!0,this.didLoadVideo&&this.didLoadVideo()}),!1)},this.state={facingModeBack:"environment"===this.props.videoConstraints.facingMode,mirrored:this.props.mirrored,deviceId:void 0}}videoSize(){const{clientVideoWidth:t,clientVideoHeight:e}=this.calculateClientVideoConstraints();return new s.Size(t,e)}saveExtractedData(){this.save=!0}zoom(){var t;return null!==(t=this.props.zoom)&&void 0!==t?t:1}imageCapture(){if(this.capture)return this.capture;const t=this.videoStream.getVideoTrack();return this.capture=new ImageCapture(t),this.capture}createImageData(t=0,e){return o(this,void 0,void 0,(function*(){if(!this.video||!this.videoLoaded)return;const t=this.getCanvasRenderingContext();if(!t)return;if(e){const e=yield this.imageCapture().takePhoto(),n=yield createImageBitmap(e);u.default.debug("Bitmap size: "+n.width*n.height),t.canvas.width=n.width,t.canvas.height=n.height,t.drawImage(n,0,0,n.width,n.height);const o=this.windowSize(),i=n.height/(o.height+o.y),r=o.width*i,a=o.height*i,s=n.width/2-r/2,c=o.y*i,d=new l.Frame(s,c,r,a);u.default.debug("Frame size: "+d.x+"-"+d.y+"-"+d.width+"-"+d.height);return t.getImageData(d.x,d.y,d.width,d.height)}let{videoWidth:n,videoHeight:o}=this.video;t.canvas.width=this.video.videoWidth,t.canvas.height=this.video.videoHeight,t.drawImage(this.video,0,0,this.video.videoWidth,this.video.videoHeight);let{clientVideoWidth:i,clientVideoHeight:r,coef:a}=this.calculateClientVideoConstraints();if(0===a)return;const s=this.finderFrame||new l.Frame(0,0,i,r),c=this.zoom(),d=(n-i/c)/2,f=(o-r/c)/2;let h=s.x/a+d,p=s.y/a+f;const m=this.finderFrame?a:c;let g=s.width/m,v=s.height/m;const y=t.getImageData(h,p,g,v);return t.clearRect(0,0,this.canvas.width,this.canvas.height),y}))}drawVideoOnCanvasAndExtractFrameFromIt(t){return o(this,void 0,void 0,(function*(){this.getCanvasRenderingContext(),this.video}))}windowSize(){var t;const e=this.props.configuration,n=null!==(t=e.container)&&void 0!==t?t:document.getElementById(e.containerId);if(!n)throw new Error("Container DOM element is required to calculate window size and snap image.");return l.Frame.fromDOMRect(n.getBoundingClientRect())}calculateClientVideoConstraints(){let{videoWidth:t,videoHeight:e}=this.video,n=this.video.getBoundingClientRect(),o=t,i=e,r=1;return n.width/n.height<=t/e?(r=n.height/e,r>0&&(o=n.width/r)):(r=n.width/t,r>0&&(i=n.height/r)),{clientVideoWidth:o,clientVideoHeight:i,coef:r}}calculateFrameSize(t,e,n){let o=e,i=n;if(t>0&&0!=e&&0!=n){const r=e/n;e>n?(o=e>t?t:e,i=o/r):(i=n>t?t:n,o=i*r)}return new s.Size(o,i)}getCanvasRenderingContext(){if(!this.video)return null;if(0===this.video.videoWidth)return null;this.canvas&&!this.reloadCanvas||(this.canvas&&this.canvas.remove(),this.canvas=document.createElement("canvas"),this.canvas.className="scanbot-sdk-canvas-element",this.canvas.width=this.videoSize().width,this.canvas.height=this.videoSize().height,this.reloadCanvas=!1);const t=this.canvas.getContext("2d",{willReadFrequently:!0});return t.imageSmoothingEnabled=!1,t}releaseCanvas(){if(this.canvas){this.canvas.width=1,this.canvas.height=1;const t=this.canvas.getContext("2d");t&&t.clearRect(0,0,1,1),this.canvas=null}}componentWillUnmount(){this.releaseCanvas(),this.video=null,this.videoStream=null}style(){var t;const e={display:"block",width:100*this.zoom()+"%",height:100*this.zoom()+"%",left:`${this.zoomMargin()}%`,top:`${this.zoomMargin()}%`,position:"relative",objectFit:"cover",backgroundColor:null===(t=this.props.configuration)||void 0===t?void 0:t.backgroundColor};return this.state.mirrored&&(e.transform="scaleX(-1)"),e}zoomMargin(){const t=this.zoom();return 1===t?0:(1-t)/2*100}render(){const{videoConstraints:t,onReady:e,onError:n}=this.props;return r.default.createElement(a.default,{videoConstraints:t,preferredCamera:this.state.deviceId||this.props.preferredCamera,onReady:e,onStreamChanged:this.onStreamChanged,onError:n,ref:t=>{this.videoStream=t}},r.default.createElement("video",{autoPlay:!0,muted:!0,playsInline:!0,className:"scanbot-camera-view",ref:t=>{this.video=t},style:this.style()}))}setDirection(t){this.props.videoConstraints.facingMode={ideal:t},this.setState({facingModeBack:"environment"===t,mirrored:"user"===t},(()=>o(this,void 0,void 0,(function*(){yield this.videoStream.refreshStream(),this.swapCameraEnabled=!0}))))}swapCameraFacing(t){if(this.swapCameraEnabled){this.swapCameraEnabled=!1;const e=!this.state.facingModeBack,n=e?"environment":"user";this.props.videoConstraints.facingMode=!0===t?{exact:n}:{ideal:n},this.setState({facingModeBack:e,mirrored:!e},(()=>o(this,void 0,void 0,(function*(){yield this.videoStream.refreshStream(),this.swapCameraEnabled=!0}))))}}switchCamera(t,e){return o(this,void 0,void 0,(function*(){this.swapCameraEnabled&&(this.swapCameraEnabled=!1,this.props.videoConstraints.facingMode=void 0,this.setState({facingModeBack:void 0,mirrored:null!=e?e:this.state.mirrored,deviceId:t},(()=>o(this,void 0,void 0,(function*(){yield this.videoStream.refreshStream(),this.swapCameraEnabled=!0})))))}))}updateCameraInfo(t){const e=t.getTracks().filter((t=>"video"===t.kind));if(e){const t=e.map((t=>{const e=t.label,n=t.getSettings().deviceId,o=t.getSettings().facingMode;let i="unknown";"user"===o?i="front":"environment"===o&&(i="back");return{deviceId:n,label:e,facingMode:i,supportsTorchControl:t.getCapabilities().torch||!1}}));this.activeCamera=t[0]}}getActiveCameraInfo(){return this.activeCamera}setTorchState(t){if(this.activeCamera&&this.activeCamera.supportsTorchControl){return this.videoStream.getVideoTrack().applyConstraints({advanced:[{torch:t}]})}return Promise.reject("Torch is not supported for current camera.")}}e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class o{}o.ScanbotPrimary="#c8193c",o.LightGray="#F5F5F5",o.Gray="#808080",o.DarkGray="#333333",o.Orange="#FF5533",o.White="#FFFFFF",o.TransparentGreen="rgba(0, 255, 0, 0.5)",o.TransparentGray="rgba(50, 50, 50, 0.5)",o.TransparentBlack="rgba(0, 0, 0, 0.3)",o.SBNegative="#FF3737",e.default=o},function(t,e,n){var o;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var t=[],e=0;e<arguments.length;e++){var o=arguments[e];if(o){var r=typeof o;if("string"===r||"number"===r)t.push(o);else if(Array.isArray(o)){if(o.length){var a=i.apply(null,o);a&&t.push(a)}}else if("object"===r)if(o.toString===Object.prototype.toString)for(var s in o)n.call(o,s)&&o[s]&&t.push(s);else t.push(o.toString())}}return t.join(" ")}t.exports?(i.default=i,t.exports=i):void 0===(o=function(){return i}.apply(e,[]))||(t.exports=o)}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewUtils=void 0;const o=n(136),i=n(13),r=n(5);class a{static convertLinesToViewportLines(t,e){if(e&&t)return e.map((e=>new o.MagneticLine(new r.Point(e.p1.x*t.width,e.p1.y*t.height),new r.Point(e.p2.x*t.width,e.p2.y*t.height))))}static convertToViewportPointsFromParentSize(t,e){return e?i.Size.isEmpty(t)?void 0:e.map((e=>r.Point.scaleUpTo(e,t))):i.Size.toPolygon(t)}static calculateScale(t){let e,n=0,o=0;return 1>t.width/t.height?(e=t.height/1,n=(1-t.width/e)/2):(e=t.width/1,o=(1-t.height/e)/2),{x:n,y:o,containerScale:e}}static findScale(t,e){let n,o=0,i=0;return e.ratio(!0)>t.ratio(!0)?(n=t.width/e.width,i=(e.height-t.height/n)/2):(n=t.height/e.height,o=(e.width-t.width/n)/2),{x:o,y:i,scale:n}}static preventDefaultCallback(t){t.preventDefault()}static disableScreenMovement(){document.addEventListener("touchmove",a.preventDefaultCallback,{passive:!1}),document.body.scrollTop=document.documentElement.scrollTop=0,document.documentElement.style.overflow="hidden"}static enableScreenMovement(){document.removeEventListener("touchmove",a.preventDefaultCallback),document.documentElement.style.overflow="auto"}static findContainerOrThrow(t){var e;const n=null!==(e=t.container)&&void 0!==e?e:document.getElementById(t.containerId);if(!n)throw Error("Unable to initialize scanner: Cannot find container element either from 'container' property or with the containerId property provided.");return n}}e.ViewUtils=a},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentLineQuad=void 0;const i=o(n(1));class r extends i.default.Component{constructor(){super(...arguments),this.LINE_COUNT=4}render(){return i.default.createElement("svg",{style:{width:"100%",height:"100%",position:"absolute",overflow:"visible",fill:this.props.polygonStyle.fill}},this.fill())}fill(){if(!this.props.points||0===this.props.points.length)return null;const t=[];for(let e=0;e<this.LINE_COUNT;e++){const n=this.props.points[e],o=this.props.points[(e+1)%this.LINE_COUNT];t.push(i.default.createElement("line",{key:e,style:this.props.polygonStyle,className:this.props.polygonClasses,x1:n.x,y1:n.y,x2:o.x,y2:o.y}))}return t}setFrame(){this.forceUpdate()}}e.DocumentLineQuad=r,r.CLASSNAME="scanbot-document-outline"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MathUtils=void 0;const o=n(5);e.MathUtils=class{static isConvex(t){if(t.length<4)return!0;let e=!1,n=t.length;for(let o=0;o<n;o++){const i=t[(o+2)%n].x-t[(o+1)%n].x,r=t[(o+2)%n].y-t[(o+1)%n].y,a=t[o].x-t[(o+1)%n].x,s=i*(t[o].y-t[(o+1)%n].y)-r*a;if(0==o)e=s>0;else if(e!=s>0)return!1}return!0}static distanceBetweenPoints(t,e){return Math.pow(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2),.5)}static intersection(t,e){const n=t[0],i=o.Point.subtract(t[1],n),r=e[0],a=o.Point.subtract(e[1],r);if(0===o.Point.cross(i,a))return;const s=o.Point.cross(o.Point.subtract(r,n),i)/o.Point.cross(i,a);return o.Point.add(r,o.Point.multiply(a,s))}}},function(t,e,n){"use strict";var o,i=function(){return"undefined"==typeof o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},r=function(){var t={};return function(e){if("undefined"==typeof t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),a=[];function s(t){for(var e=-1,n=0;n<a.length;n++)if(a[n].identifier===t){e=n;break}return e}function l(t,e){for(var n={},o=[],i=0;i<t.length;i++){var r=t[i],l=e.base?r[0]+e.base:r[0],u=n[l]||0,c="".concat(l," ").concat(u);n[l]=u+1;var d=s(c),f={css:r[1],media:r[2],sourceMap:r[3]};-1!==d?(a[d].references++,a[d].updater(f)):a.push({identifier:c,updater:g(f,e),references:1}),o.push(c)}return o}function u(t){var e=document.createElement("style"),o=t.attributes||{};if("undefined"==typeof o.nonce){var i=n.nc;i&&(o.nonce=i)}if(Object.keys(o).forEach((function(t){e.setAttribute(t,o[t])})),"function"==typeof t.insert)t.insert(e);else{var a=r(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var c,d=(c=[],function(t,e){return c[t]=e,c.filter(Boolean).join("\n")});function f(t,e,n,o){var i=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(t.styleSheet)t.styleSheet.cssText=d(e,i);else{var r=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(r,a[e]):t.appendChild(r)}}function h(t,e,n){var o=n.css,i=n.media,r=n.sourceMap;if(i?t.setAttribute("media",i):t.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleSheet)t.styleSheet.cssText=o;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(o))}}var p=null,m=0;function g(t,e){var n,o,i;if(e.singleton){var r=m++;n=p||(p=u(e)),o=f.bind(null,n,r,!1),i=f.bind(null,n,r,!0)}else n=u(e),o=h.bind(null,n,e),i=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=i());var n=l(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var o=0;o<n.length;o++){var i=s(n[o]);a[i].references--}for(var r=l(t,e),u=0;u<n.length;u++){var c=s(n[u]);0===a[c].references&&(a[c].updater(),a.splice(c,1))}n=r}}}},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,o){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(o)for(var r=0;r<this.length;r++){var a=this[r][0];null!=a&&(i[a]=!0)}for(var s=0;s<t.length;s++){var l=[].concat(t[s]);o&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeResult=void 0;const o=n(12),i=n(57);class r{constructor(t,e){this.barcodes=t,this.imageData=e}static fromWorker(t,e){const n=[];t&&t.forEach((t=>{n.push(i.Barcode.fromWorker(t))}));const a=o.ImageUtils.convertImageDataWrapperToImageData(e);return new r(n,a)}isEmpty(){return 0===this.barcodes.length}}e.BarcodeResult=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SingleScanningMode=void 0;const o=n(10),i=n(10),r=n(3),a=n(10),s=n(18),l=n(10),u=n(18),c=n(3),d=n(6),f=n(3),h=n(3),p=n(3);class m extends d.PartiallyConstructible{constructor(t={}){super(),this._type="SingleScanningMode",this.confirmationSheetEnabled=!1,this.barcodeImageVisible=!0,this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.barcodeTitle=new p.StyledText({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.barcodeSubtitle=new p.StyledText({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.submitButton=new c.ButtonConfiguration({visible:!0,text:"?sheetSubmitButton",background:new r.BackgroundStyle({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new f.ForegroundStyle({iconVisible:!0,color:"?sbColorOnPrimary"})}),this.cancelButton=new c.ButtonConfiguration({visible:!0,text:"?singleModeConfirmationCancelButton",background:new r.BackgroundStyle({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new f.ForegroundStyle({iconVisible:!1,color:"?sbColorPrimary"})}),this.barcodeInfoMapping=new s.BarcodeInfoMapping({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",loadingMessage:new p.StyledText({text:"?barcodeInfoMappingLoadingMessage",color:"?sbColorPrimary"}),errorState:new u.BarcodeItemErrorState({title:new p.StyledText({text:"?barcodeInfoMappingErrorStateTitle",color:"?sbColorOnSurface"}),subtitle:new p.StyledText({text:"?barcodeInfoMappingErrorStateSubtitle",color:"?sbColorOnSurfaceVariant"}),retryButton:new c.ButtonConfiguration({visible:!0,text:"?barcodeInfoMappingErrorStateRetryButton",background:new r.BackgroundStyle({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new f.ForegroundStyle({iconVisible:!0,color:"?sbColorOnPrimary"})}),cancelButton:new c.ButtonConfiguration({text:"?barcodeInfoMappingErrorStateCancelButton",background:new r.BackgroundStyle({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new f.ForegroundStyle({iconVisible:!1,color:"?sbColorPrimary"})})})}),this.arOverlay=new o.ArOverlayGeneralConfiguration({visible:!1,counterBadge:new a.BadgeStyle({visible:!0,background:new r.BackgroundStyle({strokeColor:"#000000FF",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),automaticSelectionEnabled:!1,barcodeItemInfoPosition:"BELOW",polygon:new i.ArOverlayPolygonConfiguration({visible:!0,deselected:new h.PolygonStyle({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),selected:new h.PolygonStyle({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5})}),barcodeItemConfiguration:new l.BarcodeItemConfiguration({imageVisible:!0,titleSelected:new p.StyledText({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new p.StyledText({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),titleDeselected:new p.StyledText({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleDeselected:new p.StyledText({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),backgroundSelected:new h.PolygonStyle({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new h.PolygonStyle({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:1,cornerRadius:5})})}),void 0!==t.confirmationSheetEnabled&&(this.confirmationSheetEnabled=t.confirmationSheetEnabled),void 0!==t.barcodeImageVisible&&(this.barcodeImageVisible=t.barcodeImageVisible),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0!==t.modalOverlayColor&&(this.modalOverlayColor=t.modalOverlayColor),void 0!==t.barcodeTitle&&(this.barcodeTitle=new p.StyledText(t.barcodeTitle)),void 0!==t.barcodeSubtitle&&(this.barcodeSubtitle=new p.StyledText(t.barcodeSubtitle)),void 0!==t.submitButton&&(this.submitButton=new c.ButtonConfiguration(t.submitButton)),void 0!==t.cancelButton&&(this.cancelButton=new c.ButtonConfiguration(t.cancelButton)),void 0!==t.barcodeInfoMapping&&(this.barcodeInfoMapping=new s.BarcodeInfoMapping(t.barcodeInfoMapping)),void 0!==t.arOverlay&&(this.arOverlay=new o.ArOverlayGeneralConfiguration(t.arOverlay))}}e.SingleScanningMode=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TopBarConfiguration=void 0;const o=n(3),i=n(3),r=n(6),a=n(3),s=n(3);class l extends r.PartiallyConstructible{constructor(t={}){super(),this.title=new s.StyledText({visible:!1,text:"Scan Item",color:"?sbColorOnPrimary"}),this.mode="SOLID",this.statusBarMode="LIGHT",this.backgroundColor="?sbColorPrimary",this.cancelButton=new i.ButtonConfiguration({text:"Cancel",background:new o.BackgroundStyle({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new a.ForegroundStyle({color:"?sbColorOnPrimary"})}),void 0!==t.title&&(this.title=new s.StyledText(t.title)),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.statusBarMode&&(this.statusBarMode=t.statusBarMode),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.cancelButton&&(this.cancelButton=new i.ButtonConfiguration(t.cancelButton))}}e.TopBarConfiguration=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FinderStrokedStyle=e.FinderCorneredStyle=e.FinderStyle=e.ViewFinderConfiguration=void 0;const o=n(3),i=n(6);class r extends i.PartiallyConstructible{constructor(t={}){super(),this.visible=!0,this.style=new s({strokeColor:"?sbColorSurface",strokeWidth:2,cornerRadius:10}),this.overlayColor="?sbColorSurfaceLow",this.aspectRatio=new o.AspectRatio({width:1,height:1}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.style&&(this.style=a.From(t.style)),void 0!==t.overlayColor&&(this.overlayColor=t.overlayColor),void 0!==t.aspectRatio&&(this.aspectRatio=new o.AspectRatio(t.aspectRatio))}}var a;e.ViewFinderConfiguration=r,function(t){t.From=function(t){const e=t._type;switch(e){case"FinderCorneredStyle":return new s(t);case"FinderStrokedStyle":return new l(t);default:throw`Unknown child class name: ${e}`}}}(a||(e.FinderStyle=a={}));class s extends i.PartiallyConstructible{constructor(t={}){super(),this._type="FinderCorneredStyle",this.strokeColor="#FFFFFFFF",this.strokeWidth=3,this.cornerRadius=10,void 0!==t.strokeColor&&(this.strokeColor=t.strokeColor),void 0!==t.strokeWidth&&(this.strokeWidth=t.strokeWidth),void 0!==t.cornerRadius&&(this.cornerRadius=t.cornerRadius)}}e.FinderCorneredStyle=s;class l extends i.PartiallyConstructible{constructor(t={}){super(),this._type="FinderStrokedStyle",this.strokeColor="#FFFFFFFF",this.strokeWidth=3,this.cornerRadius=10,void 0!==t.strokeColor&&(this.strokeColor=t.strokeColor),void 0!==t.strokeWidth&&(this.strokeWidth=t.strokeWidth),void 0!==t.cornerRadius&&(this.cornerRadius=t.cornerRadius)}}e.FinderStrokedStyle=l},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.StyledButton=void 0;const i=n(2),r=n(9),a=n(70),s=o(n(1)),l=n(4);e.StyledButton=function(t){var e;return t.visible?s.default.createElement(i.Button,{variant:"text",onClick:t.onClick,sx:Object.assign(Object.assign({flex:1},(0,r.styledTextStyle)(t.foreground)),{textTransform:"none",fontSize:18,"&:hover, &:focus, &:active, &":{outline:"none",backgroundColor:"transparent"},px:0}),disableRipple:!0},s.default.createElement(a.StyledBox,{styleConfig:Object.assign(Object.assign({},t.background),{cornerRadius:4}),sx:{borderStyle:"solid",px:"8px"}},null!==(e=t.icon)&&void 0!==e?e:null,l.SBTheme.getLocalizedBarcodeText(t.text))):null}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeInfo=void 0;const i=n(2),r=o(n(1)),a=o(n(2)),s=n(9),l=n(4),u=o(n(2)),c=o(n(2));function d(t){return{textOverflow:"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`,overflow:"hidden",whiteSpace:t>1?"normal":"nowrap",display:t>1?"-webkit-box":"block"}}e.BarcodeInfo=function(t){var e,n;const o=(null===(e=t.barcodeMappedData)||void 0===e?void 0:e.state)||"LOADING",f=(null===(n=t.barcodeMappedData)||void 0===n?void 0:n.value)||{title:"",subtitle:"",barcodeImage:""},h=!t||"LOADED"!==o,p=t.imageSize,m=t.barcodeTitle.visible||t.barcodeSubtitle.visible||t.counterForm,g=t.counterForm&&{"&:hover, &:focus, &:active, &":{borderColor:l.SBTheme.getColorValue(t.counterForm.manualCountOutlineColor),backgroundColor:"transparent"}};return r.default.createElement(i.Box,{sx:{display:"flex"},"data-sb-barcode-info":"1"},t.barcodeImageVisible&&r.default.createElement(i.Box,{sx:{pr:m?"16px":0,display:"flex",alignItems:"center",justifyContent:"center"}},h?r.default.createElement(i.Skeleton,{variant:"rounded",width:p,height:p,style:{borderRadius:8}}):r.default.createElement("img",{src:f.barcodeImage,alt:f.title,style:{width:p,height:p,borderRadius:8}})),m&&r.default.createElement(i.Box,{sx:{flex:1,display:"flex",flexDirection:"column",verticalAlign:"middle",justifyContent:"center",m:0,p:0,minWidth:0}},r.default.createElement(i.Box,{display:h?"block":"flex",sx:{alignItems:"center"}},r.default.createElement(i.Typography,{fontSize:16,fontWeight:"bold",sx:Object.assign(Object.assign({},d(t.maxNumberOfTitleLines)),(0,s.styledTextStyle)(t.barcodeTitle))},h?r.default.createElement(i.Skeleton,{variant:"text"}):f.title),t.displayRightArrow&&!h&&r.default.createElement(a.default,{sx:{fontSize:16,fontWeight:"bold",color:l.SBTheme.getColorValue(t.barcodeTitle.color)}})),r.default.createElement(i.Typography,{fontSize:14,fontWeight:400,sx:Object.assign(Object.assign({},d(t.maxNumberOfSubtitleLines)),(0,s.styledTextStyle)(t.barcodeSubtitle))},h?r.default.createElement(i.Skeleton,{variant:"text"}):f.subtitle),t.counterForm&&r.default.createElement(i.ButtonGroup,{variant:"outlined"},r.default.createElement(i.Button,{sx:g,onClick:()=>t.counterForm.setCounter(t.counterForm.counter-1),disableRipple:!0},r.default.createElement(u.default,{sx:{color:l.SBTheme.getColorValue(t.counterForm.manualCountChangeColor)}})),r.default.createElement(i.Button,{sx:Object.assign(Object.assign({},g),{color:l.SBTheme.getColorValue(t.counterForm.manualCountChangeColor),fontWeight:"bold",fontSize:16}),onClick:t.counterForm.onNumberClick,disableRipple:!0},t.counterForm.counter),r.default.createElement(i.Button,{sx:g,onClick:()=>t.counterForm.setCounter(t.counterForm.counter+1),disableRipple:!0},r.default.createElement(c.default,{sx:{color:l.SBTheme.getColorValue(t.counterForm.manualCountChangeColor)}})))))}},function(t,e,n){"use strict";var o=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.StyledDialog=void 0;const r=n(2),a=n(4),s=i(n(1));e.StyledDialog=function(t){var e,{modalOverlayColor:n}=t,i=o(t,["modalOverlayColor"]);const l={backdrop:{style:{backgroundColor:a.SBTheme.getColorValue(n)}}},u=Object.assign(Object.assign({},i.PaperProps),{sx:Object.assign(Object.assign({},null===(e=i.PaperProps)||void 0===e?void 0:e.sx),{maxWidth:400})});return s.default.createElement(r.Dialog,Object.assign({},i,{componentsProps:l,PaperProps:u}))}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ACTION_BUTTON_PADDING=e.ACTION_BUTTON_HEIGHT=e.Props=void 0;const i=o(n(1)),r=n(2),a=n(4),s=n(3);class l extends s.RoundButton{}e.Props=l,e.ACTION_BUTTON_HEIGHT=48,e.ACTION_BUTTON_PADDING=16,e.default=function(t){if(!1===t.visible)return null;const n=e.ACTION_BUTTON_HEIGHT,o={backgroundColor:t.active?a.SBTheme.getColorValue(t.activeBackgroundColor):a.SBTheme.getColorValue(t.backgroundColor),color:t.active?a.SBTheme.getColorValue(t.activeForegroundColor):a.SBTheme.getColorValue(t.foregroundColor)};return i.default.createElement(r.IconButton,{sx:Object.assign(Object.assign({},o),{"&:hover, &:focus":Object.assign({outline:"none"},o),width:n,height:n}),onClick:t.onClick},t.text&&i.default.createElement("span",{style:{fontSize:15}},a.SBTheme.getLocalizedBarcodeText(t.text)),t.icon&&i.default.createElement(t.icon,{style:{padding:7}}))}},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const r=i(n(117)),a=i(n(118)),s=i(n(119));class l{constructor(){this.audioFile=new Audio}initialize(t){return o(this,void 0,void 0,(function*(){t.successBeepEnabled&&(this.audioFile.src=s.default,yield this.play(),"MODERN_BEEP"===t.soundType&&(this.audioFile.src=r.default),"CLASSIC_BEEP"===t.soundType&&(this.audioFile.src=a.default))}))}beep(t){t.successBeepEnabled&&this.play()}play(){return o(this,void 0,void 0,(function*(){try{yield this.audioFile.play()}catch(t){}}))}}l.INSTANCE=new l,e.default=l},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=e.ViewFinderPadding=void 0;const i=o(n(1)),r=n(21),a=n(4),s=n(9);e.ViewFinderPadding=class{};e.Props=class{};class l extends i.default.Component{get style(){return this.props.configuration.style}get holeRect(){return this.holePosition}constructor(t){super(t),this.holePosition=r.Frame.empty(),this.resizeObserver=new ResizeObserver((()=>{this.updateWindowSize()})),this.componentDidUpdate=t=>{var e,n,o,i;(null===(e=this.props.padding)||void 0===e?void 0:e.minTopPadding)===(null===(n=t.padding)||void 0===n?void 0:n.minTopPadding)&&(null===(o=this.props.padding)||void 0===o?void 0:o.minBottomPadding)===(null===(i=t.padding)||void 0===i?void 0:i.minBottomPadding)&&this.props.configuration===t.configuration&&this.props.guidanceConfiguration===t.guidanceConfiguration||this.setState({shouldUpdateCanvas:!0}),this.updateCanvas()},this.updateWindowSize=()=>{this.setState({shouldUpdateCanvas:!0})},this.getVideoSize=()=>{var t;return null!==(t=this.holeCanvas.getBoundingClientRect())&&void 0!==t?t:new DOMRect},this.scaleForRetinaDisplay=t=>{if(window.devicePixelRatio>1){var e=t.width,n=t.height;t.width=e*window.devicePixelRatio,t.height=n*window.devicePixelRatio,t.style.width=e+"px",t.style.height=n+"px",t.getContext("2d").scale(window.devicePixelRatio,window.devicePixelRatio)}},this.updateCanvas=()=>{var t,e,n,o,i;if(!this.state.shouldUpdateCanvas)return;this.setState({shouldUpdateCanvas:!1});const r=this.getVideoSize().width,a=this.getVideoSize().height;this.holeCanvas.width=r,this.holeCanvas.height=a,this.crosshairCanvas.width=r,this.crosshairCanvas.height=a,this.scaleForRetinaDisplay(this.crosshairCanvas);const s=r-2*this.props.configuration.style.strokeWidth,l=Math.max(20,(r-s)/2),u=Math.min(s,r-2*l),c=this.props.configuration.aspectRatio.width/this.props.configuration.aspectRatio.height;this.holePosition.width=u,this.holePosition.height=this.holePosition.width/c,this.holePosition.x=r/2-u/2;const d=(null===(t=this.guidanceText)||void 0===t?void 0:t.clientHeight)+this.guidanceTextTopPadding||0,f=Math.max(10,null!==(n=null===(e=this.props.padding)||void 0===e?void 0:e.minTopPadding)&&void 0!==n?n:0),h=a-f-Math.max(10,null!==(i=null===(o=this.props.padding)||void 0===o?void 0:o.minBottomPadding)&&void 0!==i?i:0)-d;this.holePosition.height>h?(this.holePosition.height=h,this.holePosition.width=this.holePosition.height*c,this.holePosition.x=r/2-this.holePosition.width/2,this.holePosition.y=f):this.holePosition.y=f+(h-this.holePosition.height)/1.9;const p=this.holeCanvas.getContext("2d");p.save(),this.drawBackground(p),p.globalCompositeOperation="destination-out",this.drawHole();const m=this.crosshairCanvas.getContext("2d");m.globalCompositeOperation="source-over","FinderStrokedStyle"===this.props.configuration.style._type?this.drawHoleOutline():"FinderCorneredStyle"===this.props.configuration.style._type&&this.drawHoleCorners(),p.restore(),m.restore()},this.drawBackground=t=>{const{width:e,height:n}=this.getVideoSize();t.clearRect(0,0,e,n),t.beginPath(),t.rect(0,0,e,n),t.fillStyle=a.SBTheme.getColorValue(this.props.configuration.overlayColor),t.fill()},this.drawHole=()=>{const t=this.holeCanvas.getContext("2d"),e=this.style.cornerRadius,n=this.holePosition.x,o=this.holePosition.y,i=this.holePosition.width,r=this.holePosition.height;t.beginPath(),t.fillStyle="black",t.moveTo(n+e,o),t.arcTo(n+i,o,n+i,o+r,e),t.arcTo(n+i,o+r,n,o+r,e),t.arcTo(n,o+r,n,o,e),t.arcTo(n,o,n+i,o,e),t.closePath(),t.fill()},this.drawCrosshair=()=>{const t=this.crosshairCanvas.getContext("2d"),e=this.holePosition.x+this.holePosition.width/2,n=this.holePosition.y+this.holePosition.height/2;t.beginPath(),t.moveTo(e-10,n),t.lineTo(e+10,n),t.moveTo(e,n-10),t.lineTo(e,n+10),t.strokeStyle="white",t.fillStyle="white",t.lineWidth=1,t.stroke()},this.drawHoleCorners=()=>{const t=this.crosshairCanvas.getContext("2d"),e=this.holePosition.x,n=this.holePosition.y,o=this.holePosition.width,i=this.holePosition.height,r=15,s=this.style.strokeWidth,l=this.style.cornerRadius;t.beginPath(),t.moveTo(e,n+r),t.arcTo(e,n,e+o,n,l),t.lineTo(e+r,n),t.moveTo(e+o-r,n),t.arcTo(e+o,n,e+o,n+i,l),t.lineTo(e+o,n+r),t.moveTo(e+o,n+i-r),t.arcTo(e+o,n+i,e,n+i,l),t.lineTo(e+o-r,n+i),t.moveTo(e,n+i-r),t.arcTo(e,n+i,e+o,n+i,l),t.lineTo(e+r,n+i),t.strokeStyle=a.SBTheme.getColorValue(this.style.strokeColor),t.lineWidth=s,t.stroke()},this.drawHoleOutline=()=>{const t=this.crosshairCanvas.getContext("2d"),e=this.holePosition.x,n=this.holePosition.y,o=this.holePosition.width,i=this.holePosition.height,r=this.style.cornerRadius,s=this.style.strokeWidth;t.beginPath(),t.moveTo(e+r,n),t.arcTo(e+o,n,e+o,n+i,r),t.moveTo(e+o,n+r),t.arcTo(e+o,n+i,e,n+i,r),t.moveTo(e+o-r,n+i),t.arcTo(e,n+i,e,n,r),t.moveTo(e,n+i-r),t.arcTo(e,n,e+o,n,r),t.strokeStyle=a.SBTheme.getColorValue(this.style.strokeColor),t.lineWidth=s,t.stroke()},this.guidanceTextTopPadding=20,this.render=()=>i.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"},onClick:t=>{const e=this.holePosition;t.clientX>this.holePosition.x&&t.clientX<e.x+e.width&&t.clientY>e.y&&t.clientY<e.y+e.height&&console.log("Clicked inside hole, possibly click events need to be diverted")}},i.default.createElement("canvas",{ref:t=>{this.holeCanvas=t},style:{position:"absolute",width:"100%",height:"100%"}}),i.default.createElement("canvas",{ref:t=>{this.crosshairCanvas=t},style:{position:"absolute",width:"100%",height:"100%"}}),i.default.createElement(s.StyledText,{innerRef:t=>{this.guidanceText=t},style:{position:"absolute",display:"block",top:this.holePosition.y+this.holePosition.height+this.guidanceTextTopPadding,left:0,width:"100%",textAlign:"center"},config:this.guidance.title})),this.state={shouldUpdateCanvas:!0}}componentDidMount(){this.updateWindowSize(),this.resizeObserver.observe(this.holeCanvas)}componentWillUnmount(){this.resizeObserver.disconnect()}bottomOfGuidanceText(){var t,e;return this.holeRect.bottom()+(null!==(e=null===(t=this.guidanceText)||void 0===t?void 0:t.clientHeight)&&void 0!==e?e:0)+this.guidanceTextTopPadding}get guidance(){return this.props.guidanceConfiguration}}e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Debugger=void 0;e.Debugger=class{static warn(t){console.warn("[ScanbotSDK]",t)}}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.useIsLayoutEqualOrAbove=e.useIsLayout=e.createSBTheme=void 0;const i=n(2),r=o(n(29)),a=n(2),s=0,l=800,u=1200;e.createSBTheme=()=>(0,i.createTheme)({palette:{primary:{main:r.default.ScanbotPrimary},secondary:{main:r.default.DarkGray}}}),e.useIsLayout=function(t){switch(t){case"mobile":return(0,a.useMediaQuery)("(min-width:"+s+"px) and (max-width:"+(l-1)+"px)");case"tablet":return(0,a.useMediaQuery)("(min-width:"+l+"px) and (max-width:"+(u-1)+"px)");case"desktop":return(0,a.useMediaQuery)("(min-width:"+u+"px)")}},e.useIsLayoutEqualOrAbove=function(t){switch(t){case"mobile":return(0,a.useMediaQuery)("(min-width:"+s+"px)");case"tablet":return(0,a.useMediaQuery)("(min-width:"+l+"px)");case"desktop":return(0,a.useMediaQuery)("(min-width:"+u+"px)")}}},function(t,e,n){"use strict";var o=n(35),i=n.n(o)()((function(t){return t[1]}));i.push([t.i,"\n.scanbot-shutter-fade-in {\n opacity: 1;\n}\n\n.scanbot-shutter-fade-out {\n opacity: 0;\n}\n\n.scanbot-shutter-rotate {\n animation: scanbot-shutter-rotating linear infinite;\n}\n\n.scanbot-shutter-pulse-fast {\n animation: scanbot-shutter-pulsing 1s ease-in-out infinite;\n}\n\n.scanbot-shutter-button {\n position: relative;\n width: 64px;\n height: 64px;\n left: 50%;\n bottom: 12px;\n transform: translate(-50%, -100%);\n}\n\n.scanbot-shutter-button-part {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n transition: opacity 0.5s ease-in-out;\n}\n\n@keyframes scanbot-shutter-rotating {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes scanbot-shutter-pulsing {\n 0% {\n opacity: 0.25;\n }\n 50% {\n opacity: 0.8;\n }\n 100% {\n opacity: 0.25;\n }\n}\n",""]),e.a=i},function(t,e,n){"use strict";var o=n(35),i=n.n(o)()((function(t){return t[1]}));i.push([t.i,".scanbot-document-hint-text {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n text-align: center;\n background-color: rgba(0, 0, 0, 0.4);\n color: white;\n border-radius: 0.25em;\n padding: 0.05em 0.3em 0.05em 0.3em;\n font-family: sans-serif;\n font-size: 0.9em;\n font-weight: 300;\n}\n",""]),e.a=i},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Constants=void 0;o(n(91));var i="6.0.0-dev.1";class r{}e.Constants=r,r.VERSION=i,r.CDN_PATH=`https://cdn.jsdelivr.net/npm/scanbot-web-sdk@${i}/bundle/`,r.DEFAULT_WASM_FOLDER="bin/complete/",r.BUILD_WITH_UI=!1},function(t,e,n){"use strict";(function(t){function n(){if("undefined"!=typeof t&&"undefined"!=typeof t.versions&&"undefined"!=typeof t.versions.node)return!1;if(/(iPad|iPhone|iPod)/g.test(navigator.userAgent))return!1;try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(t){return!1}}Object.defineProperty(e,"__esModule",{value:!0}),e.gatherTransferables=function(t,e){const n=[];return function t(o){if(!o)return;if(o.constructor===ImageData){const t={data:o.data.slice(),width:o.width,height:o.height};return n.push(t.data.buffer),t}if(o.constructor===ArrayBuffer){const t=e?o.slice(0):o;if(n.push(t),e)return o}else if(ArrayBuffer.isView(o)){let t;if(e){t=new(0,o.constructor)(o.buffer.slice(0))}else t=o;if(n.push(t.buffer),e)return o}else if(Array.isArray(o))for(let e=0;e<o.length;++e){const n=t(o[e]);n&&(o[e]=n)}else if(o.constructor===Object)for(const e in o)if(o.hasOwnProperty(e)){const n=t(o[e]);n&&(o[e]=n)}}(t),n},e.isRemote=function(t){return t.startsWith("http:")||t.startsWith("https:")},e.areThreadsAvailable=n,e.getBuildType=function(t){const{allowSimd:e=!0,allowThreads:o=!0}=t||{};let i="";if(e&&function(){try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]))}catch(t){return!1}}()){i+="-simd";o&&n()&&(i+="-threads")}return i}}).call(this,n(52))},function(t,e){var n,o,i=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===r||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:r}catch(t){n=r}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(t){o=a}}();var l,u=[],c=!1,d=-1;function f(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&h())}function h(){if(!c){var t=s(f);c=!0;for(var e=u.length;e;){for(l=u,u=[];++d<e;)l&&l[d].run();d=-1,e=u.length}l=null,c=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new p(t,e)),1!==u.length||c||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentScannerConfiguration=e.CaptureButtonStyleConfiguration=e.OutlineLabelStyleConfiguration=e.CaptureAnimationStyleConfiguration=e.OutlinePolygonStyleConfiguration=e.OutlineStyleConfiguration=e.StyleConfiguration=e.TextConfiguration=void 0;const o=n(15),i={OK:"Capturing your document... Please do not move the camera.",OK_SmallSize:"The document is too small. Try moving closer.",OK_BadAngles:"This is a bad camera angle. Hold the device straight over the document.",OK_BadAspectRatio:"Rotate the device sideways, so that the document fits better into the screen.",OK_OffCenter:"Try holding the device at the center of the document.",Error_NothingDetected:"Please hold the device over a document to start scanning.",Error_Brightness:"It is too dark. Try turning on a light.",Error_Noise:"Please move the document to a clear surface."};class r{constructor(t){this.hint=t}}e.TextConfiguration=r;class a{constructor(){this.outline=new s,this.captureButton=new d}}e.StyleConfiguration=a;class s{constructor(){this.polygon=new l,this.path=new u,this.label=new c}}e.OutlineStyleConfiguration=s;class l{constructor(){this.strokeCapturing="green",this.strokeSearching="yellow",this.fillCapturing="transparent",this.fillSearching="transparent"}}e.OutlinePolygonStyleConfiguration=l;class u{constructor(){this.stroke="green",this.strokeWidth=4}}e.CaptureAnimationStyleConfiguration=u;class c{}e.OutlineLabelStyleConfiguration=c;class d{constructor(){this.color="#FFF"}}e.CaptureButtonStyleConfiguration=d;class f extends o.ScannerConfiguration{constructor(){super(o.ScannerConfiguration.DEFAULT_VIDEO_RESOLUTION_4K),this.acceptedAngleScore=f.DEFAULT_ACCEPTED_ANGLE_SCORE,this.acceptedSizeScore=f.DEFAULT_ACCEPTED_SIZE_SCORE,this.autoCaptureEnabled=!0,this.autoCaptureSensitivity=.66,this.autoCaptureDelay=1e3,this.ignoreBadAspectRatio=!0,this.useImageCaptureAPI=!1,this.text=new r(i),this.style=new a,this.onDocumentDetected=function(t){}}static fromJson(t){const e=new f;if(this.mapValues(t,e,["text","style","videoConstraints"]),t.text&&t.text.hint&&this.mapValues(t.text.hint,e.text.hint),t.style){this.mapValues(t.style,e.style,["outline","captureButton"]);const n=t.style.outline;if(n){this.mapValues(n,e.style.outline,["polygon","path","label"]);const t=n.polygon;t&&this.mapValues(t,e.style.outline.polygon);const o=n.path;o&&this.mapValues(o,e.style.outline.path);const i=n.label;i&&this.mapValues(i,e.style.outline.label)}const o=t.style.captureButton;o&&this.mapValues(o,e.style.captureButton)}return this.mapVideoConstraints(t,e),e}}e.DocumentScannerConfiguration=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseConfiguration=void 0;class o{constructor(){this.container=void 0,this.containerId=void 0}static mapValues(t,e,n){Object.keys(t).forEach((o=>{(null==n?void 0:n.includes(o))||(e[o]=t[o])}))}static mapValuesDeep(t,e){const n=t=>t&&"object"==typeof t&&!Array.isArray(t);Object.keys(t).forEach((i=>{i in e&&n(t[i])&&n(e[i])?o.mapValuesDeep(t[i],e[i]):e[i]=t[i]}))}static _fromJson(t,e){return this.mapValuesDeep(e,t),t}}e.BaseConfiguration=o},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.ImageProcessor=void 0;const i=["ROTATION_NONE","ROTATION_90_CLOCKWISE","ROTATION_180","ROTATION_90_COUNTERCLOCKWISE"];class r{constructor(t,e){this._sdk=t,this._token=e}copy(){return o(this,void 0,void 0,(function*(){const t=yield this._sdk.bridge.postByCopyingArgs("imageProcessorCopy",[this._token]);return new r(this._sdk,t)}))}applyFilter(t){return o(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("imageProcessorApplyFilter",[this._token,t.toWireType()])}))}crop(t){return o(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("imageProcessorCrop",[this._token,t])}))}resize(t){return o(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("imageProcessorResize",[this._token,t])}))}rotate(t){return o(this,void 0,void 0,(function*(){if(!i.includes(t))return Promise.reject("Invalid rotation value! It should be one of "+i.join(", "));yield this._sdk.bridge.postByTransferringArgs("imageProcessorRotate",[this._token,t])}))}processedImage(){return o(this,void 0,void 0,(function*(){return yield this._sdk.bridge.postByCopyingArgs("imageProcessorEncodedProcessedImage",[this._token,".jpg"])}))}release(){return o(this,void 0,void 0,(function*(){yield this._sdk.release(this._token,"ImageProcessor"),this._token=null,this._sdk=null}))}get __token(){return this._token}}e.ImageProcessor=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const o=n(12),i=n(22);e.default=class{saveImageAsJpeg(t,e){if(!t||0===t.length)return void console.log("Data cannot be null or empty");e||(e=i.Utils.uuid()+".jpeg");let n=new Blob([t],{type:"image/jpeg"});o.ImageUtils.saveBlob(n,e)}isCameraSupported(){return!!navigator.mediaDevices}flash(){let t=this.findFlashElement();t.style.display="block",this.animateFlashOpacity("0.5",(()=>{this.animateFlashOpacity("0.0",(()=>{t.style.opacity="1.0",t.style.display="none"}))}))}findFlashElement(){return this.getOrCreateElement("flash",{position:"fixed",top:"0",left:"0",width:"100%",height:"100%","background-color":"#fff",display:"none","z-index":"5000"})}animateFlashOpacity(t,e){const n=this.getElementByClassName("flash");setTimeout((()=>{n.style.opacity=t,e()}),150)}getOrCreateElement(t,e){let n=this.getElementByClassName(t);return n||(this.createElement(t,e),n=this.getElementByClassName(t)),n}createElement(t,e){let n=document.createElement("div");n.className=t,n.style.cssText=this.cssToString(e),document.body.append(n)}cssToString(t){let e="";return Object.keys(t).forEach((n=>{e+=n+":"+t[n]+";"})),e}getElementByClassName(t){const e=document.getElementsByClassName(t);if(0!==e.length)return e[0]}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Barcode=void 0;const o=n(5);class i{constructor(t,e,n,o,i,r){this.format=t,this.text=e,this.parsedText=n,this.rawBytes=o,this.points=i,this.barcodeImage=r}id(){return this.text+this.format}equals(t){return this.format===t.format&&this.text===t.text}static fromWorker(t){let e;if(""!==t.parsedText)try{e=JSON.parse(t.parsedText)}catch(t){}const n=t.quad.map((t=>new o.Point(t[0],t[1])));return new i(t.format,t.text,e,t.rawBytes,n,t.barcodeImage)}}e.Barcode=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.clampHandlePosition=e.clamp=void 0;const o=n(5);function i(t,e,n){return Math.min(Math.max(t,e),n)}e.clamp=i,e.clampHandlePosition=function(t,e,n){return new o.Point(i(t.x,-e/2,n.width-e/2),i(t.y,-e/2,n.height-e/2))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CameraConfiguration=void 0;const o=n(6);class i extends o.PartiallyConstructible{constructor(t={}){super(),this.cameraModule="BACK",this.zoomSteps=[1,2,5],this.defaultZoomFactor=1,this.flashEnabled=!1,this.minFocusDistanceLock=!1,this.pinchToZoomEnabled=!0,this.orientationLockMode="NONE",this.cameraPreviewMode="FILL_IN",void 0!==t.cameraModule&&(this.cameraModule=t.cameraModule),void 0!==t.zoomSteps&&(this.zoomSteps=t.zoomSteps.map((t=>t))),void 0!==t.defaultZoomFactor&&(this.defaultZoomFactor=t.defaultZoomFactor),void 0!==t.flashEnabled&&(this.flashEnabled=t.flashEnabled),void 0!==t.minFocusDistanceLock&&(this.minFocusDistanceLock=t.minFocusDistanceLock),void 0!==t.pinchToZoomEnabled&&(this.pinchToZoomEnabled=t.pinchToZoomEnabled),void 0!==t.orientationLockMode&&(this.orientationLockMode=t.orientationLockMode),void 0!==t.cameraPreviewMode&&(this.cameraPreviewMode=t.cameraPreviewMode)}}e.CameraConfiguration=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionBarConfiguration=void 0;const o=n(6),i=n(3);class r extends o.PartiallyConstructible{constructor(t={}){super(),this.flashButton=new i.RoundButton({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorWarning",activeForegroundColor:"#1C1B1F"}),this.zoomButton=new i.RoundButton({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),this.flipCameraButton=new i.RoundButton({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),void 0!==t.flashButton&&(this.flashButton=new i.RoundButton(t.flashButton)),void 0!==t.zoomButton&&(this.zoomButton=new i.RoundButton(t.zoomButton)),void 0!==t.flipCameraButton&&(this.flipCameraButton=new i.RoundButton(t.flipCameraButton))}}e.ActionBarConfiguration=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeUseCase=void 0;const o=n(62),i=n(37);var r;!function(t){t.From=function(t){const e=t._type;switch(e){case"SingleScanningMode":return new i.SingleScanningMode(t);case"MultipleScanningMode":return new o.MultipleScanningMode(t);default:throw`Unknown child class name: ${e}`}}}(r||(e.BarcodeUseCase=r={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultipleScanningMode=e.SheetContent=e.ManualCountEditDialog=e.SwipeToDelete=e.Sheet=void 0;const o=n(10),i=n(10),r=n(3),a=n(10),s=n(3),l=n(18),u=n(10),c=n(18),d=n(3),f=n(6),h=n(3),p=n(3),m=n(3),g=n(3);class v extends f.PartiallyConstructible{constructor(t={}){super(),this.mode="COLLAPSED_SHEET",this.collapsedVisibleHeight="SMALL",this.listButton=new s.BadgedButton({}),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.collapsedVisibleHeight&&(this.collapsedVisibleHeight=t.collapsedVisibleHeight),void 0!==t.listButton&&(this.listButton=new s.BadgedButton(t.listButton))}}e.Sheet=v;class y extends f.PartiallyConstructible{constructor(t={}){super(),this.enabled=!0,this.backgroundColor="?sbColorNegative",this.iconColor="?sbColorOnPrimary",void 0!==t.enabled&&(this.enabled=t.enabled),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.iconColor&&(this.iconColor=t.iconColor)}}e.SwipeToDelete=y;class b extends f.PartiallyConstructible{constructor(t={}){super(),this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.title=new g.StyledText({text:"Update count",color:"?sbColorOnSurface"}),this.info=new g.StyledText({text:"Adjust the number of items you scanned.",color:"?sbColorOnSurfaceVariant"}),this.updateButton=new d.ButtonConfiguration({visible:!0,text:"Update",background:new r.BackgroundStyle({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new h.ForegroundStyle({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),this.cancelButton=new d.ButtonConfiguration({visible:!0,text:"Cancel",background:new r.BackgroundStyle({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new h.ForegroundStyle({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),this.clearTextButton=new p.IconStyle({visible:!0,color:"?sbColorOnSurfaceVariant"}),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0!==t.modalOverlayColor&&(this.modalOverlayColor=t.modalOverlayColor),void 0!==t.title&&(this.title=new g.StyledText(t.title)),void 0!==t.info&&(this.info=new g.StyledText(t.info)),void 0!==t.updateButton&&(this.updateButton=new d.ButtonConfiguration(t.updateButton)),void 0!==t.cancelButton&&(this.cancelButton=new d.ButtonConfiguration(t.cancelButton)),void 0!==t.clearTextButton&&(this.clearTextButton=new p.IconStyle(t.clearTextButton))}}e.ManualCountEditDialog=b;class A extends f.PartiallyConstructible{constructor(t={}){super(),this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.manualCountChangeEnabled=!0,this.manualCountOutlineColor="?sbColorOutline",this.manualCountChangeColor="?sbColorPrimary",this.title=new g.StyledText({text:"%d items",color:"?sbColorOnSurface"}),this.clearAllButton=new d.ButtonConfiguration({visible:!0,text:"Clear all",background:new r.BackgroundStyle({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new h.ForegroundStyle({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),this.barcodeItemTitle=new g.StyledText({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),this.barcodeItemSubtitle=new g.StyledText({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.barcodeItemImageVisible=!0,this.submitButton=new d.ButtonConfiguration({visible:!0,text:"Submit",background:new r.BackgroundStyle({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new h.ForegroundStyle({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),this.startScanningButton=new d.ButtonConfiguration({visible:!0,text:"Start scanning",background:new r.BackgroundStyle({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new h.ForegroundStyle({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),this.placeholderTitle=new g.StyledText({text:"No barcodes here!",color:"?sbColorOnSurface"}),this.placeholderSubtitle=new g.StyledText({text:"The barcode list is currently empty. Close this sheet and scan your items to add them.",color:"?sbColorOnSurfaceVariant"}),this.placeholderIconBackground="?sbColorOutline",this.placeholderIcon=new p.IconStyle({visible:!0,color:"?sbColorOnSurface"}),this.swipeToDelete=new y({enabled:!0,backgroundColor:"?sbColorNegative",iconColor:"?sbColorOnPrimary"}),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0!==t.manualCountChangeEnabled&&(this.manualCountChangeEnabled=t.manualCountChangeEnabled),void 0!==t.manualCountOutlineColor&&(this.manualCountOutlineColor=t.manualCountOutlineColor),void 0!==t.manualCountChangeColor&&(this.manualCountChangeColor=t.manualCountChangeColor),void 0!==t.title&&(this.title=new g.StyledText(t.title)),void 0!==t.clearAllButton&&(this.clearAllButton=new d.ButtonConfiguration(t.clearAllButton)),void 0!==t.barcodeItemTitle&&(this.barcodeItemTitle=new g.StyledText(t.barcodeItemTitle)),void 0!==t.barcodeItemSubtitle&&(this.barcodeItemSubtitle=new g.StyledText(t.barcodeItemSubtitle)),void 0!==t.barcodeItemImageVisible&&(this.barcodeItemImageVisible=t.barcodeItemImageVisible),void 0!==t.submitButton&&(this.submitButton=new d.ButtonConfiguration(t.submitButton)),void 0!==t.startScanningButton&&(this.startScanningButton=new d.ButtonConfiguration(t.startScanningButton)),void 0!==t.placeholderTitle&&(this.placeholderTitle=new g.StyledText(t.placeholderTitle)),void 0!==t.placeholderSubtitle&&(this.placeholderSubtitle=new g.StyledText(t.placeholderSubtitle)),void 0!==t.placeholderIconBackground&&(this.placeholderIconBackground=t.placeholderIconBackground),void 0!==t.placeholderIcon&&(this.placeholderIcon=new p.IconStyle(t.placeholderIcon)),void 0!==t.swipeToDelete&&(this.swipeToDelete=new y(t.swipeToDelete))}}e.SheetContent=A;class S extends f.PartiallyConstructible{constructor(t={}){super(),this._type="MultipleScanningMode",this.countingRepeatDelay=1e3,this.mode="COUNTING",this.sheet=new v({mode:"COLLAPSED_SHEET",collapsedVisibleHeight:"SMALL",listButton:new s.BadgedButton({badgeBackgroundColor:"?sbColorSurface",badgeForegroundColor:"?sbColorPrimary",visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"})}),this.sheetContent=new A({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",manualCountChangeEnabled:!0,manualCountOutlineColor:"?sbColorOutline",manualCountChangeColor:"?sbColorPrimary",title:new g.StyledText({text:"?multipleModeSheetTitle",color:"?sbColorOnSurface"}),clearAllButton:new d.ButtonConfiguration({visible:!0,text:"?sheetClearAllButton",background:new r.BackgroundStyle({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new h.ForegroundStyle({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),barcodeItemTitle:new g.StyledText({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),barcodeItemSubtitle:new g.StyledText({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),barcodeItemImageVisible:!0,submitButton:new d.ButtonConfiguration({visible:!0,text:"?sheetSubmitButton",background:new r.BackgroundStyle({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new h.ForegroundStyle({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),startScanningButton:new d.ButtonConfiguration({visible:!0,text:"?sheetStartScanningButton",background:new r.BackgroundStyle({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new h.ForegroundStyle({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),placeholderTitle:new g.StyledText({visible:!0,text:"?sheetPlaceholderTitle",color:"?sbColorOnSurface",useShadow:!1}),placeholderSubtitle:new g.StyledText({visible:!0,text:"?sheetPlaceholderSubtitle",color:"?sbColorOnSurfaceVariant",useShadow:!1}),placeholderIconBackground:"?sbColorOutline",placeholderIcon:new p.IconStyle({visible:!0,color:"?sbColorOnSurface"}),swipeToDelete:new y({enabled:!0,backgroundColor:"?sbColorNegative",iconColor:"?sbColorOnPrimary"})}),this.manualCountEditDialog=new b({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",title:new g.StyledText({text:"?manualCountEditDialogTitle",color:"?sbColorOnSurface"}),info:new g.StyledText({text:"?manualCountEditDialogInfo",color:"?sbColorOnSurfaceVariant"}),updateButton:new d.ButtonConfiguration({visible:!0,text:"?manualCountEditDialogUpdateButton",background:new r.BackgroundStyle({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new h.ForegroundStyle({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new d.ButtonConfiguration({visible:!0,text:"?manualCountEditDialogCancelButton",background:new r.BackgroundStyle({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new h.ForegroundStyle({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),clearTextButton:new p.IconStyle({visible:!0,color:"?sbColorOnSurfaceVariant"})}),this.barcodeInfoMapping=new l.BarcodeInfoMapping({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",loadingMessage:new g.StyledText({text:"?barcodeInfoMappingLoadingMessage",color:"?sbColorPrimary"}),errorState:new c.BarcodeItemErrorState({title:new g.StyledText({text:"?barcodeInfoMappingErrorStateTitle",color:"?sbColorOnSurface"}),subtitle:new g.StyledText({text:"?barcodeInfoMappingErrorStateSubtitle",color:"?sbColorOnSurfaceVariant"}),retryButton:new d.ButtonConfiguration({visible:!0,text:"?barcodeInfoMappingErrorStateRetryButton",background:new r.BackgroundStyle({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new h.ForegroundStyle({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new d.ButtonConfiguration({visible:!0,text:"?barcodeInfoMappingErrorStateCancelButton",background:new r.BackgroundStyle({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new h.ForegroundStyle({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})})})}),this.arOverlay=new o.ArOverlayGeneralConfiguration({visible:!1,counterBadge:new a.BadgeStyle({visible:!0,background:new r.BackgroundStyle({strokeColor:"#FF000000",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),automaticSelectionEnabled:!1,barcodeItemInfoPosition:"BELOW",polygon:new i.ArOverlayPolygonConfiguration({visible:!0,deselected:new m.PolygonStyle({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),selected:new m.PolygonStyle({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5})}),barcodeItemConfiguration:new u.BarcodeItemConfiguration({imageVisible:!0,titleSelected:new g.StyledText({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new g.StyledText({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),titleDeselected:new g.StyledText({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),subtitleDeselected:new g.StyledText({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),backgroundSelected:new m.PolygonStyle({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new m.PolygonStyle({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:1,cornerRadius:5})})}),void 0!==t.countingRepeatDelay&&(this.countingRepeatDelay=t.countingRepeatDelay),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.sheet&&(this.sheet=new v(t.sheet)),void 0!==t.sheetContent&&(this.sheetContent=new A(t.sheetContent)),void 0!==t.manualCountEditDialog&&(this.manualCountEditDialog=new b(t.manualCountEditDialog)),void 0!==t.barcodeInfoMapping&&(this.barcodeInfoMapping=new l.BarcodeInfoMapping(t.barcodeInfoMapping)),void 0!==t.arOverlay&&(this.arOverlay=new o.ArOverlayGeneralConfiguration(t.arOverlay))}}e.MultipleScanningMode=S},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserGuidanceConfiguration=void 0;const o=n(3),i=n(6),r=n(3);class a extends i.PartiallyConstructible{constructor(t={}){super(),this.visible=!0,this.title=new r.StyledText({color:"?sbColorOnPrimary"}),this.background=new o.BackgroundStyle({strokeColor:"#00000000",fillColor:"?sbColorSurfaceLow"}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.title&&(this.title=new r.StyledText(t.title)),void 0!==t.background&&(this.background=new o.BackgroundStyle(t.background))}}e.UserGuidanceConfiguration=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeTextLocalization=void 0;const o=n(6);class i extends o.PartiallyConstructible{constructor(t={}){super(),this.cameraPermissionEnableCameraTitle="Camera permission denied!",this.cameraPermissionEnableCameraExplanation="Please allow the usage of the camera to start the scanning process.",this.cameraPermissionEnableCameraButton="Grant permission",this.cameraPermissionCloseButton="Close",this.topBarCancelButton="Cancel",this.topBarTitle="Scan Item",this.userGuidance="Move the finder over a barcode",this.barcodeInfoMappingLoadingMessage="Loading details...",this.barcodeInfoMappingErrorStateTitle="Connection Error!",this.barcodeInfoMappingErrorStateSubtitle="There was an issue and the data requested was not fetched. You could try again or discard this result to start a new scan.",this.barcodeInfoMappingErrorStateRetryButton="Retry",this.barcodeInfoMappingErrorStateCancelButton="Cancel",this.manualCountEditDialogTitle="Update count",this.manualCountEditDialogInfo="Adjust the number of items you scanned.",this.manualCountEditDialogUpdateButton="Update",this.manualCountEditDialogCancelButton="Cancel",this.sheetResetButton="Reset",this.sheetClearAllButton="Clear all",this.sheetSubmitButton="Submit",this.sheetStartScanningButton="Start scanning",this.sheetPlaceholderTitle="No barcodes here!",this.sheetPlaceholderSubtitle="The barcode list is currently empty. Close this sheet and scan your items to add them.",this.singleModeConfirmationCancelButton="Close",this.multipleModeSheetTitle="%d items",this.findAndPickSheetTitle="%d/%d scanned",this.findAndPickSheetBarcodeItemSubtitle="%d/%d added",this.findAndPickPartialAlertTitle="Incomplete scan!",this.findAndPickPartialAlertSubtitle="Some codes are yet to be scanned. Proceed with submission anyway?",this.findAndPickPartialAlertCancelButton="Cancel",this.findAndPickPartialAlertSubmitButton="Yes, Submit",this.findAndPickCompleteAlertTitle="All codes found!",this.findAndPickCompleteAlertSubtitle="You have successfully scanned all codes. Proceed with submission?",this.findAndPickCompleteAlertCancelButton="Dismiss",this.findAndPickCompleteAlertSubmitButton="Submit",void 0!==t.cameraPermissionEnableCameraTitle&&(this.cameraPermissionEnableCameraTitle=t.cameraPermissionEnableCameraTitle),void 0!==t.cameraPermissionEnableCameraExplanation&&(this.cameraPermissionEnableCameraExplanation=t.cameraPermissionEnableCameraExplanation),void 0!==t.cameraPermissionEnableCameraButton&&(this.cameraPermissionEnableCameraButton=t.cameraPermissionEnableCameraButton),void 0!==t.cameraPermissionCloseButton&&(this.cameraPermissionCloseButton=t.cameraPermissionCloseButton),void 0!==t.topBarCancelButton&&(this.topBarCancelButton=t.topBarCancelButton),void 0!==t.topBarTitle&&(this.topBarTitle=t.topBarTitle),void 0!==t.userGuidance&&(this.userGuidance=t.userGuidance),void 0!==t.barcodeInfoMappingLoadingMessage&&(this.barcodeInfoMappingLoadingMessage=t.barcodeInfoMappingLoadingMessage),void 0!==t.barcodeInfoMappingErrorStateTitle&&(this.barcodeInfoMappingErrorStateTitle=t.barcodeInfoMappingErrorStateTitle),void 0!==t.barcodeInfoMappingErrorStateSubtitle&&(this.barcodeInfoMappingErrorStateSubtitle=t.barcodeInfoMappingErrorStateSubtitle),void 0!==t.barcodeInfoMappingErrorStateRetryButton&&(this.barcodeInfoMappingErrorStateRetryButton=t.barcodeInfoMappingErrorStateRetryButton),void 0!==t.barcodeInfoMappingErrorStateCancelButton&&(this.barcodeInfoMappingErrorStateCancelButton=t.barcodeInfoMappingErrorStateCancelButton),void 0!==t.manualCountEditDialogTitle&&(this.manualCountEditDialogTitle=t.manualCountEditDialogTitle),void 0!==t.manualCountEditDialogInfo&&(this.manualCountEditDialogInfo=t.manualCountEditDialogInfo),void 0!==t.manualCountEditDialogUpdateButton&&(this.manualCountEditDialogUpdateButton=t.manualCountEditDialogUpdateButton),void 0!==t.manualCountEditDialogCancelButton&&(this.manualCountEditDialogCancelButton=t.manualCountEditDialogCancelButton),void 0!==t.sheetResetButton&&(this.sheetResetButton=t.sheetResetButton),void 0!==t.sheetClearAllButton&&(this.sheetClearAllButton=t.sheetClearAllButton),void 0!==t.sheetSubmitButton&&(this.sheetSubmitButton=t.sheetSubmitButton),void 0!==t.sheetStartScanningButton&&(this.sheetStartScanningButton=t.sheetStartScanningButton),void 0!==t.sheetPlaceholderTitle&&(this.sheetPlaceholderTitle=t.sheetPlaceholderTitle),void 0!==t.sheetPlaceholderSubtitle&&(this.sheetPlaceholderSubtitle=t.sheetPlaceholderSubtitle),void 0!==t.singleModeConfirmationCancelButton&&(this.singleModeConfirmationCancelButton=t.singleModeConfirmationCancelButton),void 0!==t.multipleModeSheetTitle&&(this.multipleModeSheetTitle=t.multipleModeSheetTitle),void 0!==t.findAndPickSheetTitle&&(this.findAndPickSheetTitle=t.findAndPickSheetTitle),void 0!==t.findAndPickSheetBarcodeItemSubtitle&&(this.findAndPickSheetBarcodeItemSubtitle=t.findAndPickSheetBarcodeItemSubtitle),void 0!==t.findAndPickPartialAlertTitle&&(this.findAndPickPartialAlertTitle=t.findAndPickPartialAlertTitle),void 0!==t.findAndPickPartialAlertSubtitle&&(this.findAndPickPartialAlertSubtitle=t.findAndPickPartialAlertSubtitle),void 0!==t.findAndPickPartialAlertCancelButton&&(this.findAndPickPartialAlertCancelButton=t.findAndPickPartialAlertCancelButton),void 0!==t.findAndPickPartialAlertSubmitButton&&(this.findAndPickPartialAlertSubmitButton=t.findAndPickPartialAlertSubmitButton),void 0!==t.findAndPickCompleteAlertTitle&&(this.findAndPickCompleteAlertTitle=t.findAndPickCompleteAlertTitle),void 0!==t.findAndPickCompleteAlertSubtitle&&(this.findAndPickCompleteAlertSubtitle=t.findAndPickCompleteAlertSubtitle),void 0!==t.findAndPickCompleteAlertCancelButton&&(this.findAndPickCompleteAlertCancelButton=t.findAndPickCompleteAlertCancelButton),void 0!==t.findAndPickCompleteAlertSubmitButton&&(this.findAndPickCompleteAlertSubmitButton=t.findAndPickCompleteAlertSubmitButton)}}e.BarcodeTextLocalization=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeRecognizerConfiguration=void 0;const o=n(6);class i extends o.PartiallyConstructible{constructor(t={}){super(),this.acceptedDocumentFormats=[],this.barcodesExtensionFilter="NO_FILTER",this.barcodesRegexFilter="",this.minimumTextLength=0,this.maximumTextLength=0,this.minimum1DBarcodesQuietZone=10,this.stripCheckDigits=!1,this.barcodeFormats=[],this.msiPlesseyChecksumAlgorithm="MOD_10",this.codeDensity="LOW",this.gs1Handling="PARSE",void 0!==t.acceptedDocumentFormats&&(this.acceptedDocumentFormats=t.acceptedDocumentFormats.map((t=>t))),void 0!==t.barcodesExtensionFilter&&(this.barcodesExtensionFilter=t.barcodesExtensionFilter),void 0!==t.barcodesRegexFilter&&(this.barcodesRegexFilter=t.barcodesRegexFilter),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.minimum1DBarcodesQuietZone&&(this.minimum1DBarcodesQuietZone=t.minimum1DBarcodesQuietZone),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.barcodeFormats&&(this.barcodeFormats=t.barcodeFormats.map((t=>t))),void 0!==t.msiPlesseyChecksumAlgorithm&&(this.msiPlesseyChecksumAlgorithm=t.msiPlesseyChecksumAlgorithm),void 0!==t.codeDensity&&(this.codeDensity=t.codeDensity),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling)}}e.BarcodeRecognizerConfiguration=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CameraPermissionScreen=void 0;const o=n(3),i=n(3),r=n(6),a=n(3),s=n(3),l=n(3);class u extends r.PartiallyConstructible{constructor(t={}){super(),this.statusBarMode="DARK",this.background="?sbColorSurface",this.iconBackground="?sbColorOutline",this.icon=new s.IconStyle({visible:!0,color:"?sbColorOnSurface"}),this.enableCameraButton=new i.ButtonConfiguration({text:"{'type': 'String', 'default': 'Grant permission'}",background:new o.BackgroundStyle({}),foreground:new a.ForegroundStyle({})}),this.closeButton=new i.ButtonConfiguration({text:"Close",background:new o.BackgroundStyle({}),foreground:new a.ForegroundStyle({})}),this.enableCameraTitle=new l.StyledText({text:"Camera permission denied!",color:"?colorOnSurface"}),this.enableCameraExplanation=new l.StyledText({text:"Please allow the usage of the camera to start the scanning process.",color:"?sbColorOnSurfaceVariant"}),void 0!==t.statusBarMode&&(this.statusBarMode=t.statusBarMode),void 0!==t.background&&(this.background=t.background),void 0!==t.iconBackground&&(this.iconBackground=t.iconBackground),void 0!==t.icon&&(this.icon=new s.IconStyle(t.icon)),void 0!==t.enableCameraButton&&(this.enableCameraButton=new i.ButtonConfiguration(t.enableCameraButton)),void 0!==t.closeButton&&(this.closeButton=new i.ButtonConfiguration(t.closeButton)),void 0!==t.enableCameraTitle&&(this.enableCameraTitle=new l.StyledText(t.enableCameraTitle)),void 0!==t.enableCameraExplanation&&(this.enableCameraExplanation=new l.StyledText(t.enableCameraExplanation))}}e.CameraPermissionScreen=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeItem=void 0;const o=n(6);class i extends o.PartiallyConstructible{constructor(t={}){if(super(),void 0===t.type)throw new Error("type must be present in constructor argument");if(this.type=t.type,void 0===t.count)throw new Error("count must be present in constructor argument");if(this.count=t.count,void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.rawBytes)throw new Error("rawBytes must be present in constructor argument");if(this.rawBytes=t.rawBytes,void 0===t.parsedDocument)throw new Error("parsedDocument must be present in constructor argument");this.parsedDocument=null!=t.parsedDocument?t.parsedDocument:null}}e.BarcodeItem=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class o{static throwIfMissingBuffer(t){o.throwIfMissing(t,"ImageBuffer may not be null")}static throwIfMissing(t,e){if(!t)throw new Error(e)}}e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicViewportHeightCssProperty=e.dvhCssValue=void 0;const o=n(1);e.dvhCssValue="var(--1-sb-dvh, 1vh)",e.DynamicViewportHeightCssProperty=function(){const t=(0,o.useMemo)((()=>{var t,e;return null===(e=null===(t=null===window||void 0===window?void 0:window.CSS)||void 0===t?void 0:t.supports)||void 0===e?void 0:e.call(t,"height: 100dvh")}),[])&&!1,e=()=>{var e=t?"1dvh":window.innerHeight/100+"px";document.documentElement.style.setProperty("--1-sb-dvh",e)};return(0,o.useEffect)((()=>{if(e(),!t)return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}})),null}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.StyledBox=void 0;const s=n(2),l=r(n(1)),u=n(4);e.StyledBox=function(t){const e=(0,l.useContext)(u.SBPaletteContext).getColorValue,{styleConfig:n}=t,o=a(t,["styleConfig"]),i=Object.assign(Object.assign({},t.style),{backgroundColor:e(n.fillColor),borderColor:e(n.strokeColor),borderWidth:n.strokeWidth,borderRadius:n.cornerRadius});return l.default.createElement(s.Box,Object.assign({},o,{style:i}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class o{constructor(){this.DURATION=200}vibrate(t){t.enabled&&navigator.vibrate&&navigator.vibrate(this.DURATION)}}o.INSTANCE=new o,e.default=o},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeScanner=e.Props=void 0;const s=a(n(73)),l=r(n(138)),u=n(1),c=a(n(1)),d=n(16),f=a(n(75)),h=n(140),p=n(80),m=n(4);e.Props=class{},e.BarcodeScanner=function(t){const e=(0,u.useRef)(),n=(0,u.useRef)(null),[o,i]=((0,u.useContext)(d.NavigationBarSizeContext),(0,u.useState)(void 0)),[r,a]=(0,u.useState)(!1);(0,u.useEffect)((()=>{var n,o;t.scanningPaused?null===(n=e.current)||void 0===n||n.pause():null===(o=e.current)||void 0===o||o.resume()}),[t.scanningPaused]);const g=function(t){const e=new p.SelectionOverlayConfiguration;return e.visible=t.visible,t.polygon.visible?(e.style.highlightedPolygonFillColor=m.SBTheme.getColorValue(t.polygon.selected.fillColor),e.style.highlightedPolygonStrokeColor=m.SBTheme.getColorValue(t.polygon.selected.strokeColor),e.style.highlightedPolygonStrokeWidth=t.polygon.selected.strokeWidth,e.style.highlightedPolygonCornerRadius=t.polygon.selected.cornerRadius,e.style.polygonFillColor=m.SBTheme.getColorValue(t.polygon.deselected.fillColor),e.style.polygonStrokeColor=m.SBTheme.getColorValue(t.polygon.deselected.strokeColor),e.style.polygonStrokeWidth=t.polygon.deselected.strokeWidth,e.style.polygonCornerRadius=t.polygon.deselected.cornerRadius):(e.style.highlightedPolygonFillColor="transparent",e.style.highlightedPolygonStrokeColor="transparent",e.style.polygonFillColor="transparent",e.style.polygonStrokeColor="transparent"),e.automaticSelectionEnabled=!1,e}(t.arOverlay),v=Object.assign(Object.assign({},t.barcodeScannerViewConfig),{onBarcodesDetected:o=>{var i,r,a,s,l;null===(i=n.current)||void 0===i||i.update(null===(r=e.current)||void 0===r?void 0:r.finder.holeRect,null===(a=e.current)||void 0===a?void 0:a.camera,o.imageData,t.containerId,o.barcodes),null===(l=(s=t.barcodeScannerViewConfig).onBarcodesDetected)||void 0===l||l.call(s,o)},_onDetectionFailed:o=>{var i,r,a,s,l;null===(i=n.current)||void 0===i||i.update(null===(r=e.current)||void 0===r?void 0:r.finder.holeRect,null===(a=e.current)||void 0===a?void 0:a.camera,o,t.containerId,[]),null===(l=(s=t.barcodeScannerViewConfig)._onDetectionFailed)||void 0===l||l.call(s,o)}});return(0,u.useEffect)((()=>{const e=(0,l.areAnyActionButtonsVisible)(o,t.actionBarConfig);t.setActionButtonsVisible(e),a(e)}),[o,t.actionBarConfig]),c.default.createElement(c.default.Fragment,null,t.arOverlay.visible&&c.default.createElement(f.default,{style:{zIndex:1e3,position:"absolute"},ref:n,LabelComponent:h.ArOverlayBarcodeInfo,labelComponentConfig:t.arOverlay,onBarcodeFound:t.arOnBarcodeEnter,onPolygonClick:t.arOnBarcodeClick,configuration:g}),c.default.createElement(l.default,{config:t.actionBarConfig,scanner:e.current,capabilities:o,bottomPadding:t.actionBarBottomPadding,torchEnabledInitially:t.cameraConfiguration.flashEnabled,zoomSteps:t.cameraConfiguration.zoomSteps,defaultZoomFactor:t.cameraConfiguration.defaultZoomFactor}),c.default.createElement(s.default,{ref:e,viewFinderPadding:t.viewFinderPadding,configuration:v,onSuccess:()=>l.ActionButtonCapabilities.setFromScanner(e,i),onFailure:t.onCameraPermissionDenied}))}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeScannerState=e.BarcodeScannerProps=void 0;const l=s(n(1)),u=n(1),c=n(26),d=s(n(28)),f=s(n(45)),h=r(n(122)),p=s(n(75)),m=s(n(127)),g=s(n(131)),v=s(n(133)),y=s(n(134)),b=s(n(78)),A=n(79),S=n(36),C=n(46),_=s(n(56)),w=n(13),x=n(31),O=n(12),E=s(n(137));class P extends c.ScanbotCameraProps{}e.BarcodeScannerProps=P;class L extends c.ScanbotCameraState{constructor(){super(...arguments),this.action="manual"}}e.BarcodeScannerState=L;class B extends c.ScannerView{constructor(t){var e;super(t),this.shouldComputeSize=!0,this.paused=!1,this.barcodes=[],this.detectionRunning=!1,this.updateDimensionsCallback=this.updateDimensions.bind(this),this.backendurl=void 0,this.desiredRecognitionResolution=void 0,Object.assign(this.state,{isFinderVisible:null===(e=this.configuration.finder.visible)||void 0===e||e,zoom:void 0,action:"manual",image:void 0,bottomHintText:void 0})}get configuration(){return this._configuration||(this._configuration=A.BarcodeScannerConfiguration.fromJson(this.props.configuration)),this._configuration}get enabled(){return!this.disposed}static create(t){return a(this,void 0,void 0,(function*(){const e=x.ViewUtils.findContainerOrThrow(t);return new Promise(((n,o)=>{(0,u.render)(l.default.createElement(B,{container:e,configuration:t,onSuccess:n,onFailure:o}),e)}))}))}isDetectionPaused(){return this.paused}resumeDetection(){return a(this,void 0,void 0,(function*(){C.Debugger.warn("Barcode detection resumed"),yield this.resume()}))}pauseDetection(){C.Debugger.warn("Barcode detection paused"),this.pause()}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return a(this,void 0,void 0,(function*(){t.componentDidMount.call(this),window.addEventListener("resize",this.updateDimensionsCallback),yield this.resume()}))}componentWillUnmount(){super.componentWillUnmount(),this.pause(),window.removeEventListener("resize",this.updateDimensionsCallback)}updateDimensions(){return a(this,void 0,void 0,(function*(){this.shouldComputeSize=!0,this.forceUpdate()}))}resume(){return a(this,void 0,void 0,(function*(){this.paused=!1,yield this.detect()}))}pause(){this.paused=!0}detect(){var t,e,n,o,i,r;return a(this,void 0,void 0,(function*(){if(!this.enabled)return;if(this.paused)return;if(null===(t=this.configuration.scanAndCount)||void 0===t?void 0:t.enabled)return;if(this.detectionRunning)return;let a=!1;try{this.detectionRunning=!0;const t=yield this.recognizeBarcodes(!0,this.shouldComputeSize,this.configuration.returnBarcodeImage);if(this.shouldComputeSize=!1,!t)return;const s=t.barcodeResult;s.isEmpty()?this.configuration._onDetectionFailed&&(null===(e=this.configuration)||void 0===e||e._onDetectionFailed(null==s?void 0:s.imageData)):(a=!0,this.configuration.overlay.visible||this.configuration.onBarcodesDetected(s)),null===(n=this.overlay)||void 0===n||n.update(null===(o=this.finder)||void 0===o?void 0:o.holeRect,this.camera,t.barcodeResult.imageData,null!==(i=this.configuration.container)&&void 0!==i?i:this.configuration.containerId,t.barcodeResult.barcodes)}catch(t){console.log(t)}finally{this.detectionRunning=!1;const t=()=>requestAnimationFrame(this.detect.bind(this)),e=(null===(r=this.configuration.overlay)||void 0===r?void 0:r.visible)?0:this.configuration.captureDelay;a&&0!=e?setTimeout(t,e):t()}}))}setUseBackendService(t){console.log("Now using backend service for recognition: ",t),this.backendurl=t}recognizeBarcodes(t,e,n){var o,i,r;return a(this,void 0,void 0,(function*(){window&&window.__SB_DEBUG_BARCODESCANNER_FORCE_DETERMINISTIC_MODE&&(t=!1);const a=t?c.ScannerView.DEFAULT_DETECTION_RESOLUTION:c.ScannerView.DETECTION_RESULTION_4K,s=null!==(o=this.desiredRecognitionResolution)&&void 0!==o?o:a;this.camera.finderFrame=null===(i=this.finder)||void 0===i?void 0:i.holeRect;const l=yield this.camera.createImageData(s);if(!l)return;e&&this.forceUpdate(),(null===(r=this.configuration.scanAndCount)||void 0===r?void 0:r.enabled)&&(this.setState({image:O.ImageUtils.wrapperToBase64(l)}),void 0!==this.desiredRecognitionResolution?console.log("Recognizing barcodes with custom resolution:",this.desiredRecognitionResolution):console.log("Recognizing barcodes with max resolution:",c.ScannerView.DETECTION_RESULTION_4K,"(the actual resolution depends on your device and may be lower)"));const u=this.configuration.engineMode,d=this.configuration.barcodeFormats;let f;if(this.backendurl&&this.backendurl.length>0)f=yield E.default.recognizeBarcodes(this.backendurl,l);else{const{result:e,originalImage:o}=yield this.bridge.postByTransferringArgs("recognizeBarcodes",[l,{live:t,engineMode:u,barcodeFormats:d,returnBarcodeImage:n}]);if(!this.enabled)return;if(null===e)return;f=S.BarcodeResult.fromWorker(e,o)}return{imageData:l,originalImage:undefined,barcodeResult:f}}))}setRecognitionResolution(t){this.desiredRecognitionResolution=t}getResolution(){return a(this,void 0,void 0,(function*(){return new Promise(((t,e)=>{const n=this.camera.videoSize();n.width>0&&n.height>0?t(w.Size.fromJson(n)):this.camera.didLoadVideo=()=>{const e=this.camera.videoSize();t(w.Size.fromJson(e))}}))}))}saveExtractedImageData(){this.camera.saveExtractedData()}setFinderVisible(t){this.setState({isFinderVisible:t})}setZoom(t){this.setState({zoom:t})}setCameraDirection(t){this.camera.setDirection(t)}updateTorch(t){this.camera.videoStream.updateTorch(t)}getCapabilities(){return this.camera.videoStream.getCapabilities()}render(){var t,e,n,o,i,r,s;const u=(null===(t=this.configuration.scanAndCount)||void 0===t?void 0:t.enabled)?"Tap the shutter button to scan":void 0;return l.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"black"}},this.renderSpinner(null===(e=this.configuration)||void 0===e?void 0:e.spinnerColor),l.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},l.default.createElement(d.default,{configuration:this.configuration,videoConstraints:this.configuration.videoConstraints,mirrored:this.configuration.mirrored,preferredCamera:this.configuration.preferredCamera,zoom:null!==(n=this.state.zoom)&&void 0!==n?n:this.configuration.zoom,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}})),l.default.createElement(y.default,{top:null===(o=this.configuration.scanAndCount)||void 0===o?void 0:o.style.topLabelTop,text:u}),l.default.createElement(g.default,{ref:t=>this.scannedImage=t,image:this.state.image}),this.state.isFinderVisible&&l.default.createElement(f.default,{ref:t=>{this.finder=t},padding:this.props.viewFinderPadding,guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder}),l.default.createElement(y.default,{bottom:100,text:this.state.bottomHintText}),l.default.createElement(v.default,{visible:"processing"===this.state.action}),(null===(i=this.configuration.overlay)||void 0===i?void 0:i.visible)&&l.default.createElement(p.default,{ref:t=>{t&&(this.overlay=t)},configuration:this.configuration.overlay,onPolygonSelected:t=>{const e=new S.BarcodeResult([t],void 0);this.configuration.onBarcodesDetected(e)},onBarcodeFound:(t,e,n)=>{var o;(null===(o=this.configuration.overlay)||void 0===o?void 0:o.onBarcodeFound)&&this.configuration.overlay.onBarcodeFound(t,e,n)},LabelComponent:b.default,labelComponentConfig:{}}),(null===(r=this.configuration.scanAndCount)||void 0===r?void 0:r.enabled)&&l.default.createElement(m.default,{ref:t=>this.bottomActionBar=t,action:this.state.action,isShowingImage:void 0!==this.state.image,onBurgerClick:()=>{this.popup.push(h.AnimationType.PushBottom,this.barcodes)},onShutterButtonClick:()=>a(this,void 0,void 0,(function*(){(new _.default).flash(),this.setState({action:"processing"});const t=(new Date).getTime(),e=yield this.recognizeBarcodes(!1,!1,!0);console.log("Recognition took:",((new Date).getTime()-t)/1e3),this.recognition=e;const n=this.countLabelText(e.barcodeResult.barcodes);this.setState({action:"manual",bottomHintText:n}),this.scannedImage.update(e.barcodeResult),this.barcodes.push(...e.barcodeResult.barcodes),this.bottomActionBar.update(this.barcodes),e.barcodeResult.barcodes.length>0&&this.configuration.onBarcodesDetected(e.barcodeResult)})),onScanMoreClick:()=>{this.resetCountImage()}}),l.default.createElement(h.default,{ref:t=>this.popup=t,style:null===(s=this.configuration.scanAndCount)||void 0===s?void 0:s.style,onDeleteClick:()=>{if(confirm("Are you sure you want to delete all scanned barcodes?")){for(;this.barcodes.length>0;)this.barcodes.pop();console.log("Cleared barcodes",this.barcodes.length),this.popup.update(this.barcodes),this.bottomActionBar.update(void 0),this.resetCountImage(),this.popup.reset()}}}))}resetCountImage(){this.scannedImage.reset(),this.setState({image:void 0,bottomHintText:void 0})}countLabelText(t){return 0==t.length?"No codes scanned. Try again?":1==t.length?"1 Code Scanned":`${t.length} Codes Scanned`}}e.default=B},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.MediaError=void 0;class i extends Error{constructor(t,e,n){super(e),this.name="",this.name=t,this.message=e,this.webApiError=n}static mediaDevicesUndefined(){return new i(this.MESSAGE.DEVICES_UNDEFINED,"Does your device even have a camera? If so, please use a secure context (HTTPS) or use 'localhost' explicitly.")}static enumerateDevicesFailed(){return new i(this.MESSAGE.DEVICES_UNDEFINED,"Does your device even have a camera? Because we're unable to query query navigator.mediaDevices?.enumerateDevices")}static mediaDeviceNotFound(t){return new i(this.MESSAGE.ENUMERATE_FAILED,"Does your device even have a camera? Because we were unable to query navigator.mediaDevices?.getUserMedia().",t)}static permissionDenied(t){return new i(this.MESSAGE.PERMISSION_DENIED,"Camera permission has not been granted. Please prompt your users again to grant permission.",t)}static unknown(t){return new i(this.MESSAGE.UNKNOWN,"\n Unfortunately we were unable to query navigator.mediaDevicess.getUserMedia, \n and unable to determine the reason why. This may be caused by the user to denied the permission prompt. \n Or you may be using an in-app browser that itself has not been granted permission to use the camera.\n Or your users may be using a niche browser that does not support the media API at all!\n ",t)}static tryCheckPermission(){return o(this,void 0,void 0,(function*(){if(!this.permissionState)try{const t=yield navigator.permissions.query({name:"camera"});this.permissionState=t.state}catch(t){this.permissionState=this.PERMISSION_STATE.UNKNOWN}}))}static hasDeniedPermission(){return this.permissionState===this.PERMISSION_STATE.DENIED}static hasCheckedPermission(){return!!this.permissionState}}e.MediaError=i,i.PERMISSION_STATE={GRANTED:"granted",DENIED:"denied",PROMPT:"prompt",UNKNOWN:"unknown"},i.MESSAGE={DEVICES_UNDEFINED:"MediaError_DevicesUndefined",DEVICE_NOT_FOUND:"MediaError_DeviceNotFound",ENUMERATE_FAILED:"MediaError_EnumerateFailed",PERMISSION_DENIED:"MediaError_PermissionDenied",UNKNOWN:"MediaError_Unknown"}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionOverlayProps=e.BarcodePolygonElement=void 0;const i=o(n(1)),r=n(14),a=n(76),s=n(5),l=o(n(125)),u=o(n(126));e.BarcodePolygonElement=class{};e.SelectionOverlayProps=class{};class c extends i.default.Component{constructor(t){super(t),this.state={polygonElements:[]}}update(t,e,n,o,r){const c=[];r.forEach((o=>{const i=new a.BarcodeOverlay(o);i.points=void 0===t?s.Point.scaleListToHtmlElement(o.points,n,e.video):o.points.map((e=>{const o=new s.Point(e.x,e.y);return o.x*=t.width/n.width,o.y*=t.height/n.height,o.y+=t.y,o.x+=t.x,o})),c.push(i)}));const d=[];this.state.polygonElements.forEach((t=>{const e=c.find((e=>e.code.equals(t.element.code)));let n=!1;void 0===e?t.updatedAt+1e3<l.default.now()&&(n=!0):(t.element=e,t.polygon=i.default.createElement(u.default,{key:t.element.code.id(),ref:e=>t.polygonRef=e,configuration:this.props.configuration,element:t.element,animateToPoints:e.points,onClick:this.onPolygonClick.bind(this)}),t.label=i.default.createElement(this.props.LabelComponent,Object.assign({},this.props.labelComponentConfig,{key:t.element.code.id(),ref:e=>t.labelRef=e,configuration:this.props.configuration,element:t.element,animateToPoints:e.points,onClick:this.onPolygonClick.bind(this)})),t.updatedAt=l.default.now()),n||d.push(t)})),c.forEach((t=>{if(void 0===this.state.polygonElements.find((e=>e.element.code.equals(t.code)))){let e,n;const o=i.default.createElement(u.default,{key:t.code.id(),ref:o=>{e=o,void 0!==n&&this.props.onBarcodeFound(t.code,e,n)},configuration:this.props.configuration,element:t,onClick:this.onPolygonClick.bind(this)}),r=i.default.createElement(this.props.LabelComponent,Object.assign({},this.props.labelComponentConfig,{key:t.code.id(),ref:o=>{n=o,void 0!==e&&this.props.onBarcodeFound(t.code,e,n)},configuration:this.props.configuration,element:t,onClick:this.onPolygonClick.bind(this)})),a={element:t,polygon:o,label:r,polygonRef:e,labelRef:n,updatedAt:l.default.now()};d.push(a)}})),this.setState({polygonElements:d})}onPolygonClick(t){var e,n,o,i;t.highlighted=!t.highlighted,this.forceUpdate(),this.state.polygonElements.forEach((e=>{var n;const o=e.labelRef;o&&e.label.props.element.code.equals(t.code)&&(o.update(t),null===(n=e.polygonRef)||void 0===n||n.update(t))})),t.highlighted&&(null===(n=(e=this.props).onPolygonSelected)||void 0===n||n.call(e,t.code)),null===(i=(o=this.props).onPolygonClick)||void 0===i||i.call(o,t.code)}render(){var t,e;return i.default.createElement("div",{style:Object.assign({width:"100%",height:"100%",position:"absolute"},this.props.style)},i.default.createElement(r.motion.svg,{style:{position:"absolute",maxWidth:"100%",width:"100%",height:"100%"}},null===(t=this.state.polygonElements)||void 0===t?void 0:t.map((t=>t.polygon))),null===(e=this.state.polygonElements)||void 0===e?void 0:e.map((t=>t.label)))}}e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeOverlay=void 0;e.BarcodeOverlay=class{constructor(t){this.highlighted=!1,this.code=t,this.points=[]}}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ShutterButton=e.ShutterButtonProps=void 0;const i=o(n(1));n(128);const r=o(n(30));e.ShutterButtonProps=class{};class a{constructor(t){this.lastTime=0,this.lastDuration=0,this.t=0,this.element=null,this.animationClass="",this.animationClass=t}setDuration(t){const e=Date.now()/1e3,n=e-this.lastTime;this.lastDuration&&(this.t+=n%this.lastDuration/this.lastDuration,this.t-=0|this.t);const o=-t*this.t;this.element&&(this.element.style.animationDuration=`${t}s`,this.element.style.animationDelay=`${o}s`,this.element.classList.remove(this.animationClass),this.element.offsetHeight,this.element.classList.add(this.animationClass)),this.lastTime=e,this.lastDuration=t}}class s extends i.default.Component{constructor(){super(...arguments),this.inner1=new a("scanbot-shutter-rotate"),this.inner2=new a("scanbot-shutter-rotate")}render(){return i.default.createElement("div",{className:"scanbot-shutter-button",style:this.props.style,onClick:this.props.onClick},this.captureBackground(),this.captureInnerCircle(),this.captureSearchingInner1(),this.captureSearchingInner2())}updateAnimationSpeed(t){"searching"==t?(this.inner1.setDuration(3),this.inner2.setDuration(2)):(this.inner1.setDuration(1.5),this.inner2.setDuration(.75))}componentDidMount(){this.updateAnimationSpeed(this.props.action)}componentDidUpdate(){this.updateAnimationSpeed(this.props.action)}captureBackground(){return this.svgBase(null,i.default.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},this.path("M32 0c17.673 0 32 14.327 32 32 0 17.673-14.327 32-32 32C14.327 64 0 49.673 0 32 0 14.327 14.327 0 32 0zm0 3C15.984 3 3 15.984 3 32s12.984 29 29 29 29-12.984 29-29S48.016 3 32 3z")))}captureInnerCircle(){const{action:t}=this.props;return this.svgBase({"scanbot-shutter-button-part":!0,"scanbot-shutter-fade-in":"processing"==t||"manual"==t,"scanbot-shutter-fade-out":"searching"==t||"capturing"==t,"scanbot-shutter-pulse-fast":"processing"==t},i.default.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},i.default.createElement("circle",{cx:"32",cy:"32",r:"24",fill:this.props.color,fillRule:"nonzero"})))}captureSearchingInner1(){const{action:t}=this.props;return this.svgBase({"scanbot-shutter-button-part":!0,"scanbot-shutter-fade-in":"searching"==t||"capturing"==t,"scanbot-shutter-fade-out":"processing"==t||"manual"==t},i.default.createElement("g",{fill:"none",fillOpacity:"0.7",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},this.path("M44.24 51.476a1 1 0 01-1.066-1.692A20.981 20.981 0 0053 32c0-11.598-9.402-21-21-21a1 1 0 010-2c12.703 0 23 10.297 23 23a22.98 22.98 0 01-10.76 19.476z")),(t=>{this.inner1.element=t}))}captureSearchingInner2(){const{action:t}=this.props;return this.svgBase({"scanbot-shutter-button-part":!0,"scanbot-shutter-fade-in":"searching"==t||"capturing"==t,"scanbot-shutter-fade-out":"processing"==t||"manual"==t},i.default.createElement("g",{fill:"none",fillOpacity:"0.4",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},this.path("M46.624 35.35a1 1 0 01-1.95-.445C44.89 33.96 45 32.988 45 32c0-7.18-5.82-13-13-13a1 1 0 010-2c8.284 0 15 6.716 15 15 0 1.138-.127 2.26-.376 3.35z")),(t=>{this.inner2.element=t}))}path(t){return i.default.createElement("path",{fill:this.props.color,fillRule:"nonzero",d:t})}svgBase(t,e,n){return i.default.createElement("div",{className:(0,r.default)(t),ref:n},i.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 0 64 64"},e))}}e.ShutterButton=s},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodePolygonLabelProps=void 0;const i=o(n(1)),r=n(14),a=n(5);e.BarcodePolygonLabelProps=class{};class s extends i.default.Component{constructor(t){super(t),this.state={element:t.element}}style(t){this.customStyle=t,this.forceUpdate()}update(t){this.setState({element:t})}formatText(t,e){if("None"!==e)return"Text"===e?t.text:t.format+" ("+t.text+")"}render(){var t,e,n,o,s;const l=this.state.element,u=this.props.configuration.style,c=this.formatText(l.code,this.props.configuration.textFormat),d=a.Point.width(null!==(t=this.props.animateToPoints)&&void 0!==t?t:l.points);if(!c)return null;if(!l.points)return null;const f=null!==(n=null===(e=this.customStyle)||void 0===e?void 0:e.backgroundColor)&&void 0!==n?n:l.highlighted?u.highlightedTextBackgroundColor:u.textBackgroundColor,h=null!==(s=null===(o=this.customStyle)||void 0===o?void 0:o.textColor)&&void 0!==s?s:l.highlighted?u.highlightedTextColor:u.textColor;return i.default.createElement(r.motion.div,{ref:t=>this.label=t,onClick:()=>{this.props.onClick&&this.props.onClick(l)},style:{x:a.Point.lowestX(l.points),y:a.Point.highestY(l.points)+3,backgroundColor:f,fontSize:12,width:d,overflow:"hidden",maxLines:2,color:h,borderRadius:5,position:"absolute",padding:"3px 7px",textAlign:"center",maxHeight:50,lineBreak:"anywhere",lineHeight:"22px"},animate:this.props.animateToPoints?{x:a.Point.lowestX(this.props.animateToPoints),y:a.Point.highestY(this.props.animateToPoints)+30}:{}},c)}}e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeScannerConfiguration=void 0;const o=n(15),i=n(80),r=n(135),a=n(23);class s extends a.ViewFinderScannerConfiguration{constructor(){super(o.ScannerConfiguration.DEFAULT_VIDEO_RESOLUTION_HD),this.captureDelay=1e3,this.overlay=new i.SelectionOverlayConfiguration,this.scanAndCount=new r.BarcodeCountConfiguration,this.onBarcodesDetected=function(t){}}static fromJson(t){const e=new s;return this.mapValues(t,e,["style","videoConstraints","overlay","scanAndCount","finder","userGuidance"]),this.mapFinderConfiguration(e,t),t.overlay&&(this.mapValues(t.overlay,e.overlay,["style"]),t.overlay.style&&this.mapValues(t.overlay.style,e.overlay.style)),t.scanAndCount&&(this.mapValues(t.scanAndCount,e.scanAndCount,["style"]),t.scanAndCount.style&&this.mapValues(t.scanAndCount.style,e.scanAndCount.style)),this.mapVideoConstraints(t,e),e}}e.BarcodeScannerConfiguration=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionOverlayConfiguration=e.SelectionOverlayStyleConfiguration=e.BarcodePolygonLabelStyle=e.BarcodePolygonStyle=void 0;e.BarcodePolygonStyle=class{};e.BarcodePolygonLabelStyle=class{};class o{constructor(){this.defaultFillColor="rgba(255, 0, 0, 0.3)",this.defaultHighlightedFillColor="rgba(0, 255, 0, 0.3)",this.polygonStrokeColor="rgba(255, 0, 0, 1)",this.polygonFillColor=this.defaultFillColor,this.polygonStrokeWidth=1,this.polygonCornerRadius=0,this.highlightedPolygonStrokeColor="rgba(0, 255, 0, 1)",this.highlightedPolygonFillColor=this.defaultHighlightedFillColor,this.highlightedPolygonStrokeWidth=2,this.highlightedPolygonCornerRadius=0,this.textColor="white",this.textBackgroundColor="rgba(255, 0, 0, 0.9)",this.highlightedTextColor="white",this.highlightedTextBackgroundColor="rgba(0, 255, 0, 0.9)"}}e.SelectionOverlayStyleConfiguration=o;e.SelectionOverlayConfiguration=class{constructor(){this.visible=!1,this.textFormat="Text",this.automaticSelectionEnabled=!1,this.style=new o}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.barcodeScannerViewConfigFromRtuUiConfig=void 0;const o=n(79);e.barcodeScannerViewConfigFromRtuUiConfig=function(t){const e=(new o.BarcodeScannerConfiguration).videoConstraints;return e.facingMode="FRONT"===t.cameraModule?"user":"environment",{videoConstraints:e}}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DrawerHeaderContent=e.DrawerHeaderContentProps=void 0;const i=o(n(1)),r=n(40),a=n(2),s=n(9),l=n(4);e.DrawerHeaderContentProps=class{},e.DrawerHeaderContent=function(t){const e=Object.assign(Object.assign({},t.title),{text:l.SBTheme.getLocalizedBarcodeText(t.title.text).replace("%d",t.numBarcodes.toString())});return i.default.createElement(i.default.Fragment,null,i.default.createElement(r.StyledButton,Object.assign({},t.leftButton)),i.default.createElement(a.Typography,{sx:{flex:2,textAlign:"center",fontWeight:600,fontSize:18}},i.default.createElement(s.StyledText,{config:e})),i.default.createElement(r.StyledButton,Object.assign({},t.rightButton)))}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=void 0;const i=o(n(1)),r=n(2),a=o(n(144)),s=n(25),l=n(4),u=n(9);e.Props=class{},e.default=function(t){return 0!==t.numBarcodes?null:i.default.createElement("div",{style:{display:"flex",alignItems:"center",flexDirection:"column",marginTop:"auto",marginBottom:"auto",overflowY:"scroll"}},t.style.placeholderIcon.visible&&i.default.createElement(r.Avatar,{style:{backgroundColor:l.SBTheme.getColorValue(t.style.placeholderIconBackground),width:100,height:100}},i.default.createElement(a.default,{color:l.SBTheme.getColorValue(t.style.placeholderIcon.color)})),i.default.createElement(r.Typography,{style:{marginTop:20},variant:"h6"},i.default.createElement(u.StyledText,{config:t.style.placeholderTitle})),i.default.createElement(r.Typography,{style:{marginTop:20,paddingLeft:"10%",paddingRight:"10%",maxWidth:400,textAlign:"center"},variant:"body2"},i.default.createElement(u.StyledText,{config:t.style.placeholderSubtitle})),t.onStartClick&&i.default.createElement(s.DialogButton,Object.assign({style:{width:"60%",marginTop:20}},t.style.startScanningButton,{visible:!0,onClick:t.onStartClick})))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useDragListener=e.TouchEvent=e.DragProps=void 0;const o=n(1),i=n(5);e.DragProps=class{};e.TouchEvent=class{},e.useDragListener=function(t,e,n){const r=(0,o.useRef)(),a=(0,o.useRef)(null),[s,l]=(0,o.useState)(),[u,c]=(0,o.useState)(!1),d=(0,o.useRef)([]),f=t=>{let n="none";if(d.current.length>0){const e=200,o=((t,e)=>{let n=t[0],o=Math.abs(n.time-e);for(let i=1;i<t.length;i++){const r=Math.abs(t[i].time-e);r<o&&(n=t[i],o=r)}return n})(d.current,t.timeStamp-e),i=o.y-t.clientY,r=100;i>r?n="up":i<-r&&(n="down")}d.current.splice(0,d.current.length),e(new i.Point(t.clientX,t.clientY),n)},h={onPointerDown:t=>{t.target.setPointerCapture(t.pointerId),c(!0),a.current=new i.Point(t.clientX,t.clientY),l(i.Point.empty()),t.stopPropagation()},onPointerMove:e=>{if(!u)return;const n=new i.Point(e.clientX,e.clientY);r.current=e,l(n),t(n),d.current.push({x:e.clientX,y:e.clientY,time:e.timeStamp})},onPointerUp:t=>{t.target.releasePointerCapture(t.pointerId),c(!1),f(t)},onPointerCancel:t=>{t.target.releasePointerCapture(t.pointerId),c(!1),n()}};return{startPoint:a,currentPoint:s,props:h,stop:()=>{r.current.stopPropagation()},dragOngoing:u}}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DraggableBaseContainer=void 0;const i=o(n(1));class r extends i.default.Component{constructor(){super(...arguments),this.POINT_COUNT=4,this.items=[],this.DRAG_BUFFER=5}get pointSize(){var t,e;return(null===(t=this.props.style)||void 0===t?void 0:t.size)?(null===(e=this.props)||void 0===e?void 0:e.scale)?this.props.style.size/this.props.scale:this.props.style.size:0}get pointStyle(){var t,e;return{width:this.pointSize+"px",height:this.pointSize+"px",border:null===(t=this.props.style)||void 0===t?void 0:t.border,borderRadius:this.pointSize/2+"px",backgroundColor:null===(e=this.props.style)||void 0===e?void 0:e.color,position:"absolute",cursor:"pointer",zIndex:500}}nextIndex(t){return(t+1)%this.POINT_COUNT}previousIndex(t){return(t-1+this.POINT_COUNT)%this.POINT_COUNT}isHorizontal(t){return t%2==0}isOutOfBounds(t,e){return t<-this.DRAG_BUFFER||t>e+this.DRAG_BUFFER}get invisibleHandleStyle(){return{width:"50px",height:"50px",opacity:0,position:"relative",top:this.pointSize/2-25+"px",left:this.pointSize/2-25+"px",borderRadius:"25px"}}}e.DraggableBaseContainer=r},function(t,e){t.exports=function(t,e,n,o){var i=n?n.call(o,t,e):void 0;if(void 0!==i)return!!i;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;var r=Object.keys(t),a=Object.keys(e);if(r.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(e),l=0;l<r.length;l++){var u=r[l];if(!s(u))return!1;var c=t[u],d=e[u];if(!1===(i=n?n.call(o,c,d,u):void 0)||void 0===i&&c!==d)return!1}return!0}},function(t,e,n){"use strict";e.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(t,e,n){"use strict";function o(t){var e=Object.create(null);return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}n.d(e,"a",(function(){return r}));var i=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,r=o((function(t){return i.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91}))},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ScanbotSDK=void 0;const i=o(n(20));e.ScanbotSDK=i.default},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerBridge=void 0;const i=n(50),r=n(92);class a{constructor(t,e,n){t||(t=i.Constants.CDN_PATH+i.Constants.DEFAULT_WASM_FOLDER),this.core=new r.WorkerBridge(t,e),this.coreInitializationSuccessful=this.core.postByCopyingArgs("initialize",n)}awaitInitialized(){return o(this,void 0,void 0,(function*(){yield this.getCoreForCommand()}))}postByCopyingArgs(t,e){return o(this,void 0,void 0,(function*(){return(yield this.getCoreForCommand(t)).postByCopyingArgs(t,e)}))}postByTransferringArgs(t,e){return o(this,void 0,void 0,(function*(){return(yield this.getCoreForCommand(t)).postByTransferringArgs(t,e)}))}getCoreForCommand(t=""){return o(this,void 0,void 0,(function*(){const e=yield this.coreInitializationSuccessful;if("getLicenseInfo"===t||e)return this.core;throw new Error("WASM not initialized successfully. This can be due to an invalid license or problems loading the WASM file. Please check the console for more information.")}))}}e.WorkerBridge=a,a.ASM_JS="ScanbotSDK.Core.js"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=""},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerBridge=void 0;var o=n(51);e.WorkerBridge=class{constructor(t,e){const{requestSuffix:n=""}=e||{},i=(0,o.getBuildType)(e),r=`${t}${t.endsWith("/")?"":"/"}ScanbotSDK.Core${i}.js${n}`;if((0,o.isRemote)(r)){const t=new Blob([`importScripts("${r}")`]);this.instance=new Worker(URL.createObjectURL(t))}else this.instance=new Worker(r);this.continuations={},this.nextTicketId=1,this.instance.onmessage=t=>{const{log:e,logError:n}=t.data;if(e)return void console.log(...e);if(n)return void console.error(...n);const{ticket:o,result:i,error:r}=t.data,{resolve:a,reject:s}=this.continuations[o];delete this.continuations[o],r?s(r):a(i)}}post(t,e,n){return new Promise(((i,r)=>{const a=(0,o.gatherTransferables)(e,n),s=this.nextTicketId++;this.continuations[s]={resolve:i,reject:r},this.instance.postMessage({command:t,args:e,ticket:s},a)}))}postByCopyingArgs(t,e){return this.post(t,e,!0)}postByTransferringArgs(t,e){return this.post(t,e,!1)}destroy(){this.instance.terminate()}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LicenseInfo=void 0;class o{isValid(){return"Okay"===this.status||"Trial"===this.status}static fromJson(t){const e=new o;return e.status=t.licenseStatus,e.description=t.description,e}}e.LicenseInfo=o},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});e.default=class{constructor(t,e){this._sdk=t,this._pdfOperation=e}addPage(t){return o(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByCopyingArgs("addPageToPdf",[this._pdfOperation,t])}))}complete(){return o(this,void 0,void 0,(function*(){return yield this._sdk.bridge.postByCopyingArgs("completePdf",[this._pdfOperation])}))}}},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});const i=n(55);e.default=class{constructor(t,e){this._sdk=t,this._tiffOperation=e}addPage(t){return o(this,void 0,void 0,(function*(){let e;e=t instanceof i.ImageProcessor?t.__token:t,yield this._sdk.bridge.postByCopyingArgs("addPageToTiff",[this._tiffOperation,e])}))}complete(){return o(this,void 0,void 0,(function*(){return yield this._sdk.bridge.postByCopyingArgs("completeTiff",[this._tiffOperation])}))}}},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});const i=n(97);e.default=class{constructor(t,e,n){this._sdk=t,this._mrzRecognizerToken=e,this.enableFrameAccumulation=n}recognize(t){return o(this,void 0,void 0,(function*(){try{let e=yield this._sdk.bridge.postByTransferringArgs("recognizeMRZ",[yield this._mrzRecognizerToken,t]);if(null===e)return;const n=i.MrzResult.fromWorker(e);return this.enableFrameAccumulation||delete n.verificationSuccessful,n}catch(t){return void console.warn(t)}}))}recognizeURL(t){return o(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),i=document.createElement("img");i.src=t,i.onload=()=>o(this,void 0,void 0,(function*(){n.width=i.width,n.height=i.height;const t=n.getContext("2d");t.drawImage(i,0,0);const o=t.getImageData(0,0,i.width,i.height),r=yield this.recognize(o);r&&e(r)}))}))}))}release(){return o(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("releaseObject",[yield this._mrzRecognizerToken])}))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MrzResult=e.MrzCheckDigits=e.MrzField=void 0;class o{constructor(t,e,n,o){this.value=e,this.confidence=n,this.validated=o,this.name=t}}e.MrzField=o;class i{}e.MrzCheckDigits=i;class r{static fromWorker(t){let e=new r;e.verificationSuccessful=t.verificationSuccessful;const n=new i,a=t.recognitionSuccessful;return(t.fields||[]).forEach((t=>{switch(t.name){case"DocumentNumber":e.documentNumber=new o(t.name,t.text,t.confidence,t.validated);break;case"IssuingAuthority":e.issuingAuthority=new o(t.name,t.text,t.confidence,t.validated);break;case"DepartmentOfIssuance":e.departmentOfIssuance=new o(t.name,t.text,t.confidence,t.validated);break;case"GivenNames":e.givenNames=new o(t.name,t.text,t.confidence,t.validated);break;case"Surname":e.surname=new o(t.name,t.text,t.confidence,t.validated);break;case"Nationality":e.nationality=new o(t.name,t.text,t.confidence,t.validated);break;case"BirthDate":e.birthDate=new o(t.name,t.text,t.confidence,t.validated);break;case"Gender":e.gender=new o(t.name,t.text,t.confidence,t.validated);break;case"ExpiryDate":e.expiryDate=new o(t.name,t.text,t.confidence,t.validated);break;case"PersonalNumber":e.personalNumber=new o(t.name,t.text,t.confidence,t.validated);break;case"TravelDocType":e.travelDocType=new o(t.name,t.text,t.confidence,t.validated);break;case"TravelDocTypeVariant":e.travelDocTypeVariant=new o(t.name,t.text,t.confidence,t.validated);break;case"DiscreetIssuingStateOrOrganization":e.discreetIssuingStateOrOrganization=new o(t.name,t.text,t.confidence,t.validated);break;case"DocumentTypeCode":e.kindOfDocumentField=new o(t.name,t.text,t.confidence,t.validated);break;case"DocumentType":e.documentType=new o(t.name,t.text,t.confidence,t.validated);break;case"Format":e.format=new o(t.name,t.text,t.confidence,t.validated);break;case"PINCode":e.pinCode=new o(t.name,t.text,t.confidence,t.validated);break;case"LanguageCode":e.languageCode=new o(t.name,t.text,t.confidence,t.validated);break;case"VersionNumber":e.versionNumber=new o(t.name,t.text,t.confidence,t.validated);break;case"CheckDigitGeneral":n.general=new o(t.name,t.text,t.confidence,t.validated);break;case"CheckDigitDocumentNumber":n.documentNumber=new o(t.name,t.text,t.confidence,t.validated);break;case"CheckDigitBirthDate":n.birthDate=new o(t.name,t.text,t.confidence,t.validated);break;case"CheckDigitExpiryDate":n.expiryDate=new o(t.name,t.text,t.confidence,t.validated);break;case"CheckDigitPersonalNumber":n.personalNumber=new o(t.name,t.text,t.confidence,t.validated);break;case"Optional1":e.optional1=new o(t.name,t.text,t.confidence,t.validated);break;case"Optional2":e.optional2=new o(t.name,t.text,t.confidence,t.validated)}})),e.documentType||(e.documentType=new o("DocumentType",t.documentType)),a?e.checkDigits=n:e=void 0,e}}e.MrzResult=r},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});e.default=class{constructor(t,e){this._sdk=t,this._OcrEngineToken=e}performOcr(t){return o(this,void 0,void 0,(function*(){return yield this._sdk.bridge.postByCopyingArgs("performOcr",[this._OcrEngineToken,t])}))}recognizeURL(t){return o(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),i=document.createElement("img");i.src=t,i.onload=()=>o(this,void 0,void 0,(function*(){n.width=i.width,n.height=i.height;const t=n.getContext("2d");t.drawImage(i,0,0);const o=t.getImageData(0,0,i.width,i.height),r=yield this.performOcr(o);e(r)}))}))}))}release(){return o(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("releaseObject",[this._OcrEngineToken])}))}}},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});const i=n(100);e.default=class{constructor(t,e){this._sdk=t,this._textDataScannerToken=e}recognize(t){return o(this,void 0,void 0,(function*(){try{let e=yield this._sdk.bridge.postByTransferringArgs("recognizeTextLine",[yield this._textDataScannerToken,t]);if(null===e)return;return i.TextDataScannerResult.fromWorker(e)}catch(t){return void console.warn(t)}}))}cleanRecognitionQueue(){return o(this,void 0,void 0,(function*(){try{yield this._sdk.bridge.postByTransferringArgs("cleanTextLineRecognitionQueue",[yield this._textDataScannerToken])}catch(t){return void console.warn(t)}}))}recognizeURL(t){return o(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),i=document.createElement("img");i.src=t,i.onload=()=>o(this,void 0,void 0,(function*(){n.width=i.width,n.height=i.height;const t=n.getContext("2d");t.drawImage(i,0,0);const o=t.getImageData(0,0,i.width,i.height),r=yield this.recognize(o);r&&e(r)}))}))}))}release(){return o(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("releaseObject",[yield this._textDataScannerToken])}))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextDataScannerResult=void 0;class o{static fromWorker(t){if(!t)return;const e=new o;return e.text=t.rawText,e.confidence=t.confidence,e.validated=t.validationSuccessful,e}}e.TextDataScannerResult=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextDataScannerConfiguration=void 0;const o=n(15),i=n(23);class r extends i.ViewFinderScannerConfiguration{constructor(){super(o.ScannerConfiguration.DEFAULT_VIDEO_RESOLUTION_HD),this.onTextDetected=function(t){},this.finder.aspectRatio.width=6,this.userGuidance.title.text="Please hold the device over the text to start scanning"}static fromJson(t){const e=new r;return this.mapFinderConfiguration(e,t),this._fromJson(e,t)}}e.TextDataScannerConfiguration=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExpectedBarcode=void 0;const o=n(6);class i extends o.PartiallyConstructible{constructor(t={}){if(super(),this.count=1,void 0===t.barcodeValue)throw new Error("barcodeValue must be present in constructor argument");if(this.barcodeValue=t.barcodeValue,void 0===t.title)throw new Error("title must be present in constructor argument");if(this.title=null!=t.title?t.title:null,void 0===t.image)throw new Error("image must be present in constructor argument");this.image=null!=t.image?t.image:null,void 0!==t.count&&(this.count=t.count)}}e.ExpectedBarcode=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeScannerConfiguration=void 0;const o=n(60),i=n(3),r=n(3),a=n(65),s=n(64),l=n(61),u=n(3),c=n(59),d=n(66),f=n(6),h=n(39),p=n(3),m=n(3),g=n(3),v=n(3),y=n(37),b=n(3),A=n(3),S=n(3),C=n(38),_=n(63),w=n(3),x=n(39);class O extends f.PartiallyConstructible{constructor(t={}){super(),this.version="1.0",this.screen="BarcodeScanner",this.palette=new g.Palette({sbColorPrimary:"#C8193C",sbColorPrimaryDisabled:"#F5F5F5",sbColorNegative:"#FF3737",sbColorPositive:"#4EFFB4",sbColorWarning:"#FFCE5C",sbColorSecondary:"#FFEDEE",sbColorSecondaryDisabled:"#F5F5F5",sbColorOnPrimary:"#FFFFFF",sbColorOnSecondary:"#C8193C",sbColorSurface:"#FFFFFF",sbColorOutline:"#EFEFEF",sbColorOnSurfaceVariant:"#707070",sbColorOnSurface:"#000000",sbColorSurfaceLow:"#00000026",sbColorSurfaceHigh:"#0000007A",sbColorModalOverlay:"#000000A3"}),this.localization=new s.BarcodeTextLocalization({}),this.backgroundColor="?sbColorSurfaceLow",this.topBar=new C.TopBarConfiguration({title:new A.StyledText({text:"?topBarTitle",color:"?sbColorOnPrimary"}),mode:"SOLID",statusBarMode:"LIGHT",backgroundColor:"?sbColorPrimary",cancelButton:new u.ButtonConfiguration({visible:!0,text:"?topBarCancelButton",background:new r.BackgroundStyle({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new p.ForegroundStyle({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})})}),this.actionBar=new o.ActionBarConfiguration({flashButton:new v.RoundButton({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorWarning",activeForegroundColor:"#1C1B1F"}),zoomButton:new v.RoundButton({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),flipCameraButton:new v.RoundButton({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"})}),this.viewFinder=new x.ViewFinderConfiguration({visible:!0,style:new h.FinderCorneredStyle({strokeColor:"?sbColorSurface",strokeWidth:2,cornerRadius:10}),overlayColor:"?sbColorSurfaceLow",aspectRatio:new i.AspectRatio({width:1,height:1})}),this.userGuidance=new _.UserGuidanceConfiguration({visible:!0,title:new A.StyledText({text:"?userGuidance",color:"?sbColorOnPrimary"}),background:new r.BackgroundStyle({strokeColor:"#00000000",fillColor:"?sbColorSurfaceLow",strokeWidth:0})}),this.cameraPermission=new d.CameraPermissionScreen({statusBarMode:"DARK",background:"?sbColorSurface",iconBackground:"?sbColorOutline",icon:new m.IconStyle({visible:!0,color:"?sbColorOnSurface"}),enableCameraButton:new u.ButtonConfiguration({visible:!0,text:"?cameraPermissionEnableCameraButton",background:new r.BackgroundStyle({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:0}),foreground:new p.ForegroundStyle({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),closeButton:new u.ButtonConfiguration({visible:!0,text:"?cameraPermissionCloseButton",background:new r.BackgroundStyle({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new p.ForegroundStyle({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),enableCameraTitle:new A.StyledText({text:"?cameraPermissionEnableCameraTitle",color:"?sbColorOnSurface"}),enableCameraExplanation:new A.StyledText({text:"?cameraPermissionEnableCameraExplanation",color:"?sbColorOnSurfaceVariant"})}),this.cameraConfiguration=new c.CameraConfiguration({}),this.recognizerConfiguration=new a.BarcodeRecognizerConfiguration({}),this.useCase=new y.SingleScanningMode({}),this.sound=new b.Sound({successBeepEnabled:!0,soundType:"MODERN_BEEP"}),this.vibration=new w.Vibration({enabled:!0}),this.timeouts=new S.Timeouts({autoCancelTimeout:0,initialScanDelay:0}),void 0!==t.version&&(this.version=t.version),void 0!==t.screen&&(this.screen=t.screen),void 0!==t.palette&&(this.palette=new g.Palette(t.palette)),void 0!==t.localization&&(this.localization=new s.BarcodeTextLocalization(t.localization)),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.topBar&&(this.topBar=new C.TopBarConfiguration(t.topBar)),void 0!==t.actionBar&&(this.actionBar=new o.ActionBarConfiguration(t.actionBar)),void 0!==t.viewFinder&&(this.viewFinder=new x.ViewFinderConfiguration(t.viewFinder)),void 0!==t.userGuidance&&(this.userGuidance=new _.UserGuidanceConfiguration(t.userGuidance)),void 0!==t.cameraPermission&&(this.cameraPermission=new d.CameraPermissionScreen(t.cameraPermission)),void 0!==t.cameraConfiguration&&(this.cameraConfiguration=new c.CameraConfiguration(t.cameraConfiguration)),void 0!==t.recognizerConfiguration&&(this.recognizerConfiguration=new a.BarcodeRecognizerConfiguration(t.recognizerConfiguration)),void 0!==t.useCase&&(this.useCase=l.BarcodeUseCase.From(t.useCase)),void 0!==t.sound&&(this.sound=new b.Sound(t.sound)),void 0!==t.vibration&&(this.vibration=new w.Vibration(t.vibration)),void 0!==t.timeouts&&(this.timeouts=new S.Timeouts(t.timeouts))}}e.BarcodeScannerConfiguration=O},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeScannerResult=void 0;const o=n(67),i=n(6);class r extends i.PartiallyConstructible{constructor(t={}){super(),this.items=[],void 0!==t.items&&(this.items=t.items.map((t=>new o.BarcodeItem(t))))}}e.BarcodeScannerResult=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScanbotAlertDialog=void 0;const o=n(3),i=n(6),r=n(3);class a extends i.PartiallyConstructible{constructor(t={}){if(super(),this.title=new r.StyledText({text:"Title",color:"?sbColorOnSurface"}),this.subtitle=new r.StyledText({text:"Standard explanation message text.",color:"?sbColorOnSurfaceVariant"}),this.sheetColor="?sbColorSurface",this.modalOverlayColor="?sbColorModalOverlay",this.dividerColor="?sbColorOutline",void 0!==t.title&&(this.title=new r.StyledText(t.title)),void 0!==t.subtitle&&(this.subtitle=new r.StyledText(t.subtitle)),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.modalOverlayColor&&(this.modalOverlayColor=t.modalOverlayColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0===t.okButton)throw new Error("okButton must be present in constructor argument");if(this.okButton=new o.ButtonConfiguration(t.okButton),void 0===t.cancelButton)throw new Error("cancelButton must be present in constructor argument");this.cancelButton=new o.ButtonConfiguration(t.cancelButton)}}e.ScanbotAlertDialog=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VINScannerConfiguration=void 0;const o=n(15),i=n(23);class r extends i.ViewFinderScannerConfiguration{constructor(){super(o.ScannerConfiguration.DEFAULT_VIDEO_RESOLUTION_HD),this.onTextDetected=function(t){},this.finder.aspectRatio.width=6,this.userGuidance.title.text="Please hold the device over the vehicle identification number to start scanning"}static fromJson(t){const e=new r;return this.mapFinderConfiguration(e,t),this._fromJson(e,t)}}e.VINScannerConfiguration=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LicenseError=void 0;class o extends Error{constructor(t){super(t.description),this.name="LicenseError"}}e.LicenseError=o},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const r=i(n(68));e.default=class{constructor(t,e){this._sdk=t,this._token=e}analyze(t){return o(this,void 0,void 0,(function*(){r.default.throwIfMissingBuffer(t);return yield this._sdk.bridge.postByCopyingArgs("documentQualityAnalyzerAnalyze",[this._token,t])}))}release(){return o(this,void 0,void 0,(function*(){yield this._sdk.bridge.postByTransferringArgs("releaseObject",[this._token])}))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.ScanbotBinarizationFilter=class{constructor(){this.outputMode="BINARY"}toWireType(){return{$type:"ScanbotBinarizationFilter",outputMode:this.outputMode}}};e.CustomBinarizationFilter=class{constructor(){this.preset="PRESET_4",this.outputMode="BINARY",this.denoise=.5,this.radius=32}toWireType(){return{$type:"CustomBinarizationFilter",preset:this.preset,outputMode:this.outputMode,denoise:this.denoise,radius:this.radius}}};e.ColorDocumentFilter=class{constructor(){this.valueStrength=1.5,this.saturationStrength=1.5,this.saturationOffset=64}toWireType(){return{$type:"ColorDocumentFilter",valueStrength:this.valueStrength,saturationStrength:this.saturationStrength,saturationOffset:this.saturationOffset}}};e.BrightnessFilter=class{constructor(){this.brightness=0}toWireType(){return{$type:"BrightnessFilter",brightness:this.brightness}}};e.ContrastFilter=class{constructor(){this.contrast=0}toWireType(){return{$type:"ContrastFilter",contrast:this.contrast}}};e.GrayscaleFilter=class{constructor(){this.autocontrast=!0,this.borderWidthFraction=.06,this.blackOutliersFraction=0,this.whiteOutliersFraction=.02}toWireType(){return{$type:"GrayscaleFilter",autocontrast:this.autocontrast,borderWidthFraction:this.borderWidthFraction,blackOutliersFraction:this.blackOutliersFraction,whiteOutliersFraction:this.whiteOutliersFraction}}};e.LegacyFilter=class{constructor(){this.filterType=0}toWireType(){return{$type:"LegacyFilter",filterType:this.filterType}}};e.WhiteBlackPointFilter=class{constructor(){this.blackPoint=0,this.whitePoint=1}toWireType(){return{$type:"WhiteBlackPointFilter",blackPoint:this.blackPoint,whitePoint:this.whitePoint}}}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const l=s(n(1)),u=n(112),c=n(113),d=r(n(17)),f=s(n(44));class h{static createBarcodeScanner(t){return new Promise(((e,n)=>{f.default.INSTANCE.initialize(t.sound);const o=h.createContainer("barcode-scanner-controller"),i=(0,u.createRoot)(o),r=()=>a(this,void 0,void 0,(function*(){return new Promise((t=>{window.setTimeout((()=>{i.unmount(),document.body.removeChild(o),t()}),0)}))}));i.render(l.default.createElement(c.BarcodeScannerController,{configuration:t,onClose:()=>a(this,void 0,void 0,(function*(){yield r(),e(null)})),onSubmit:t=>a(this,void 0,void 0,(function*(){yield r(),e(t)})),onError:t=>a(this,void 0,void 0,(function*(){yield r(),n(t)}))}))}))}static createContainer(t){const e=document.createElement("div");return e.id=t,e.style.position="fixed",e.style.width="100%",e.style.height="100%",e.style.zIndex="1000",e.style.top="0",e.style.backgroundColor="rgba(0, 0, 0, 0.5)",document.body.appendChild(e),e}}h.Config=d,e.default=h},function(t,e,n){const{render:o,hydrate:i,unmountComponentAtNode:r}=n(1);function a(t){return{render(e){o(e,t)},unmount(){r(t)}}}e.createRoot=a,e.hydrateRoot=function(t,e){return i(e,t),a(t)}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeScannerController=e.Props=void 0;const s=r(n(1)),l=n(2),u=a(n(2)),c=n(4),d=a(n(16)),f=n(114),h=n(141),p=n(153),m=n(19),g=n(154),v=n(47),y=n(69),b=n(155);e.Props=class{},e.BarcodeScannerController=function(t){const e=(0,s.useRef)((0,v.createSBTheme)()),[n,o]=(0,s.useState)(!1),[i,r]=(0,s.useState)(!1),a=(0,s.useRef)(t.configuration.timeouts.initialScanDelay<=0),A=(0,s.useRef)(),S=(0,s.useRef)(),C=(0,s.useMemo)((()=>new m.BarcodeMapper(t.configuration.useCase.barcodeInfoMapping.barcodeItemMapper,((t,e)=>{o(!0),A.current=()=>{o(!1),t()},S.current=()=>{o(!1),e()}}))),[]);let _;if((0,s.useEffect)((()=>{c.SBTheme.setPalette(t.configuration.palette),c.SBTheme.setBarcodeTextLocalization(t.configuration.localization)}),[t.configuration]),(0,s.useEffect)((()=>{if(t.configuration.timeouts.autoCancelTimeout>0){const e=setTimeout((()=>{t.onClose()}),t.configuration.timeouts.autoCancelTimeout);return()=>{clearTimeout(e)}}}),[]),(0,s.useEffect)((()=>{if(t.configuration.timeouts.initialScanDelay>0){const e=setTimeout((()=>{a.current=!0}),t.configuration.timeouts.initialScanDelay);return()=>{clearTimeout(e)}}}),[]),"SingleScanningMode"===t.configuration.useCase._type)_=s.default.createElement(f.SingleScanningModeController,{configuration:t.configuration,onClose:t.onClose,onSubmit:t.onSubmit,onCameraPermissionDenied:()=>r(!0),initialScanDelayHasPassed:a});else{if("MultipleScanningMode"!==t.configuration.useCase._type)throw new Error("Unsupported use case type");_=s.default.createElement(h.MultipleScanningModeController,{configuration:t.configuration,onSubmit:t.onSubmit,onCameraPermissionDenied:()=>r(!0),initialScanDelayHasPassed:a})}return s.default.createElement(s.default.Fragment,null,s.default.createElement(y.DynamicViewportHeightCssProperty,null),s.default.createElement(p.ErrorBoundary,{onError:t.onError,fallback:s.default.createElement("div",null,"Error")},s.default.createElement(c.SBPaletteContext.Provider,{value:(0,c.createSBPaletteContextValue)(t.configuration.palette)},s.default.createElement(m.BarcodeMapperContext.Provider,{value:C},s.default.createElement(l.ThemeProvider,{theme:e.current},s.default.createElement(g.BarcodeMappingErrorDialog,Object.assign({open:n,handleCancel:S.current,handleRetry:A.current,modalOverlayColor:t.configuration.useCase.barcodeInfoMapping.modalOverlayColor,dividerColor:t.configuration.useCase.barcodeInfoMapping.dividerColor,sheetColor:t.configuration.useCase.barcodeInfoMapping.sheetColor},t.configuration.useCase.barcodeInfoMapping.errorState)),s.default.createElement(u.default,{sx:{height:`100 * ${y.dvhCssValue}`,width:"100vw",backgroundColor:c.SBTheme.getColorValue(t.configuration.backgroundColor)}},s.default.createElement(d.default,Object.assign({onBackPress:t.onClose},t.configuration.topBar),!i&&_,i&&s.default.createElement(b.CameraPermissionDenied,{onAppClose:t.onClose,config:t.configuration.cameraPermission}))))))))}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SingleScanningModeController=void 0;const s=r(n(1)),l=n(2),u=n(115),c=n(19),d=n(16),f=n(43),h=a(n(44)),p=a(n(71)),m=n(72),g=n(4),v=n(81);e.SingleScanningModeController=function(t){const[e,n]=(0,s.useState)(null),[o,i]=(0,s.useState)(!0),r=(0,s.useMemo)((()=>"__sb_"+Math.random()),[]),a=(0,s.useContext)(c.BarcodeMapperContext),y=t.configuration.useCase,b=Object.assign(Object.assign({},(0,v.barcodeScannerViewConfigFromRtuUiConfig)(t.configuration.cameraConfiguration)),{onBarcodesDetected:e=>{e.barcodes.length>0&&!y.arOverlay.visible&&t.initialScanDelayHasPassed.current&&n(e.barcodes[0]),h.default.INSTANCE.beep(t.configuration.sound),p.default.INSTANCE.vibrate(t.configuration.vibration)},onError:t=>{},returnBarcodeImage:!y.barcodeInfoMapping.barcodeItemMapper,containerId:r,captureDelay:0,backgroundColor:g.SBTheme.getColorValue(t.configuration.backgroundColor)}),A=(0,s.useMemo)((()=>{let t;return t=null===e?[]:[a.mapBarcodeToBarcodeItem(e,1)],{items:t}}),[e]);(0,s.useEffect)((()=>{null===e||y.confirmationSheetEnabled||t.onSubmit(A)}),[e,y.confirmationSheetEnabled]);const S=a.useBarcodeMappedData(e);(0,s.useEffect)((()=>{"FAILED"===(null==S?void 0:S.state)&&n(null)}),[null==S?void 0:S.state]);const C=(0,s.useContext)(d.NavigationBarSizeContext);return s.default.createElement(s.default.Fragment,null,s.default.createElement(u.BarcodeInfoDialog,Object.assign({open:!!S&&["LOADED","LOADING"].includes(S.state),handleCancel:()=>{n(null)},handleSubmit:()=>{t.onSubmit(A)},barcodeMappedData:S},(0,u.barcodeInfoDialogStylingPropsFromConfig)(y),{displayRightArrow:!1,modalOverlayColor:y.barcodeInfoMapping.modalOverlayColor})),s.default.createElement(l.Box,{id:r,sx:{width:"100%",height:C.remainingVisibleBodyHeight}},s.default.createElement(m.BarcodeScanner,{cameraConfiguration:t.configuration.cameraConfiguration,scanningPaused:null!==e,setActionButtonsVisible:i,viewFinderPadding:{minTopPadding:C.minTopPaddingForViewFinder,minBottomPadding:o?2*f.ACTION_BUTTON_PADDING+f.ACTION_BUTTON_HEIGHT:0},barcodeScannerViewConfig:b,arOnBarcodeClick:t=>n(t),arOnBarcodeEnter:e=>{y.arOverlay.automaticSelectionEnabled&&t.initialScanDelayHasPassed.current&&n(e)},arOverlay:Object.assign(Object.assign({},y.arOverlay),{counterBadge:Object.assign(Object.assign({},y.arOverlay.counterBadge),{visible:!1})}),containerId:r,actionBarConfig:t.configuration.actionBar,actionBarBottomPadding:f.ACTION_BUTTON_PADDING,onCameraPermissionDenied:t.onCameraPermissionDenied})))}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeInfoDialog=e.barcodeInfoDialogStylingPropsFromConfig=void 0;const s=n(2),l=r(n(1)),u=n(41),c=n(4),d=a(n(2)),f=a(n(2)),h=n(25),p=n(9),m=n(42);e.barcodeInfoDialogStylingPropsFromConfig=function(t){return{sheetColorLoaded:t.sheetColor,sheetColorLoading:t.barcodeInfoMapping.sheetColor,barcodeImageVisible:t.barcodeImageVisible,barcodeTitle:t.barcodeTitle,barcodeSubtitle:t.barcodeSubtitle,cancelButton:t.cancelButton,submitButton:t.submitButton,dividerColor:t.dividerColor,loadingMessage:t.barcodeInfoMapping.loadingMessage}},e.BarcodeInfoDialog=function(t){const e=(0,l.useContext)(c.SBPaletteContext).getColorValue,n=!t.barcodeMappedData||"LOADED"!==t.barcodeMappedData.state,o={backgroundColor:e(n?t.sheetColorLoading:t.sheetColorLoaded)},[i,r]=l.default.useState(),a=(0,l.useRef)((()=>{}));(0,l.useEffect)((()=>{t.open&&r(!1)}),[t.open]);const g=()=>{a.current=t.handleCancel,r(!0)};return l.default.createElement(m.StyledDialog,{modalOverlayColor:t.modalOverlayColor,open:t.open&&!i,fullWidth:!0,TransitionProps:{onExited:()=>{i&&a.current()}},onClose:()=>{n||g()}},l.default.createElement(s.DialogContent,{style:o},l.default.createElement(u.BarcodeInfo,Object.assign({},t,{maxNumberOfTitleLines:2,maxNumberOfSubtitleLines:1,imageSize:68}))),l.default.createElement(s.DialogActions,{style:o},l.default.createElement(d.default,{container:!0,spacing:2,sx:{overflow:"hidden"}},l.default.createElement(d.default,{item:!0,xs:12},l.default.createElement(f.default,{color:e(t.dividerColor)})),n?l.default.createElement(d.default,{item:!0,xs:12,sx:{textAlign:"center"}},l.default.createElement(s.Box,null,l.default.createElement(s.CircularProgress,{sx:{color:e(t.loadingMessage.color),verticalAlign:"middle",mr:2}}),l.default.createElement(p.StyledText,{config:t.loadingMessage}))):l.default.createElement(l.default.Fragment,null,l.default.createElement(d.default,{item:!0,xs:6},l.default.createElement(h.DialogButton,Object.assign({style:{width:"100%"},onClick:g},t.cancelButton))),l.default.createElement(d.default,{item:!0,xs:6},l.default.createElement(h.DialogButton,Object.assign({style:{width:"100%"},onClick:()=>{a.current=t.handleSubmit,r(!0)}},t.submitButton)))))))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.usePromise=void 0;const o=n(1);e.usePromise=function(t){const e=(0,o.useRef)(!0);(0,o.useEffect)((()=>(e.current=!0,()=>{e.current=!1})));const[,n]=(0,o.useReducer)((t=>t+1),0),i=(0,o.useRef)();return(0,o.useMemo)((()=>{i.current={loading:!0,value:void 0,error:null}}),[t]),function(t,e){(0,o.useMemo)((()=>{t&&t.then((t=>{e({loading:!1,error:null,value:t})})).catch((t=>{e({loading:!1,error:t,value:void 0})}))}),[t])}(t,(t=>{i.current=t,e.current&&n()})),t?i.current:null}},function(t,e,n){"use strict";n.r(e),e.default="data:audio/mp4;base64,AAAAHGZ0eXBNNEEgAAACAE00QSBpc29taXNvMgAAAAhmcmVlAAAEcm1kYXQBQCKAo30ghS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLwDmVAjh8QBrRiUH/88pKh3gJPmPt9t8oIUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLwDsl6UY83aVqFeq3aVmmYyFp70/kJT+A9hdePd7Z7aRSFKZBhCUP6E1rS/9+DhfmhvTknCnQzE+QHVPD6rhSIRpGIAFmBioF1XkxwAQjxKkQMc+qECgXnCAU1IcgpFDnWo02EdihsnrUx/1bJAUo+x6//p8VmoS0iuleHvPnKj9mjjHOoaDGI/s2DHcYI66Grp+5pezZuKJExJOzoyJRdmv6ltO6ibTdTDZ1YqLauKTebYOtpTWnh3/K3kBQmN3NsieqxzHeZKNiFphWuYSWMhaHIZRnRt6O/WzTXYFGrG0wBT54NCQ3wtSpqr5dHbQN2yY0jcckhLUieNtOSjS3u1NuMqWbOx1zHwlHfJKgI349OU9iZEzeN3rCVbBVdrdcAEW9Cm2Ji2FjQNkiFBViV6ofFsNVeVqpKgpsf3/iWtBG6cpMqFHjy2QhyBEnPtwTbWbm9b1u7frF3bnaVykqieEvTKfqnCYL2u4g1CLiQ4Zb8hkkTL9tnGmdMOeqIkUcHZ0zsspzvHOUXJTlssZTRjqcIsp514HJO9YhVRXALKaCRKQkbMEty3CstONNYzuhq57bbccc+/Pq22226ueWXLLbTTw4bFIoQoGWepZBRJWQFh4yui2+evKOqLp+rLKJ4LKcAtQ7XA0aLCyMRVDDOmuoYcnFEmIrpzmRQNQIJ5HWvOesgzjrK071chBhESdztJ0sMqhdAAyjegdEYPNyA4BCDQtLGRRKQQBQIhXYqGZ65Pu1S7XMxxVXEOWtJGMAARETyDKiMN4tsmFfcvmo+sHuHZrY196169rbT/sHFGNK1cnJrBK2vDu7b0AsBd9VaKrsNHL/KxFHm3Yma/+S365yvTF+abktGk7JSrS++mXLBw76AiuijMPpwzPoP4jNzZjI+R/p7zboMSKiFvZkMx8CDIPGB+K2Ee7XaOqAu8z6cWgazCp76DdzIwsmGw2TiczmQMAafEX0U6lQOAA6jQJAfCsBrSxVH+Hw8fPKIpB7JuhzAB/BwAAAw9tb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAATwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACOnRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAATwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAE4AAAgAAAEAAAAAAbJtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAVgFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAFdbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAAEhc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAQAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgABAASAgIAUQBUAAAAAARrvAAEa7wWAgIACEggGgICAAQIAAAAgc3R0cwAAAAAAAAACAAAABQAABAAAAAABAAABgAAAABxzdHNjAAAAAAAAAAEAAAABAAAABgAAAAEAAAAsc3RzegAAAAAAAAAAAAAABgAAALkAAAC6AAABIAAAAQAAAAC9AAAAGgAAABRzdGNvAAAAAAAAAAEAAAAsAAAAGnNncGQBAAAAcm9sbAAAAAIAAAAB//8AAAAcc2JncAAAAAByb2xsAAAAAQAAAAYAAAABAAAAYXVkdGEAAABZbWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAsaWxzdAAAACSpdG9vAAAAHGRhdGEAAAABAAAAAExhdmY2MC4zLjEwMA=="},function(t,e,n){"use strict";n.r(e),e.default="data:audio/mp4;base64,AAAAHGZ0eXBNNEEgAAAAAE00QSBtcDQyaXNvbQAAAAFtZGF0AAAAAAAACHchIANAaBv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOCFO4v////////gyh+L1JkJB36Cv0yBUdzB8/8/b8vveozPf+/6eH18deTh9kOp11urWAB5ZsMnhMwSjUCF2MQub4hybjxDhHACGof0XiT9tAHVOwt4NPtPOMFr/ndlTpTNXy79GYIfXP7VkPs99ySHNOFkpNrBS1pClU3rRGHp6Dy9FBIlk4KbBNBLGMJRcWQxuVsVJCSMnGw1FuIUrBN2UJLoEMhurMxpIiyGAweBvyfNJy4FbxqDm3WDjCtzP+3yVmOjxhIBDANLYyeG05LNyCZONEOk/c4hCj3Y2XQkgTI7y/39g0a+MuEoAdbRz4gSgRJnjEGB0TnOB0LtiL0XB9kwz2SwCBB0MvIByUSWTPTsRdCA4PvEmwnNdTnJT5/kPGk4swkTgOOuWJBI0EkxFs5mmNIR6wSFql36Hn03/Lf/uHp+6aTmBY0HJ6P6X1atw/Y8vK72LCWpsq0beo5KkrrrMe1eabaDyfZRPYfgPwH4Dv4CHU663VrAA8wchbBRlqQNnYNlYNhYNigNhoTBsTCcTCgLBEQCX+XfNd+3y+piKntTerXdXpDWRpLzsKmJ4iRM4ig+I6R65pDawx8Ry4cxfeifbsbzK/TxNhafR9y2zFVicy8nCVkU6CkmLckGtqbuYvhruBP0TriLNTU1TNhW6tUCdUSyneDUWAox5RTMlF2W1san5MQRlj7Btm2bZhoqoUUAJlpaat54WVuTyOxqwzNVhPenFR9KBpuA3qrUrT+3ShOUdXAkGXmCrMBxH3XmROdVSkS8cccRMOKTN+7OOEIQrMYIcna5hipAqPHk6VSgy0gGXljIk7GR/O606SyhhgglQIZLyxxOa/ZANmzZkyZMlRoqIt/T6xZHaFLcZ6n8jSgTVoOGsK5MvOlIBBkR+AtM5hvkTG2UzEhEAcsA7bZfCZmmZmZjQnqfn/yRwXzQtlZljFYd93mGppQSDDV/oz8HKkKjElN9Pu/inFmh3IHFyXlrJ/dodwM2EUkLZff1jWCO84wYUa3JB52yTMCETuUgA0BWB+I4hDBR1xoligVhgVhgNhYdBcLCcakAb1XLO/eZ9cUtvv6cNzrRYdMWgFvJySSSSscWFxCQElKcwc2dFkyos8dHfXPYFSt0klO2wUeIUxNKf5LiWYGm57bV0dipv7Qpw9uRRu23CuNIbT7++AuwEnyFWIQP0OpdUhc7u2k2fKW3mTZZxCSb+gVCjOzNf7LzxdBpbZxYwuNkcRlqAMdRMhq+tXmbLkMGGph20w4JvwvBm+x4Wtomh4lz0GGBVGQ96+JUXhvqQQAQPRTHtn+e7SwaCKMXnEEWXevaFVrPVEX7wxIBbbcpAHXj2DQz/vO9M0FHzyQFtegQjjn+fM99jgBE2fLJs/PLcErzrmCGJdVHZ19uxTErdmR6viG6cetew2MYQFm5AIDdPmjeXifvbFcjkYQWUsqKoBQJAKMp50hLtJRCKLCTSw2f7e0wzzhr6eGhjlyOQ8blgBiR0fxcjQYM5rBBM/wzuDe972u2f/mN7u8zVqGu7QADPHgAK4PxW8nJJJJLgISwUZaaRYmFRWRBEIwQKfmepncccZoqHnVy0WnFag51Yt48agPiK7D59zNlI+6YR9SHvnKoiJCcRzsskEGDgIrLQoLEgDguNTzeNvuxVpc8wntXmUlTQMa9WLn/geS8F7ku6Vt+I9yiumFP6I5hbEGeXac1BCB3YA3gNA0rLFPwrWq//VvtF6JGKIOVA12lCnpZl8NJojK1yqVsVKp+ZqbDpq0S1duspmvSvCbwmftOnwnfuNqBCnzZfzZF9fkqxTCqlq8GmR3bGK+1uvEcF55cGGx8BNANhkk1438/rWbXeTtPGfukvhUxZBp0M5447+2SFiQW674ySiGSRHgyqcqU0x39tbz3afnWt5BKNHDYj1lzq6sg8dcJlJnSQDUEba4npgEoAqVUkksoqM0UUO3VXDo3Mablwd2GLAoXjgK071swbuWhQJ2AjGYsBx5dtOMYCyPVh+K3jxqA+IuAhTrc+3KVqmDuVmIO5TZmQbDr4vUV+0338fXQ3665PiYnII1REb2klWhUcwjqi/pMe4yYZaDbo9T1ougUKE5h1jUim2NZxM71zBZVa/tWam6wXlmFVVHGuvL76pT3PUGufbO9YwevQzCvXhsabRuJyJjz8A1Haftmewy4gZ0FWlMIO5BoXB49j0TeIiikaxP9ZHcD9oI6x2H4DajNt5WgRXj6/H72V+gj2bgMDVkIZ36j1Tl+wdO6fvFsz56a5V6t9lS+gyWSOvuQP9bqtYgqWlsthXSFkrTfNqni6jSQ5vN9Fp1iYJODbUg8Sg0lYLbNEM7oqvrggxzq13IfO9hGQ0MQVpMIAR0aSGMFWOZzpJmXG1IcjppdZkINTYN2UvrHmGUrVBHvRuueFPuy2GzQoSnMCvkT3WvaR/LoVYw7Voy47wdJee2Va623AFXWNINOpByyoc9SQU4vPQ6X0PMBLQs6GdMlx+RlC3VoMDOryeFFolCTD8B+A/A4AAANKbW9vdgAAAGxtdmhkAAAAANcxfvfXMX73AACsRAAADbEAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAdx0cmFrAAAAXHRraGQAAAAB1zF+99cxfvcAAAABAAAAAAAADbEAAAAAAAAAAAAAAAABAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAF4bWRpYQAAACBtZGhkAAAAANcxfvfXMX73AACsRAAAGABVxAAAAAAAMWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABDb3JlIE1lZGlhIEF1ZGlvAAAAAR9taW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAONzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAAABICAgBRAFQAYAAAB9AAAAfQABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAAAGAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAABgAAAAEAAAAsc3RzegAAAAAAAAAAAAAABgAAAP4AAAF+AAABjwAAAYQAAAFeAAABegAAABRzdGNvAAAAAAAAAAEAAAAsAAAA+nVkdGEAAADybWV0YQAAAAAAAAAiaGRscgAAAAAAAAAAbWRpcgAAAAAAAAAAAAAAAAAAAAAAxGlsc3QAAAC8LS0tLQAAABxtZWFuAAAAAGNvbS5hcHBsZS5pVHVuZXMAAAAUbmFtZQAAAABpVHVuU01QQgAAAIRkYXRhAAAAAQAAAAAgMDAwMDAwMDAgMDAwMDA4NDAgMDAwMDAyMEYgMDAwMDAwMDAwMDAwMERCMSAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMA=="},function(t,e,n){"use strict";n.r(e),e.default="data:audio/mp4;base64,AAAAHGZ0eXBNNEEgAAACAE00QSBpc29taXNvMgAAAAhmcmVlAAASCG1kYXQBQCKAo3/4hS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS7/8QpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpd+aIUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLwBQCKAo3/4hS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS7/8QpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpd+aIUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLwA6jQEQfEIQGIQaqctMIv9EpiYforpaDbT80WfPFRSswKfd8cy6kN/+IUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0u//EKWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaXfViFLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLwA6jQQpRY6EYNCcKDAqAAEUgC2wFy0kF7JTgecsqIp6pxd/lHO7kUuSCLFK6n2mPOKfj5aKhQPOaRtBEKFS85eIYbr71AGaAPJTSIHeIhXTcpA5i155UICz3nXk0Cz0A8QhxIhoqQIJ2Be9MIEiJ6GpuMa1fPXcJmIoxDUKpZuJozBa6iFmjy7O/genSlwPKL6xaiiL8Y1XtgBDY7ke/CAOoawOqmZm6suSVQPbxzaxZJpWFcWva4RqTil72HqDpc2N4eG3KA0JkU8G58RNabxVq9gSLwysPKIzL1fZVF1FQwllEs4YUKpPtoMw2VtepdbZHqGriAsZ5Lu154uiewW41szI4RHfpWOWSH7s1LAzlv/xClpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWl36AhS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0vAA6jQEYVEIDEQDEKCAYhAIXMdbaI5q82OvhmYS1FO11cD3Yt4EwZI+aTsqoctJJaN0FKvNqorQmK3SUWpNOtf+uKNIxX3xeTEq8LKb/8QpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpd/+IUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0u+GEKWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpeABMDQD6WqsfRABwAUSib4c3/4hS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS7/8QpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpd+EIUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS8AAAO4bW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAAAfgAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAiJ0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAAfgAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAH4AAAIAAABAAAAAAGabWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAAfQAAAF8BVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAABRW1pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABCXN0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAEAEAAAAAAfQAAAAAAAM2VzZHMAAAAAA4CAgCIAAQAEgICAFEAVAAAAAAH0AAAAvXkFgICAAhWIBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAAAUAAAQAAAAAAQAAA8AAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAYAAAABAAAAFHN0c3oAAAAAAAADAAAAAAYAAAAUc3RjbwAAAAAAAAABAAAALAAAABpzZ3BkAQAAAHJvbGwAAAACAAAAAf//AAAAHHNiZ3AAAAAAcm9sbAAAAAEAAAAGAAAAAQAAASJ1ZHRhAAABGm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAA7Wlsc3QAAAAzqW5hbQAAACtkYXRhAAAAAQAAAAAyNTAgTWlsbGlzZWNvbmRzIG9mIFNpbGVuY2UAAAApqUFSVAAAACFkYXRhAAAAAQAAAABBbmFyIFNvZnR3YXJlIExMQwAAAClhQVJUAAAAIWRhdGEAAAABAAAAAEFuYXIgU29mdHdhcmUgTExDAAAAI6lhbGIAAAAbZGF0YQAAAAEAAAAAQmxhbmsgQXVkaW8AAAAkqXRvbwAAABxkYXRhAAAAAQAAAABMYXZmNjAuMy4xMDAAAAAZY3BpbAAAABFkYXRhAAAAFQAAAAAA"},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=o(n(1)),r=o(n(27)).default.svg`
|
|
2
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(window,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=47)}([function(t,e,n){"use strict";n.r(e),n.d(e,"Component",(function(){return C})),n.d(e,"Fragment",(function(){return y})),n.d(e,"createContext",(function(){return G})),n.d(e,"createElement",(function(){return v})),n.d(e,"createRef",(function(){return b})),n.d(e,"useCallback",(function(){return ft})),n.d(e,"useContext",(function(){return mt})),n.d(e,"useDebugValue",(function(){return gt})),n.d(e,"useEffect",(function(){return ct})),n.d(e,"useErrorBoundary",(function(){return vt})),n.d(e,"useId",(function(){return At})),n.d(e,"useImperativeHandle",(function(){return ht})),n.d(e,"useLayoutEffect",(function(){return ut})),n.d(e,"useMemo",(function(){return pt})),n.d(e,"useReducer",(function(){return lt})),n.d(e,"useRef",(function(){return dt})),n.d(e,"useState",(function(){return st})),n.d(e,"Children",(function(){return Rt})),n.d(e,"PureComponent",(function(){return Ot})),n.d(e,"StrictMode",(function(){return ye})),n.d(e,"Suspense",(function(){return jt})),n.d(e,"SuspenseList",(function(){return Vt})),n.d(e,"__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",(function(){return ue})),n.d(e,"cloneElement",(function(){return me})),n.d(e,"createFactory",(function(){return he})),n.d(e,"createPortal",(function(){return Qt})),n.d(e,"default",(function(){return Oe})),n.d(e,"findDOMNode",(function(){return ve})),n.d(e,"flushSync",(function(){return be})),n.d(e,"forwardRef",(function(){return Pt})),n.d(e,"hydrate",(function(){return te})),n.d(e,"isElement",(function(){return Ee})),n.d(e,"isFragment",(function(){return fe})),n.d(e,"isValidElement",(function(){return pe})),n.d(e,"lazy",(function(){return Nt})),n.d(e,"memo",(function(){return Tt})),n.d(e,"render",(function(){return Jt})),n.d(e,"startTransition",(function(){return Ce})),n.d(e,"unmountComponentAtNode",(function(){return ge})),n.d(e,"unstable_batchedUpdates",(function(){return Ae})),n.d(e,"useDeferredValue",(function(){return Se})),n.d(e,"useInsertionEffect",(function(){return xe})),n.d(e,"useSyncExternalStore",(function(){return Le})),n.d(e,"useTransition",(function(){return we})),n.d(e,"version",(function(){return de}));var i,o,r,a,s,l,c,u,d={},h=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=Array.isArray;function m(t,e){for(var n in e)t[n]=e[n];return t}function g(t){var e=t.parentNode;e&&e.removeChild(t)}function v(t,e,n){var o,r,a,s={};for(a in e)"key"==a?o=e[a]:"ref"==a?r=e[a]:s[a]=e[a];if(arguments.length>2&&(s.children=arguments.length>3?i.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===s[a]&&(s[a]=t.defaultProps[a]);return A(t,s,o,r,null)}function A(t,e,n,i,a){var s={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==a?++r:a,__i:-1,__u:0};return null==a&&null!=o.vnode&&o.vnode(s),s}function b(){return{current:null}}function y(t){return t.children}function C(t,e){this.props=t,this.context=e}function S(t,e){if(null==e)return t.__?S(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?S(t):null}function w(t,e,n){var i,r=t.__v,a=r.__e,s=t.__P;if(s)return(i=m({},r)).__v=r.__v+1,o.vnode&&o.vnode(i),F(s,i,r,t.__n,void 0!==s.ownerSVGElement,32&r.__u?[a]:null,e,null==a?S(r):a,!!(32&r.__u),n),i.__v=r.__v,i.__.__k[i.__i]=i,i.__d=void 0,i.__e!=a&&x(i),i}function x(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return x(t)}}function E(t){(!t.__d&&(t.__d=!0)&&a.push(t)&&!L.__r++||s!==o.debounceRendering)&&((s=o.debounceRendering)||l)(L)}function L(){var t,e,n,i=[],r=[];for(a.sort(c);t=a.shift();)t.__d&&(n=a.length,e=w(t,i,r)||e,0===n||a.length>n?(W(i,e,r),r.length=i.length=0,e=void 0,a.sort(c)):e&&o.__c&&o.__c(e,h));e&&W(i,e,r),L.__r=0}function _(t,e,n,i,o,r,a,s,l,c,u){var p,f,m,g,v,A=i&&i.__k||h,b=e.length;for(n.__d=l,O(n,e,A),l=n.__d,p=0;p<b;p++)null!=(m=n.__k[p])&&"boolean"!=typeof m&&"function"!=typeof m&&(f=-1===m.__i?d:A[m.__i]||d,m.__i=p,F(t,m,f,o,r,a,s,l,c,u),g=m.__e,m.ref&&f.ref!=m.ref&&(f.ref&&j(f.ref,null,m),u.push(m.ref,m.__c||g,m)),null==v&&null!=g&&(v=g),65536&m.__u||f.__k===m.__k?l=T(m,l,t):"function"==typeof m.type&&void 0!==m.__d?l=m.__d:g&&(l=g.nextSibling),m.__d=void 0,m.__u&=-196609);n.__d=l,n.__e=v}function O(t,e,n){var i,o,r,a,s,l=e.length,c=n.length,u=c,d=0;for(t.__k=[],i=0;i<l;i++)null!=(o=t.__k[i]=null==(o=e[i])||"boolean"==typeof o||"function"==typeof o?null:"string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?A(null,o,null,null,o):f(o)?A(y,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?A(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=t,o.__b=t.__b+1,s=D(o,n,a=i+d,u),o.__i=s,r=null,-1!==s&&(u--,(r=n[s])&&(r.__u|=131072)),null==r||null===r.__v?(-1==s&&d--,"function"!=typeof o.type&&(o.__u|=65536)):s!==a&&(s===a+1?d++:s>a?u>l-a?d+=s-a:d--:d=s<a&&s==a-1?s-a:0,s!==i+d&&(o.__u|=65536))):(r=n[i])&&null==r.key&&r.__e&&0==(131072&r.__u)&&(r.__e==t.__d&&(t.__d=S(r)),z(r,r,!1),n[i]=null,u--);if(u)for(i=0;i<c;i++)null!=(r=n[i])&&0==(131072&r.__u)&&(r.__e==t.__d&&(t.__d=S(r)),z(r,r))}function T(t,e,n){var i,o;if("function"==typeof t.type){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,e=T(i[o],e,n));return e}t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function k(t,e){return e=e||[],null==t||"boolean"==typeof t||(f(t)?t.some((function(t){k(t,e)})):e.push(t)),e}function D(t,e,n,i){var o=t.key,r=t.type,a=n-1,s=n+1,l=e[n];if(null===l||l&&o==l.key&&r===l.type)return n;if(i>(null!=l&&0==(131072&l.__u)?1:0))for(;a>=0||s<e.length;){if(a>=0){if((l=e[a])&&0==(131072&l.__u)&&o==l.key&&r===l.type)return a;a--}if(s<e.length){if((l=e[s])&&0==(131072&l.__u)&&o==l.key&&r===l.type)return s;s++}}return-1}function P(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||p.test(e)?n:n+"px"}function B(t,e,n,i,o){var r;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof i&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||P(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||P(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])r=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?i?n.u=i.u:(n.u=Date.now(),t.addEventListener(e,r?I:R,r)):t.removeEventListener(e,r?I:R,r);else{if(o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==e&&"height"!==e&&"href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&"rowSpan"!==e&&"colSpan"!==e&&"role"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function R(t){if(this.l){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(o.event?o.event(t):t)}}function I(t){if(this.l)return this.l[t.type+!0](o.event?o.event(t):t)}function F(t,e,n,i,r,a,s,l,c,u){var d,h,p,g,v,A,b,S,w,x,E,L,O,T,k,D=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(c=!!(32&n.__u),a=[l=e.__e=n.__e]),(d=o.__b)&&d(e);t:if("function"==typeof D)try{if(S=e.props,w=(d=D.contextType)&&i[d.__c],x=d?w?w.props.value:d.__:i,n.__c?b=(h=e.__c=n.__c).__=h.__E:("prototype"in D&&D.prototype.render?e.__c=h=new D(S,x):(e.__c=h=new C(S,x),h.constructor=D,h.render=N),w&&w.sub(h),h.props=S,h.state||(h.state={}),h.context=x,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=D.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=m({},h.__s)),m(h.__s,D.getDerivedStateFromProps(S,h.__s))),g=h.props,v=h.state,h.__v=e,p)null==D.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==D.getDerivedStateFromProps&&S!==g&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(S,x),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(S,h.__s,x)||e.__v===n.__v)){for(e.__v!==n.__v&&(h.props=S,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),E=0;E<h._sb.length;E++)h.__h.push(h._sb[E]);h._sb=[],h.__h.length&&s.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(S,h.__s,x),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(g,v,A)}))}if(h.context=x,h.props=S,h.__P=t,h.__e=!1,L=o.__r,O=0,"prototype"in D&&D.prototype.render){for(h.state=h.__s,h.__d=!1,L&&L(e),d=h.render(h.props,h.state,h.context),T=0;T<h._sb.length;T++)h.__h.push(h._sb[T]);h._sb=[]}else do{h.__d=!1,L&&L(e),d=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++O<25);h.state=h.__s,null!=h.getChildContext&&(i=m(m({},i),h.getChildContext())),p||null==h.getSnapshotBeforeUpdate||(A=h.getSnapshotBeforeUpdate(g,v)),_(t,f(k=null!=d&&d.type===y&&null==d.key?d.props.children:d)?k:[k],e,n,i,r,a,s,l,c,u),h.base=e.__e,e.__u&=-161,h.__h.length&&s.push(h),b&&(h.__E=h.__=null)}catch(t){e.__v=null,c||null!=a?(e.__e=l,e.__u|=c?160:32,a[a.indexOf(l)]=null):(e.__e=n.__e,e.__k=n.__k),o.__e(t,e,n)}else null==a&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=M(n.__e,e,n,i,r,a,s,c,u);(d=o.diffed)&&d(e)}function W(t,e,n){for(var i=0;i<n.length;i++)j(n[i],n[++i],n[++i]);o.__c&&o.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){o.__e(t,e.__v)}}))}function M(t,e,n,o,r,a,s,l,c){var u,h,p,m,v,A,b,y=n.props,C=e.props,w=e.type;if("svg"===w&&(r=!0),null!=a)for(u=0;u<a.length;u++)if((v=a[u])&&"setAttribute"in v==!!w&&(w?v.localName===w:3===v.nodeType)){t=v,a[u]=null;break}if(null==t){if(null===w)return document.createTextNode(C);t=r?document.createElementNS("http://www.w3.org/2000/svg",w):document.createElement(w,C.is&&C),a=null,l=!1}if(null===w)y===C||l&&t.data===C||(t.data=C);else{if(a=a&&i.call(t.childNodes),y=n.props||d,!l&&null!=a)for(y={},u=0;u<t.attributes.length;u++)y[(v=t.attributes[u]).name]=v.value;for(u in y)v=y[u],"children"==u||("dangerouslySetInnerHTML"==u?p=v:"key"===u||u in C||B(t,u,null,v,r));for(u in C)v=C[u],"children"==u?m=v:"dangerouslySetInnerHTML"==u?h=v:"value"==u?A=v:"checked"==u?b=v:"key"===u||l&&"function"!=typeof v||y[u]===v||B(t,u,v,y[u],r);if(h)l||p&&(h.__html===p.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(p&&(t.innerHTML=""),_(t,f(m)?m:[m],e,n,o,r&&"foreignObject"!==w,a,s,a?a[0]:n.__k&&S(n,0),l,c),null!=a)for(u=a.length;u--;)null!=a[u]&&g(a[u]);l||(u="value",void 0!==A&&(A!==t[u]||"progress"===w&&!A||"option"===w&&A!==y[u])&&B(t,u,A,y[u],!1),u="checked",void 0!==b&&b!==t[u]&&B(t,u,b,y[u],!1))}return t}function j(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){o.__e(t,n)}}function z(t,e,n){var i,r;if(o.unmount&&o.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||j(i,null,e)),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(t){o.__e(t,e)}i.base=i.__P=null,t.__c=void 0}if(i=t.__k)for(r=0;r<i.length;r++)i[r]&&z(i[r],e,n||"function"!=typeof t.type);n||null==t.__e||g(t.__e),t.__=t.__e=t.__d=void 0}function N(t,e,n){return this.constructor(t,n)}function V(t,e,n){var r,a,s,l;o.__&&o.__(t,e),a=(r="function"==typeof n)?null:n&&n.__k||e.__k,s=[],l=[],F(e,t=(!r&&n||e).__k=v(y,null,[t]),a||d,d,void 0!==e.ownerSVGElement,!r&&n?[n]:a?null:e.firstChild?i.call(e.childNodes):null,s,!r&&n?n:a?a.__e:e.firstChild,r,l),t.__d=void 0,W(s,t,l)}function U(t,e){V(t,e,U)}function H(t,e,n){var o,r,a,s,l=m({},t.props);for(a in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)"key"==a?o=e[a]:"ref"==a?r=e[a]:l[a]=void 0===e[a]&&void 0!==s?s[a]:e[a];return arguments.length>2&&(l.children=arguments.length>3?i.call(arguments,2):n),A(t.type,l,o||t.key,r||t.ref,null)}function G(t,e){var n={__c:e="__cC"+u++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,i;return this.getChildContext||(n=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some((function(t){t.__e=!0,E(t)}))},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}i=h.slice,o={__e:function(t,e,n,i){for(var o,r,a;e=e.__;)if((o=e.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(t)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,i||{}),a=o.__d),a)return o.__E=o}catch(e){t=e}throw t}},r=0,C.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof t&&(t=t(m({},n),this.props)),t&&m(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),E(this))},C.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),E(this))},C.prototype.render=y,a=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(t,e){return t.__v.__b-e.__v.__b},L.__r=0,u=0;var Q,Y,Z,q,X=0,$=[],K=[],J=o,tt=J.__b,et=J.__r,nt=J.diffed,it=J.__c,ot=J.unmount,rt=J.__;function at(t,e){J.__h&&J.__h(Y,t,X||e),X=0;var n=Y.__H||(Y.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:K}),n.__[t]}function st(t){return X=1,lt(Et,t)}function lt(t,e,n){var i=at(Q++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):Et(void 0,e),function(t){var e=i.__N?i.__N[0]:i.__[0],n=i.t(e,t);e!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=Y,!Y.u)){var o=function(t,e,n){if(!i.__c.__H)return!0;var o=i.__c.__H.__.filter((function(t){return!!t.__c}));if(o.every((function(t){return!t.__N})))return!r||r.call(this,t,e,n);var a=!1;return o.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(a=!0)}})),!(!a&&i.__c.props===t)&&(!r||r.call(this,t,e,n))};Y.u=!0;var r=Y.shouldComponentUpdate,a=Y.componentWillUpdate;Y.componentWillUpdate=function(t,e,n){if(this.__e){var i=r;r=void 0,o(t,e,n),r=i}a&&a.call(this,t,e,n)},Y.shouldComponentUpdate=o}return i.__N||i.__}function ct(t,e){var n=at(Q++,3);!J.__s&&xt(n.__H,e)&&(n.__=t,n.i=e,Y.__H.__h.push(n))}function ut(t,e){var n=at(Q++,4);!J.__s&&xt(n.__H,e)&&(n.__=t,n.i=e,Y.__h.push(n))}function dt(t){return X=5,pt((function(){return{current:t}}),[])}function ht(t,e,n){X=6,ut((function(){return"function"==typeof t?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0}),null==n?n:n.concat(t))}function pt(t,e){var n=at(Q++,7);return xt(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function ft(t,e){return X=8,pt((function(){return t}),e)}function mt(t){var e=Y.context[t.__c],n=at(Q++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(Y)),e.props.value):t.__}function gt(t,e){J.useDebugValue&&J.useDebugValue(e?e(t):t)}function vt(t){var e=at(Q++,10),n=st();return e.__=t,Y.componentDidCatch||(Y.componentDidCatch=function(t,i){e.__&&e.__(t,i),n[1](t)}),[n[0],function(){n[1](void 0)}]}function At(){var t=at(Q++,11);if(!t.__){for(var e=Y.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function bt(){for(var t;t=$.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(St),t.__H.__h.forEach(wt),t.__H.__h=[]}catch(e){t.__H.__h=[],J.__e(e,t.__v)}}J.__b=function(t){Y=null,tt&&tt(t)},J.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),rt&&rt(t,e)},J.__r=function(t){et&&et(t),Q=0;var e=(Y=t.__c).__H;e&&(Z===Y?(e.__h=[],Y.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=K,t.__N=t.i=void 0}))):(e.__h.forEach(St),e.__h.forEach(wt),e.__h=[],Q=0)),Z=Y},J.diffed=function(t){nt&&nt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==$.push(e)&&q===J.requestAnimationFrame||((q=J.requestAnimationFrame)||Ct)(bt)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==K&&(t.__=t.__V),t.i=void 0,t.__V=K}))),Z=Y=null},J.__c=function(t,e){e.some((function(t){try{t.__h.forEach(St),t.__h=t.__h.filter((function(t){return!t.__||wt(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],J.__e(n,t.__v)}})),it&&it(t,e)},J.unmount=function(t){ot&&ot(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{St(t)}catch(t){e=t}})),n.__H=void 0,e&&J.__e(e,n.__v))};var yt="function"==typeof requestAnimationFrame;function Ct(t){var e,n=function(){clearTimeout(i),yt&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,100);yt&&(e=requestAnimationFrame(n))}function St(t){var e=Y,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),Y=e}function wt(t){var e=Y;t.__c=t.__(),Y=e}function xt(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function Et(t,e){return"function"==typeof e?e(t):e}function Lt(t,e){for(var n in e)t[n]=e[n];return t}function _t(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var i in e)if("__source"!==i&&t[i]!==e[i])return!0;return!1}function Ot(t,e){this.props=t,this.context=e}function Tt(t,e){function n(t){var n=this.props.ref,i=n==t.ref;return!i&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!i:_t(this.props,t)}function i(e){return this.shouldComponentUpdate=n,v(t,e)}return i.displayName="Memo("+(t.displayName||t.name)+")",i.prototype.isReactComponent=!0,i.__f=!0,i}(Ot.prototype=new C).isPureReactComponent=!0,Ot.prototype.shouldComponentUpdate=function(t,e){return _t(this.props,t)||_t(this.state,e)};var kt=o.__b;o.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),kt&&kt(t)};var Dt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Pt(t){function e(e){var n=Lt({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=Dt,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var Bt=function(t,e){return null==t?null:k(k(t).map(e))},Rt={map:Bt,forEach:Bt,count:function(t){return t?k(t).length:0},only:function(t){var e=k(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:k},It=o.__e;o.__e=function(t,e,n,i){if(t.then)for(var o,r=e;r=r.__;)if((o=r.__c)&&o.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e);It(t,e,n,i)};var Ft=o.unmount;function Wt(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=Lt({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return Wt(t,e,n)}))),t}function Mt(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return Mt(t,e,n)})),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function jt(){this.__u=0,this.t=null,this.__b=null}function zt(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Nt(t){var e,n,i;function o(o){if(e||(e=t()).then((function(t){n=t.default||t}),(function(t){i=t})),i)throw i;if(!n)throw e;return v(n,o)}return o.displayName="Lazy",o.__f=!0,o}function Vt(){this.u=null,this.o=null}o.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Ft&&Ft(t)},(jt.prototype=new C).__c=function(t,e){var n=e.__c,i=this;null==i.t&&(i.t=[]),i.t.push(n);var o=zt(i.__v),r=!1,a=function(){r||(r=!0,n.__R=null,o?o(s):s())};n.__R=a;var s=function(){if(!--i.__u){if(i.state.__a){var t=i.state.__a;i.__v.__k[0]=Mt(t,t.__c.__P,t.__c.__O)}var e;for(i.setState({__a:i.__b=null});e=i.t.pop();)e.forceUpdate()}};i.__u++||32&e.__u||i.setState({__a:i.__b=i.__v.__k[0]}),t.then(a,a)},jt.prototype.componentWillUnmount=function(){this.t=[]},jt.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=Wt(this.__b,n,i.__O=i.__P)}this.__b=null}var o=e.__a&&v(y,null,t.fallback);return o&&(o.__u&=-33),[v(y,null,e.__a?null:t.children),o]};var Ut=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function Ht(t){return this.getChildContext=function(){return t.context},t.children}function Gt(t){var e=this,n=t.i;e.componentWillUnmount=function(){V(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,n){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),V(v(Ht,{context:e.context},t.__v),e.l)}function Qt(t,e){var n=v(Gt,{__v:t,i:e});return n.containerInfo=e,n}(Vt.prototype=new C).__a=function(t){var e=this,n=zt(e.__v),i=e.o.get(t);return i[0]++,function(o){var r=function(){e.props.revealOrder?(i.push(o),Ut(e,t,i)):o()};n?n(r):r()}},Vt.prototype.render=function(t){this.u=null,this.o=new Map;var e=k(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},Vt.prototype.componentDidUpdate=Vt.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){Ut(t,n,e)}))};var Yt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Zt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,qt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Xt=/[A-Z0-9]/g,$t="undefined"!=typeof document,Kt=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};function Jt(t,e,n){return null==e.__k&&(e.textContent=""),V(t,e),"function"==typeof n&&n(),t?t.__c:null}function te(t,e,n){return U(t,e),"function"==typeof n&&n(),t?t.__c:null}C.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(C.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var ee=o.event;function ne(){}function ie(){return this.cancelBubble}function oe(){return this.defaultPrevented}o.event=function(t){return ee&&(t=ee(t)),t.persist=ne,t.isPropagationStopped=ie,t.isDefaultPrevented=oe,t.nativeEvent=t};var re,ae={enumerable:!1,configurable:!0,get:function(){return this.class}},se=o.vnode;o.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,i={};for(var o in e){var r=e[o];if(!("value"===o&&"defaultValue"in e&&null==r||$t&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var a=o.toLowerCase();"defaultValue"===o&&"value"in e&&null==e.value?o="value":"download"===o&&!0===r?r="":"translate"===a&&"no"===r?r=!1:"ondoubleclick"===a?o="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||Kt(e.type)?"onfocus"===a?o="onfocusin":"onblur"===a?o="onfocusout":qt.test(o)?o=a:-1===n.indexOf("-")&&Zt.test(o)?o=o.replace(Xt,"-$&").toLowerCase():null===r&&(r=void 0):a=o="oninput","oninput"===a&&i[o=a]&&(o="oninputCapture"),i[o]=r}}"select"==n&&i.multiple&&Array.isArray(i.value)&&(i.value=k(e.children).forEach((function(t){t.props.selected=-1!=i.value.indexOf(t.props.value)}))),"select"==n&&null!=i.defaultValue&&(i.value=k(e.children).forEach((function(t){t.props.selected=i.multiple?-1!=i.defaultValue.indexOf(t.props.value):i.defaultValue==t.props.value}))),e.class&&!e.className?(i.class=e.class,Object.defineProperty(i,"className",ae)):(e.className&&!e.class||e.class&&e.className)&&(i.class=i.className=e.className),t.props=i}(t),t.$$typeof=Yt,se&&se(t)};var le=o.__r;o.__r=function(t){le&&le(t),re=t.__c};var ce=o.diffed;o.diffed=function(t){ce&&ce(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value),re=null};var ue={ReactCurrentDispatcher:{current:{readContext:function(t){return re.__n[t.__c].props.value}}}},de="17.0.2";function he(t){return v.bind(null,t)}function pe(t){return!!t&&t.$$typeof===Yt}function fe(t){return pe(t)&&t.type===y}function me(t){return pe(t)?H.apply(null,arguments):t}function ge(t){return!!t.__k&&(V(null,t),!0)}function ve(t){return t&&(t.base||1===t.nodeType&&t)||null}var Ae=function(t,e){return t(e)},be=function(t,e){return t(e)},ye=y;function Ce(t){t()}function Se(t){return t}function we(){return[!1,Ce]}var xe=ut,Ee=pe;function Le(t,e){var n=e(),i=st({h:{__:n,v:e}}),o=i[0].h,r=i[1];return ut((function(){o.__=n,o.v=e,_e(o)&&r({h:o})}),[t,n,e]),ct((function(){return _e(o)&&r({h:o}),t((function(){_e(o)&&r({h:o})}))}),[t]),n}function _e(t){var e,n,i=t.v,o=t.__;try{var r=i();return!((e=o)===(n=r)&&(0!==e||1/e==1/n)||e!=e&&n!=n)}catch(t){return!0}}var Oe={useState:st,useId:At,useReducer:lt,useEffect:ct,useLayoutEffect:ut,useInsertionEffect:ut,useTransition:we,useDeferredValue:Se,useSyncExternalStore:Le,startTransition:Ce,useRef:dt,useImperativeHandle:ht,useMemo:pt,useCallback:ft,useContext:mt,useDebugValue:gt,version:"17.0.2",Children:Rt,render:Jt,hydrate:te,unmountComponentAtNode:ge,createPortal:Qt,createElement:v,createContext:G,createFactory:he,cloneElement:me,createRef:b,Fragment:y,isValidElement:pe,isElement:pe,isFragment:fe,findDOMNode:ve,Component:C,PureComponent:Ot,memo:Tt,forwardRef:Pt,flushSync:be,unstable_batchedUpdates:Ae,StrictMode:y,Suspense:jt,SuspenseList:Vt,lazy:Nt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ue}},function(t,e,n){"use strict";n.d(e,"f",(function(){return o})),n.d(e,"j",(function(){return r})),n.d(e,"e",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"a",(function(){return l})),n.d(e,"d",(function(){return c})),n.d(e,"h",(function(){return u})),n.d(e,"b",(function(){return d})),n.d(e,"c",(function(){return h})),n.d(e,"i",(function(){return p})),n.d(e,"l",(function(){return f})),n.d(e,"k",(function(){return m}));var i=n(7);class o extends i.a{constructor(t={}){super(),this.sbColorPrimary="#C8193C",this.sbColorPrimaryDisabled="#F5F5F5",this.sbColorNegative="#FF3737",this.sbColorPositive="#4EFFB4",this.sbColorWarning="#FFCE5C",this.sbColorSecondary="#FFEDEE",this.sbColorSecondaryDisabled="#F5F5F5",this.sbColorOnPrimary="#FFFFFF",this.sbColorOnSecondary="#C8193C",this.sbColorSurface="#FFFFFF",this.sbColorOutline="#EFEFEF",this.sbColorOnSurfaceVariant="#707070",this.sbColorOnSurface="#000000",this.sbColorSurfaceLow="#00000026",this.sbColorSurfaceHigh="#0000007A",this.sbColorModalOverlay="#000000A3",void 0!==t.sbColorPrimary&&(this.sbColorPrimary=t.sbColorPrimary),void 0!==t.sbColorPrimaryDisabled&&(this.sbColorPrimaryDisabled=t.sbColorPrimaryDisabled),void 0!==t.sbColorNegative&&(this.sbColorNegative=t.sbColorNegative),void 0!==t.sbColorPositive&&(this.sbColorPositive=t.sbColorPositive),void 0!==t.sbColorWarning&&(this.sbColorWarning=t.sbColorWarning),void 0!==t.sbColorSecondary&&(this.sbColorSecondary=t.sbColorSecondary),void 0!==t.sbColorSecondaryDisabled&&(this.sbColorSecondaryDisabled=t.sbColorSecondaryDisabled),void 0!==t.sbColorOnPrimary&&(this.sbColorOnPrimary=t.sbColorOnPrimary),void 0!==t.sbColorOnSecondary&&(this.sbColorOnSecondary=t.sbColorOnSecondary),void 0!==t.sbColorSurface&&(this.sbColorSurface=t.sbColorSurface),void 0!==t.sbColorOutline&&(this.sbColorOutline=t.sbColorOutline),void 0!==t.sbColorOnSurfaceVariant&&(this.sbColorOnSurfaceVariant=t.sbColorOnSurfaceVariant),void 0!==t.sbColorOnSurface&&(this.sbColorOnSurface=t.sbColorOnSurface),void 0!==t.sbColorSurfaceLow&&(this.sbColorSurfaceLow=t.sbColorSurfaceLow),void 0!==t.sbColorSurfaceHigh&&(this.sbColorSurfaceHigh=t.sbColorSurfaceHigh),void 0!==t.sbColorModalOverlay&&(this.sbColorModalOverlay=t.sbColorModalOverlay)}}class r extends i.a{constructor(t={}){super(),this.visible=!0,this.text="",this.color="#FFFFFF",this.useShadow=!1,void 0!==t.visible&&(this.visible=t.visible),void 0!==t.text&&(this.text=t.text),void 0!==t.color&&(this.color=t.color),void 0!==t.useShadow&&(this.useShadow=t.useShadow)}}class a extends i.a{constructor(t={}){super(),this.visible=!0,this.color="#FFFFFF",void 0!==t.visible&&(this.visible=t.visible),void 0!==t.color&&(this.color=t.color)}}class s extends i.a{constructor(t={}){super(),this.strokeColor="#FFFFFFFF",this.fillColor="#FFFFFF30",this.strokeWidth=2,this.cornerRadius=0,void 0!==t.strokeColor&&(this.strokeColor=t.strokeColor),void 0!==t.fillColor&&(this.fillColor=t.fillColor),void 0!==t.strokeWidth&&(this.strokeWidth=t.strokeWidth),void 0!==t.cornerRadius&&(this.cornerRadius=t.cornerRadius)}}class l extends i.a{constructor(t={}){super(),this.strokeColor="#FFFFFFFF",this.fillColor="#FFFFFF30",this.strokeWidth=2,void 0!==t.strokeColor&&(this.strokeColor=t.strokeColor),void 0!==t.fillColor&&(this.fillColor=t.fillColor),void 0!==t.strokeWidth&&(this.strokeWidth=t.strokeWidth)}}class c extends i.a{constructor(t={}){super(),this.iconVisible=!0,this.color="#FFFFFF",this.useShadow=!1,void 0!==t.iconVisible&&(this.iconVisible=t.iconVisible),void 0!==t.color&&(this.color=t.color),void 0!==t.useShadow&&(this.useShadow=t.useShadow)}}class u extends i.a{constructor(t={}){super(),this.visible=!0,this.backgroundColor="#0000007A",this.foregroundColor="#FFFFFF",this.activeBackgroundColor="#FFCE5C",this.activeForegroundColor="#1C1B1F",void 0!==t.visible&&(this.visible=t.visible),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.foregroundColor&&(this.foregroundColor=t.foregroundColor),void 0!==t.activeBackgroundColor&&(this.activeBackgroundColor=t.activeBackgroundColor),void 0!==t.activeForegroundColor&&(this.activeForegroundColor=t.activeForegroundColor)}}class d extends i.a{constructor(t={}){super(),this.badgeBackgroundColor="#FFFFFF",this.badgeForegroundColor="#C8193C",this.visible=!0,this.backgroundColor="#0000007A",this.foregroundColor="#FFFFFF",this.activeBackgroundColor="#FFCE5C",this.activeForegroundColor="#1C1B1F",void 0!==t.badgeBackgroundColor&&(this.badgeBackgroundColor=t.badgeBackgroundColor),void 0!==t.badgeForegroundColor&&(this.badgeForegroundColor=t.badgeForegroundColor),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.foregroundColor&&(this.foregroundColor=t.foregroundColor),void 0!==t.activeBackgroundColor&&(this.activeBackgroundColor=t.activeBackgroundColor),void 0!==t.activeForegroundColor&&(this.activeForegroundColor=t.activeForegroundColor)}}class h extends i.a{constructor(t={}){super(),this.visible=!0,this.text="",this.background=new l({}),this.foreground=new c({}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.text&&(this.text=t.text),void 0!==t.background&&(this.background=new l(t.background)),void 0!==t.foreground&&(this.foreground=new c(t.foreground))}}class p extends i.a{constructor(t={}){super(),this.successBeepEnabled=!0,this.soundType="MODERN_BEEP",void 0!==t.successBeepEnabled&&(this.successBeepEnabled=t.successBeepEnabled),void 0!==t.soundType&&(this.soundType=t.soundType)}}class f extends i.a{constructor(t={}){super(),this.enabled=!1,void 0!==t.enabled&&(this.enabled=t.enabled)}}class m extends i.a{constructor(t={}){super(),this.autoCancelTimeout=0,this.initialScanDelay=0,void 0!==t.autoCancelTimeout&&(this.autoCancelTimeout=t.autoCancelTimeout),void 0!==t.initialScanDelay&&(this.initialScanDelay=t.initialScanDelay)}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return r})),n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"e",(function(){return l}));var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)};function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var r=function(){return r=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};function a(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n}Object.create;function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function l(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))}Object.create},function(t,e){t.exports=window["@mui"]},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));class i{_marker(){}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return l}));var i=n(0),o=n(13),r=n(16);const a=Object(i.createContext)(null);function s(t){return{getColorValue:e=>{if(e){if(e.startsWith("?")){const n=e.slice(1);if(n in t)return t[n];r.a.debugWarn(`Color ${n} not found in palette`)}return e}r.a.debugWarn("Color is missing")}}}class l{static setPalette(t){this.palette=t}static setBarcodeTextLocalization(t){this.barcodeTextLocalization=t}static getColorValue(t){return s(l.palette).getColorValue(t)}static getPolygonColorValues(t,e){return new o.PolygonStyle({fillColor:e?l.getColorValue(t.fillColor):"transparent",strokeColor:e?l.getColorValue(t.strokeColor):"transparent",strokeWidth:t.strokeWidth,cornerRadius:t.cornerRadius})}static getLocalizedBarcodeText(t,e=[]){if(t.startsWith("?")){const e=t.slice(1);e in l.barcodeTextLocalization&&(t=l.barcodeTextLocalization[e]),r.a.debugWarn(`Barcode text localization key ${e} not found in localization`)}for(let n of e)t=t.replace("%d",n);return t}}l.palette=(new o.BarcodeScannerConfiguration).palette,l.barcodeTextLocalization=(new o.BarcodeScannerConfiguration).localization},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(31);class o{constructor(t,e){this.x=t,this.y=e}static toPolygon(t,e){return[o.scaleDownTo(t[0],e),o.scaleDownTo(t[1],e),o.scaleDownTo(t[2],e),o.scaleDownTo(t[3],e)]}static scaleToPoint(t,e,n,i){return new o(i*(t.x-e),i*(t.y-n))}static scaleListToHtmlElement(t,e,n){return t.map((t=>o.scaleToHtmlElement(t,e,n)))}static scaleToHtmlElement(t,e,n){return new o(t.x*(n.clientWidth/e.width),t.y*(n.clientHeight/e.height))}static scaleUpTo(t,e){return new o(t.x*e.width,t.y*e.height)}static scaleDownTo(t,e){return new o(t.x/e.width,t.y/e.height)}static fromHtmlElement(t){return new o(t.offsetLeft,t.offsetTop)}static withScale(t,e,n){return new o(t/n,e/n)}static fromCoordinates(t,e,n,i){if(!t||!e)return new o(0,0);const r=new o(t,e);return i=null!=i?i:1,1===(n=n?n%4:0)?o.withScale(r.y,-r.x,i):2===n?o.withScale(-r.x,-r.y,i):3===n?o.withScale(-r.y,r.x,i):o.withScale(r.x,r.y,i)}static centerOf(t){const e=t.reduce(((t,e)=>t+e.x),0)/t.length,n=t.reduce(((t,e)=>t+e.y),0)/t.length;return new o(e,n)}static smallerSizeOfQuad(t){const e=Math.max(...t.map((t=>t.x)))-Math.min(...t.map((t=>t.x))),n=Math.max(...t.map((t=>t.y)))-Math.min(...t.map((t=>t.y)));return Math.min(e,n)}static empty(){return new o(0,0)}static centerX(t){if(t)return(o.highestX(t)+o.lowestX(t))/2}static highestX(t){if(t)return Math.max(...t.map((t=>t.x)))}static lowestX(t){if(t)return Math.min(...t.map((t=>t.x)))}static lowestY(t){if(t)return Math.min(...t.map((t=>t.y)))}static highestY(t){if(t)return Math.max(...t.map((t=>t.y)))}static width(t){if(t)return o.highestX(t)-o.lowestX(t)}static left(t){if(t)return t.reduce(((t,e)=>t.x<e.x?t:e))}static right(t){if(t)return t.reduce(((t,e)=>t.x>e.x?t:e))}static toSvgString(t){if(void 0!==t)return t.map((t=>`${t.x.toFixed(2)},${t.y.toFixed(2)}`)).join(" ")}static toSvgPathStringWithRoundedCorners(t,e=0){if(void 0===t)return;function n(t,e,n){const i=Math.atan2(t.y-e.y,t.x-e.x);return{x:t.x-n*Math.cos(i),y:t.y-n*Math.sin(i)}}let i="";const r=n(t[0],t[1],o.distance(t[0],t[1])/2);i+=`M ${r.x} ${r.y}`;for(let r=0;r<t.length;r++){const a=t[r],s=t[(r+1)%t.length],l=t[(r+2)%t.length],c=n(s,l,o.distance(s,l)/2),u=Math.abs(Math.atan2(s.y-a.y,s.x-a.x)-Math.atan2(s.y-l.y,s.x-l.x)),d=u>Math.PI?2*Math.PI-u:u,h=Math.min(Math.sqrt(Math.pow(s.x-a.x,2)+Math.pow(s.y-a.y,2)),Math.sqrt(Math.pow(s.x-l.x,2)+Math.pow(s.y-l.y,2))),p=Math.min(e,h*Math.tan(d/2)/2),f=Math.abs(p/Math.tan(d/2)),m=(s.x-a.x)*(s.y-l.y)-(s.x-l.x)*(s.y-a.y)<0?1:0,g=n(s,a,f),v=n(s,l,f);i+=` L${g.x} ${g.y}`,i+=` A${p} ${p} 0 0 ${m} ${v.x} ${v.y}`,i+=` L${c.x} ${c.y}`}return i+" Z"}static distance(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}static subtract(t,e){return new o(t.x-e.x,t.y-e.y)}static add(t,e){return new o(t.x+e.x,t.y+e.y)}static multiply(t,e){return new o(t.x*e,t.y*e)}static cross(t,e){return t.x*e.y-t.y*e.x}static clamp(t,e){return new o(Object(i.a)(t.x,0,e.width),Object(i.a)(t.y,0,e.height))}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));class i{}},function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"e",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"b",(function(){return l})),n.d(e,"f",(function(){return c})),n.d(e,"g",(function(){return u})),n.d(e,"a",(function(){return d}));var i=n(1),o=n(7);class r extends o.a{constructor(t={}){super(),this.visible=!0,this.deselected=new i.g({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:2,cornerRadius:2}),this.selected=new i.g({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:2,cornerRadius:2}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.deselected&&(this.deselected=new i.g(t.deselected)),void 0!==t.selected&&(this.selected=new i.g(t.selected))}}class a extends o.a{constructor(t={}){super(),this.imageVisible=!0,this.titleSelected=new i.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.subtitleSelected=new i.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.titleDeselected=new i.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.subtitleDeselected=new i.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.backgroundSelected=new i.g({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:0,cornerRadius:10}),this.backgroundDeselected=new i.g({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:0,cornerRadius:10}),void 0!==t.imageVisible&&(this.imageVisible=t.imageVisible),void 0!==t.titleSelected&&(this.titleSelected=new i.j(t.titleSelected)),void 0!==t.subtitleSelected&&(this.subtitleSelected=new i.j(t.subtitleSelected)),void 0!==t.titleDeselected&&(this.titleDeselected=new i.j(t.titleDeselected)),void 0!==t.subtitleDeselected&&(this.subtitleDeselected=new i.j(t.subtitleDeselected)),void 0!==t.backgroundSelected&&(this.backgroundSelected=new i.g(t.backgroundSelected)),void 0!==t.backgroundDeselected&&(this.backgroundDeselected=new i.g(t.backgroundDeselected))}}class s extends o.a{constructor(t={}){if(super(),this.visible=!0,this.foregroundColor="?sbColorOnSurface",void 0!==t.visible&&(this.visible=t.visible),void 0===t.background)throw new Error("background must be present in constructor argument");this.background=new i.a(t.background),void 0!==t.foregroundColor&&(this.foregroundColor=t.foregroundColor)}}class l extends o.a{constructor(t={}){super(),this.visible=!1,this.counterBadge=new s({background:new i.a({}),foregroundColor:"?sbColorOnSurface"}),this.automaticSelectionEnabled=!1,this.barcodeItemInfoPosition="BELOW",this.polygon=new r({visible:!0,deselected:new i.g({}),selected:new i.g({})}),this.barcodeItemConfiguration=new a({imageVisible:!0,titleSelected:new i.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new i.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),titleDeselected:new i.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleDeselected:new i.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),backgroundSelected:new i.g({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new i.g({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:1,cornerRadius:5})}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.counterBadge&&(this.counterBadge=new s(t.counterBadge)),void 0!==t.automaticSelectionEnabled&&(this.automaticSelectionEnabled=t.automaticSelectionEnabled),void 0!==t.barcodeItemInfoPosition&&(this.barcodeItemInfoPosition=t.barcodeItemInfoPosition),void 0!==t.polygon&&(this.polygon=new r(t.polygon)),void 0!==t.barcodeItemConfiguration&&(this.barcodeItemConfiguration=new a(t.barcodeItemConfiguration))}}class c extends o.a{constructor(t={}){super(),this.visible=!0,this.partiallyScanned=new i.g({strokeColor:"?sbColorWarning",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),this.rejected=new i.g({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),this.completed=new i.g({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.partiallyScanned&&(this.partiallyScanned=new i.g(t.partiallyScanned)),void 0!==t.rejected&&(this.rejected=new i.g(t.rejected)),void 0!==t.completed&&(this.completed=new i.g(t.completed))}}class u extends o.a{constructor(t={}){super(),this.partiallyScanned=new s({visible:!0,background:new i.a({strokeColor:"#FFFFFF30",fillColor:"?sbColorWarning",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),this.rejected=new s({visible:!0,background:new i.a({strokeColor:"#FFFFFF30",fillColor:"?sbColorNegative",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),this.completed=new s({visible:!0,background:new i.a({strokeColor:"#FFFFFF30",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),void 0!==t.partiallyScanned&&(this.partiallyScanned=new s(t.partiallyScanned)),void 0!==t.rejected&&(this.rejected=new s(t.rejected)),void 0!==t.completed&&(this.completed=new s(t.completed))}}class d extends o.a{constructor(t={}){super(),this.visible=!1,this.automaticSelectionEnabled=!0,this.polygon=new c({}),this.badge=new u({}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.automaticSelectionEnabled&&(this.automaticSelectionEnabled=t.automaticSelectionEnabled),void 0!==t.polygon&&(this.polygon=new c(t.polygon)),void 0!==t.badge&&(this.badge=new u(t.badge))}}},function(t,e,n){"use strict";n.r(e),n.d(e,"BarcodeConfigs",(function(){return w})),n.d(e,"BarcodeScannerTypes",(function(){return x})),n.d(e,"BarcodeTypes",(function(){return i})),n.d(e,"CheckRecognizerTypes",(function(){return o})),n.d(e,"CommonFieldType",(function(){return r})),n.d(e,"DocumentDetectorTypes",(function(){return a})),n.d(e,"DocumentQualityAnalyzerTypes",(function(){return s})),n.d(e,"EhicTypes",(function(){return l})),n.d(e,"GenericDocument",(function(){return _})),n.d(e,"GenericDocumentRecognizerConfigs",(function(){return c})),n.d(e,"GenericDocumentRecognizerTypes",(function(){return u})),n.d(e,"GenericDocumentTypes",(function(){return d})),n.d(e,"GenericTextLineScannerTypes",(function(){return h})),n.d(e,"Geometry",(function(){return I})),n.d(e,"ImageProcessorTypes",(function(){return p})),n.d(e,"LicensePlateScannerTypes",(function(){return f})),n.d(e,"MedicalCertificateTypes",(function(){return m})),n.d(e,"MRZTypes",(function(){return v})),n.d(e,"OcrElements",(function(){return A})),n.d(e,"ParametricFilters",(function(){return b})),n.d(e,"PdfConfig",(function(){return y})),n.d(e,"TiffTypes",(function(){return C})),n.d(e,"FrameUtilities",(function(){return g})),n.d(e,"PartiallyConstructible",(function(){return E.a}));var i={};n.r(i),n.d(i,"BarcodeFormats",(function(){return L}));var o={};n.r(o),n.d(o,"RecognitionResult",(function(){return O}));var r={};n.r(r);var a={};n.r(a),n.d(a,"DetectionParameters",(function(){return F})),n.d(a,"DetectorConfiguration",(function(){return W})),n.d(a,"DetectionScores",(function(){return M})),n.d(a,"DetectionResult",(function(){return j}));var s={};n.r(s),n.d(s,"QualityThreshold",(function(){return z})),n.d(s,"Config",(function(){return N})),n.d(s,"AnalysisResult",(function(){return V}));var l={};n.r(l),n.d(l,"RecognitionResult",(function(){return U})),n.d(l,"RecognizerParameters",(function(){return H}));var c={};n.r(c),n.d(c,"GDRConfig",(function(){return T})),n.d(c,"DateValidationConfig",(function(){return G})),n.d(c,"EuropeanHealthInsuranceCardConfig",(function(){return Q})),n.d(c,"MRZFallbackConfig",(function(){return Y})),n.d(c,"GDRGroupConfig",(function(){return Z}));var u={};n.r(u),n.d(u,"RecognitionResult",(function(){return q})),n.d(u,"RecognitionParameters",(function(){return X})),n.d(u,"ResultAccumulationConfig",(function(){return $})),n.d(u,"GenericDocumentRecognizerParameters",(function(){return K}));var d={};n.r(d),n.d(d,"DocumentTypes",(function(){return J}));var h={};n.r(h),n.d(h,"WordBox",(function(){return tt})),n.d(h,"SymbolBox",(function(){return et})),n.d(h,"ScannerResult",(function(){return nt})),n.d(h,"ContentValidator",(function(){return k})),n.d(h,"DefaultContentValidator",(function(){return it})),n.d(h,"PresetContentValidator",(function(){return ot})),n.d(h,"PatternContentValidator",(function(){return rt})),n.d(h,"ScannerConfiguration",(function(){return at}));var p={};n.r(p);var f={};n.r(f),n.d(f,"ScannerConfiguration",(function(){return st})),n.d(f,"ScannerResult",(function(){return lt}));var m={};n.r(m),n.d(m,"RecognitionParameters",(function(){return ct})),n.d(m,"CheckBox",(function(){return ut})),n.d(m,"DateRecord",(function(){return dt})),n.d(m,"PatientInfoField",(function(){return ht})),n.d(m,"PatientInfoBox",(function(){return pt})),n.d(m,"RecognitionResult",(function(){return ft}));var g={};n.r(g),n.d(g,"AccumulatedResultsVerifierConfig",(function(){return mt}));var v={};n.r(v),n.d(v,"RecognitionResult",(function(){return gt})),n.d(v,"RecognizerConfiguration",(function(){return vt}));var A={};n.r(A),n.d(A,"OcrElement",(function(){return D})),n.d(A,"Glyph",(function(){return At})),n.d(A,"Word",(function(){return bt})),n.d(A,"Line",(function(){return yt})),n.d(A,"Block",(function(){return Ct})),n.d(A,"Page",(function(){return St}));var b={};n.r(b),n.d(b,"ParametricFilter",(function(){return P})),n.d(b,"ScanbotBinarizationFilter",(function(){return wt})),n.d(b,"CustomBinarizationFilter",(function(){return xt})),n.d(b,"ColorDocumentFilter",(function(){return Et})),n.d(b,"BrightnessFilter",(function(){return Lt})),n.d(b,"ContrastFilter",(function(){return _t})),n.d(b,"GrayscaleFilter",(function(){return Ot})),n.d(b,"LegacyFilter",(function(){return Tt})),n.d(b,"WhiteBlackPointFilter",(function(){return kt}));var y={};n.r(y),n.d(y,"PdfAttributes",(function(){return Dt})),n.d(y,"PdfConfig",(function(){return Pt}));var C={};n.r(C),n.d(C,"UserFieldValue",(function(){return B})),n.d(C,"UserFieldDoubleValue",(function(){return Bt})),n.d(C,"UserFieldStringValue",(function(){return Rt})),n.d(C,"UserFieldIntValue",(function(){return It})),n.d(C,"UserField",(function(){return Ft})),n.d(C,"TIFFWriterParameters",(function(){return Wt}));var S,w=n(32),x=n(34),E=n(4);class L extends E.a{constructor(t={}){super()}}(S=L||(L={})).oned=["CODABAR","CODE_11","CODE_25","CODE_32","CODE_39","CODE_93","CODE_128","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_8","EAN_13","IATA_2_OF_5","INDUSTRIAL_2_OF_5","ITF","MSI_PLESSEY","PHARMA_CODE","PZN","UPC_A","UPC_E"],S.twod=["AZTEC","DATA_MATRIX","MAXICODE","MICRO_QR_CODE","MICRO_PDF_417","PDF_417","QR_CODE","RMQR_CODE"],S.postal=["AUSTRALIA_POST","JAPAN_POST","ROYAL_MAIL","ROYAL_TNT_POST","USPS_INTELLIGENT_MAIL"],S.pharma=["CODE_32","PHARMA_CODE","PHARMA_CODE_TWO_TRACK","PZN"],S.common=["AZTEC","CODABAR","CODE_39","CODE_93","CODE_128","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","ITF","MICRO_QR_CODE","PDF_417","QR_CODE","UPC_A","UPC_E"],S.all=["AUSTRALIA_POST","AZTEC","CODABAR","CODE_11","CODE_25","CODE_32","CODE_39","CODE_93","CODE_128","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","GS1_COMPOSITE","IATA_2_OF_5","INDUSTRIAL_2_OF_5","ITF","JAPAN_POST","MAXICODE","MICRO_PDF_417","MICRO_QR_CODE","MSI_PLESSEY","PDF_417","PHARMA_CODE","PHARMA_CODE_TWO_TRACK","PZN","QR_CODE","RMQR_CODE","ROYAL_MAIL","ROYAL_TNT_POST","UPC_A","UPC_E","USPS_INTELLIGENT_MAIL"];var _=n(19);class O extends E.a{constructor(t={}){if(super(),this.status="FAIL",void 0!==t.status&&(this.status=t.status),void 0===t.check)throw new Error("check must be present in constructor argument");this.check=null!=t.check?new _.GenericDocument(t.check):null}}var T,k,D,P,B,R,I=n(20);class F extends E.a{constructor(t={}){super(),this.acceptedAngleScore=75,this.acceptedSizeScore=80,this.acceptedBrightnessThreshold=0,this.requiredAspectRatios=[],this.rectangleOfInterest={x:0,y:0,width:0,height:0},void 0!==t.acceptedAngleScore&&(this.acceptedAngleScore=t.acceptedAngleScore),void 0!==t.acceptedSizeScore&&(this.acceptedSizeScore=t.acceptedSizeScore),void 0!==t.acceptedBrightnessThreshold&&(this.acceptedBrightnessThreshold=t.acceptedBrightnessThreshold),void 0!==t.requiredAspectRatios&&(this.requiredAspectRatios=t.requiredAspectRatios.map((t=>new I.AspectRatio(t)))),void 0!==t.rectangleOfInterest&&(this.rectangleOfInterest={x:t.rectangleOfInterest.x,y:t.rectangleOfInterest.y,width:t.rectangleOfInterest.width,height:t.rectangleOfInterest.height})}}class W extends E.a{constructor(t={}){super(),this.engineMode="ML",this.parameters=new F({}),void 0!==t.engineMode&&(this.engineMode=t.engineMode),void 0!==t.parameters&&(this.parameters=new F(t.parameters))}}class M extends E.a{constructor(t={}){if(super(),void 0===t.totalScore)throw new Error("totalScore must be present in constructor argument");if(this.totalScore=t.totalScore,void 0===t.distanceScore)throw new Error("distanceScore must be present in constructor argument");if(this.distanceScore=t.distanceScore,void 0===t.angleScore)throw new Error("angleScore must be present in constructor argument");if(this.angleScore=t.angleScore,void 0===t.sizeScore)throw new Error("sizeScore must be present in constructor argument");if(this.sizeScore=t.sizeScore,void 0===t.aspectRatioScore)throw new Error("aspectRatioScore must be present in constructor argument");if(this.aspectRatioScore=t.aspectRatioScore,void 0===t.lineCoverageScore)throw new Error("lineCoverageScore must be present in constructor argument");if(this.lineCoverageScore=t.lineCoverageScore,void 0===t.widthScore)throw new Error("widthScore must be present in constructor argument");if(this.widthScore=t.widthScore,void 0===t.heightScore)throw new Error("heightScore must be present in constructor argument");this.heightScore=t.heightScore}}class j extends E.a{constructor(t={}){if(super(),this.status="NOT_ACQUIRED",this.averageBrightness=0,void 0!==t.status&&(this.status=t.status),void 0===t.detectionScores)throw new Error("detectionScores must be present in constructor argument");if(this.detectionScores=new M(t.detectionScores),void 0===t.points)throw new Error("points must be present in constructor argument");if(this.points=t.points.map((t=>({x:t.x,y:t.y}))),void 0===t.horizontalLines)throw new Error("horizontalLines must be present in constructor argument");if(this.horizontalLines=t.horizontalLines.map((t=>new I.LineSegmentInt(t))),void 0===t.verticalLines)throw new Error("verticalLines must be present in constructor argument");if(this.verticalLines=t.verticalLines.map((t=>new I.LineSegmentInt(t))),void 0===t.pointsNormalized)throw new Error("pointsNormalized must be present in constructor argument");if(this.pointsNormalized=t.pointsNormalized.map((t=>({x:t.x,y:t.y}))),void 0===t.horizontalLinesNormalized)throw new Error("horizontalLinesNormalized must be present in constructor argument");if(this.horizontalLinesNormalized=t.horizontalLinesNormalized.map((t=>new I.LineSegmentFloat(t))),void 0===t.verticalLinesNormalized)throw new Error("verticalLinesNormalized must be present in constructor argument");if(this.verticalLinesNormalized=t.verticalLinesNormalized.map((t=>new I.LineSegmentFloat(t))),void 0===t.aspectRatio)throw new Error("aspectRatio must be present in constructor argument");this.aspectRatio=t.aspectRatio,void 0!==t.averageBrightness&&(this.averageBrightness=t.averageBrightness)}}class z extends E.a{constructor(t={}){if(super(),void 0===t.symbolQuality)throw new Error("symbolQuality must be present in constructor argument");if(this.symbolQuality=t.symbolQuality,void 0===t.symbolRatio)throw new Error("symbolRatio must be present in constructor argument");this.symbolRatio=t.symbolRatio}}class N extends E.a{constructor(t={}){super(),this.qualityThresholds=[new z({symbolQuality:.5,symbolRatio:.5}),new z({symbolQuality:.7,symbolRatio:.3}),new z({symbolQuality:.85,symbolRatio:.3}),new z({symbolQuality:.9,symbolRatio:.1})],this.qualityIndices=["VERY_POOR","POOR","REASONABLE","GOOD","EXCELLENT"],this.maxImageSize=2e3,this.minEstimatedNumberOfSymbolsForDocument=20,this.minProcessedFraction=0,this.maxProcessedFraction=.5,this.earlyStopIfNSymbolsFound=100,this.tileSize=300,void 0!==t.qualityThresholds&&(this.qualityThresholds=t.qualityThresholds.map((t=>new z(t)))),void 0!==t.qualityIndices&&(this.qualityIndices=t.qualityIndices.map((t=>t))),void 0!==t.maxImageSize&&(this.maxImageSize=t.maxImageSize),void 0!==t.minEstimatedNumberOfSymbolsForDocument&&(this.minEstimatedNumberOfSymbolsForDocument=t.minEstimatedNumberOfSymbolsForDocument),void 0!==t.minProcessedFraction&&(this.minProcessedFraction=t.minProcessedFraction),void 0!==t.maxProcessedFraction&&(this.maxProcessedFraction=t.maxProcessedFraction),void 0!==t.earlyStopIfNSymbolsFound&&(this.earlyStopIfNSymbolsFound=t.earlyStopIfNSymbolsFound),void 0!==t.tileSize&&(this.tileSize=t.tileSize)}}class V extends E.a{constructor(t={}){if(super(),void 0===t.documentFound)throw new Error("documentFound must be present in constructor argument");if(this.documentFound=t.documentFound,void 0===t.quality)throw new Error("quality must be present in constructor argument");this.quality=null!=t.quality?t.quality:null}}class U extends E.a{constructor(t={}){if(super(),this.status="FAILED_DETECTION",void 0===t.fields)throw new Error("fields must be present in constructor argument");this.fields=t.fields.map((t=>new U.Field(t))),void 0!==t.status&&(this.status=t.status)}}!function(t){class e extends E.a{constructor(t={}){if(super(),this.validationStatus="NOT_VALIDATED",void 0===t.type)throw new Error("type must be present in constructor argument");if(this.type=t.type,void 0===t.value)throw new Error("value must be present in constructor argument");if(this.value=t.value,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");this.confidence=t.confidence,void 0!==t.validationStatus&&(this.validationStatus=t.validationStatus)}}t.Field=e}(U||(U={}));class H extends E.a{constructor(t={}){super(),this.allowedCountries=[],this.minBirthYear=0,this.maxBirthYear=2999,this.minExpirationYear=0,this.maxExpirationYear=2999,this.maxCountryDetectionAttempts=5,this.minEqualFrameCount=4,this.maxAccumulatedFrameCount=10,void 0!==t.allowedCountries&&(this.allowedCountries=t.allowedCountries.map((t=>t))),void 0!==t.minBirthYear&&(this.minBirthYear=t.minBirthYear),void 0!==t.maxBirthYear&&(this.maxBirthYear=t.maxBirthYear),void 0!==t.minExpirationYear&&(this.minExpirationYear=t.minExpirationYear),void 0!==t.maxExpirationYear&&(this.maxExpirationYear=t.maxExpirationYear),void 0!==t.maxCountryDetectionAttempts&&(this.maxCountryDetectionAttempts=t.maxCountryDetectionAttempts),void 0!==t.minEqualFrameCount&&(this.minEqualFrameCount=t.minEqualFrameCount),void 0!==t.maxAccumulatedFrameCount&&(this.maxAccumulatedFrameCount=t.maxAccumulatedFrameCount)}}!function(t){t.From=function(t){const e=t._type;switch(e){case"DateValidationConfig":return new G(t);case"EuropeanHealthInsuranceCardConfig":return new Q(t);case"MRZFallbackConfig":return new Y(t);case"GDRGroupConfig":return new Z(t);default:throw`Unknown child class name: ${e}`}}}(T||(T={}));class G extends E.a{constructor(t={}){super(),this._type="DateValidationConfig",this.minBirthYear=0,this.maxBirthYear=2999,this.minExpirationYear=0,this.maxExpirationYear=2999,this.documentTypes=[],void 0!==t.minBirthYear&&(this.minBirthYear=t.minBirthYear),void 0!==t.maxBirthYear&&(this.maxBirthYear=t.maxBirthYear),void 0!==t.minExpirationYear&&(this.minExpirationYear=t.minExpirationYear),void 0!==t.maxExpirationYear&&(this.maxExpirationYear=t.maxExpirationYear),void 0!==t.documentTypes&&(this.documentTypes=t.documentTypes.map((t=>t)))}}class Q extends E.a{constructor(t={}){super(),this._type="EuropeanHealthInsuranceCardConfig",this.minBirthYear=0,this.maxBirthYear=2999,this.minExpirationYear=0,this.maxExpirationYear=2999,this.expectedCountry=null,void 0!==t.minBirthYear&&(this.minBirthYear=t.minBirthYear),void 0!==t.maxBirthYear&&(this.maxBirthYear=t.maxBirthYear),void 0!==t.minExpirationYear&&(this.minExpirationYear=t.minExpirationYear),void 0!==t.maxExpirationYear&&(this.maxExpirationYear=t.maxExpirationYear),void 0!==t.expectedCountry&&(this.expectedCountry=null!=t.expectedCountry?t.expectedCountry:null)}}class Y extends E.a{constructor(t={}){super(),this._type="MRZFallbackConfig",this.acceptedCountries=[],this.acceptedMRZTypes=[],void 0!==t.acceptedCountries&&(this.acceptedCountries=t.acceptedCountries.map((t=>t))),void 0!==t.acceptedMRZTypes&&(this.acceptedMRZTypes=t.acceptedMRZTypes.map((t=>t)))}}class Z extends E.a{constructor(t={}){super(),this._type="GDRGroupConfig",this.acceptedDocumentTypes=[],void 0!==t.acceptedDocumentTypes&&(this.acceptedDocumentTypes=t.acceptedDocumentTypes.map((t=>t)))}}class q extends E.a{constructor(t={}){if(super(),void 0===t.status)throw new Error("status must be present in constructor argument");if(this.status=t.status,void 0===t.document)throw new Error("document must be present in constructor argument");if(this.document=null!=t.document?new _.GenericDocument(t.document):null,void 0===t.quad)throw new Error("quad must be present in constructor argument");this.quad=null!=t.quad?t.quad.map((t=>({x:t.x,y:t.y}))):null}}class X extends E.a{constructor(t={}){super(),this.mode="LIVE",void 0!==t.mode&&(this.mode=t.mode)}}class $ extends E.a{constructor(t={}){super(),this.minConfirmations=3,this.minConfidenceForStableField=.8,this.autoClearThreshold=4,void 0!==t.minConfirmations&&(this.minConfirmations=t.minConfirmations),void 0!==t.minConfidenceForStableField&&(this.minConfidenceForStableField=t.minConfidenceForStableField),void 0!==t.autoClearThreshold&&(this.autoClearThreshold=t.autoClearThreshold)}}class K extends E.a{constructor(t={}){super(),this.resultAccumulationConfig=new $({}),this.fieldExcludeList=[],this.configurations=[new Z({})],void 0!==t.resultAccumulationConfig&&(this.resultAccumulationConfig=new $(t.resultAccumulationConfig)),void 0!==t.fieldExcludeList&&(this.fieldExcludeList=t.fieldExcludeList.map((t=>t))),void 0!==t.configurations&&(this.configurations=t.configurations.map((t=>T.From(t))))}}class J extends E.a{constructor(t={}){super()}}(J||(J={})).all=["DeIdCardFront","DeIdCardBack","DePassport","DeDriverLicenseFront","DeDriverLicenseBack","DeResidencePermitFront","DeResidencePermitBack","EuropeanHealthInsuranceCard","DeHealthInsuranceCardFront"];class tt extends E.a{constructor(t={}){if(super(),this.recognitionConfidence=0,void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.boundingRect)throw new Error("boundingRect must be present in constructor argument");this.boundingRect={x:t.boundingRect.x,y:t.boundingRect.y,width:t.boundingRect.width,height:t.boundingRect.height},void 0!==t.recognitionConfidence&&(this.recognitionConfidence=t.recognitionConfidence)}}class et extends E.a{constructor(t={}){if(super(),void 0===t.symbol)throw new Error("symbol must be present in constructor argument");if(this.symbol=t.symbol,void 0===t.boundingRect)throw new Error("boundingRect must be present in constructor argument");if(this.boundingRect={x:t.boundingRect.x,y:t.boundingRect.y,width:t.boundingRect.width,height:t.boundingRect.height},void 0===t.recognitionConfidence)throw new Error("recognitionConfidence must be present in constructor argument");this.recognitionConfidence=t.recognitionConfidence}}class nt extends E.a{constructor(t={}){if(super(),this.confidence=0,this.validationSuccessful=!1,void 0===t.rawText)throw new Error("rawText must be present in constructor argument");if(this.rawText=t.rawText,void 0===t.wordBoxes)throw new Error("wordBoxes must be present in constructor argument");if(this.wordBoxes=t.wordBoxes.map((t=>new tt(t))),void 0===t.symbolBoxes)throw new Error("symbolBoxes must be present in constructor argument");this.symbolBoxes=t.symbolBoxes.map((t=>new et(t))),void 0!==t.confidence&&(this.confidence=t.confidence),void 0!==t.validationSuccessful&&(this.validationSuccessful=t.validationSuccessful)}}!function(t){t.From=function(t){const e=t._type;switch(e){case"DefaultContentValidator":return new it(t);case"PresetContentValidator":return new ot(t);case"PatternContentValidator":return new rt(t);default:throw`Unknown child class name: ${e}`}}}(k||(k={}));class it extends E.a{constructor(t={}){super(),this._type="DefaultContentValidator",this.allowedCharacters="",void 0!==t.allowedCharacters&&(this.allowedCharacters=t.allowedCharacters)}}class ot extends E.a{constructor(t={}){if(super(),this._type="PresetContentValidator",void 0===t.preset)throw new Error("preset must be present in constructor argument");this.preset=t.preset}}class rt extends E.a{constructor(t={}){if(super(),this._type="PatternContentValidator",this.allowedCharacters="",this.matchSubstring=!1,void 0!==t.allowedCharacters&&(this.allowedCharacters=t.allowedCharacters),void 0===t.pattern)throw new Error("pattern must be present in constructor argument");this.pattern=t.pattern,void 0!==t.matchSubstring&&(this.matchSubstring=t.matchSubstring)}}class at extends E.a{constructor(t={}){super(),this.ocrResolutionLimit=0,this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,this.validator=new it({}),void 0!==t.ocrResolutionLimit&&(this.ocrResolutionLimit=t.ocrResolutionLimit),void 0!==t.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=t.maximumNumberOfAccumulatedFrames),void 0!==t.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=t.minimumNumberOfRequiredFramesWithEqualRecognitionResult),void 0!==t.validator&&(this.validator=k.From(t.validator))}}class st extends E.a{constructor(t={}){super(),this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualScanningResult=2,this.scannerStrategy="ML",void 0!==t.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=t.maximumNumberOfAccumulatedFrames),void 0!==t.minimumNumberOfRequiredFramesWithEqualScanningResult&&(this.minimumNumberOfRequiredFramesWithEqualScanningResult=t.minimumNumberOfRequiredFramesWithEqualScanningResult),void 0!==t.scannerStrategy&&(this.scannerStrategy=t.scannerStrategy)}}class lt extends E.a{constructor(t={}){if(super(),this.confidence=0,this.validationSuccessful=!1,this.croppedImage=null,void 0===t.countryCode)throw new Error("countryCode must be present in constructor argument");if(this.countryCode=t.countryCode,void 0===t.licensePlate)throw new Error("licensePlate must be present in constructor argument");if(this.licensePlate=t.licensePlate,void 0===t.rawText)throw new Error("rawText must be present in constructor argument");this.rawText=t.rawText,void 0!==t.confidence&&(this.confidence=t.confidence),void 0!==t.validationSuccessful&&(this.validationSuccessful=t.validationSuccessful),void 0!==t.croppedImage&&(this.croppedImage=null!=t.croppedImage?t.croppedImage:null)}}class ct extends E.a{constructor(t={}){super(),this.shouldCropDocument=!0,this.recognizePatientInfoBox=!0,this.recognizeBarcode=!0,this.extractCroppedImage=!1,this.preprocessInput=!1,void 0!==t.shouldCropDocument&&(this.shouldCropDocument=t.shouldCropDocument),void 0!==t.recognizePatientInfoBox&&(this.recognizePatientInfoBox=t.recognizePatientInfoBox),void 0!==t.recognizeBarcode&&(this.recognizeBarcode=t.recognizeBarcode),void 0!==t.extractCroppedImage&&(this.extractCroppedImage=t.extractCroppedImage),void 0!==t.preprocessInput&&(this.preprocessInput=t.preprocessInput)}}class ut extends E.a{constructor(t={}){if(super(),this.type="UNKNOWN",this.checked=!1,this.checkedConfidence=0,void 0!==t.type&&(this.type=t.type),void 0!==t.checked&&(this.checked=t.checked),void 0!==t.checkedConfidence&&(this.checkedConfidence=t.checkedConfidence),void 0===t.quad)throw new Error("quad must be present in constructor argument");this.quad=t.quad.map((t=>({x:t.x,y:t.y})))}}class dt extends E.a{constructor(t={}){if(super(),this.value="",this.rawString="",this.type="UNDEFINED",this.recognitionConfidence=0,void 0===t.quad)throw new Error("quad must be present in constructor argument");this.quad=t.quad.map((t=>({x:t.x,y:t.y}))),void 0!==t.value&&(this.value=t.value),void 0!==t.rawString&&(this.rawString=t.rawString),void 0!==t.type&&(this.type=t.type),void 0!==t.recognitionConfidence&&(this.recognitionConfidence=t.recognitionConfidence)}}class ht extends E.a{constructor(t={}){if(super(),void 0===t.type)throw new Error("type must be present in constructor argument");if(this.type=t.type,void 0===t.value)throw new Error("value must be present in constructor argument");if(this.value=t.value,void 0===t.recognitionConfidence)throw new Error("recognitionConfidence must be present in constructor argument");this.recognitionConfidence=t.recognitionConfidence}}class pt extends E.a{constructor(t={}){if(super(),this.hasContents=!1,void 0===t.quad)throw new Error("quad must be present in constructor argument");if(this.quad=t.quad.map((t=>({x:t.x,y:t.y}))),void 0===t.fields)throw new Error("fields must be present in constructor argument");this.fields=t.fields.map((t=>new ht(t))),void 0!==t.hasContents&&(this.hasContents=t.hasContents)}}class ft extends E.a{constructor(t={}){if(super(),this.recognitionSuccessful=!1,this.formType="UNKNOWN",this.clockwiseRotations=0,this.croppedImage=null,this.scaleX=1,this.scaleY=1,void 0!==t.recognitionSuccessful&&(this.recognitionSuccessful=t.recognitionSuccessful),void 0===t.patientInfoBox)throw new Error("patientInfoBox must be present in constructor argument");if(this.patientInfoBox=new pt(t.patientInfoBox),void 0===t.checkBoxes)throw new Error("checkBoxes must be present in constructor argument");if(this.checkBoxes=t.checkBoxes.map((t=>new ut(t))),void 0===t.dates)throw new Error("dates must be present in constructor argument");if(this.dates=t.dates.map((t=>new dt(t))),void 0!==t.formType&&(this.formType=t.formType),void 0!==t.clockwiseRotations&&(this.clockwiseRotations=t.clockwiseRotations),void 0!==t.croppedImage&&(this.croppedImage=null!=t.croppedImage?t.croppedImage:null),void 0!==t.scaleX&&(this.scaleX=t.scaleX),void 0!==t.scaleY&&(this.scaleY=t.scaleY),void 0===t.documentRoi)throw new Error("documentRoi must be present in constructor argument");this.documentRoi=new j(t.documentRoi)}}class mt extends E.a{constructor(t={}){super(),this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=2,void 0!==t.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=t.maximumNumberOfAccumulatedFrames),void 0!==t.minimumNumberOfRequiredFramesWithEqualRecognitionResult&&(this.minimumNumberOfRequiredFramesWithEqualRecognitionResult=t.minimumNumberOfRequiredFramesWithEqualRecognitionResult)}}class gt extends E.a{constructor(t={}){if(super(),this.recognitionSuccessful=!1,void 0!==t.recognitionSuccessful&&(this.recognitionSuccessful=t.recognitionSuccessful),void 0===t.rawMRZ)throw new Error("rawMRZ must be present in constructor argument");if(this.rawMRZ=t.rawMRZ,void 0===t.document)throw new Error("document must be present in constructor argument");this.document=null!=t.document?new _.GenericDocument(t.document):null}}class vt extends E.a{constructor(t={}){super(),this.accumulatedResultsVerifierConfig=new mt({}),void 0!==t.accumulatedResultsVerifierConfig&&(this.accumulatedResultsVerifierConfig=new mt(t.accumulatedResultsVerifierConfig))}}!function(t){t.From=function(t){const e=t._type;switch(e){case"Glyph":return new At(t);case"Word":return new bt(t);case"Line":return new yt(t);case"Block":return new Ct(t);case"Page":return new St(t);default:throw`Unknown child class name: ${e}`}}}(D||(D={}));class At extends E.a{constructor(t={}){if(super(),this._type="Glyph",void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");if(this.confidence=t.confidence,void 0===t.roi)throw new Error("roi must be present in constructor argument");this.roi=t.roi.map((t=>({x:t.x,y:t.y})))}}class bt extends E.a{constructor(t={}){if(super(),this._type="Word",void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");if(this.confidence=t.confidence,void 0===t.roi)throw new Error("roi must be present in constructor argument");if(this.roi=t.roi.map((t=>({x:t.x,y:t.y}))),void 0===t.glyphs)throw new Error("glyphs must be present in constructor argument");this.glyphs=t.glyphs.map((t=>new At(t)))}}class yt extends E.a{constructor(t={}){if(super(),this._type="Line",void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");if(this.confidence=t.confidence,void 0===t.roi)throw new Error("roi must be present in constructor argument");if(this.roi=t.roi.map((t=>({x:t.x,y:t.y}))),void 0===t.words)throw new Error("words must be present in constructor argument");this.words=t.words.map((t=>new bt(t)))}}class Ct extends E.a{constructor(t={}){if(super(),this._type="Block",void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");if(this.confidence=t.confidence,void 0===t.roi)throw new Error("roi must be present in constructor argument");if(this.roi=t.roi.map((t=>({x:t.x,y:t.y}))),void 0===t.lines)throw new Error("lines must be present in constructor argument");this.lines=t.lines.map((t=>new yt(t)))}}class St extends E.a{constructor(t={}){if(super(),this._type="Page",void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");if(this.confidence=t.confidence,void 0===t.roi)throw new Error("roi must be present in constructor argument");if(this.roi=t.roi.map((t=>({x:t.x,y:t.y}))),void 0===t.blocks)throw new Error("blocks must be present in constructor argument");this.blocks=t.blocks.map((t=>new Ct(t)))}}!function(t){t.From=function(t){const e=t._type;switch(e){case"ScanbotBinarizationFilter":return new wt(t);case"CustomBinarizationFilter":return new xt(t);case"ColorDocumentFilter":return new Et(t);case"BrightnessFilter":return new Lt(t);case"ContrastFilter":return new _t(t);case"GrayscaleFilter":return new Ot(t);case"LegacyFilter":return new Tt(t);case"WhiteBlackPointFilter":return new kt(t);default:throw`Unknown child class name: ${e}`}}}(P||(P={}));class wt extends E.a{constructor(t={}){super(),this._type="ScanbotBinarizationFilter",this.outputMode="BINARY",void 0!==t.outputMode&&(this.outputMode=t.outputMode)}}class xt extends E.a{constructor(t={}){super(),this._type="CustomBinarizationFilter",this.outputMode="BINARY",this.denoise=.5,this.radius=32,this.preset="PRESET_4",void 0!==t.outputMode&&(this.outputMode=t.outputMode),void 0!==t.denoise&&(this.denoise=t.denoise),void 0!==t.radius&&(this.radius=t.radius),void 0!==t.preset&&(this.preset=t.preset)}}class Et extends E.a{constructor(t={}){super(),this._type="ColorDocumentFilter"}}class Lt extends E.a{constructor(t={}){super(),this._type="BrightnessFilter",this.brightness=0,void 0!==t.brightness&&(this.brightness=t.brightness)}}class _t extends E.a{constructor(t={}){super(),this._type="ContrastFilter",this.contrast=0,void 0!==t.contrast&&(this.contrast=t.contrast)}}class Ot extends E.a{constructor(t={}){super(),this._type="GrayscaleFilter",this.borderWidthFraction=.06,this.blackOutliersFraction=0,this.whiteOutliersFraction=.02,void 0!==t.borderWidthFraction&&(this.borderWidthFraction=t.borderWidthFraction),void 0!==t.blackOutliersFraction&&(this.blackOutliersFraction=t.blackOutliersFraction),void 0!==t.whiteOutliersFraction&&(this.whiteOutliersFraction=t.whiteOutliersFraction)}}class Tt extends E.a{constructor(t={}){super(),this._type="LegacyFilter",this.filterType=0,void 0!==t.filterType&&(this.filterType=t.filterType)}}class kt extends E.a{constructor(t={}){super(),this._type="WhiteBlackPointFilter",this.blackPoint=0,this.whitePoint=1,void 0!==t.blackPoint&&(this.blackPoint=t.blackPoint),void 0!==t.whitePoint&&(this.whitePoint=t.whitePoint)}}class Dt extends E.a{constructor(t={}){super(),this.author="Created with ❤️ with Scanbot SDK",this.creator="",this.title="",this.subject="",this.keywords="",void 0!==t.author&&(this.author=t.author),void 0!==t.creator&&(this.creator=t.creator),void 0!==t.title&&(this.title=t.title),void 0!==t.subject&&(this.subject=t.subject),void 0!==t.keywords&&(this.keywords=t.keywords)}}class Pt extends E.a{constructor(t={}){super(),this.attributes=new Dt({}),this.pageSize="A4",this.pageDirection="PORTRAIT",this.pageFit="FIT_IN",this.dpi=72,this.jpegQuality=80,this.resamplingMethod="NONE",void 0!==t.attributes&&(this.attributes=new Dt(t.attributes)),void 0!==t.pageSize&&(this.pageSize=t.pageSize),void 0!==t.pageDirection&&(this.pageDirection=t.pageDirection),void 0!==t.pageFit&&(this.pageFit=t.pageFit),void 0!==t.dpi&&(this.dpi=t.dpi),void 0!==t.jpegQuality&&(this.jpegQuality=t.jpegQuality),void 0!==t.resamplingMethod&&(this.resamplingMethod=t.resamplingMethod)}}!function(t){t.From=function(t){const e=t._type;switch(e){case"UserFieldDoubleValue":return new Bt(t);case"UserFieldStringValue":return new Rt(t);case"UserFieldIntValue":return new It(t);default:throw`Unknown child class name: ${e}`}}}(B||(B={}));class Bt extends E.a{constructor(t={}){if(super(),this._type="UserFieldDoubleValue",void 0===t.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class Rt extends E.a{constructor(t={}){if(super(),this._type="UserFieldStringValue",void 0===t.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class It extends E.a{constructor(t={}){if(super(),this._type="UserFieldIntValue",void 0===t.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class Ft extends E.a{constructor(t={}){if(super(),void 0===t.tag)throw new Error("tag must be present in constructor argument");if(this.tag=t.tag,void 0===t.name)throw new Error("name must be present in constructor argument");if(this.name=t.name,void 0===t.value)throw new Error("value must be present in constructor argument");this.value=B.From(t.value)}}class Wt extends E.a{constructor(t={}){super(),this.compression="LZW",this.jpegQuality=80,this.zipCompressionLevel=6,this.dpi=72,this.userFields=[],this.binarizationFilter=null,void 0!==t.compression&&(this.compression=t.compression),void 0!==t.jpegQuality&&(this.jpegQuality=t.jpegQuality),void 0!==t.zipCompressionLevel&&(this.zipCompressionLevel=t.zipCompressionLevel),void 0!==t.dpi&&(this.dpi=t.dpi),void 0!==t.userFields&&(this.userFields=t.userFields.map((t=>new Ft(t)))),void 0!==t.binarizationFilter&&(this.binarizationFilter=null!=t.binarizationFilter?P.From(t.binarizationFilter):null)}}(R=Wt||(Wt={})).defaultCompression="LZW",R.binaryDocumentOptimizedCompression="CCITTFAX4"},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(6);class o{constructor(t,e){this.width=t,this.height=e}isPortrait(){return this.height>this.width}ratio(t){return t?this.height/this.width:this.width/this.height}ratioDiff(t,e){return this.ratio(e)/t.ratio(e)}static isEmpty(t){return!t||(0===t.width||0===t.height)}static toPolygon(t){return[new i.a(0,0),new i.a(t.width,0),new i.a(t.width,t.height),new i.a(0,t.height)]}static fromHtmlElement(t){return t?new o(t.clientWidth,t.clientHeight):new o(0,0)}static fromJson(t){return new o(t.width,t.height)}static subtractFrom(t,e){return new o(t.width-e,t.height-e)}static empty(){return new o(0,0)}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return a}));var i=n(0),o=n(5);function r(t){return{color:o.b.getColorValue(t.color),textShadow:t.useShadow?"1px 1px 2px":""}}function a(t){return t.config.visible?i.default.createElement("span",{ref:t.innerRef,style:Object.assign(Object.assign({},t.style),r(t.config))},o.b.getLocalizedBarcodeText(t.config.text)):null}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return d}));var i=n(0),o=n(39);const r=n(24).a.svg`
|
|
3
3
|
animation: rotate 2s linear infinite;
|
|
4
4
|
width: 50px;
|
|
5
5
|
height: 50px;
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
stroke-dashoffset: -120;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
`;e.default=t=>i.default.createElement(r,{viewBox:"0 0 50 50"},i.default.createElement("circle",{className:"path",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"3",stroke:t.color||"black"}))},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const r=i(n(1)),a=n(74);class s extends r.default.Component{constructor(t){super(t),this.orientationchangeCallback=this.orientationChanged.bind(this),this.state={orientation:window.orientation,stream:void 0}}orientationChanged(t){this.setState({orientation:window.orientation})}setDeviceIdInConstraints(t){return o(this,void 0,void 0,(function*(){const e=this.props.preferredCamera;if(e)try{const n=(yield navigator.mediaDevices.enumerateDevices()).find((t=>t.deviceId===e||t.label===e));if(n)return Object.assign(Object.assign({},t),{deviceId:n.deviceId})}catch(t){throw a.MediaError.enumerateDevicesFailed()}return t}))}componentDidMount(){return o(this,void 0,void 0,(function*(){window.addEventListener("orientationchange",this.orientationchangeCallback),yield this.refreshStream()}))}refreshStream(){var t,e,n,i,r,s,l,u;return o(this,void 0,void 0,(function*(){if(a.MediaError.hasCheckedPermission()||(yield a.MediaError.tryCheckPermission()),a.MediaError.hasDeniedPermission())return void(null===(e=(t=this.props).onError)||void 0===e||e.call(t,a.MediaError.permissionDenied()));const o={video:yield this.setDeviceIdInConstraints(this.props.videoConstraints)};try{if(!navigator.mediaDevices){const t=a.MediaError.unknown();return null===(i=(n=this.props).onError)||void 0===i||i.call(n,t),void console.log(t)}this.stopCurrentStreams();try{const t=yield navigator.mediaDevices.getUserMedia(o);this.setState({stream:t},(()=>{var e,n,o,i;null===(n=(e=this.props).onStreamChanged)||void 0===n||n.call(e,t),null===(i=(o=this.props).onReady)||void 0===i||i.call(o)}))}catch(t){const e=a.MediaError.mediaDeviceNotFound();return null===(s=(r=this.props).onError)||void 0===s||s.call(r,e),void console.error(e)}}catch(t){let e=a.MediaError.unknown(t.message);return t instanceof DOMException&&("NotAllowedError"===t.name?e=a.MediaError.permissionDenied("Specifically, the native 'NotAllowedError' was thrown."):"NotFoundError"===t.name&&(e=a.MediaError.mediaDeviceNotFound("Specifically, the native 'NotFoundError' was thrown."))),null===(u=(l=this.props).onError)||void 0===u||u.call(l,e),void console.error(e)}}))}stopCurrentStreams(){return o(this,void 0,void 0,(function*(){const t=this.state.stream,e=null==t?void 0:t.getTracks();e&&e.forEach((t=>{t.stop()}))}))}componentWillUnmount(){window.removeEventListener("orientationchange",this.orientationchangeCallback),this.state.stream&&(this.state.stream.getVideoTracks&&this.state.stream.getAudioTracks&&(this.state.stream.getVideoTracks().forEach((t=>t.stop())),this.state.stream.getAudioTracks().forEach((t=>t.stop()))),this.setState({stream:void 0}))}render(){return this.props.children}updateTorch(t){return o(this,void 0,void 0,(function*(){const e=[{torch:t}];yield this.state.stream.getVideoTracks()[0].applyConstraints({advanced:e})}))}getCapabilities(){if(this.state.stream.getVideoTracks){const t=this.getVideoTrack();if(t&&t.getCapabilities)return t.getCapabilities()}}getVideoTrack(){const t=this.state.stream.getVideoTracks();if(t.length>0)return t[0]}}e.default=s},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.AnimationType=void 0;const s=a(n(1)),l=r(n(27)),u=a(n(123)),c=a(n(29));var d;!function(t){t[t.None=0]="None",t[t.PushRight=1]="PushRight",t[t.PushBottom=2]="PushBottom",t[t.Pop=3]="Pop"}(d||(e.AnimationType=d={}));class f extends s.default.Component{constructor(t){super(t),this._isVisible=!1,this.state={animation:{type:d.None},elements:[]}}containerStyle(t){return{height:"100%",width:"100%",position:"absolute",top:"0",left:"0",zIndex:101,transform:t,overflow:"scroll"}}render(){var t,e,n;if(this.state.animation.type===d.None)return null;const o=this.animation(this.state.animation.type),i=this.to(this.state.animation.type);this.previousDestination=i;const r=this.props.style;return s.default.createElement(o,{style:this.containerStyle(`${i}`),onAnimationStart:this.onAnimationStart.bind(this),onAnimationEnd:this.onAnimationEnd.bind(this),onClick:t=>{this.reset()}},s.default.createElement("div",{style:{backgroundColor:"white",height:r.sheetHeight,width:"100%",marginTop:r.sheetTopMargin,borderTopLeftRadius:20,borderTopRightRadius:20},onClick:t=>{t.stopPropagation()}},s.default.createElement("div",{style:{borderTopLeftRadius:20,borderTopRightRadius:20,backgroundColor:c.default.ScanbotPrimary}},s.default.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"end",height:10}},s.default.createElement("div",{style:{backgroundColor:c.default.White,height:3,width:33,borderRadius:5}})),s.default.createElement("div",{style:{display:"flex",height:50}},s.default.createElement("div",{style:{display:"flex",fontSize:12,flex:1,color:c.default.White,alignItems:"center",justifyContent:"left",paddingLeft:10,fontWeight:300},onClick:this.props.onDeleteClick},"CLEAR ALL"),s.default.createElement("div",{style:{display:"flex",fontSize:15,flex:1,color:c.default.White,justifyContent:"center",alignItems:"center",fontWeight:500}},(null!==(e=null===(t=this.barcodes)||void 0===t?void 0:t.length)&&void 0!==e?e:0)+" Codes"),s.default.createElement("div",{style:{display:"flex",fontSize:13,flex:1,color:c.default.White,justifyContent:"right",alignItems:"center",paddingRight:10}},s.default.createElement("div",{style:{fontSize:30,fontWeight:100},onClick:t=>{t.stopPropagation(),this.reset()}},"×")))),s.default.createElement(u.default,{ref:t=>{null!==t&&(this.list=t)},barcodes:null!==(n=this.barcodes)&&void 0!==n?n:[]})))}reset(){this.pop()}isVisible(){return this._isVisible}push(t,e){this._isVisible=!0,this.barcodes=e,this.updateAnimationType(t)}update(t){this.barcodes=t,this.forceUpdate()}pop(){this._isVisible=!1,this.updateAnimationType(d.Pop)}onAnimationStart(){}onAnimationEnd(){this.state.animation.type===d.Pop&&this.updateAnimationType(d.None)}updateAnimationType(t,e){this.setState({animation:{type:t}},e)}animation(t){let e=this.from(t),n=this.to(t);this.previousDestination===n&&(e=this.previousDestination,n=this.previousDestination);const o=l.keyframes`from {transform: ${e};} to {transform: ${n};}`;return l.default.div`animation: ${o} 0.5s;`}from(t){if(t===d.PushRight)return this.translate("X",100);if(t===d.PushBottom)return this.translate("Y",100);if(t===d.Pop){const t=this.pushType===d.PushRight?"X":"Y";return this.translate(t,0)}}to(t){if(t===d.PushRight)return this.translate("X",0);if(t===d.PushBottom)return this.translate("Y",0);if(t===d.Pop){const t=this.pushType===d.PushRight?"X":"Y";return this.translate(t,100)}}translate(t,e){return"translate"+t+"("+e+"%)"}componentWillUnmount(){this._isVisible=!1}}e.default=f},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=o(n(1)),r=o(n(124));class a extends i.default.Component{constructor(t){super(t),this.state={barcodes:this.toUniqueListWithDuplicateCounter(t.barcodes)}}toUniqueListWithDuplicateCounter(t){const e=[];return t.forEach((t=>{const n=e.findIndex((e=>e.equals(t)));-1===n?(t.count=1,e.push(t)):e[n].count++})),e}update(t){this.setState({barcodes:this.toUniqueListWithDuplicateCounter(t)})}render(){return i.default.createElement("div",{style:{display:"flex",flexDirection:"column",backgroundColor:"white",padding:15}},this.state.barcodes.map(((t,e)=>i.default.createElement(r.default,{key:e,barcode:t,onClick:this.props.onClick}))))}}e.default=a},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=o(n(1));class r extends i.default.Component{constructor(t){super(t),this.state={base64Image:void 0}}render(){const t="x"+this.props.barcode.count;return i.default.createElement("div",{style:{display:"flex",flexDirection:"row",backgroundColor:"white",paddingBottom:5,paddingTop:5,borderBottom:"0.5px solid gray"}},i.default.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",width:"100%"}},i.default.createElement("div",{style:{display:"flex",fontSize:15,fontWeight:400,width:"100%"}},i.default.createElement("div",{style:{flex:1}},this.props.barcode.text),i.default.createElement("div",{style:{flex:1,justifyContent:"end",display:"flex"}},t)),i.default.createElement("div",{style:{color:"gray",fontSize:13,fontWeight:300}},this.props.barcode.format)))}}e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=class{static now(){return Date.now()}}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodePolygonProps=void 0;const s=r(n(1)),l=n(14),u=n(5);e.BarcodePolygonProps=class{};class c extends s.default.Component{constructor(t){super(t),this.state={element:t.element}}update(t){this.setState({element:t})}style(t){this.customStyle=t,this.forceUpdate()}render(){var t,e,n,o,i,r,a,l,u;const c=this.state.element,f=this.props.configuration.style;!c.highlighted&&this.props.configuration.automaticSelectionEnabled&&this.props.onClick(c);const h=null!==(e=null===(t=this.customStyle)||void 0===t?void 0:t.fill)&&void 0!==e?e:c.highlighted?f.highlightedPolygonFillColor:f.polygonFillColor,p=null!==(o=null===(n=this.customStyle)||void 0===n?void 0:n.stroke)&&void 0!==o?o:c.highlighted?f.highlightedPolygonStrokeColor:f.polygonStrokeColor,m=null!==(r=null===(i=this.customStyle)||void 0===i?void 0:i.strokeWidth)&&void 0!==r?r:c.highlighted?f.highlightedPolygonStrokeWidth:f.polygonStrokeWidth,g=null!==(l=null===(a=this.customStyle)||void 0===a?void 0:a.cornerRadius)&&void 0!==l?l:c.highlighted?f.highlightedPolygonCornerRadius:f.polygonCornerRadius,v=null!==(u=this.props.animateToPoints)&&void 0!==u?u:c.points;return s.default.createElement(d,{points:v,onClick:()=>{this.props.onClick&&this.props.onClick(c)},fill:h,stroke:p,strokeWidth:m,cornerRadius:g})}}function d(t){var{points:e,cornerRadius:n}=t,o=a(t,["points","cornerRadius"]);const i=[e[0].x,e[0].y,e[1].x,e[1].y,e[2].x,e[2].y,e[3].x,e[3].y],r=i.map(l.useMotionValue),c=(0,l.useTransform)(r,(([t,e,o,i,r,a,s,l])=>{const c=[{x:t,y:e},{x:o,y:i},{x:r,y:a},{x:s,y:l}];return u.Point.toSvgPathStringWithRoundedCorners(c,n)}));return(0,s.useEffect)((()=>{const t=[];for(let e=0;e<i.length;e++)t.push((0,l.animate)(r[e],i[e]));return()=>{t.forEach((t=>t.stop()))}}),[e]),s.default.createElement(l.motion.path,Object.assign({d:c},o))}e.default=c},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=o(n(1)),r=n(77),a=o(n(29)),s=o(n(129)),l=o(n(130));class u extends i.default.Component{constructor(t){super(t),this.state={barcodes:void 0}}update(t){this.setState({barcodes:t})}didScan(){return void 0!==this.state.barcodes}render(){var t,e;return i.default.createElement("div",{style:{position:"absolute",bottom:0,width:"100%",height:76,display:"flex",alignItems:"center",backgroundColor:a.default.ScanbotPrimary}},i.default.createElement("div",{style:{display:"flex",flex:1,justifyContent:"center",alignItems:"center",opacity:this.didScan()?1:.5},onClick:this.didScan()&&this.props.onBurgerClick},i.default.createElement(s.default,null),i.default.createElement("div",{style:{backgroundColor:a.default.Orange,color:a.default.White,width:24,height:24,borderRadius:12,marginLeft:10,fontSize:13,lineHeight:"24px",textAlign:"center"}},null!==(e=null===(t=this.state.barcodes)||void 0===t?void 0:t.length)&&void 0!==e?e:0)),i.default.createElement("div",{style:{display:"flex",flex:1,justifyContent:"center",opacity:this.props.isShowingImage?.5:1}},i.default.createElement(r.ShutterButton,{style:{left:0,bottom:0,transform:"none"},color:"#FFF",action:this.props.action,onClick:!this.props.isShowingImage&&this.props.onShutterButtonClick})),i.default.createElement("div",{style:{display:"flex",flex:1,justifyContent:"center",alignItems:"center",opacity:this.didScan()?1:.5},onClick:this.didScan()&&this.props.onScanMoreClick},i.default.createElement("div",{style:{fontSize:13,color:a.default.White,marginRight:10}},"Scan More"),i.default.createElement(l.default,null)))}}e.default=u},function(t,e,n){"use strict";n.r(e);var o=n(34),i=n.n(o),r=n(48),a={insert:"head",singleton:!1};i()(r.a,a);e.default=r.a.locals||{}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=o(n(1));class r extends i.default.Component{render(){return i.default.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.default.createElement("mask",{id:"mask0_919_23088",style:"mask-type:alpha",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},i.default.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),i.default.createElement("g",{mask:"url(#mask0_919_23088)"},i.default.createElement("path",{d:"M9 19V17H21V19H9ZM9 13V11H21V13H9ZM9 7V5H21V7H9ZM5 20C4.45 20 3.97917 19.8042 3.5875 19.4125C3.19583 19.0208 3 18.55 3 18C3 17.45 3.19583 16.9792 3.5875 16.5875C3.97917 16.1958 4.45 16 5 16C5.55 16 6.02083 16.1958 6.4125 16.5875C6.80417 16.9792 7 17.45 7 18C7 18.55 6.80417 19.0208 6.4125 19.4125C6.02083 19.8042 5.55 20 5 20ZM5 14C4.45 14 3.97917 13.8042 3.5875 13.4125C3.19583 13.0208 3 12.55 3 12C3 11.45 3.19583 10.9792 3.5875 10.5875C3.97917 10.1958 4.45 10 5 10C5.55 10 6.02083 10.1958 6.4125 10.5875C6.80417 10.9792 7 11.45 7 12C7 12.55 6.80417 13.0208 6.4125 13.4125C6.02083 13.8042 5.55 14 5 14ZM5 8C4.45 8 3.97917 7.80417 3.5875 7.4125C3.19583 7.02083 3 6.55 3 6C3 5.45 3.19583 4.97917 3.5875 4.5875C3.97917 4.19583 4.45 4 5 4C5.55 4 6.02083 4.19583 6.4125 4.5875C6.80417 4.97917 7 5.45 7 6C7 6.55 6.80417 7.02083 6.4125 7.4125C6.02083 7.80417 5.55 8 5 8Z",fill:"white"})))}}e.default=r},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=o(n(1));class r extends i.default.Component{render(){return i.default.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.default.createElement("mask",{id:"mask0_919_23102",style:"mask-type:alpha",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},i.default.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),i.default.createElement("g",{mask:"url(#mask0_919_23102)"},i.default.createElement("path",{d:"M12 22C10.75 22 9.57917 21.7625 8.4875 21.2875C7.39583 20.8125 6.44583 20.1708 5.6375 19.3625C4.82917 18.5542 4.1875 17.6042 3.7125 16.5125C3.2375 15.4208 3 14.25 3 13H5C5 14.95 5.67917 16.6042 7.0375 17.9625C8.39583 19.3208 10.05 20 12 20C13.95 20 15.6042 19.3208 16.9625 17.9625C18.3208 16.6042 19 14.95 19 13C19 11.05 18.3208 9.39583 16.9625 8.0375C15.6042 6.67917 13.95 6 12 6H11.85L13.4 7.55L12 9L8 5L12 1L13.4 2.45L11.85 4H12C13.25 4 14.4208 4.2375 15.5125 4.7125C16.6042 5.1875 17.5542 5.82917 18.3625 6.6375C19.1708 7.44583 19.8125 8.39583 20.2875 9.4875C20.7625 10.5792 21 11.75 21 13C21 14.25 20.7625 15.4208 20.2875 16.5125C19.8125 17.6042 19.1708 18.5542 18.3625 19.3625C17.5542 20.1708 16.6042 20.8125 15.5125 21.2875C14.4208 21.7625 13.25 22 12 22Z",fill:"white"})))}}e.default=r},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=o(n(1)),r=n(76),a=o(n(132)),s=n(13),l=n(5);class u extends i.default.Component{constructor(t){super(t),this.state={elements:[],imageSize:s.Size.empty()}}update(t){const e=[];t.barcodes.forEach((n=>{const o=new r.BarcodeOverlay(n);o.points=l.Point.scaleListToHtmlElement(n.points,t.imageData,this.image),e.push(o)})),this.setState({imageSize:s.Size.fromHtmlElement(this.image),elements:e})}reset(){this.setState({elements:[]})}render(){return void 0===this.props.image||null===this.props.image?null:i.default.createElement("div",{className:"scanned-image-with-overlay",style:{position:"absolute",display:"flex",justifyContent:"center",alignItems:this.state.image?"normal":"center",minHeight:"300px",height:"100%",width:"100%",top:0,left:0}},i.default.createElement("img",{style:{maxWidth:"100%"},ref:t=>this.image=t,src:`${this.props.image}`}),i.default.createElement("div",{style:{position:"absolute",maxWidth:"100%",width:this.state.imageSize.width,height:this.state.imageSize.height}},this.state.elements.map(((t,e)=>i.default.createElement(a.default,{key:e,points:t.points})))))}}e.default=u},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=o(n(1)),r=n(5);class a extends i.default.Component{render(){const t=r.Point.centerOf(this.props.points),e=r.Point.smallerSizeOfQuad(this.props.points)/40;return i.default.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{position:"absolute",left:t.x-20,top:t.y-20,transform:`scale(${e})`}},i.default.createElement("mask",{id:"mask0_910_20901",style:"mask-type:alpha",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"40",height:"40"},i.default.createElement("rect",{width:"40",height:"40",fill:"#D9D9D9"})),i.default.createElement("g",{mask:"url(#mask0_910_20901)"},i.default.createElement("rect",{x:"7",y:"13",width:"26",height:"16",fill:"white"}),i.default.createElement("path",{d:"M17.5833 27.6111L29.3611 15.8333L27.3055 13.8055L17.5833 23.5278L12.6666 18.6111L10.6389 20.6389L17.5833 27.6111ZM20 36.6666C17.713 36.6666 15.5555 36.2291 13.5278 35.3541C11.5 34.4791 9.73147 33.287 8.22219 31.7778C6.71294 30.2685 5.52081 28.5 4.64581 26.4722C3.77081 24.4444 3.33331 22.287 3.33331 20C3.33331 17.6944 3.77081 15.5278 4.64581 13.5C5.52081 11.4722 6.71294 9.70831 8.22219 8.20831C9.73147 6.70831 11.5 5.52081 13.5278 4.64581C15.5555 3.77081 17.713 3.33331 20 3.33331C22.3055 3.33331 24.4722 3.77081 26.5 4.64581C28.5278 5.52081 30.2916 6.70831 31.7916 8.20831C33.2916 9.70831 34.4791 11.4722 35.3541 13.5C36.2291 15.5278 36.6666 17.6944 36.6666 20C36.6666 22.287 36.2291 24.4444 35.3541 26.4722C34.4791 28.5 33.2916 30.2685 31.7916 31.7778C30.2916 33.287 28.5278 34.4791 26.5 35.3541C24.4722 36.2291 22.3055 36.6666 20 36.6666Z",fill:"#55BB77"})))}}e.default=a},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=o(n(1)),r=o(n(27));class a extends i.default.Component{render(){if(!this.props.visible)return null;const t=r.default.svg`
|
|
31
|
+
`;var a=t=>i.default.createElement(r,{viewBox:"0 0 50 50"},i.default.createElement("circle",{className:"path",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"3",stroke:t.color||"black"})),s=n(25),l=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class c{}class u{constructor(){this.videoReady=!1,this.sdkReady=!1}}class d extends i.default.Component{constructor(t){super(t),this.onVideoReady=()=>{this.setState({videoReady:!0},(()=>{const{onSuccess:t}=this.props;t&&t(this)}))},this.onVideoError=t=>{if(!0===this.state.videoReady){const{onError:e}=this.props.configuration;e?e(t):console.error(t)}else{const{onFailure:e}=this.props;e&&e(t),this.dispose()}},this.state=new u,this.bridge.awaitInitialized().then((()=>{this.setState({sdkReady:!0})}))}get bridge(){return o.a.instance.bridge}dispose(){const{container:t}=this.props;t&&Object(i.render)(null,t)}componentDidMount(){this.disposed=!1}componentWillUnmount(){this.disposed=!0}isSupported(){return"localhost"===location.hostname||"https:"===location.protocol}swapCameraFacing(t){this.camera.swapCameraFacing(t)}switchCamera(t,e){return l(this,void 0,void 0,(function*(){this.camera.switchCamera(t,e)}))}getActiveCameraInfo(){return this.camera.getActiveCameraInfo()}fetchAvailableCameras(){return s.a.INSTANCE.load()}renderSpinner(t){return this.state.videoReady&&this.state.sdkReady?null:i.default.createElement("div",{"data-sb-spinner":"1",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:500}},i.default.createElement(a,{color:t}))}setTorchState(t){return this.camera.setTorchState(t)}}d.DEFAULT_DETECTION_RESOLUTION=600,d.DETECTION_RESULTION_4K=3840},function(t,e,n){"use strict";n.r(e),n.d(e,"SingleScanningMode",(function(){return c})),n.d(e,"Resolution",(function(){return u})),n.d(e,"CameraConfiguration",(function(){return d})),n.d(e,"TopBarConfiguration",(function(){return p.a})),n.d(e,"ActionBarConfiguration",(function(){return f})),n.d(e,"BarcodeUseCase",(function(){return h})),n.d(e,"Palette",(function(){return o.f})),n.d(e,"StyledText",(function(){return o.j})),n.d(e,"IconStyle",(function(){return o.e})),n.d(e,"PolygonStyle",(function(){return o.g})),n.d(e,"BackgroundStyle",(function(){return o.a})),n.d(e,"ForegroundStyle",(function(){return o.d})),n.d(e,"RoundButton",(function(){return o.h})),n.d(e,"BadgedButton",(function(){return o.b})),n.d(e,"ButtonConfiguration",(function(){return o.c})),n.d(e,"Sound",(function(){return o.i})),n.d(e,"Vibration",(function(){return o.l})),n.d(e,"Timeouts",(function(){return o.k})),n.d(e,"ViewFinderConfiguration",(function(){return E})),n.d(e,"FinderStyle",(function(){return w})),n.d(e,"FinderCorneredStyle",(function(){return L})),n.d(e,"FinderStrokedStyle",(function(){return _})),n.d(e,"UserGuidanceConfiguration",(function(){return O})),n.d(e,"BarcodeItemErrorState",(function(){return a})),n.d(e,"BarcodeMappedData",(function(){return s})),n.d(e,"BarcodeInfoMapping",(function(){return l})),n.d(e,"ExpectedBarcode",(function(){return C})),n.d(e,"FindAndPickScanningMode",(function(){return S})),n.d(e,"BarcodeTextLocalization",(function(){return T})),n.d(e,"BarcodeRecognizerConfiguration",(function(){return k})),n.d(e,"ArOverlayPolygonConfiguration",(function(){return i.c})),n.d(e,"BarcodeItemConfiguration",(function(){return i.e})),n.d(e,"BadgeStyle",(function(){return i.d})),n.d(e,"ArOverlayGeneralConfiguration",(function(){return i.b})),n.d(e,"FindAndPickArOverlayPolygonConfiguration",(function(){return i.f})),n.d(e,"FindAndPickBadgeConfiguration",(function(){return i.g})),n.d(e,"ArOverlayFindAndPickConfiguration",(function(){return i.a})),n.d(e,"BarcodeScannerConfiguration",(function(){return P})),n.d(e,"BarcodeScannerUIItem",(function(){return R})),n.d(e,"BarcodeScannerUIResult",(function(){return I})),n.d(e,"OcrResult",(function(){return F.OcrResult})),n.d(e,"ParsedData",(function(){return F.ParsedData})),n.d(e,"FieldType",(function(){return F.FieldType})),n.d(e,"Field",(function(){return F.Field})),n.d(e,"GenericDocumentType",(function(){return F.GenericDocumentType})),n.d(e,"GenericDocument",(function(){return F.GenericDocument})),n.d(e,"Sheet",(function(){return m})),n.d(e,"SwipeToDelete",(function(){return g})),n.d(e,"ManualCountEditDialog",(function(){return v})),n.d(e,"SheetContent",(function(){return A})),n.d(e,"MultipleScanningMode",(function(){return b})),n.d(e,"ScanbotAlertDialog",(function(){return y})),n.d(e,"CameraPermissionScreen",(function(){return D})),n.d(e,"BarcodeItem",(function(){return B.BarcodeItem})),n.d(e,"BarcodeDocumentFormats",(function(){return B.BarcodeDocumentFormats}));var i=n(8),o=n(1),r=n(7);class a extends r.a{constructor(t={}){super(),this.title=new o.j({text:"Connection Error!",color:"?sbColorOnSurface"}),this.subtitle=new o.j({text:"There was an issue and the data requested was not fetched. You could try again or discard this result to start a new scan.",color:"?sbColorOnSurfaceVariant"}),this.retryButton=new o.c({}),this.cancelButton=new o.c({}),void 0!==t.title&&(this.title=new o.j(t.title)),void 0!==t.subtitle&&(this.subtitle=new o.j(t.subtitle)),void 0!==t.retryButton&&(this.retryButton=new o.c(t.retryButton)),void 0!==t.cancelButton&&(this.cancelButton=new o.c(t.cancelButton))}}class s extends r.a{constructor(t={}){if(super(),void 0===t.title)throw new Error("title must be present in constructor argument");if(this.title=t.title,void 0===t.subtitle)throw new Error("subtitle must be present in constructor argument");if(this.subtitle=t.subtitle,void 0===t.barcodeImage)throw new Error("barcodeImage must be present in constructor argument");this.barcodeImage=t.barcodeImage}}class l extends r.a{constructor(t={}){super(),this.barcodeItemMapper=null,this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.loadingMessage=new o.j({text:"Loading message for barcode info mapping.",color:"?sbColorPrimary"}),this.errorState=new a({}),void 0!==t.barcodeItemMapper&&(this.barcodeItemMapper=null!=t.barcodeItemMapper?t.barcodeItemMapper:null),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0!==t.modalOverlayColor&&(this.modalOverlayColor=t.modalOverlayColor),void 0!==t.loadingMessage&&(this.loadingMessage=new o.j(t.loadingMessage)),void 0!==t.errorState&&(this.errorState=new a(t.errorState))}}class c extends r.a{constructor(t={}){super(),this._type="SingleScanningMode",this.confirmationSheetEnabled=!1,this.barcodeImageVisible=!0,this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.barcodeTitle=new o.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),this.barcodeSubtitle=new o.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.submitButton=new o.c({visible:!0,text:"?sheetSubmitButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary"})}),this.cancelButton=new o.c({visible:!0,text:"?singleModeConfirmationCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary"})}),this.barcodeInfoMapping=new l({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",loadingMessage:new o.j({text:"?barcodeInfoMappingLoadingMessage",color:"?sbColorPrimary"}),errorState:new a({title:new o.j({text:"?barcodeInfoMappingErrorStateTitle",color:"?sbColorOnSurface"}),subtitle:new o.j({text:"?barcodeInfoMappingErrorStateSubtitle",color:"?sbColorOnSurfaceVariant"}),retryButton:new o.c({visible:!0,text:"?barcodeInfoMappingErrorStateRetryButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary"})}),cancelButton:new o.c({text:"?barcodeInfoMappingErrorStateCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary"})})})}),this.arOverlay=new i.b({visible:!1,counterBadge:new i.d({visible:!0,background:new o.a({strokeColor:"#000000FF",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),automaticSelectionEnabled:!1,barcodeItemInfoPosition:"BELOW",polygon:new i.c({visible:!0,deselected:new o.g({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),selected:new o.g({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5})}),barcodeItemConfiguration:new i.e({imageVisible:!0,titleSelected:new o.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new o.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),titleDeselected:new o.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleDeselected:new o.j({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),backgroundSelected:new o.g({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new o.g({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:1,cornerRadius:5})})}),void 0!==t.confirmationSheetEnabled&&(this.confirmationSheetEnabled=t.confirmationSheetEnabled),void 0!==t.barcodeImageVisible&&(this.barcodeImageVisible=t.barcodeImageVisible),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0!==t.modalOverlayColor&&(this.modalOverlayColor=t.modalOverlayColor),void 0!==t.barcodeTitle&&(this.barcodeTitle=new o.j(t.barcodeTitle)),void 0!==t.barcodeSubtitle&&(this.barcodeSubtitle=new o.j(t.barcodeSubtitle)),void 0!==t.submitButton&&(this.submitButton=new o.c(t.submitButton)),void 0!==t.cancelButton&&(this.cancelButton=new o.c(t.cancelButton)),void 0!==t.barcodeInfoMapping&&(this.barcodeInfoMapping=new l(t.barcodeInfoMapping)),void 0!==t.arOverlay&&(this.arOverlay=new i.b(t.arOverlay))}}class u extends r.a{constructor(t={}){if(super(),void 0===t.width)throw new Error("width must be present in constructor argument");if(this.width=t.width,void 0===t.height)throw new Error("height must be present in constructor argument");this.height=t.height}}class d extends r.a{constructor(t={}){super(),this.cameraModule="BACK",this.zoomSteps=[1,2,5],this.defaultZoomFactor=1,this.flashEnabled=!1,this.idealPreviewResolution=new u({width:1920,height:1080}),void 0!==t.cameraModule&&(this.cameraModule=t.cameraModule),void 0!==t.zoomSteps&&(this.zoomSteps=t.zoomSteps.map((t=>t))),void 0!==t.defaultZoomFactor&&(this.defaultZoomFactor=t.defaultZoomFactor),void 0!==t.flashEnabled&&(this.flashEnabled=t.flashEnabled),void 0!==t.idealPreviewResolution&&(this.idealPreviewResolution=new u(t.idealPreviewResolution))}}var h,p=n(30);class f extends r.a{constructor(t={}){super(),this.flashButton=new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorWarning",activeForegroundColor:"#1C1B1F"}),this.zoomButton=new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),this.flipCameraButton=new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),void 0!==t.flashButton&&(this.flashButton=new o.h(t.flashButton)),void 0!==t.zoomButton&&(this.zoomButton=new o.h(t.zoomButton)),void 0!==t.flipCameraButton&&(this.flipCameraButton=new o.h(t.flipCameraButton))}}class m extends r.a{constructor(t={}){super(),this.mode="COLLAPSED_SHEET",this.collapsedVisibleHeight="SMALL",this.listButton=new o.b({}),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.collapsedVisibleHeight&&(this.collapsedVisibleHeight=t.collapsedVisibleHeight),void 0!==t.listButton&&(this.listButton=new o.b(t.listButton))}}class g extends r.a{constructor(t={}){super(),this.enabled=!0,this.backgroundColor="?sbColorNegative",this.iconColor="?sbColorOnPrimary",void 0!==t.enabled&&(this.enabled=t.enabled),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.iconColor&&(this.iconColor=t.iconColor)}}class v extends r.a{constructor(t={}){super(),this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.modalOverlayColor="?sbColorModalOverlay",this.title=new o.j({text:"Update count",color:"?sbColorOnSurface"}),this.info=new o.j({text:"Adjust the number of items you scanned.",color:"?sbColorOnSurfaceVariant"}),this.updateButton=new o.c({visible:!0,text:"Update",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),this.cancelButton=new o.c({visible:!0,text:"Cancel",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),this.clearTextButton=new o.e({visible:!0,color:"?sbColorOnSurfaceVariant"}),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0!==t.modalOverlayColor&&(this.modalOverlayColor=t.modalOverlayColor),void 0!==t.title&&(this.title=new o.j(t.title)),void 0!==t.info&&(this.info=new o.j(t.info)),void 0!==t.updateButton&&(this.updateButton=new o.c(t.updateButton)),void 0!==t.cancelButton&&(this.cancelButton=new o.c(t.cancelButton)),void 0!==t.clearTextButton&&(this.clearTextButton=new o.e(t.clearTextButton))}}class A extends r.a{constructor(t={}){super(),this.sheetColor="?sbColorSurface",this.dividerColor="?sbColorOutline",this.manualCountChangeEnabled=!0,this.manualCountOutlineColor="?sbColorOutline",this.manualCountChangeColor="?sbColorPrimary",this.title=new o.j({text:"%d items",color:"?sbColorOnSurface"}),this.clearAllButton=new o.c({visible:!0,text:"Clear all",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),this.barcodeItemTitle=new o.j({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),this.barcodeItemSubtitle=new o.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),this.barcodeItemImageVisible=!0,this.submitButton=new o.c({visible:!0,text:"Submit",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),this.startScanningButton=new o.c({visible:!0,text:"Start scanning",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),this.placeholderTitle=new o.j({text:"No barcodes here!",color:"?sbColorOnSurface"}),this.placeholderSubtitle=new o.j({text:"The barcode list is currently empty. Close this sheet and scan your items to add them.",color:"?sbColorOnSurfaceVariant"}),this.placeholderIconBackground="?sbColorOutline",this.placeholderIcon=new o.e({visible:!0,color:"?sbColorOnSurface"}),this.swipeToDelete=new g({enabled:!0,backgroundColor:"?sbColorNegative",iconColor:"?sbColorOnPrimary"}),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0!==t.manualCountChangeEnabled&&(this.manualCountChangeEnabled=t.manualCountChangeEnabled),void 0!==t.manualCountOutlineColor&&(this.manualCountOutlineColor=t.manualCountOutlineColor),void 0!==t.manualCountChangeColor&&(this.manualCountChangeColor=t.manualCountChangeColor),void 0!==t.title&&(this.title=new o.j(t.title)),void 0!==t.clearAllButton&&(this.clearAllButton=new o.c(t.clearAllButton)),void 0!==t.barcodeItemTitle&&(this.barcodeItemTitle=new o.j(t.barcodeItemTitle)),void 0!==t.barcodeItemSubtitle&&(this.barcodeItemSubtitle=new o.j(t.barcodeItemSubtitle)),void 0!==t.barcodeItemImageVisible&&(this.barcodeItemImageVisible=t.barcodeItemImageVisible),void 0!==t.submitButton&&(this.submitButton=new o.c(t.submitButton)),void 0!==t.startScanningButton&&(this.startScanningButton=new o.c(t.startScanningButton)),void 0!==t.placeholderTitle&&(this.placeholderTitle=new o.j(t.placeholderTitle)),void 0!==t.placeholderSubtitle&&(this.placeholderSubtitle=new o.j(t.placeholderSubtitle)),void 0!==t.placeholderIconBackground&&(this.placeholderIconBackground=t.placeholderIconBackground),void 0!==t.placeholderIcon&&(this.placeholderIcon=new o.e(t.placeholderIcon)),void 0!==t.swipeToDelete&&(this.swipeToDelete=new g(t.swipeToDelete))}}class b extends r.a{constructor(t={}){super(),this._type="MultipleScanningMode",this.countingRepeatDelay=1e3,this.mode="COUNTING",this.sheet=new m({mode:"COLLAPSED_SHEET",collapsedVisibleHeight:"SMALL",listButton:new o.b({badgeBackgroundColor:"?sbColorSurface",badgeForegroundColor:"?sbColorPrimary",visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"})}),this.sheetContent=new A({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",manualCountChangeEnabled:!0,manualCountOutlineColor:"?sbColorOutline",manualCountChangeColor:"?sbColorPrimary",title:new o.j({text:"?multipleModeSheetTitle",color:"?sbColorOnSurface"}),clearAllButton:new o.c({visible:!0,text:"?sheetClearAllButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),barcodeItemTitle:new o.j({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),barcodeItemSubtitle:new o.j({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),barcodeItemImageVisible:!0,submitButton:new o.c({visible:!0,text:"?sheetSubmitButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),startScanningButton:new o.c({visible:!0,text:"?sheetStartScanningButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),placeholderTitle:new o.j({visible:!0,text:"?sheetPlaceholderTitle",color:"?sbColorOnSurface",useShadow:!1}),placeholderSubtitle:new o.j({visible:!0,text:"?sheetPlaceholderSubtitle",color:"?sbColorOnSurfaceVariant",useShadow:!1}),placeholderIconBackground:"?sbColorOutline",placeholderIcon:new o.e({visible:!0,color:"?sbColorOnSurface"}),swipeToDelete:new g({enabled:!0,backgroundColor:"?sbColorNegative",iconColor:"?sbColorOnPrimary"})}),this.manualCountEditDialog=new v({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",title:new o.j({text:"?manualCountEditDialogTitle",color:"?sbColorOnSurface"}),info:new o.j({text:"?manualCountEditDialogInfo",color:"?sbColorOnSurfaceVariant"}),updateButton:new o.c({visible:!0,text:"?manualCountEditDialogUpdateButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new o.c({visible:!0,text:"?manualCountEditDialogCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),clearTextButton:new o.e({visible:!0,color:"?sbColorOnSurfaceVariant"})}),this.barcodeInfoMapping=new l({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",loadingMessage:new o.j({text:"?barcodeInfoMappingLoadingMessage",color:"?sbColorPrimary"}),errorState:new a({title:new o.j({text:"?barcodeInfoMappingErrorStateTitle",color:"?sbColorOnSurface"}),subtitle:new o.j({text:"?barcodeInfoMappingErrorStateSubtitle",color:"?sbColorOnSurfaceVariant"}),retryButton:new o.c({visible:!0,text:"?barcodeInfoMappingErrorStateRetryButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new o.c({visible:!0,text:"?barcodeInfoMappingErrorStateCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})})})}),this.arOverlay=new i.b({visible:!1,counterBadge:new i.d({visible:!0,background:new o.a({strokeColor:"#FF000000",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),automaticSelectionEnabled:!1,barcodeItemInfoPosition:"BELOW",polygon:new i.c({visible:!0,deselected:new o.g({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),selected:new o.g({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5})}),barcodeItemConfiguration:new i.e({imageVisible:!0,titleSelected:new o.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),subtitleSelected:new o.j({visible:!0,text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant",useShadow:!1}),titleDeselected:new o.j({visible:!0,text:"BARCODE_TITLE",color:"?sbColorOnSurface",useShadow:!1}),subtitleDeselected:new o.j({text:"BARCODE_SUBTITLE",color:"?sbColorOnSurfaceVariant"}),backgroundSelected:new o.g({strokeColor:"?sbColorPositive",fillColor:"?sbColorPositive",strokeWidth:1,cornerRadius:5}),backgroundDeselected:new o.g({strokeColor:"?sbColorSurface",fillColor:"?sbColorSurface",strokeWidth:1,cornerRadius:5})})}),void 0!==t.countingRepeatDelay&&(this.countingRepeatDelay=t.countingRepeatDelay),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.sheet&&(this.sheet=new m(t.sheet)),void 0!==t.sheetContent&&(this.sheetContent=new A(t.sheetContent)),void 0!==t.manualCountEditDialog&&(this.manualCountEditDialog=new v(t.manualCountEditDialog)),void 0!==t.barcodeInfoMapping&&(this.barcodeInfoMapping=new l(t.barcodeInfoMapping)),void 0!==t.arOverlay&&(this.arOverlay=new i.b(t.arOverlay))}}class y extends r.a{constructor(t={}){if(super(),this.title=new o.j({text:"Title",color:"?sbColorOnSurface"}),this.subtitle=new o.j({text:"Standard explanation message text.",color:"?sbColorOnSurfaceVariant"}),this.sheetColor="?sbColorSurface",this.modalOverlayColor="?sbColorModalOverlay",this.dividerColor="?sbColorOutline",void 0!==t.title&&(this.title=new o.j(t.title)),void 0!==t.subtitle&&(this.subtitle=new o.j(t.subtitle)),void 0!==t.sheetColor&&(this.sheetColor=t.sheetColor),void 0!==t.modalOverlayColor&&(this.modalOverlayColor=t.modalOverlayColor),void 0!==t.dividerColor&&(this.dividerColor=t.dividerColor),void 0===t.okButton)throw new Error("okButton must be present in constructor argument");if(this.okButton=new o.c(t.okButton),void 0===t.cancelButton)throw new Error("cancelButton must be present in constructor argument");this.cancelButton=new o.c(t.cancelButton)}}class C extends r.a{constructor(t={}){if(super(),this.count=1,void 0===t.barcodeValue)throw new Error("barcodeValue must be present in constructor argument");this.barcodeValue=t.barcodeValue,void 0!==t.title&&(this.title=null!=t.title?t.title:null),void 0!==t.image&&(this.image=null!=t.image?t.image:null),void 0!==t.count&&(this.count=t.count)}}class S extends r.a{constructor(t={}){super(),this._type="FindAndPickScanningMode",this.scanningCompletedColor="?sbColorPositive",this.scanningPartiallyColor="?sbColorWarning",this.scanningNotScannedColor="?sbColorOutline",this.allowPartialScan=!1,this.expectedBarcodes=[],this.countingRepeatDelay=1e3,this.sheet=new m({mode:"COLLAPSED_SHEET",collapsedVisibleHeight:"SMALL",listButton:new o.b({badgeBackgroundColor:"?sbColorSurface",badgeForegroundColor:"?sbColorPrimary",visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"})}),this.sheetContent=new A({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",manualCountChangeEnabled:!0,manualCountOutlineColor:"?sbColorOutline",manualCountChangeColor:"?sbColorPrimary",title:new o.j({visible:!0,text:"?findAndPickSheetTitle",color:"?sbColorOnSurface",useShadow:!1}),clearAllButton:new o.c({visible:!0,text:"?sheetResetButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),barcodeItemTitle:new o.j({text:"BARCODE_TITLE",color:"?sbColorOnSurface"}),barcodeItemSubtitle:new o.j({text:"?findAndPickSheetBarcodeItemSubtitle",color:"?sbColorOnSurfaceVariant"}),barcodeItemImageVisible:!0,submitButton:new o.c({visible:!0,text:"?sheetSubmitButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnSurface",useShadow:!1})}),startScanningButton:new o.c({visible:!0,text:"?sheetStartScanningButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),placeholderTitle:new o.j({text:"?sheetPlaceholderTitle",color:"?sbColorOnSurface"}),placeholderSubtitle:new o.j({text:"?sheetPlaceholderSubtitle",color:"?sbColorOnSurfaceVariant"}),placeholderIconBackground:"?sbColorOutline",placeholderIcon:new o.e({visible:!0,color:"?sbColorOnSurface"}),swipeToDelete:new g({enabled:!1,backgroundColor:"?sbColorNegative",iconColor:"?sbColorOnPrimary"})}),this.manualCountEditDialog=new v({sheetColor:"?sbColorSurface",dividerColor:"?sbColorOutline",modalOverlayColor:"?sbColorModalOverlay",title:new o.j({text:"?manualCountEditDialogTitle",color:"?sbColorOnSurface"}),info:new o.j({text:"?manualCountEditDialogInfo",color:"?sbColorOnSurfaceVariant"}),updateButton:new o.c({visible:!0,text:"?manualCountEditDialogUpdateButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new o.c({visible:!0,text:"?manualCountEditDialogCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),clearTextButton:new o.e({visible:!0,color:"?sbColorOnSurfaceVariant"})}),this.arOverlay=new i.a({visible:!1,automaticSelectionEnabled:!0,polygon:new i.f({partiallyScanned:new o.g({strokeColor:"?sbColorWarning",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),rejected:new o.g({strokeColor:"?sbColorSurface",fillColor:"#00000000",strokeWidth:3,cornerRadius:5}),completed:new o.g({strokeColor:"?sbColorPositive",fillColor:"#00000000",strokeWidth:3,cornerRadius:5})}),badge:new i.g({partiallyScanned:new i.d({visible:!0,background:new o.a({strokeColor:"#000000FF",fillColor:"?sbColorWarning",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),rejected:new i.d({visible:!0,background:new o.a({strokeColor:"#000000FF",fillColor:"?sbColorSurface",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"}),completed:new i.d({visible:!0,background:new o.a({strokeColor:"#000000FF",fillColor:"?sbColorPositive",strokeWidth:0}),foregroundColor:"?sbColorOnSurface"})})}),this.partialScannedAlertDialogEnabled=!0,this.partialScannedAlertDialog=new y({title:new o.j({text:"?findAndPickPartialAlertTitle",color:"?sbColorOnSurface"}),subtitle:new o.j({text:"?findAndPickPartialAlertSubtitle",color:"?sbColorOnSurfaceVariant"}),sheetColor:"?sbColorSurface",modalOverlayColor:"?sbColorModalOverlay",dividerColor:"?sbColorOutline",okButton:new o.c({visible:!0,text:"?findAndPickPartialAlertSubmitButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new o.c({visible:!0,text:"?findAndPickPartialAlertCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})})}),this.confirmationAlertDialogEnabled=!1,this.confirmationAlertDialog=new y({title:new o.j({text:"?findAndPickCompleteAlertTitle",color:"?sbColorOnSurface"}),subtitle:new o.j({text:"?findAndPickCompleteAlertSubtitle",color:"?sbColorOnSurfaceVariant"}),sheetColor:"?sbColorSurface",modalOverlayColor:"?sbColorModalOverlay",dividerColor:"?sbColorOutline",okButton:new o.c({visible:!0,text:"?findAndPickCompleteAlertSubmitButton",background:new o.a({strokeColor:"?sbColorPrimary",fillColor:"?sbColorPrimary",strokeWidth:1}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})}),cancelButton:new o.c({visible:!0,text:"?findAndPickCompleteAlertCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:1}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})})}),void 0!==t.scanningCompletedColor&&(this.scanningCompletedColor=t.scanningCompletedColor),void 0!==t.scanningPartiallyColor&&(this.scanningPartiallyColor=t.scanningPartiallyColor),void 0!==t.scanningNotScannedColor&&(this.scanningNotScannedColor=t.scanningNotScannedColor),void 0!==t.allowPartialScan&&(this.allowPartialScan=t.allowPartialScan),void 0!==t.expectedBarcodes&&(this.expectedBarcodes=t.expectedBarcodes.map((t=>new C(t)))),void 0!==t.countingRepeatDelay&&(this.countingRepeatDelay=t.countingRepeatDelay),void 0!==t.sheet&&(this.sheet=new m(t.sheet)),void 0!==t.sheetContent&&(this.sheetContent=new A(t.sheetContent)),void 0!==t.manualCountEditDialog&&(this.manualCountEditDialog=new v(t.manualCountEditDialog)),void 0!==t.arOverlay&&(this.arOverlay=new i.a(t.arOverlay)),void 0!==t.partialScannedAlertDialogEnabled&&(this.partialScannedAlertDialogEnabled=t.partialScannedAlertDialogEnabled),void 0!==t.partialScannedAlertDialog&&(this.partialScannedAlertDialog=new y(t.partialScannedAlertDialog)),void 0!==t.confirmationAlertDialogEnabled&&(this.confirmationAlertDialogEnabled=t.confirmationAlertDialogEnabled),void 0!==t.confirmationAlertDialog&&(this.confirmationAlertDialog=new y(t.confirmationAlertDialog))}}(h||(h={})).From=function(t){const e=t._type;switch(e){case"SingleScanningMode":return new c(t);case"MultipleScanningMode":return new b(t);case"FindAndPickScanningMode":return new S(t);default:throw`Unknown child class name: ${e}`}};var w,x=n(20);class E extends r.a{constructor(t={}){super(),this.visible=!0,this.style=new L({strokeColor:"?sbColorSurface",strokeWidth:2,cornerRadius:10}),this.overlayColor="?sbColorSurfaceLow",this.aspectRatio=new x.AspectRatio({width:1,height:1}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.style&&(this.style=w.From(t.style)),void 0!==t.overlayColor&&(this.overlayColor=t.overlayColor),void 0!==t.aspectRatio&&(this.aspectRatio=new x.AspectRatio(t.aspectRatio))}}!function(t){t.From=function(t){const e=t._type;switch(e){case"FinderCorneredStyle":return new L(t);case"FinderStrokedStyle":return new _(t);default:throw`Unknown child class name: ${e}`}}}(w||(w={}));class L extends r.a{constructor(t={}){super(),this._type="FinderCorneredStyle",this.strokeColor="#FFFFFFFF",this.strokeWidth=3,this.cornerRadius=10,void 0!==t.strokeColor&&(this.strokeColor=t.strokeColor),void 0!==t.strokeWidth&&(this.strokeWidth=t.strokeWidth),void 0!==t.cornerRadius&&(this.cornerRadius=t.cornerRadius)}}class _ extends r.a{constructor(t={}){super(),this._type="FinderStrokedStyle",this.strokeColor="#FFFFFFFF",this.strokeWidth=3,this.cornerRadius=10,void 0!==t.strokeColor&&(this.strokeColor=t.strokeColor),void 0!==t.strokeWidth&&(this.strokeWidth=t.strokeWidth),void 0!==t.cornerRadius&&(this.cornerRadius=t.cornerRadius)}}class O extends r.a{constructor(t={}){super(),this.visible=!0,this.title=new o.j({color:"?sbColorOnPrimary"}),this.background=new o.a({strokeColor:"#00000000",fillColor:"?sbColorSurfaceLow"}),void 0!==t.visible&&(this.visible=t.visible),void 0!==t.title&&(this.title=new o.j(t.title)),void 0!==t.background&&(this.background=new o.a(t.background))}}class T extends r.a{constructor(t={}){super(),this.cameraPermissionEnableCameraTitle="Camera permission denied!",this.cameraPermissionEnableCameraExplanation="Please allow the usage of the camera to start the scanning process.",this.cameraPermissionCloseButton="Close",this.topBarCancelButton="Cancel",this.topBarTitle="Scan Item",this.userGuidance="Move the finder over a barcode",this.barcodeInfoMappingLoadingMessage="Loading details...",this.barcodeInfoMappingErrorStateTitle="Connection Error!",this.barcodeInfoMappingErrorStateSubtitle="There was an issue and the data requested was not fetched. You could try again or discard this result to start a new scan.",this.barcodeInfoMappingErrorStateRetryButton="Retry",this.barcodeInfoMappingErrorStateCancelButton="Cancel",this.manualCountEditDialogTitle="Update count",this.manualCountEditDialogInfo="Adjust the number of items you scanned.",this.manualCountEditDialogUpdateButton="Update",this.manualCountEditDialogCancelButton="Cancel",this.sheetResetButton="Reset",this.sheetClearAllButton="Clear all",this.sheetSubmitButton="Submit",this.sheetStartScanningButton="Start scanning",this.sheetPlaceholderTitle="No barcodes here!",this.sheetPlaceholderSubtitle="The barcode list is currently empty. Close this sheet and scan your items to add them.",this.singleModeConfirmationCancelButton="Close",this.multipleModeSheetTitle="%d items",this.findAndPickSheetTitle="%d/%d scanned",this.findAndPickSheetBarcodeItemSubtitle="%d/%d added",this.findAndPickPartialAlertTitle="Incomplete scan!",this.findAndPickPartialAlertSubtitle="Some codes are yet to be scanned. Proceed with submission anyway?",this.findAndPickPartialAlertCancelButton="Cancel",this.findAndPickPartialAlertSubmitButton="Yes, Submit",this.findAndPickCompleteAlertTitle="All codes found!",this.findAndPickCompleteAlertSubtitle="You have successfully scanned all codes. Proceed with submission?",this.findAndPickCompleteAlertCancelButton="Dismiss",this.findAndPickCompleteAlertSubmitButton="Submit",void 0!==t.cameraPermissionEnableCameraTitle&&(this.cameraPermissionEnableCameraTitle=t.cameraPermissionEnableCameraTitle),void 0!==t.cameraPermissionEnableCameraExplanation&&(this.cameraPermissionEnableCameraExplanation=t.cameraPermissionEnableCameraExplanation),void 0!==t.cameraPermissionCloseButton&&(this.cameraPermissionCloseButton=t.cameraPermissionCloseButton),void 0!==t.topBarCancelButton&&(this.topBarCancelButton=t.topBarCancelButton),void 0!==t.topBarTitle&&(this.topBarTitle=t.topBarTitle),void 0!==t.userGuidance&&(this.userGuidance=t.userGuidance),void 0!==t.barcodeInfoMappingLoadingMessage&&(this.barcodeInfoMappingLoadingMessage=t.barcodeInfoMappingLoadingMessage),void 0!==t.barcodeInfoMappingErrorStateTitle&&(this.barcodeInfoMappingErrorStateTitle=t.barcodeInfoMappingErrorStateTitle),void 0!==t.barcodeInfoMappingErrorStateSubtitle&&(this.barcodeInfoMappingErrorStateSubtitle=t.barcodeInfoMappingErrorStateSubtitle),void 0!==t.barcodeInfoMappingErrorStateRetryButton&&(this.barcodeInfoMappingErrorStateRetryButton=t.barcodeInfoMappingErrorStateRetryButton),void 0!==t.barcodeInfoMappingErrorStateCancelButton&&(this.barcodeInfoMappingErrorStateCancelButton=t.barcodeInfoMappingErrorStateCancelButton),void 0!==t.manualCountEditDialogTitle&&(this.manualCountEditDialogTitle=t.manualCountEditDialogTitle),void 0!==t.manualCountEditDialogInfo&&(this.manualCountEditDialogInfo=t.manualCountEditDialogInfo),void 0!==t.manualCountEditDialogUpdateButton&&(this.manualCountEditDialogUpdateButton=t.manualCountEditDialogUpdateButton),void 0!==t.manualCountEditDialogCancelButton&&(this.manualCountEditDialogCancelButton=t.manualCountEditDialogCancelButton),void 0!==t.sheetResetButton&&(this.sheetResetButton=t.sheetResetButton),void 0!==t.sheetClearAllButton&&(this.sheetClearAllButton=t.sheetClearAllButton),void 0!==t.sheetSubmitButton&&(this.sheetSubmitButton=t.sheetSubmitButton),void 0!==t.sheetStartScanningButton&&(this.sheetStartScanningButton=t.sheetStartScanningButton),void 0!==t.sheetPlaceholderTitle&&(this.sheetPlaceholderTitle=t.sheetPlaceholderTitle),void 0!==t.sheetPlaceholderSubtitle&&(this.sheetPlaceholderSubtitle=t.sheetPlaceholderSubtitle),void 0!==t.singleModeConfirmationCancelButton&&(this.singleModeConfirmationCancelButton=t.singleModeConfirmationCancelButton),void 0!==t.multipleModeSheetTitle&&(this.multipleModeSheetTitle=t.multipleModeSheetTitle),void 0!==t.findAndPickSheetTitle&&(this.findAndPickSheetTitle=t.findAndPickSheetTitle),void 0!==t.findAndPickSheetBarcodeItemSubtitle&&(this.findAndPickSheetBarcodeItemSubtitle=t.findAndPickSheetBarcodeItemSubtitle),void 0!==t.findAndPickPartialAlertTitle&&(this.findAndPickPartialAlertTitle=t.findAndPickPartialAlertTitle),void 0!==t.findAndPickPartialAlertSubtitle&&(this.findAndPickPartialAlertSubtitle=t.findAndPickPartialAlertSubtitle),void 0!==t.findAndPickPartialAlertCancelButton&&(this.findAndPickPartialAlertCancelButton=t.findAndPickPartialAlertCancelButton),void 0!==t.findAndPickPartialAlertSubmitButton&&(this.findAndPickPartialAlertSubmitButton=t.findAndPickPartialAlertSubmitButton),void 0!==t.findAndPickCompleteAlertTitle&&(this.findAndPickCompleteAlertTitle=t.findAndPickCompleteAlertTitle),void 0!==t.findAndPickCompleteAlertSubtitle&&(this.findAndPickCompleteAlertSubtitle=t.findAndPickCompleteAlertSubtitle),void 0!==t.findAndPickCompleteAlertCancelButton&&(this.findAndPickCompleteAlertCancelButton=t.findAndPickCompleteAlertCancelButton),void 0!==t.findAndPickCompleteAlertSubmitButton&&(this.findAndPickCompleteAlertSubmitButton=t.findAndPickCompleteAlertSubmitButton)}}class k extends r.a{constructor(t={}){super(),this.barcodesRegexFilter="",this.barcodeFormats=[],this.gs1Handling="PARSE",this.engineMode="NEXT_GEN_LOW_POWER",this.maximumRecognizerResolution=600,void 0!==t.barcodesRegexFilter&&(this.barcodesRegexFilter=t.barcodesRegexFilter),void 0!==t.barcodeFormats&&(this.barcodeFormats=t.barcodeFormats.map((t=>t))),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.engineMode&&(this.engineMode=t.engineMode),void 0!==t.maximumRecognizerResolution&&(this.maximumRecognizerResolution=t.maximumRecognizerResolution)}}class D extends r.a{constructor(t={}){super(),this.background="?sbColorSurface",this.iconBackground="?sbColorOutline",this.icon=new o.e({visible:!0,color:"?sbColorOnSurface"}),this.closeButton=new o.c({text:"Close",background:new o.a({}),foreground:new o.d({})}),this.enableCameraTitle=new o.j({text:"Camera permission denied!",color:"?colorOnSurface"}),this.enableCameraExplanation=new o.j({text:"Please allow the usage of the camera to start the scanning process.",color:"?sbColorOnSurfaceVariant"}),void 0!==t.background&&(this.background=t.background),void 0!==t.iconBackground&&(this.iconBackground=t.iconBackground),void 0!==t.icon&&(this.icon=new o.e(t.icon)),void 0!==t.closeButton&&(this.closeButton=new o.c(t.closeButton)),void 0!==t.enableCameraTitle&&(this.enableCameraTitle=new o.j(t.enableCameraTitle)),void 0!==t.enableCameraExplanation&&(this.enableCameraExplanation=new o.j(t.enableCameraExplanation))}}class P extends r.a{constructor(t={}){super(),this.version="1.0",this.screen="BarcodeScanner",this.palette=new o.f({sbColorPrimary:"#C8193C",sbColorPrimaryDisabled:"#F5F5F5",sbColorNegative:"#FF3737",sbColorPositive:"#4EFFB4",sbColorWarning:"#FFCE5C",sbColorSecondary:"#FFEDEE",sbColorSecondaryDisabled:"#F5F5F5",sbColorOnPrimary:"#FFFFFF",sbColorOnSecondary:"#C8193C",sbColorSurface:"#FFFFFF",sbColorOutline:"#EFEFEF",sbColorOnSurfaceVariant:"#707070",sbColorOnSurface:"#000000",sbColorSurfaceLow:"#00000026",sbColorSurfaceHigh:"#0000007A",sbColorModalOverlay:"#000000A3"}),this.localization=new T({}),this.backgroundColor="?sbColorSurfaceLow",this.topBar=new p.a({title:new o.j({text:"?topBarTitle",color:"?sbColorOnPrimary"}),mode:"SOLID",backgroundColor:"?sbColorPrimary",cancelButton:new o.c({visible:!0,text:"?topBarCancelButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new o.d({iconVisible:!0,color:"?sbColorOnPrimary",useShadow:!1})})}),this.actionBar=new f({flashButton:new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorWarning",activeForegroundColor:"#1C1B1F"}),zoomButton:new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"}),flipCameraButton:new o.h({visible:!0,backgroundColor:"?sbColorSurfaceHigh",foregroundColor:"?sbColorOnPrimary",activeBackgroundColor:"?sbColorSurfaceHigh",activeForegroundColor:"?sbColorOnPrimary"})}),this.viewFinder=new E({visible:!0,style:new L({strokeColor:"?sbColorSurface",strokeWidth:2,cornerRadius:10}),overlayColor:"?sbColorSurfaceLow",aspectRatio:new x.AspectRatio({width:1,height:1})}),this.userGuidance=new O({visible:!0,title:new o.j({text:"?userGuidance",color:"?sbColorOnPrimary"}),background:new o.a({strokeColor:"#00000000",fillColor:"?sbColorSurfaceLow",strokeWidth:0})}),this.cameraPermission=new D({background:"?sbColorSurface",iconBackground:"?sbColorOutline",icon:new o.e({visible:!0,color:"?sbColorOnSurface"}),closeButton:new o.c({visible:!0,text:"?cameraPermissionCloseButton",background:new o.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new o.d({iconVisible:!1,color:"?sbColorPrimary",useShadow:!1})}),enableCameraTitle:new o.j({text:"?cameraPermissionEnableCameraTitle",color:"?sbColorOnSurface"}),enableCameraExplanation:new o.j({text:"?cameraPermissionEnableCameraExplanation",color:"?sbColorOnSurfaceVariant"})}),this.cameraConfiguration=new d({}),this.recognizerConfiguration=new k({}),this.useCase=new c({}),this.sound=new o.i({successBeepEnabled:!0,soundType:"MODERN_BEEP"}),this.vibration=new o.l({enabled:!0}),this.timeouts=new o.k({autoCancelTimeout:0,initialScanDelay:0}),void 0!==t.version&&(this.version=t.version),void 0!==t.screen&&(this.screen=t.screen),void 0!==t.palette&&(this.palette=new o.f(t.palette)),void 0!==t.localization&&(this.localization=new T(t.localization)),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.topBar&&(this.topBar=new p.a(t.topBar)),void 0!==t.actionBar&&(this.actionBar=new f(t.actionBar)),void 0!==t.viewFinder&&(this.viewFinder=new E(t.viewFinder)),void 0!==t.userGuidance&&(this.userGuidance=new O(t.userGuidance)),void 0!==t.cameraPermission&&(this.cameraPermission=new D(t.cameraPermission)),void 0!==t.cameraConfiguration&&(this.cameraConfiguration=new d(t.cameraConfiguration)),void 0!==t.recognizerConfiguration&&(this.recognizerConfiguration=new k(t.recognizerConfiguration)),void 0!==t.useCase&&(this.useCase=h.From(t.useCase)),void 0!==t.sound&&(this.sound=new o.i(t.sound)),void 0!==t.vibration&&(this.vibration=new o.l(t.vibration)),void 0!==t.timeouts&&(this.timeouts=new o.k(t.timeouts))}}var B=n(34);class R extends r.a{constructor(t={}){if(super(),void 0===t.barcode)throw new Error("barcode must be present in constructor argument");if(this.barcode=new B.BarcodeItem(t.barcode),void 0===t.count)throw new Error("count must be present in constructor argument");this.count=t.count}}class I extends r.a{constructor(t={}){super(),this.items=[],void 0!==t.items&&(this.items=t.items.map((t=>new R(t))))}}var F=n(19)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(36);class o extends i.a{constructor(t){super(),this.mirrored=!1,this.spinnerColor="black",this.backgroundColor="black",this.videoConstraints={width:{ideal:t.width},height:{ideal:t.height},facingMode:"environment",resizeMode:"none",experimental:{focusMode:"continous",focusDistance:0}}}static mapVideoConstraints(t,e){t.videoConstraints&&this.mapValues(t.videoConstraints,e.videoConstraints)}}o.DEFAULT_VIDEO_RESOLUTION_4K={width:3840,height:2160},o.DEFAULT_VIDEO_RESOLUTION_HD={width:1920,height:1080},o.DEFAULT_ACCEPTED_BRIGHTNESS_SCORE=0,o.DEFAULT_ACCEPTED_ANGLE_SCORE=75,o.DEFAULT_ACCEPTED_SIZE_SCORE=75},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class o extends Error{constructor(t,e,n){super(e),this.name="",this.name=t,this.message=e,this.webApiError=n}static mediaDevicesUndefined(){return new o(this.MESSAGE.DEVICES_UNDEFINED,"Does your device even have a camera? If so, please use a secure context (HTTPS) or use 'localhost' explicitly.")}static enumerateDevicesFailed(){return new o(this.MESSAGE.DEVICES_UNDEFINED,"Does your device even have a camera? Because we're unable to query query navigator.mediaDevices?.enumerateDevices")}static mediaDeviceNotFound(t){return new o(this.MESSAGE.ENUMERATE_FAILED,"Does your device even have a camera? Because we were unable to query navigator.mediaDevices?.getUserMedia().",t)}static permissionDenied(t){return new o(this.MESSAGE.PERMISSION_DENIED,"Camera permission has not been granted. Please prompt your users again to grant permission.",t)}static unknown(t){return new o(this.MESSAGE.UNKNOWN,"\n Unfortunately we were unable to query navigator.mediaDevicess.getUserMedia, \n and unable to determine the reason why. This may be caused by the user to denied the permission prompt. \n Or you may be using an in-app browser that itself has not been granted permission to use the camera.\n Or your users may be using a niche browser that does not support the media API at all!\n ",t)}static tryCheckPermission(){return i(this,void 0,void 0,(function*(){if(!this.permissionState)try{const t=yield navigator.permissions.query({name:"camera"});this.permissionState=t.state}catch(t){this.permissionState=this.PERMISSION_STATE.UNKNOWN}}))}static hasDeniedPermission(){return this.permissionState===this.PERMISSION_STATE.DENIED}static hasCheckedPermission(){return!!this.permissionState}static createFromDOMException(t){return t instanceof DOMException?"NotAllowedError"===t.name?o.permissionDenied("Specifically, the native 'NotAllowedError' was thrown."):"NotFoundError"===t.name?o.mediaDeviceNotFound("Specifically, the native 'NotFoundError' was thrown."):void 0:o.unknown(null==t?void 0:t.message)}}o.PERMISSION_STATE={GRANTED:"granted",DENIED:"denied",PROMPT:"prompt",UNKNOWN:"unknown"},o.MESSAGE={DEVICES_UNDEFINED:"MediaError_DevicesUndefined",DEVICE_NOT_FOUND:"MediaError_DeviceNotFound",ENUMERATE_FAILED:"MediaError_EnumerateFailed",PERMISSION_DENIED:"MediaError_PermissionDenied",UNKNOWN:"MediaError_Unknown"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));class i{static initialize(t=!1){this.verbose=t}static debug(t){this.verbose&&console.log("ScanbotSDK:",t)}static debugWarn(t){this.verbose&&console.warn("ScanbotSDK:",t)}}},,,function(t,e,n){"use strict";n.r(e),n.d(e,"OcrResult",(function(){return o})),n.d(e,"ParsedData",(function(){return r})),n.d(e,"FieldType",(function(){return a})),n.d(e,"Field",(function(){return s})),n.d(e,"GenericDocumentType",(function(){return l})),n.d(e,"GenericDocument",(function(){return c}));var i=n(4);class o extends i.a{constructor(t={}){if(super(),void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0===t.confidence)throw new Error("confidence must be present in constructor argument");this.confidence=t.confidence}}class r extends i.a{constructor(t={}){if(super(),void 0===t.type)throw new Error("type must be present in constructor argument");if(this.type=t.type,void 0===t.value)throw new Error("value must be present in constructor argument");this.value=t.value}}class a extends i.a{constructor(t={}){if(super(),this.listIndex=null,void 0===t.name)throw new Error("name must be present in constructor argument");if(this.name=t.name,void 0===t.fullName)throw new Error("fullName must be present in constructor argument");if(this.fullName=t.fullName,void 0===t.normalizedName)throw new Error("normalizedName must be present in constructor argument");if(this.normalizedName=t.normalizedName,void 0===t.commonType)throw new Error("commonType must be present in constructor argument");this.commonType=null!=t.commonType?t.commonType:null,void 0!==t.listIndex&&(this.listIndex=null!=t.listIndex?t.listIndex:null)}}class s extends i.a{constructor(t={}){if(super(),this.confidenceWeight=1,this.image=null,this.validationStatus="NONE",this.parsedData=[],void 0===t.type)throw new Error("type must be present in constructor argument");if(this.type=new a(t.type),void 0===t.value)throw new Error("value must be present in constructor argument");if(this.value=null!=t.value?new o(t.value):null,void 0!==t.confidenceWeight&&(this.confidenceWeight=t.confidenceWeight),void 0!==t.image&&(this.image=null!=t.image?t.image:null),void 0===t.polygonInRoot)throw new Error("polygonInRoot must be present in constructor argument");this.polygonInRoot=t.polygonInRoot.map((t=>({x:t.x,y:t.y}))),void 0!==t.validationStatus&&(this.validationStatus=t.validationStatus),void 0!==t.parsedData&&(this.parsedData=t.parsedData.map((t=>new r(t))))}}class l extends i.a{constructor(t={}){if(super(),this.listIndex=null,void 0===t.name)throw new Error("name must be present in constructor argument");if(this.name=t.name,void 0===t.fullName)throw new Error("fullName must be present in constructor argument");if(this.fullName=t.fullName,void 0===t.normalizedName)throw new Error("normalizedName must be present in constructor argument");this.normalizedName=t.normalizedName,void 0!==t.listIndex&&(this.listIndex=null!=t.listIndex?t.listIndex:null)}}class c extends i.a{constructor(t={}){if(super(),this.crop=null,this.confidence=0,this.confidenceWeight=0,void 0===t.type)throw new Error("type must be present in constructor argument");if(this.type=new l(t.type),void 0===t.fields)throw new Error("fields must be present in constructor argument");if(this.fields=t.fields.map((t=>new s(t))),void 0===t.children)throw new Error("children must be present in constructor argument");if(this.children=t.children.map((t=>new c(t))),void 0===t.quad)throw new Error("quad must be present in constructor argument");if(this.quad=null!=t.quad?t.quad.map((t=>({x:t.x,y:t.y}))):null,void 0===t.quadInRoot)throw new Error("quadInRoot must be present in constructor argument");this.quadInRoot=null!=t.quadInRoot?t.quadInRoot.map((t=>({x:t.x,y:t.y}))):null,void 0!==t.crop&&(this.crop=null!=t.crop?t.crop:null),void 0!==t.confidence&&(this.confidence=t.confidence),void 0!==t.confidenceWeight&&(this.confidenceWeight=t.confidenceWeight)}}},function(t,e,n){"use strict";n.r(e),n.d(e,"LineSegmentInt",(function(){return o})),n.d(e,"LineSegmentFloat",(function(){return r})),n.d(e,"AspectRatio",(function(){return a}));var i=n(4);class o extends i.a{constructor(t={}){if(super(),void 0===t.start)throw new Error("start must be present in constructor argument");if(this.start={x:t.start.x,y:t.start.y},void 0===t.end)throw new Error("end must be present in constructor argument");this.end={x:t.end.x,y:t.end.y}}}class r extends i.a{constructor(t={}){if(super(),void 0===t.start)throw new Error("start must be present in constructor argument");if(this.start={x:t.start.x,y:t.start.y},void 0===t.end)throw new Error("end must be present in constructor argument");this.end={x:t.end.x,y:t.end.y}}}class a extends i.a{constructor(t={}){super(),this.width=1,this.height=1,void 0!==t.width&&(this.width=t.width),void 0!==t.height&&(this.height=t.height)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));class i{constructor(t,e,n,i){this.x=t,this.y=e,this.width=n,this.height=i}scaleDown(t){return new i(this.x/t,this.y/t,this.width/t,this.height/t)}bottom(){return this.y+this.height}static withSize(t,e){return new i(0,0,t,e)}static empty(){return new i(0,0,0,0)}static fromRect(t){return t?new i(t.x,t.y,t.width,t.height):i.empty()}static fromPoint(t,e){return new i(t.x-e/2,t.y-e/2,e,e)}static fromDOMRect(t){return new i(t.x,t.y,t.width,t.height)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(14),o=n(13);class r extends i.a{constructor(t){super(t);const e=new o.BarcodeScannerConfiguration;this.finder=e.viewFinder,this.userGuidance=e.userGuidance}static mapFinderConfiguration(t,e){var n,o;i.a.mapValuesDeep(null!==(n=e.finder)&&void 0!==n?n:{},t.finder),i.a.mapValuesDeep(null!==(o=e.userGuidance)&&void 0!==o?o:{},t.userGuidance)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var i=n(0),o=n(15),r=n(25),a=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class s extends i.default.Component{constructor(t){super(t),this.orientationchangeCallback=this.orientationChanged.bind(this),this.state={orientation:window.orientation,stream:void 0}}orientationChanged(t){this.setState({orientation:window.orientation})}setDeviceIdInConstraints(t){var e,n;return a(this,void 0,void 0,(function*(){const i=this.props.preferredCamera;if(i)try{const e=(yield navigator.mediaDevices.enumerateDevices()).find((t=>t.deviceId===i||t.label===i));if(e)return Object.assign(Object.assign({},t),{deviceId:e.deviceId})}catch(t){throw o.a.enumerateDevicesFailed()}else{const i={user:"front",environment:"back"},o=(null===(e=null==t?void 0:t.facingMode)||void 0===e?void 0:e.ideal)||(null===(n=null==t?void 0:t.facingMode)||void 0===n?void 0:n.exact)||(null==t?void 0:t.facingMode);if("string"==typeof o&&o in i){yield r.a.INSTANCE.load();const e=r.a.INSTANCE.getMainCamera(i[o]);if(e)return Object.assign(Object.assign({},t),{deviceId:e.deviceId})}}return t}))}componentDidMount(){return a(this,void 0,void 0,(function*(){window.addEventListener("orientationchange",this.orientationchangeCallback),yield this.refreshStream()}))}refreshStream(){var t,e,n,i,r,s,l,c;return a(this,void 0,void 0,(function*(){if(console.log("refreshStream",this),o.a.hasCheckedPermission()||(yield o.a.tryCheckPermission()),o.a.hasDeniedPermission())return void(null===(e=(t=this.props).onError)||void 0===e||e.call(t,o.a.permissionDenied()));const a={video:yield this.setDeviceIdInConstraints(this.props.videoConstraints)};try{if(!navigator.mediaDevices){const t=o.a.unknown();return null===(i=(n=this.props).onError)||void 0===i||i.call(n,t),void console.log(t)}this.stopCurrentStreams();try{const t=yield navigator.mediaDevices.getUserMedia(a);this.setState({stream:t},(()=>{var e,n,i,o;null===(n=(e=this.props).onStreamChanged)||void 0===n||n.call(e,t),null===(o=(i=this.props).onReady)||void 0===o||o.call(i)}))}catch(t){const e=o.a.mediaDeviceNotFound();return null===(s=(r=this.props).onError)||void 0===s||s.call(r,e),void console.error(e)}}catch(t){const e=o.a.createFromDOMException(t);return null===(c=(l=this.props).onError)||void 0===c||c.call(l,e),void console.error(e)}}))}stopCurrentStreams(){const t=this.state.stream,e=null==t?void 0:t.getTracks();e&&e.forEach((t=>{t.stop()}))}componentWillUnmount(){window.removeEventListener("orientationchange",this.orientationchangeCallback),this.state.stream&&(this.state.stream.getVideoTracks&&this.state.stream.getAudioTracks&&(this.state.stream.getVideoTracks().forEach((t=>t.stop())),this.state.stream.getAudioTracks().forEach((t=>t.stop()))),this.setState({stream:void 0}))}render(){return this.props.children}updateTorch(t){return a(this,void 0,void 0,(function*(){const e=[{torch:t}];yield this.state.stream.getVideoTracks()[0].applyConstraints({advanced:e})}))}getCapabilities(){if(this.state.stream.getVideoTracks){const t=this.getVideoTrack();return s.getMediaTrackCapabilities(t)}}static getMediaTrackCapabilities(t){if(t&&t.getCapabilities)return t.getCapabilities()}getVideoTrack(){const t=this.state.stream.getVideoTracks();if(t.length>0)return t[0]}}var l=n(10),c=n(21),u=n(16),d=n(35);class h{static isSupported(){return!!document.createElement("canvas").getContext("webgl")}constructor(){this._type="WebGL",this.canvas=document.createElement("canvas");const t=this.gl=this.canvas.getContext("webgl",{willReadFrequently:!0}),e=t.createTexture();t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR);const n=t.createShader(t.VERTEX_SHADER);t.shaderSource(n,"attribute vec2 p;void main(){ gl_Position = vec4(p,0,1);}"),t.compileShader(n);const i=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(i,"precision mediump float;uniform sampler2D texture; uniform vec2 scale; uniform vec2 offset; void main() { gl_FragColor=texture2D( texture, gl_FragCoord.xy * scale + offset );}"),t.compileShader(i);const o=this.program=t.createProgram();t.attachShader(o,n),t.attachShader(o,i),t.linkProgram(o),t.useProgram(o),t.uniform1i(t.getUniformLocation(o,"texture"),0),t.bindBuffer(t.ARRAY_BUFFER,t.createBuffer()),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),t.STATIC_DRAW),t.enableVertexAttribArray(0),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,0)}getImageData(t,e,n,i,o,r,a,s){let l,c;if(r=Math.floor(r),a=Math.floor(a),e=Math.floor(e),n=Math.floor(n),i=Math.floor(i),o=Math.floor(o),t instanceof HTMLVideoElement)[c,l]=[t.videoWidth,t.videoHeight];else{if(!(t instanceof HTMLCanvasElement))throw new Error("Unsupported source type");[c,l]=[t.width,t.height]}(c<e+i||l<n+o)&&u.a.debug("Crop region exceeds source video dimensions. This can happen when the screen is resized or rotated and the video has not yet changed its size. Most likely, the frame we analyzed now contains some garbage data. This is not a problem, unless it happens very frequently.");const h=this.gl;this.canvas.width=r,this.canvas.height=a,h.viewport(0,0,r,a);const p=[i/(r*c),o/(a*l)],f=[e/c,n/l];return h.uniform2fv(h.getUniformLocation(this.program,"scale"),p),h.uniform2fv(h.getUniformLocation(this.program,"offset"),f),h.texImage2D(h.TEXTURE_2D,0,h.RGB,h.RGB,h.UNSIGNED_BYTE,t),h.drawArrays(h.TRIANGLES,0,6),(null==s?void 0:s.byteLength)!==r*a*4&&(s=new Uint8ClampedArray(r*a*4),d.a.INSTANCE.values.set("WebGLNumBufferAllocations",(d.a.INSTANCE.values.get("WebGLNumBufferAllocations")||0)+1)),h.readPixels(0,0,r,a,h.RGBA,h.UNSIGNED_BYTE,s),new ImageData(s,r,a)}}class p{constructor(){this._type="TwoD",this.canvas=document.createElement("canvas"),this.ctx=this.canvas.getContext("2d",{willReadFrequently:!0,alpha:!1}),this.ctx.imageSmoothingEnabled=!1}getImageData(t,e,n,i,o,r,a,s){return this.canvas.width=r,this.canvas.height=a,this.ctx.drawImage(t,e,n,i,o,0,0,r,a),this.ctx.getImageData(0,0,r,a)}}var f=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class m extends i.default.Component{constructor(t){super(t),this.videoLoaded=!1,this.reloadCanvas=!0,this.swapCameraEnabled=!0,this.activeCamera=void 0,this.save=!1,this._reusableImageBuffer=null,this.onStreamChanged=t=>{this.video.srcObject=t,this.updateCameraInfo(t),this.video.addEventListener("resize",(t=>{this.reloadCanvas=!0}),!1),this.video.addEventListener("loadeddata",(t=>{this.videoLoaded=!0,this.didLoadVideo&&this.didLoadVideo()}),!1)},this.state={facingModeBack:"environment"===this.props.videoConstraints.facingMode,mirrored:this.props.mirrored,deviceId:void 0}}videoSize(){const{clientVideoWidth:t,clientVideoHeight:e}=this.calculateClientVideoConstraints();return new l.a(t,e)}saveExtractedData(){this.save=!0}zoom(){var t;return null!==(t=this.props.zoom)&&void 0!==t?t:1}imageCapture(){if(this.capture)return this.capture;const t=this.videoStream.getVideoTrack();return this.capture=new ImageCapture(t),this.capture}set reusableImageBuffer(t){this._reusableImageBuffer=t}createImageData(t=0,e){return f(this,void 0,void 0,(function*(){if(!this.video||!this.videoLoaded)return;const n=this.getCanvasRenderingContext();if(!n)return;if(e){const t=yield this.imageCapture().takePhoto(),e=yield createImageBitmap(t);u.a.debug("Bitmap size: "+e.width*e.height);const i=this.windowSize(),o=e.height/(i.height+i.y),r=i.width*o,a=i.height*o,s=e.width/2-r/2,l=i.y*o,d=new c.a(s,l,r,a);return u.a.debug("Frame size: "+d.x+"-"+d.y+"-"+d.width+"-"+d.height),n.getImageData(this.video,d.x,d.y,e.width,e.height,d.width,d.height,this._reusableImageBuffer)}let{videoWidth:i,videoHeight:o}=this.video,{clientVideoWidth:r,clientVideoHeight:a,coef:s}=this.calculateClientVideoConstraints();if(0===s)return;const l=this.finderFrame||new c.a(0,0,r,a),d=this.zoom(),h=(i-r/d)/2,p=(o-a/d)/2,f=l.x/s+h,m=l.y/s+p,g=this.finderFrame?s:d,v=l.width/g,A=l.height/g,b=this.calculateFrameSize(t,v,A);return n.getImageData(this.video,f,m,v,A,b.width,b.height,this._reusableImageBuffer)}))}windowSize(){var t;const e=this.props.configuration,n=null!==(t=e.container)&&void 0!==t?t:document.getElementById(e.containerId);if(!n)throw new Error("Container DOM element is required to calculate window size and snap image.");return c.a.fromDOMRect(n.getBoundingClientRect())}calculateClientVideoConstraints(){let{videoWidth:t,videoHeight:e}=this.video,n=this.video.getBoundingClientRect(),i=t,o=e,r=1;return n.width/n.height<=t/e?(r=n.height/e,r>0&&(i=n.width/r)):(r=n.width/t,r>0&&(o=n.height/r)),{clientVideoWidth:i,clientVideoHeight:o,coef:r}}calculateFrameSize(t,e,n){let i=e,o=n;if(t>0&&0!=e&&0!=n){const r=e/n;e>n?(i=e>t?t:e,o=i/r):(o=n>t?t:n,i=o*r)}return new l.a(i,o)}getCanvasRenderingContext(){return this.video?0===this.video.videoWidth?null:(this.canvas&&!this.reloadCanvas||(this.canvas&&this.releaseCanvas(),this.canvas=h.isSupported()?new h:new p,this.reloadCanvas=!1),this.canvas):null}releaseCanvas(){this.canvas&&(this.canvas=null)}componentWillUnmount(){this.releaseCanvas(),this.video=null,this.videoStream=null}style(){var t;const e={display:"block",width:100*this.zoom()+"%",height:100*this.zoom()+"%",left:`${this.zoomMargin()}%`,top:`${this.zoomMargin()}%`,position:"relative",objectFit:"cover",backgroundColor:null===(t=this.props.configuration)||void 0===t?void 0:t.backgroundColor};return this.state.mirrored&&(e.transform="scaleX(-1)"),e}zoomMargin(){const t=this.zoom();return 1===t?0:(1-t)/2*100}render(){const{videoConstraints:t,onReady:e,onError:n}=this.props;return i.default.createElement(s,{videoConstraints:t,preferredCamera:this.state.deviceId||this.props.preferredCamera,onReady:e,onStreamChanged:this.onStreamChanged,onError:n,ref:t=>{this.videoStream=t}},i.default.createElement("video",{autoPlay:!0,muted:!0,playsInline:!0,className:"scanbot-camera-view",ref:t=>{this.video=t},style:this.style()}))}setDirection(t){this.props.videoConstraints.facingMode={ideal:t},this.setState({facingModeBack:"environment"===t,mirrored:"user"===t},(()=>f(this,void 0,void 0,(function*(){yield this.videoStream.refreshStream(),this.swapCameraEnabled=!0}))))}swapCameraFacing(t){if(this.swapCameraEnabled){this.swapCameraEnabled=!1;const e=!this.state.facingModeBack,n=e?"environment":"user";this.props.videoConstraints.facingMode=!0===t?{exact:n}:{ideal:n},this.setState({facingModeBack:e,mirrored:!e},(()=>f(this,void 0,void 0,(function*(){yield this.videoStream.refreshStream(),this.swapCameraEnabled=!0}))))}}switchCamera(t,e){return f(this,void 0,void 0,(function*(){this.swapCameraEnabled&&(this.swapCameraEnabled=!1,this.props.videoConstraints.facingMode=void 0,this.setState({facingModeBack:void 0,mirrored:null!=e?e:this.state.mirrored,deviceId:t},(()=>f(this,void 0,void 0,(function*(){yield this.videoStream.refreshStream(),this.swapCameraEnabled=!0})))))}))}updateCameraInfo(t){this.activeCamera=r.a.getCameraInfoFromStream(t)}getActiveCameraInfo(){return this.activeCamera}setTorchState(t){if(this.activeCamera&&this.activeCamera.supportsTorchControl){return this.videoStream.getVideoTrack().applyConstraints({advanced:[{torch:t}]})}return Promise.reject("Torch is not supported for current camera.")}}},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return Qt})),n.d(e,"b",(function(){return Yt}));var i=n(2),o=(n(46),n(0)),r=n(44),a=n.n(r),s=n(28),l=n(45),c="undefined"!=typeof t&&void 0!==t.env&&(t.env.REACT_APP_SC_ATTR||t.env.SC_ATTR)||"data-styled",u="active",d="data-styled-version",h="6.1.8",p="/*!sc*/\n",f="undefined"!=typeof window&&"HTMLElement"in window,m=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof t&&void 0!==t.env&&void 0!==t.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==t.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==t.env.REACT_APP_SC_DISABLE_SPEEDY&&t.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof t&&void 0!==t.env&&void 0!==t.env.SC_DISABLE_SPEEDY&&""!==t.env.SC_DISABLE_SPEEDY&&("false"!==t.env.SC_DISABLE_SPEEDY&&t.env.SC_DISABLE_SPEEDY)),g=(new Set,Object.freeze([])),v=Object.freeze({});function A(t,e,n){return void 0===n&&(n=v),t.theme!==n.theme&&t.theme||e||n.theme}var b=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),y=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,C=/(^-|-$)/g;function S(t){return t.replace(y,"-").replace(C,"")}var w=/(a)(d)/gi,x=function(t){return String.fromCharCode(t+(t>25?39:97))};function E(t){var e,n="";for(e=Math.abs(t);e>52;e=e/52|0)n=x(e%52)+n;return(x(e%52)+n).replace(w,"$1-$2")}var L,_=function(t,e){for(var n=e.length;n;)t=33*t^e.charCodeAt(--n);return t},O=function(t){return _(5381,t)};function T(t){return E(O(t)>>>0)}function k(t){return t.displayName||t.name||"Component"}function D(t){return"string"==typeof t&&!0}var P="function"==typeof Symbol&&Symbol.for,B=P?Symbol.for("react.memo"):60115,R=P?Symbol.for("react.forward_ref"):60112,I={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},F={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},W={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},M=((L={})[R]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},L[B]=W,L);function j(t){return("type"in(e=t)&&e.type.$$typeof)===B?W:"$$typeof"in t?M[t.$$typeof]:I;var e}var z=Object.defineProperty,N=Object.getOwnPropertyNames,V=Object.getOwnPropertySymbols,U=Object.getOwnPropertyDescriptor,H=Object.getPrototypeOf,G=Object.prototype;function Q(t,e,n){if("string"!=typeof e){if(G){var i=H(e);i&&i!==G&&Q(t,i,n)}var o=N(e);V&&(o=o.concat(V(e)));for(var r=j(t),a=j(e),s=0;s<o.length;++s){var l=o[s];if(!(l in F||n&&n[l]||a&&l in a||r&&l in r)){var c=U(e,l);try{z(t,l,c)}catch(t){}}}}return t}function Y(t){return"function"==typeof t}function Z(t){return"object"==typeof t&&"styledComponentId"in t}function q(t,e){return t&&e?"".concat(t," ").concat(e):t||e||""}function X(t,e){if(0===t.length)return"";for(var n=t[0],i=1;i<t.length;i++)n+=e?e+t[i]:t[i];return n}function $(t){return null!==t&&"object"==typeof t&&t.constructor.name===Object.name&&!("props"in t&&t.$$typeof)}function K(t,e,n){if(void 0===n&&(n=!1),!n&&!$(t)&&!Array.isArray(t))return e;if(Array.isArray(e))for(var i=0;i<e.length;i++)t[i]=K(t[i],e[i]);else if($(e))for(var i in e)t[i]=K(t[i],e[i]);return t}function J(t,e){Object.defineProperty(t,"toString",{value:e})}function tt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(e.length>0?" Args: ".concat(e.join(", ")):""))}var et=function(){function t(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return t.prototype.indexOfGroup=function(t){for(var e=0,n=0;n<t;n++)e+=this.groupSizes[n];return e},t.prototype.insertRules=function(t,e){if(t>=this.groupSizes.length){for(var n=this.groupSizes,i=n.length,o=i;t>=o;)if((o<<=1)<0)throw tt(16,"".concat(t));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var r=i;r<o;r++)this.groupSizes[r]=0}for(var a=this.indexOfGroup(t+1),s=(r=0,e.length);r<s;r++)this.tag.insertRule(a,e[r])&&(this.groupSizes[t]++,a++)},t.prototype.clearGroup=function(t){if(t<this.length){var e=this.groupSizes[t],n=this.indexOfGroup(t),i=n+e;this.groupSizes[t]=0;for(var o=n;o<i;o++)this.tag.deleteRule(n)}},t.prototype.getGroup=function(t){var e="";if(t>=this.length||0===this.groupSizes[t])return e;for(var n=this.groupSizes[t],i=this.indexOfGroup(t),o=i+n,r=i;r<o;r++)e+="".concat(this.tag.getRule(r)).concat(p);return e},t}(),nt=new Map,it=new Map,ot=1,rt=function(t){if(nt.has(t))return nt.get(t);for(;it.has(ot);)ot++;var e=ot++;return nt.set(t,e),it.set(e,t),e},at=function(t,e){ot=e+1,nt.set(t,e),it.set(e,t)},st="style[".concat(c,"][").concat(d,'="').concat(h,'"]'),lt=new RegExp("^".concat(c,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),ct=function(t,e,n){for(var i,o=n.split(","),r=0,a=o.length;r<a;r++)(i=o[r])&&t.registerName(e,i)},ut=function(t,e){for(var n,i=(null!==(n=e.textContent)&&void 0!==n?n:"").split(p),o=[],r=0,a=i.length;r<a;r++){var s=i[r].trim();if(s){var l=s.match(lt);if(l){var c=0|parseInt(l[1],10),u=l[2];0!==c&&(at(u,c),ct(t,u,l[3]),t.getTag().insertRules(c,o)),o.length=0}else o.push(s)}}};function dt(){return n.nc}var ht=function(t){var e=document.head,n=t||e,i=document.createElement("style"),o=function(t){var e=Array.from(t.querySelectorAll("style[".concat(c,"]")));return e[e.length-1]}(n),r=void 0!==o?o.nextSibling:null;i.setAttribute(c,u),i.setAttribute(d,h);var a=dt();return a&&i.setAttribute("nonce",a),n.insertBefore(i,r),i},pt=function(){function t(t){this.element=ht(t),this.element.appendChild(document.createTextNode("")),this.sheet=function(t){if(t.sheet)return t.sheet;for(var e=document.styleSheets,n=0,i=e.length;n<i;n++){var o=e[n];if(o.ownerNode===t)return o}throw tt(17)}(this.element),this.length=0}return t.prototype.insertRule=function(t,e){try{return this.sheet.insertRule(e,t),this.length++,!0}catch(t){return!1}},t.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},t.prototype.getRule=function(t){var e=this.sheet.cssRules[t];return e&&e.cssText?e.cssText:""},t}(),ft=function(){function t(t){this.element=ht(t),this.nodes=this.element.childNodes,this.length=0}return t.prototype.insertRule=function(t,e){if(t<=this.length&&t>=0){var n=document.createTextNode(e);return this.element.insertBefore(n,this.nodes[t]||null),this.length++,!0}return!1},t.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},t.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},t}(),mt=function(){function t(t){this.rules=[],this.length=0}return t.prototype.insertRule=function(t,e){return t<=this.length&&(this.rules.splice(t,0,e),this.length++,!0)},t.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},t.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},t}(),gt=f,vt={isServer:!f,useCSSOMInjection:!m},At=function(){function t(t,e,n){void 0===t&&(t=v),void 0===e&&(e={});var o=this;this.options=Object(i.a)(Object(i.a)({},vt),t),this.gs=e,this.names=new Map(n),this.server=!!t.isServer,!this.server&&f&>&&(gt=!1,function(t){for(var e=document.querySelectorAll(st),n=0,i=e.length;n<i;n++){var o=e[n];o&&o.getAttribute(c)!==u&&(ut(t,o),o.parentNode&&o.parentNode.removeChild(o))}}(this)),J(this,(function(){return function(t){for(var e=t.getTag(),n=e.length,i="",o=function(n){var o=function(t){return it.get(t)}(n);if(void 0===o)return"continue";var r=t.names.get(o),a=e.getGroup(n);if(void 0===r||0===a.length)return"continue";var s="".concat(c,".g").concat(n,'[id="').concat(o,'"]'),l="";void 0!==r&&r.forEach((function(t){t.length>0&&(l+="".concat(t,","))})),i+="".concat(a).concat(s,'{content:"').concat(l,'"}').concat(p)},r=0;r<n;r++)o(r);return i}(o)}))}return t.registerId=function(t){return rt(t)},t.prototype.reconstructWithOptions=function(e,n){return void 0===n&&(n=!0),new t(Object(i.a)(Object(i.a)({},this.options),e),this.gs,n&&this.names||void 0)},t.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(t=function(t){var e=t.useCSSOMInjection,n=t.target;return t.isServer?new mt(n):e?new pt(n):new ft(n)}(this.options),new et(t)));var t},t.prototype.hasNameForId=function(t,e){return this.names.has(t)&&this.names.get(t).has(e)},t.prototype.registerName=function(t,e){if(rt(t),this.names.has(t))this.names.get(t).add(e);else{var n=new Set;n.add(e),this.names.set(t,n)}},t.prototype.insertRules=function(t,e,n){this.registerName(t,e),this.getTag().insertRules(rt(t),n)},t.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},t.prototype.clearRules=function(t){this.getTag().clearGroup(rt(t)),this.clearNames(t)},t.prototype.clearTag=function(){this.tag=void 0},t}(),bt=/&/g,yt=/^\s*\/\/.*$/gm;function Ct(t,e){return t.map((function(t){return"rule"===t.type&&(t.value="".concat(e," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(e," ")),t.props=t.props.map((function(t){return"".concat(e," ").concat(t)}))),Array.isArray(t.children)&&"@keyframes"!==t.type&&(t.children=Ct(t.children,e)),t}))}function St(t){var e,n,i,o=void 0===t?v:t,r=o.options,a=void 0===r?v:r,l=o.plugins,c=void 0===l?g:l,u=function(t,i,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(e):t},d=c.slice();d.push((function(t){t.type===s.a&&t.value.includes("&")&&(t.props[0]=t.props[0].replace(bt,n).replace(i,u))})),a.prefix&&d.push(s.d),d.push(s.g);var h=function(t,o,r,l){void 0===o&&(o=""),void 0===r&&(r=""),void 0===l&&(l="&"),e=l,n=o,i=new RegExp("\\".concat(n,"\\b"),"g");var c=t.replace(yt,""),u=s.b(r||o?"".concat(r," ").concat(o," { ").concat(c," }"):c);a.namespace&&(u=Ct(u,a.namespace));var h=[];return s.f(u,s.c(d.concat(s.e((function(t){return h.push(t)}))))),h};return h.hash=c.length?c.reduce((function(t,e){return e.name||tt(15),_(t,e.name)}),5381).toString():"",h}var wt=new At,xt=St(),Et=o.default.createContext({shouldForwardProp:void 0,styleSheet:wt,stylis:xt}),Lt=(Et.Consumer,o.default.createContext(void 0));function _t(){return Object(o.useContext)(Et)}function Ot(t){var e=Object(o.useState)(t.stylisPlugins),n=e[0],i=e[1],r=_t().styleSheet,s=Object(o.useMemo)((function(){var e=r;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e}),[t.disableCSSOMInjection,t.sheet,t.target,r]),l=Object(o.useMemo)((function(){return St({options:{namespace:t.namespace,prefix:t.enableVendorPrefixes},plugins:n})}),[t.enableVendorPrefixes,t.namespace,n]);Object(o.useEffect)((function(){a()(n,t.stylisPlugins)||i(t.stylisPlugins)}),[t.stylisPlugins]);var c=Object(o.useMemo)((function(){return{shouldForwardProp:t.shouldForwardProp,styleSheet:s,stylis:l}}),[t.shouldForwardProp,s,l]);return o.default.createElement(Et.Provider,{value:c},o.default.createElement(Lt.Provider,{value:l},t.children))}var Tt=function(){function t(t,e){var n=this;this.inject=function(t,e){void 0===e&&(e=xt);var i=n.name+e.hash;t.hasNameForId(n.id,i)||t.insertRules(n.id,i,e(n.rules,i,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=e,J(this,(function(){throw tt(12,String(n.name))}))}return t.prototype.getName=function(t){return void 0===t&&(t=xt),this.name+t.hash},t}(),kt=function(t){return t>="A"&&t<="Z"};function Dt(t){for(var e="",n=0;n<t.length;n++){var i=t[n];if(1===n&&"-"===i&&"-"===t[0])return t;kt(i)?e+="-"+i.toLowerCase():e+=i}return e.startsWith("ms-")?"-"+e:e}var Pt=function(t){return null==t||!1===t||""===t},Bt=function(t){var e,n,o=[];for(var r in t){var a=t[r];t.hasOwnProperty(r)&&!Pt(a)&&(Array.isArray(a)&&a.isCss||Y(a)?o.push("".concat(Dt(r),":"),a,";"):$(a)?o.push.apply(o,Object(i.e)(Object(i.e)(["".concat(r," {")],Bt(a),!1),["}"],!1)):o.push("".concat(Dt(r),": ").concat((e=r,null==(n=a)||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||e in l.a||e.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return o};function Rt(t,e,n,i){return Pt(t)?[]:Z(t)?[".".concat(t.styledComponentId)]:Y(t)?!Y(o=t)||o.prototype&&o.prototype.isReactComponent||!e?[t]:Rt(t(e),e,n,i):t instanceof Tt?n?(t.inject(n,i),[t.getName(i)]):[t]:$(t)?Bt(t):Array.isArray(t)?Array.prototype.concat.apply(g,t.map((function(t){return Rt(t,e,n,i)}))):[t.toString()];var o}function It(t){for(var e=0;e<t.length;e+=1){var n=t[e];if(Y(n)&&!Z(n))return!1}return!0}var Ft=O(h),Wt=function(){function t(t,e,n){this.rules=t,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&It(t),this.componentId=e,this.baseHash=_(Ft,e),this.baseStyle=n,At.registerId(e)}return t.prototype.generateAndInjectStyles=function(t,e,n){var i=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,e,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&e.hasNameForId(this.componentId,this.staticRulesId))i=q(i,this.staticRulesId);else{var o=X(Rt(this.rules,t,e,n)),r=E(_(this.baseHash,o)>>>0);if(!e.hasNameForId(this.componentId,r)){var a=n(o,".".concat(r),void 0,this.componentId);e.insertRules(this.componentId,r,a)}i=q(i,r),this.staticRulesId=r}else{for(var s=_(this.baseHash,n.hash),l="",c=0;c<this.rules.length;c++){var u=this.rules[c];if("string"==typeof u)l+=u;else if(u){var d=X(Rt(u,t,e,n));s=_(s,d+c),l+=d}}if(l){var h=E(s>>>0);e.hasNameForId(this.componentId,h)||e.insertRules(this.componentId,h,n(l,".".concat(h),void 0,this.componentId)),i=q(i,h)}}return i},t}(),Mt=o.default.createContext(void 0);Mt.Consumer;var jt={};new Set;function zt(t,e,n){var r=Z(t),a=t,s=!D(t),l=e.attrs,c=void 0===l?g:l,u=e.componentId,d=void 0===u?function(t,e){var n="string"!=typeof t?"sc":S(t);jt[n]=(jt[n]||0)+1;var i="".concat(n,"-").concat(T(h+n+jt[n]));return e?"".concat(e,"-").concat(i):i}(e.displayName,e.parentComponentId):u,p=e.displayName,f=void 0===p?function(t){return D(t)?"styled.".concat(t):"Styled(".concat(k(t),")")}(t):p,m=e.displayName&&e.componentId?"".concat(S(e.displayName),"-").concat(e.componentId):e.componentId||d,y=r&&a.attrs?a.attrs.concat(c).filter(Boolean):c,C=e.shouldForwardProp;if(r&&a.shouldForwardProp){var w=a.shouldForwardProp;if(e.shouldForwardProp){var x=e.shouldForwardProp;C=function(t,e){return w(t,e)&&x(t,e)}}else C=w}var E=new Wt(n,m,r?a.componentStyle:void 0);function L(t,e){return function(t,e,n){var r=t.attrs,a=t.componentStyle,s=t.defaultProps,l=t.foldedComponentIds,c=t.styledComponentId,u=t.target,d=o.default.useContext(Mt),h=_t(),p=t.shouldForwardProp||h.shouldForwardProp,f=A(e,d,s)||v,m=function(t,e,n){for(var o,r=Object(i.a)(Object(i.a)({},e),{className:void 0,theme:n}),a=0;a<t.length;a+=1){var s=Y(o=t[a])?o(r):o;for(var l in s)r[l]="className"===l?q(r[l],s[l]):"style"===l?Object(i.a)(Object(i.a)({},r[l]),s[l]):s[l]}return e.className&&(r.className=q(r.className,e.className)),r}(r,e,f),g=m.as||u,y={};for(var C in m)void 0===m[C]||"$"===C[0]||"as"===C||"theme"===C&&m.theme===f||("forwardedAs"===C?y.as=m.forwardedAs:p&&!p(C,g)||(y[C]=m[C]));var S=function(t,e){var n=_t();return t.generateAndInjectStyles(e,n.styleSheet,n.stylis)}(a,m),w=q(l,c);return S&&(w+=" "+S),m.className&&(w+=" "+m.className),y[D(g)&&!b.has(g)?"class":"className"]=w,y.ref=n,Object(o.createElement)(g,y)}(_,t,e)}L.displayName=f;var _=o.default.forwardRef(L);return _.attrs=y,_.componentStyle=E,_.displayName=f,_.shouldForwardProp=C,_.foldedComponentIds=r?q(a.foldedComponentIds,a.styledComponentId):"",_.styledComponentId=m,_.target=r?a.target:t,Object.defineProperty(_,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var i=0,o=e;i<o.length;i++)K(t,o[i],!0);return t}({},a.defaultProps,t):t}}),J(_,(function(){return".".concat(_.styledComponentId)})),s&&Q(_,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),_}function Nt(t,e){for(var n=[t[0]],i=0,o=e.length;i<o;i+=1)n.push(e[i],t[i+1]);return n}var Vt=function(t){return Object.assign(t,{isCss:!0})};function Ut(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(Y(t)||$(t))return Vt(Rt(Nt(g,Object(i.e)([t],e,!0))));var o=t;return 0===e.length&&1===o.length&&"string"==typeof o[0]?Rt(o):Vt(Rt(Nt(o,e)))}function Ht(t,e,n){if(void 0===n&&(n=v),!e)throw tt(1,e);var o=function(o){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];return t(e,n,Ut.apply(void 0,Object(i.e)([o],r,!1)))};return o.attrs=function(o){return Ht(t,e,Object(i.a)(Object(i.a)({},n),{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}))},o.withConfig=function(o){return Ht(t,e,Object(i.a)(Object(i.a)({},n),o))},o}var Gt=function(t){return Ht(zt,t)},Qt=Gt;b.forEach((function(t){Qt[t]=Gt(t)}));!function(){function t(t,e){this.rules=t,this.componentId=e,this.isStatic=It(t),At.registerId(this.componentId+1)}t.prototype.createStyles=function(t,e,n,i){var o=i(X(Rt(this.rules,e,n,i)),""),r=this.componentId+t;n.insertRules(r,r,o)},t.prototype.removeStyles=function(t,e){e.clearRules(this.componentId+t)},t.prototype.renderStyles=function(t,e,n,i){t>2&&At.registerId(this.componentId+t),this.removeStyles(t,n),this.createStyles(t,e,n,i)}}();function Yt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=X(Ut.apply(void 0,Object(i.e)([t],e,!1))),r=T(o);return new Tt(r,o)}(function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=dt(),i=X([n&&'nonce="'.concat(n,'"'),"".concat(c,'="true"'),"".concat(d,'="').concat(h,'"')].filter(Boolean)," ");return"<style ".concat(i,">").concat(e,"</style>")},this.getStyleTags=function(){if(t.sealed)throw tt(2);return t._emitSheetCSS()},this.getStyleElement=function(){var e;if(t.sealed)throw tt(2);var n=((e={})[c]="",e[d]=h,e.dangerouslySetInnerHTML={__html:t.instance.toString()},e),r=dt();return r&&(n.nonce=r),[o.default.createElement("style",Object(i.a)({},n,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new At({isServer:!0}),this.sealed=!1}t.prototype.collectStyles=function(t){if(this.sealed)throw tt(2);return o.default.createElement(Ot,{sheet:this.instance},t)},t.prototype.interleaveWithNodeStream=function(t){throw tt(3)}})(),"__sc-".concat(c,"__")}).call(this,n(42))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(15),o=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class r{static get INSTANCE(){return r._INSTANCE||(r._INSTANCE=new r),r._INSTANCE}constructor(){this.listOfCameras=[],this.strategy="FAST_DEFERRED"}initialize(t){if(t&&(this.strategy=t),"SLOW"===t||"FAST"===t){const e=t;this.load(e)}}load(t){return o(this,void 0,void 0,(function*(){if(!t)if("SLOW_DEFERRED"===this.strategy||"SLOW"===this.strategy)t="SLOW";else if("FAST_DEFERRED"===this.strategy||"FAST"===this.strategy)t="FAST";else if("NONE"===this.strategy)return this.listOfCameras;let e;if("SLOW"===t)e=this.loadSlow();else{if("FAST"!==t)throw new Error(`Unknown mode ${t}`);e=this.loadFast()}try{return this.listOfCameras=yield e,this.listOfCameras}catch(t){throw this.loadSlowResult=void 0,i.a.createFromDOMException(t)}}))}loadSlow(){return this.loadSlowResult=this.loadSlowResult||(()=>o(this,void 0,void 0,(function*(){yield this.assertPermissionsAreOk();const t=[];for(const e of yield this.getVideoDevices()){let n;try{n=yield this.getUserMedia({video:{deviceId:e.deviceId}}),t.push(r.getCameraInfoFromStream(n))}finally{this.stopStream(n),yield new Promise((t=>setTimeout(t,0)))}}return t})))(),this.loadSlowResult}loadFast(){return this.loadFastResult=this.loadFastResult||(()=>o(this,void 0,void 0,(function*(){yield this.assertPermissionsAreOk();const t=[];for(const e of yield this.getVideoDevices()){const n=r.guessparseCameraLabelFacingMode(e.label),i=r.guessparseCameraLabelMaxNumPixels(e.label);t.push({maxNumPixels:i,facingMode:n,supportsTorchControl:void 0,deviceId:e.deviceId,label:e.label})}return t})))(),this.loadFastResult}getMainCamera(t){var e,n,i,o,r,a;return null!==(a=null===(r=null===(o=null===(i=null===(n=null===(e=this.listOfCameras)||void 0===e?void 0:e.filter((e=>e.facingMode===t)))||void 0===n?void 0:n.map(((t,e)=>({camera:t,index:e}))))||void 0===i?void 0:i.sort(((t,e)=>{var n;return-(+t.camera.supportsTorchControl||0)-(+e.camera.supportsTorchControl||0)||-((t.camera.maxNumPixels||0)-(e.camera.maxNumPixels||0))||(null===(n=t.camera.label)||void 0===n?void 0:n.localeCompare(e.camera.label))||t.index-e.index})))||void 0===o?void 0:o[0])||void 0===r?void 0:r.camera)&&void 0!==a?a:null}getVideoDevices(){return o(this,void 0,void 0,(function*(){let t=yield navigator.mediaDevices.enumerateDevices();if(t=t.filter((t=>"videoinput"===t.kind)),t.some((t=>""===t.label))){let e;try{e=yield this.getUserMedia({video:{facingMode:{ideal:"environment"}},audio:!1}),t=yield navigator.mediaDevices.enumerateDevices(),t=t.filter((t=>"videoinput"===t.kind))}finally{this.stopStream(e)}}return t}))}stopStream(t){null==t||t.getTracks().forEach((t=>t.stop()))}static guessparseCameraLabelFacingMode(t){return function(t){const e=["rear","back","rück","arrière","trasera","trás","traseira","posteriore","后面","後面","背面","后置","後置","背置","задней","الخلفية","후","arka","achterzijde","หลัง","baksidan","bagside","sau","bak","tylny","takakamera","belakang","אחורית","πίσω","spate","hátsó","zadní","darrere","zadná","задня","stražnja","belakang","बैक"];for(const n of e)if(t.toLowerCase().includes(n.toLowerCase()))return!0;return!1}(t)?"back":"front"}static guessparseCameraLabelMaxNumPixels(t){const e=RegExp(/\b([0-9]+)mp?\b/).exec(t.toLowerCase()),n=e?1e6*parseInt(e[1],10):NaN;return Number.isNaN(n)?void 0:n}assertPermissionsAreOk(){return o(this,void 0,void 0,(function*(){if(i.a.hasCheckedPermission()||(yield i.a.tryCheckPermission()),i.a.hasDeniedPermission())throw i.a.permissionDenied();if(!navigator.mediaDevices)throw i.a.unknown()}))}static getCameraInfoFromStream(t){var e;return null===(e=t.getVideoTracks().map((t=>{var e,n,i,o,r,a;const s=null===(e=t.getCapabilities)||void 0===e?void 0:e.call(t),l=null===(n=t.getSettings)||void 0===n?void 0:n.call(t),c=t.label;let u=function(t){if("user"===(null==t?void 0:t.toLowerCase()))return"front";if("environment"===(null==t?void 0:t.toLowerCase()))return"back";return"unknown"}(null!==(o=null===(i=null==s?void 0:s.facingMode)||void 0===i?void 0:i[0])&&void 0!==o?o:l.facingMode);"unknown"===u&&(u=this.guessparseCameraLabelFacingMode(c));let d=function(t){var e,n;let i=(null===(e=null==t?void 0:t.width)||void 0===e?void 0:e.max)*(null===(n=null==t?void 0:t.height)||void 0===n?void 0:n.max);if(!i||Number.isNaN(i))return;return i}(s);Number.isNaN(d)&&(d=this.guessparseCameraLabelMaxNumPixels(c));return{facingMode:u,maxNumPixels:d,supportsTorchControl:null!==(a=null!==(r=null==s?void 0:s.torch)&&void 0!==r?r:"torch"in l)&&void 0!==a&&a,label:c,deviceId:l.deviceId}})).sort(((t,e)=>e.maxNumPixels-t.maxNumPixels)))||void 0===e?void 0:e[0]}getUserMedia(t){return o(this,void 0,void 0,(function*(){try{return yield navigator.mediaDevices.getUserMedia(t)}catch(t){throw i.a.mediaDeviceNotFound()}}))}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),o=n(21),r=n(5),a=n(11);class s extends i.default.Component{get style(){return this.props.configuration.style}get holeRect(){return this.holePosition}constructor(t){super(t),this.holePosition=o.a.empty(),this.resizeObserver=new ResizeObserver((()=>{this.updateWindowSize()})),this.componentDidUpdate=t=>{var e,n,i,o;(null===(e=this.props.padding)||void 0===e?void 0:e.minTopPadding)===(null===(n=t.padding)||void 0===n?void 0:n.minTopPadding)&&(null===(i=this.props.padding)||void 0===i?void 0:i.minBottomPadding)===(null===(o=t.padding)||void 0===o?void 0:o.minBottomPadding)&&this.props.configuration===t.configuration&&this.props.guidanceConfiguration===t.guidanceConfiguration||this.setState({shouldUpdateCanvas:!0}),this.updateCanvas()},this.updateWindowSize=()=>{this.setState({shouldUpdateCanvas:!0})},this.getVideoSize=()=>{var t;return null!==(t=this.holeCanvas.getBoundingClientRect())&&void 0!==t?t:new DOMRect},this.scaleForRetinaDisplay=t=>{if(window.devicePixelRatio>1){var e=t.width,n=t.height;t.width=e*window.devicePixelRatio,t.height=n*window.devicePixelRatio,t.style.width=e+"px",t.style.height=n+"px",t.getContext("2d").scale(window.devicePixelRatio,window.devicePixelRatio)}},this.updateCanvas=()=>{var t,e,n,i,o;if(!this.state.shouldUpdateCanvas)return;this.setState({shouldUpdateCanvas:!1});const r=this.getVideoSize().width,a=this.getVideoSize().height;this.holeCanvas.width=r,this.holeCanvas.height=a,this.crosshairCanvas.width=r,this.crosshairCanvas.height=a,this.scaleForRetinaDisplay(this.crosshairCanvas);const s=r-2*this.props.configuration.style.strokeWidth,l=Math.max(20,(r-s)/2),c=Math.min(s,r-2*l),u=this.props.configuration.aspectRatio.width/this.props.configuration.aspectRatio.height;this.holePosition.width=c,this.holePosition.height=this.holePosition.width/u,this.holePosition.x=r/2-c/2;const d=(null===(t=this.guidanceText)||void 0===t?void 0:t.clientHeight)+this.guidanceTextTopPadding||0,h=Math.max(10,null!==(n=null===(e=this.props.padding)||void 0===e?void 0:e.minTopPadding)&&void 0!==n?n:0),p=a-h-Math.max(10,null!==(o=null===(i=this.props.padding)||void 0===i?void 0:i.minBottomPadding)&&void 0!==o?o:0)-d;this.holePosition.height>p?(this.holePosition.height=p,this.holePosition.width=this.holePosition.height*u,this.holePosition.x=r/2-this.holePosition.width/2,this.holePosition.y=h):this.holePosition.y=h+(p-this.holePosition.height)/1.9;const f=this.holeCanvas.getContext("2d");f.save(),this.drawBackground(f),f.globalCompositeOperation="destination-out",this.drawHole();const m=this.crosshairCanvas.getContext("2d");m.globalCompositeOperation="source-over","FinderStrokedStyle"===this.props.configuration.style._type?this.drawHoleOutline():"FinderCorneredStyle"===this.props.configuration.style._type&&this.drawHoleCorners(),f.restore(),m.restore()},this.drawBackground=t=>{const{width:e,height:n}=this.getVideoSize();t.clearRect(0,0,e,n),t.beginPath(),t.rect(0,0,e,n),t.fillStyle=r.b.getColorValue(this.props.configuration.overlayColor),t.fill()},this.drawHole=()=>{const t=this.holeCanvas.getContext("2d"),e=this.cornerRadius(),n=this.holePosition.x,i=this.holePosition.y,o=this.holePosition.width,r=this.holePosition.height;t.beginPath(),t.fillStyle="black",t.moveTo(n+e,i),t.arcTo(n+o,i,n+o,i+r,e),t.arcTo(n+o,i+r,n,i+r,e),t.arcTo(n,i+r,n,i,e),t.arcTo(n,i,n+o,i,e),t.closePath(),t.fill()},this.drawCrosshair=()=>{const t=this.crosshairCanvas.getContext("2d"),e=this.holePosition.x+this.holePosition.width/2,n=this.holePosition.y+this.holePosition.height/2;t.beginPath(),t.moveTo(e-10,n),t.lineTo(e+10,n),t.moveTo(e,n-10),t.lineTo(e,n+10),t.strokeStyle="white",t.fillStyle="white",t.lineWidth=1,t.stroke()},this.drawHoleCorners=()=>{const t=this.crosshairCanvas.getContext("2d"),e=this.holePosition.x,n=this.holePosition.y,i=this.holePosition.width,o=this.holePosition.height,a=15,s=this.style.strokeWidth,l=this.cornerRadius();t.beginPath(),t.moveTo(e,n+a),t.arcTo(e,n,e+i,n,l),t.lineTo(e+a,n),t.moveTo(e+i-a,n),t.arcTo(e+i,n,e+i,n+o,l),t.lineTo(e+i,n+a),t.moveTo(e+i,n+o-a),t.arcTo(e+i,n+o,e,n+o,l),t.lineTo(e+i-a,n+o),t.moveTo(e,n+o-a),t.arcTo(e,n+o,e+i,n+o,l),t.lineTo(e+a,n+o),t.strokeStyle=r.b.getColorValue(this.style.strokeColor),t.lineWidth=s,t.stroke()},this.drawHoleOutline=()=>{const t=this.crosshairCanvas.getContext("2d"),e=this.holePosition.x,n=this.holePosition.y,i=this.holePosition.width,o=this.holePosition.height,a=this.cornerRadius(),s=this.style.strokeWidth;t.beginPath(),t.moveTo(e+a,n),t.arcTo(e+i,n,e+i,n+o,a),t.moveTo(e+i,n+a),t.arcTo(e+i,n+o,e,n+o,a),t.moveTo(e+i-a,n+o),t.arcTo(e,n+o,e,n,a),t.moveTo(e,n+o-a),t.arcTo(e,n,e+i,n,a),t.strokeStyle=r.b.getColorValue(this.style.strokeColor),t.lineWidth=s,t.stroke()},this.guidanceTextTopPadding=20,this.render=()=>i.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",textAlign:"left"},onClick:t=>{const e=this.holePosition;t.clientX>this.holePosition.x&&t.clientX<e.x+e.width&&t.clientY>e.y&&t.clientY<e.y+e.height&&console.log("Clicked inside hole, possibly click events need to be diverted")}},i.default.createElement("canvas",{ref:t=>{this.holeCanvas=t},style:{position:"absolute",width:"100%",height:"100%"}}),i.default.createElement("canvas",{ref:t=>{this.crosshairCanvas=t},style:{position:"absolute",width:"100%",height:"100%"}}),this.guidance.visible&&i.default.createElement("div",{ref:t=>{this.guidanceText=t},style:{position:"absolute",display:"block",top:this.holePosition.y+this.holePosition.height+this.guidanceTextTopPadding,left:0,width:"100%",textAlign:"center"}},i.default.createElement(a.a,{style:{display:"inline-block",backgroundColor:r.b.getColorValue(this.guidance.background.fillColor),borderStyle:"solid",borderColor:r.b.getColorValue(this.guidance.background.strokeColor),borderWidth:this.style.strokeWidth,borderRadius:4,padding:"4px 8px",flex:1},config:this.guidance.title}))),this.state={shouldUpdateCanvas:!0}}componentDidMount(){this.updateWindowSize(),this.resizeObserver.observe(this.holeCanvas)}componentWillUnmount(){this.resizeObserver.disconnect()}bottomOfGuidanceText(){var t,e;return this.holeRect.bottom()+(null!==(e=null===(t=this.guidanceText)||void 0===t?void 0:t.clientHeight)&&void 0!==e?e:0)+this.guidanceTextTopPadding}get guidance(){return this.props.guidanceConfiguration}cornerRadius(){return Math.max(0,Math.min(this.style.cornerRadius,this.holePosition.width/2,this.holePosition.height/2))}}},function(t,e,n){var i;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e<arguments.length;e++){var i=arguments[e];if(i){var r=typeof i;if("string"===r||"number"===r)t.push(i);else if(Array.isArray(i)){if(i.length){var a=o.apply(null,i);a&&t.push(a)}}else if("object"===r)if(i.toString===Object.prototype.toString)for(var s in i)n.call(i,s)&&i[s]&&t.push(s);else t.push(i.toString())}}return t.join(" ")}t.exports?(o.default=o,t.exports=o):void 0===(i=function(){return o}.apply(e,[]))||(t.exports=i)}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return Q})),n.d(e,"c",(function(){return tt})),n.d(e,"d",(function(){return nt})),n.d(e,"e",(function(){return et})),n.d(e,"f",(function(){return K})),n.d(e,"g",(function(){return J}));var i="-ms-",o="-moz-",r="-webkit-",a="comm",s="rule",l="decl",c="@keyframes",u=Math.abs,d=String.fromCharCode,h=Object.assign;function p(t){return t.trim()}function f(t,e){return(t=e.exec(t))?t[0]:t}function m(t,e,n){return t.replace(e,n)}function g(t,e,n){return t.indexOf(e,n)}function v(t,e){return 0|t.charCodeAt(e)}function A(t,e,n){return t.slice(e,n)}function b(t){return t.length}function y(t){return t.length}function C(t,e){return e.push(t),t}function S(t,e){return t.map(e).join("")}function w(t,e){return t.filter((function(t){return!f(t,e)}))}var x=1,E=1,L=0,_=0,O=0,T="";function k(t,e,n,i,o,r,a,s){return{value:t,root:e,parent:n,type:i,props:o,children:r,line:x,column:E,length:a,return:"",siblings:s}}function D(t,e){return h(k("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}function P(t){for(;t.root;)t=D(t.root,{children:[t]});C(t,t.siblings)}function B(){return O=_<L?v(T,_++):0,E++,10===O&&(E=1,x++),O}function R(){return v(T,_)}function I(){return _}function F(t,e){return A(T,t,e)}function W(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function M(t){return x=E=1,L=b(T=t),_=0,[]}function j(t){return T="",t}function z(t){return p(F(_-1,U(91===t?t+2:40===t?t+1:t)))}function N(t){for(;(O=R())&&O<33;)B();return W(t)>2||W(O)>3?"":" "}function V(t,e){for(;--e&&B()&&!(O<48||O>102||O>57&&O<65||O>70&&O<97););return F(t,I()+(e<6&&32==R()&&32==B()))}function U(t){for(;B();)switch(O){case t:return _;case 34:case 39:34!==t&&39!==t&&U(O);break;case 40:41===t&&U(t);break;case 92:B()}return _}function H(t,e){for(;B()&&t+O!==57&&(t+O!==84||47!==R()););return"/*"+F(e,_-1)+"*"+d(47===t?t:B())}function G(t){for(;!W(R());)B();return F(t,_)}function Q(t){return j(Y("",null,null,null,[""],t=M(t),0,[0],t))}function Y(t,e,n,i,o,r,a,s,l){for(var c=0,h=0,p=a,f=0,A=0,y=0,S=1,w=1,L=1,k=0,D="",P=o,F=r,W=i,M=D;w;)switch(y=k,k=B()){case 40:if(108!=y&&58==v(M,p-1)){-1!=g(M+=m(z(k),"&","&\f"),"&\f",u(c?s[c-1]:0))&&(L=-1);break}case 34:case 39:case 91:M+=z(k);break;case 9:case 10:case 13:case 32:M+=N(y);break;case 92:M+=V(I()-1,7);continue;case 47:switch(R()){case 42:case 47:C(q(H(B(),I()),e,n,l),l);break;default:M+="/"}break;case 123*S:s[c++]=b(M)*L;case 125*S:case 59:case 0:switch(k){case 0:case 125:w=0;case 59+h:-1==L&&(M=m(M,/\f/g,"")),A>0&&b(M)-p&&C(A>32?X(M+";",i,n,p-1,l):X(m(M," ","")+";",i,n,p-2,l),l);break;case 59:M+=";";default:if(C(W=Z(M,e,n,c,h,o,s,D,P=[],F=[],p,r),r),123===k)if(0===h)Y(M,e,W,W,P,r,p,s,F);else switch(99===f&&110===v(M,3)?100:f){case 100:case 108:case 109:case 115:Y(t,W,W,i&&C(Z(t,W,W,0,0,o,s,D,o,P=[],p,F),F),o,F,p,s,i?P:F);break;default:Y(M,W,W,W,[""],F,0,s,F)}}c=h=A=0,S=L=1,D=M="",p=a;break;case 58:p=1+b(M),A=y;default:if(S<1)if(123==k)--S;else if(125==k&&0==S++&&125==(O=_>0?v(T,--_):0,E--,10===O&&(E=1,x--),O))continue;switch(M+=d(k),k*S){case 38:L=h>0?1:(M+="\f",-1);break;case 44:s[c++]=(b(M)-1)*L,L=1;break;case 64:45===R()&&(M+=z(B())),f=R(),h=p=b(D=M+=G(I())),k++;break;case 45:45===y&&2==b(M)&&(S=0)}}return r}function Z(t,e,n,i,o,r,a,l,c,d,h,f){for(var g=o-1,v=0===o?r:[""],b=y(v),C=0,S=0,w=0;C<i;++C)for(var x=0,E=A(t,g+1,g=u(S=a[C])),L=t;x<b;++x)(L=p(S>0?v[x]+" "+E:m(E,/&\f/g,v[x])))&&(c[w++]=L);return k(t,e,n,0===o?s:l,c,d,h,f)}function q(t,e,n,i){return k(t,e,n,a,d(O),A(t,2,-2),0,i)}function X(t,e,n,i,o){return k(t,e,n,l,A(t,0,i),A(t,i+1,-1),i,o)}function $(t,e,n){switch(function(t,e){return 45^v(t,0)?(((e<<2^v(t,0))<<2^v(t,1))<<2^v(t,2))<<2^v(t,3):0}(t,e)){case 5103:return r+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return r+t+t;case 4789:return o+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return r+t+o+t+i+t+t;case 5936:switch(v(t,e+11)){case 114:return r+t+i+m(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return r+t+i+m(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return r+t+i+m(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return r+t+i+t+t;case 6165:return r+t+i+"flex-"+t+t;case 5187:return r+t+m(t,/(\w+).+(:[^]+)/,r+"box-$1$2"+i+"flex-$1$2")+t;case 5443:return r+t+i+"flex-item-"+m(t,/flex-|-self/g,"")+(f(t,/flex-|baseline/)?"":i+"grid-row-"+m(t,/flex-|-self/g,""))+t;case 4675:return r+t+i+"flex-line-pack"+m(t,/align-content|flex-|-self/g,"")+t;case 5548:return r+t+i+m(t,"shrink","negative")+t;case 5292:return r+t+i+m(t,"basis","preferred-size")+t;case 6060:return r+"box-"+m(t,"-grow","")+r+t+i+m(t,"grow","positive")+t;case 4554:return r+m(t,/([^-])(transform)/g,"$1"+r+"$2")+t;case 6187:return m(m(m(t,/(zoom-|grab)/,r+"$1"),/(image-set)/,r+"$1"),t,"")+t;case 5495:case 3959:return m(t,/(image-set\([^]*)/,r+"$1$`$1");case 4968:return m(m(t,/(.+:)(flex-)?(.*)/,r+"box-pack:$3"+i+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+r+t+t;case 4200:if(!f(t,/flex-|baseline/))return i+"grid-column-align"+A(t,e)+t;break;case 2592:case 3360:return i+m(t,"template-","")+t;case 4384:case 3616:return n&&n.some((function(t,n){return e=n,f(t.props,/grid-\w+-end/)}))?~g(t+(n=n[e].value),"span",0)?t:i+m(t,"-start","")+t+i+"grid-row-span:"+(~g(n,"span",0)?f(n,/\d+/):+f(n,/\d+/)-+f(t,/\d+/))+";":i+m(t,"-start","")+t;case 4896:case 4128:return n&&n.some((function(t){return f(t.props,/grid-\w+-start/)}))?t:i+m(m(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return m(t,/(.+)-inline(.+)/,r+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(b(t)-1-e>6)switch(v(t,e+1)){case 109:if(45!==v(t,e+4))break;case 102:return m(t,/(.+:)(.+)-([^]+)/,"$1"+r+"$2-$3$1"+o+(108==v(t,e+3)?"$3":"$2-$3"))+t;case 115:return~g(t,"stretch",0)?$(m(t,"stretch","fill-available"),e,n)+t:t}break;case 5152:case 5920:return m(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(e,n,o,r,a,s,l){return i+n+":"+o+l+(r?i+n+"-span:"+(a?s:+s-+o)+l:"")+t}));case 4949:if(121===v(t,e+6))return m(t,":",":"+r)+t;break;case 6444:switch(v(t,45===v(t,14)?18:11)){case 120:return m(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+r+(45===v(t,14)?"inline-":"")+"box$3$1"+r+"$2$3$1"+i+"$2box$3")+t;case 100:return m(t,":",":"+i)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return m(t,"scroll-","scroll-snap-")+t}return t}function K(t,e){for(var n="",i=0;i<t.length;i++)n+=e(t[i],i,t,e)||"";return n}function J(t,e,n,i){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case l:return t.return=t.return||t.value;case a:return"";case c:return t.return=t.value+"{"+K(t.children,i)+"}";case s:if(!b(t.value=t.props.join(",")))return""}return b(n=K(t.children,i))?t.return=t.value+"{"+n+"}":""}function tt(t){var e=y(t);return function(n,i,o,r){for(var a="",s=0;s<e;s++)a+=t[s](n,i,o,r)||"";return a}}function et(t){return function(e){e.root||(e=e.return)&&t(e)}}function nt(t,e,n,o){if(t.length>-1&&!t.return)switch(t.type){case l:return void(t.return=$(t.value,t.length,n));case c:return K([D(t,{value:m(t.value,"@","@"+r)})],o);case s:if(t.length)return S(n=t.props,(function(e){switch(f(e,o=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":P(D(t,{props:[m(e,/:(read-\w+)/,":-moz-$1")]})),P(D(t,{props:[e]})),h(t,{props:w(n,o)});break;case"::placeholder":P(D(t,{props:[m(e,/:(plac\w+)/,":"+r+"input-$1")]})),P(D(t,{props:[m(e,/:(plac\w+)/,":-moz-$1")]})),P(D(t,{props:[m(e,/:(plac\w+)/,i+"input-$1")]})),P(D(t,{props:[e]})),h(t,{props:w(n,o)})}return""}))}}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(1),o=n(7);class r extends o.a{constructor(t={}){super(),this.title=new i.j({visible:!1,text:"Scan Item",color:"?sbColorOnPrimary"}),this.mode="SOLID",this.backgroundColor="?sbColorPrimary",this.cancelButton=new i.c({text:"Cancel",background:new i.a({strokeColor:"#00000000",fillColor:"#00000000",strokeWidth:0}),foreground:new i.d({color:"?sbColorOnPrimary"})}),void 0!==t.title&&(this.title=new i.j(t.title)),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.backgroundColor&&(this.backgroundColor=t.backgroundColor),void 0!==t.cancelButton&&(this.cancelButton=new i.c(t.cancelButton))}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return r}));var i=n(6);function o(t,e,n){return Math.min(Math.max(t,e),n)}function r(t,e,n){return new i.a(o(t.x,-e/2,n.width-e/2),o(t.y,-e/2,n.height-e/2))}},function(t,e,n){"use strict";n.r(e),n.d(e,"BarcodeConfig",(function(){return i})),n.d(e,"OneDBarcodeConfig",(function(){return o})),n.d(e,"CodabarConfig",(function(){return l})),n.d(e,"Code11Config",(function(){return c})),n.d(e,"Code39Config",(function(){return u})),n.d(e,"Code93Config",(function(){return d})),n.d(e,"Code128Config",(function(){return h})),n.d(e,"Code2Of5Config",(function(){return p})),n.d(e,"DataBarConfig",(function(){return f})),n.d(e,"DataBarExpandedConfig",(function(){return m})),n.d(e,"DataBarLimitedConfig",(function(){return g})),n.d(e,"ITFConfig",(function(){return v})),n.d(e,"MSIPlesseyConfig",(function(){return A})),n.d(e,"UpcEanConfig",(function(){return b})),n.d(e,"PharmaCodeConfig",(function(){return y})),n.d(e,"TwoDBarcodeConfig",(function(){return r})),n.d(e,"AztecConfig",(function(){return C})),n.d(e,"QRCodeConfig",(function(){return S})),n.d(e,"PDF417Config",(function(){return w})),n.d(e,"MicroPDF417Config",(function(){return x})),n.d(e,"DataMatrixConfig",(function(){return E})),n.d(e,"MaxiCodeConfig",(function(){return L})),n.d(e,"FourStateBarcodeConfig",(function(){return a})),n.d(e,"AustraliaPostConfig",(function(){return _})),n.d(e,"JapanPostConfig",(function(){return O})),n.d(e,"RoyalMailConfig",(function(){return T})),n.d(e,"RoyalTNTPostConfig",(function(){return k})),n.d(e,"USPSIntelligentMailConfig",(function(){return D})),n.d(e,"PharmaCodeTwoTrackConfig",(function(){return P})),n.d(e,"GS1CompositeConfig",(function(){return B})),n.d(e,"GroupOneDConfig",(function(){return R})),n.d(e,"GroupTwoDConfig",(function(){return I})),n.d(e,"GroupFourStateConfig",(function(){return F})),n.d(e,"GroupCommonConfig",(function(){return W}));var i,o,r,a,s=n(4);!function(t){t.From=function(t){const e=t._type;switch(e){case"CodabarConfig":return new l(t);case"Code11Config":return new c(t);case"Code39Config":return new u(t);case"Code93Config":return new d(t);case"Code128Config":return new h(t);case"Code2Of5Config":return new p(t);case"DataBarConfig":return new f(t);case"DataBarExpandedConfig":return new m(t);case"DataBarLimitedConfig":return new g(t);case"ITFConfig":return new v(t);case"MSIPlesseyConfig":return new A(t);case"UpcEanConfig":return new b(t);case"PharmaCodeConfig":return new y(t);case"AztecConfig":return new C(t);case"QRCodeConfig":return new S(t);case"PDF417Config":return new w(t);case"MicroPDF417Config":return new x(t);case"DataMatrixConfig":return new E(t);case"MaxiCodeConfig":return new L(t);case"AustraliaPostConfig":return new _(t);case"JapanPostConfig":return new O(t);case"RoyalMailConfig":return new T(t);case"RoyalTNTPostConfig":return new k(t);case"USPSIntelligentMailConfig":return new D(t);case"PharmaCodeTwoTrackConfig":return new P(t);case"GS1CompositeConfig":return new B(t);case"GroupOneDConfig":return new R(t);case"GroupTwoDConfig":return new I(t);case"GroupFourStateConfig":return new F(t);case"GroupCommonConfig":return new W(t);default:throw`Unknown child class name: ${e}`}}}(i||(i={})),function(t){t.From=function(t){const e=t._type;switch(e){case"CodabarConfig":return new l(t);case"Code11Config":return new c(t);case"Code39Config":return new u(t);case"Code93Config":return new d(t);case"Code128Config":return new h(t);case"Code2Of5Config":return new p(t);case"DataBarConfig":return new f(t);case"DataBarExpandedConfig":return new m(t);case"DataBarLimitedConfig":return new g(t);case"ITFConfig":return new v(t);case"MSIPlesseyConfig":return new A(t);case"UpcEanConfig":return new b(t);case"PharmaCodeConfig":return new y(t);default:throw`Unknown child class name: ${e}`}}}(o||(o={}));class l extends s.a{constructor(t={}){super(),this._type="CodabarConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumTextLength=0,this.maximumTextLength=0,this.returnStartEnd=!1,void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.returnStartEnd&&(this.returnStartEnd=t.returnStartEnd)}}class c extends s.a{constructor(t={}){super(),this._type="Code11Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksum=!0,void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.checksum&&(this.checksum=t.checksum)}}class u extends s.a{constructor(t={}){super(),this._type="Code39Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.code32=!1,this.code39=!0,this.pzn=!0,this.tryCode39ExtendedMode=!1,this.useCode39CheckDigit=!1,void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.code32&&(this.code32=t.code32),void 0!==t.code39&&(this.code39=t.code39),void 0!==t.pzn&&(this.pzn=t.pzn),void 0!==t.tryCode39ExtendedMode&&(this.tryCode39ExtendedMode=t.tryCode39ExtendedMode),void 0!==t.useCode39CheckDigit&&(this.useCode39CheckDigit=t.useCode39CheckDigit)}}class d extends s.a{constructor(t={}){super(),this._type="Code93Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength)}}class h extends s.a{constructor(t={}){super(),this._type="Code128Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength)}}class p extends s.a{constructor(t={}){super(),this._type="Code2Of5Config",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.iata2of5=!0,this.code25=!1,this.industrial2of5=!0,this.useIATA2OF5Checksum=!0,void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.iata2of5&&(this.iata2of5=t.iata2of5),void 0!==t.code25&&(this.code25=t.code25),void 0!==t.industrial2of5&&(this.industrial2of5=t.industrial2of5),void 0!==t.useIATA2OF5Checksum&&(this.useIATA2OF5Checksum=t.useIATA2OF5Checksum)}}class f extends s.a{constructor(t={}){super(),this._type="DataBarConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling)}}class m extends s.a{constructor(t={}){super(),this._type="DataBarExpandedConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling)}}class g extends s.a{constructor(t={}){super(),this._type="DataBarLimitedConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.gs1Handling="PARSE",void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling)}}class v extends s.a{constructor(t={}){super(),this._type="ITFConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumTextLength=0,this.maximumTextLength=0,void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength)}}class A extends s.a{constructor(t={}){super(),this._type="MSIPlesseyConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.checksumAlgorithms=["MOD_10"],void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.checksumAlgorithms&&(this.checksumAlgorithms=t.checksumAlgorithms.map((t=>t)))}}class b extends s.a{constructor(t={}){super(),this._type="UpcEanConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.stripCheckDigits=!1,this.ean8=!0,this.ean13=!0,this.upca=!0,this.upce=!0,this.extensions="AllowAny",void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.ean8&&(this.ean8=t.ean8),void 0!==t.ean13&&(this.ean13=t.ean13),void 0!==t.upca&&(this.upca=t.upca),void 0!==t.upce&&(this.upce=t.upce),void 0!==t.extensions&&(this.extensions=t.extensions)}}class y extends s.a{constructor(t={}){super(),this._type="PharmaCodeConfig",this.minimum1DQuietZoneSize=6,this.regexFilter="",this.minimumValue=16,this.allowNarrowBarsOnly=!1,this.allowWideBarsOnly=!1,void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimumValue&&(this.minimumValue=t.minimumValue),void 0!==t.allowNarrowBarsOnly&&(this.allowNarrowBarsOnly=t.allowNarrowBarsOnly),void 0!==t.allowWideBarsOnly&&(this.allowWideBarsOnly=t.allowWideBarsOnly)}}!function(t){t.From=function(t){const e=t._type;switch(e){case"AztecConfig":return new C(t);case"QRCodeConfig":return new S(t);case"PDF417Config":return new w(t);case"MicroPDF417Config":return new x(t);case"DataMatrixConfig":return new E(t);case"MaxiCodeConfig":return new L(t);default:throw`Unknown child class name: ${e}`}}}(r||(r={}));class C extends s.a{constructor(t={}){super(),this._type="AztecConfig",this.regexFilter="",this.gs1Handling="PARSE",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling)}}class S extends s.a{constructor(t={}){super(),this._type="QRCodeConfig",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,this.qr=!0,this.microQr=!1,this.rmqr=!1,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode),void 0!==t.qr&&(this.qr=t.qr),void 0!==t.microQr&&(this.microQr=t.microQr),void 0!==t.rmqr&&(this.rmqr=t.rmqr)}}class w extends s.a{constructor(t={}){super(),this._type="PDF417Config",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode)}}class x extends s.a{constructor(t={}){super(),this._type="MicroPDF417Config",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode)}}class E extends s.a{constructor(t={}){super(),this._type="DataMatrixConfig",this.regexFilter="",this.gs1Handling="PARSE",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling)}}class L extends s.a{constructor(t={}){super(),this._type="MaxiCodeConfig",this.regexFilter="",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter)}}!function(t){t.From=function(t){const e=t._type;switch(e){case"AustraliaPostConfig":return new _(t);case"JapanPostConfig":return new O(t);case"RoyalMailConfig":return new T(t);case"RoyalTNTPostConfig":return new k(t);case"USPSIntelligentMailConfig":return new D(t);case"PharmaCodeTwoTrackConfig":return new P(t);default:throw`Unknown child class name: ${e}`}}}(a||(a={}));class _ extends s.a{constructor(t={}){super(),this._type="AustraliaPostConfig",this.regexFilter="",this.australiaPostCustomerFormat="ALPHA_NUMERIC",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.australiaPostCustomerFormat&&(this.australiaPostCustomerFormat=t.australiaPostCustomerFormat)}}class O extends s.a{constructor(t={}){super(),this._type="JapanPostConfig",this.regexFilter="",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter)}}class T extends s.a{constructor(t={}){super(),this._type="RoyalMailConfig",this.regexFilter="",this.stripCheckDigits=!1,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits)}}class k extends s.a{constructor(t={}){super(),this._type="RoyalTNTPostConfig",this.regexFilter="",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter)}}class D extends s.a{constructor(t={}){super(),this._type="USPSIntelligentMailConfig",this.regexFilter="",void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter)}}class P extends s.a{constructor(t={}){super(),this._type="PharmaCodeTwoTrackConfig",this.regexFilter="",this.minimumValue=364,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimumValue&&(this.minimumValue=t.minimumValue)}}class B extends s.a{constructor(t={}){super(),this._type="GS1CompositeConfig",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.gs1Handling="PARSE",this.strictMode=!0,void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode)}}class R extends s.a{constructor(t={}){super(),this._type="GroupOneDConfig",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["CODABAR","CODE_11","CODE_25","CODE_32","CODE_39","CODE_93","CODE_128","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_8","EAN_13","IATA_2_OF_5","INDUSTRIAL_2_OF_5","ITF","MSI_PLESSEY","PHARMA_CODE","PZN","UPC_A","UPC_E"],void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode),void 0!==t.formats&&(this.formats=t.formats.map((t=>t)))}}class I extends s.a{constructor(t={}){super(),this._type="GroupTwoDConfig",this.regexFilter="",this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","DATA_MATRIX","MAXICODE","MICRO_QR_CODE","MICRO_PDF_417","PDF_417","QR_CODE","RMQR_CODE"],void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode),void 0!==t.formats&&(this.formats=t.formats.map((t=>t)))}}class F extends s.a{constructor(t={}){super(),this._type="GroupFourStateConfig",this.regexFilter="",this.formats=["AUSTRALIA_POST","JAPAN_POST","ROYAL_MAIL","ROYAL_TNT_POST","USPS_INTELLIGENT_MAIL"],void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.formats&&(this.formats=t.formats.map((t=>t)))}}class W extends s.a{constructor(t={}){super(),this._type="GroupCommonConfig",this.regexFilter="",this.minimum1DQuietZoneSize=6,this.stripCheckDigits=!1,this.minimumTextLength=0,this.maximumTextLength=0,this.gs1Handling="PARSE",this.strictMode=!0,this.formats=["AZTEC","CODABAR","CODE_39","CODE_93","CODE_128","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","ITF","MICRO_QR_CODE","PDF_417","QR_CODE","UPC_A","UPC_E"],void 0!==t.regexFilter&&(this.regexFilter=t.regexFilter),void 0!==t.minimum1DQuietZoneSize&&(this.minimum1DQuietZoneSize=t.minimum1DQuietZoneSize),void 0!==t.stripCheckDigits&&(this.stripCheckDigits=t.stripCheckDigits),void 0!==t.minimumTextLength&&(this.minimumTextLength=t.minimumTextLength),void 0!==t.maximumTextLength&&(this.maximumTextLength=t.maximumTextLength),void 0!==t.gs1Handling&&(this.gs1Handling=t.gs1Handling),void 0!==t.strictMode&&(this.strictMode=t.strictMode),void 0!==t.formats&&(this.formats=t.formats.map((t=>t)))}}},function(t,e,n){"use strict";(function(t){function i(t,e=!1){const n=[];if(e)return n;return function t(e){if(e)if(e.constructor===ImageData)n.push(e.data.buffer);else if(e.constructor===ArrayBuffer)n.push(e);else if(ArrayBuffer.isView(e))n.push(e.buffer);else if(Array.isArray(e))for(let n=0;n<e.length;++n)t(e[n]);else if(e.constructor===Object)for(const n in e)e.hasOwnProperty(n)&&t(e[n])}(t),n}function o(t){return t.startsWith("http:")||t.startsWith("https:")}function r(){if("undefined"!=typeof t&&"undefined"!=typeof t.versions&&"undefined"!=typeof t.versions.node)return!1;if(/(iPad|iPhone|iPod)/g.test(navigator.userAgent))return!1;try{return(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(t){return!1}}function a(t){const{allowSimd:e=!0,allowThreads:n=!0}=t||{};let i="";if(e&&function(){try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]))}catch(t){return!1}}()){i+="-simd";n&&r()&&(i+="-threads")}return i}n.d(e,"b",(function(){return i})),n.d(e,"d",(function(){return o})),n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return a}))}).call(this,n(42))},function(t,e,n){"use strict";n.r(e),n.d(e,"BarcodeItem",(function(){return a})),n.d(e,"BarcodeDocumentFormats",(function(){return s})),n.d(e,"BarcodeRecognizerParameters",(function(){return l})),n.d(e,"BarcodeScannerResult",(function(){return c}));var i=n(32),o=n(4),r=n(19);class a extends o.a{constructor(t={}){if(super(),this.format="NONE",this.isUpsideDown=!1,this.sourceImage=null,this.isGS1Message=!1,this.isGS1CompositePart=!1,this.dataBarStackSize=1,void 0===t.text)throw new Error("text must be present in constructor argument");if(this.text=t.text,void 0!==t.format&&(this.format=t.format),void 0===t.quad)throw new Error("quad must be present in constructor argument");if(this.quad=t.quad.map((t=>({x:t.x,y:t.y}))),void 0!==t.isUpsideDown&&(this.isUpsideDown=t.isUpsideDown),void 0!==t.sourceImage&&(this.sourceImage=null!=t.sourceImage?t.sourceImage:null),void 0===t.rawBytes)throw new Error("rawBytes must be present in constructor argument");if(this.rawBytes=t.rawBytes,void 0===t.upcEanExtension)throw new Error("upcEanExtension must be present in constructor argument");if(this.upcEanExtension=t.upcEanExtension,void 0!==t.isGS1Message&&(this.isGS1Message=t.isGS1Message),void 0!==t.isGS1CompositePart&&(this.isGS1CompositePart=t.isGS1CompositePart),void 0!==t.dataBarStackSize&&(this.dataBarStackSize=t.dataBarStackSize),void 0===t.parsedDocument)throw new Error("parsedDocument must be present in constructor argument");this.parsedDocument=null!=t.parsedDocument?new r.GenericDocument(t.parsedDocument):null}}class s extends o.a{constructor(t={}){super()}}!function(t){t.all=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],t.documentBarcodeFormats={AAMVA:["PDF_417"],ID_CARD_PDF_417:["PDF_417"],SEPA:["QR_CODE"],MEDICAL_CERTIFICATE:["PDF_417"],DE_MEDICAL_PLAN:["DATA_MATRIX"],BOARDING_PASS:["PDF_417","AZTEC"],VCARD:["QR_CODE"],SWISS_QR:["QR_CODE"],GS1:["CODE_128","AZTEC","DATA_MATRIX","DATABAR","DATABAR_EXPANDED","DATABAR_LIMITED","EAN_13","EAN_8","GS1_COMPOSITE","ITF","MICRO_PDF_417","PDF_417","QR_CODE","UPC_A","UPC_E"],HIBC:["CODE_39","CODE_128","AZTEC","DATA_MATRIX","MICRO_PDF_417","PDF_417","QR_CODE"]}}(s||(s={}));class l extends o.a{constructor(t={}){super(),this.configurators=[new i.GroupCommonConfig({})],this.engineMode="NEXT_GEN_LOW_POWER",this.live=!0,this.acceptedDocumentFormats=["AAMVA","BOARDING_PASS","DE_MEDICAL_PLAN","MEDICAL_CERTIFICATE","ID_CARD_PDF_417","SEPA","SWISS_QR","VCARD","GS1","HIBC"],this.returnBarcodeImage=!0,void 0!==t.configurators&&(this.configurators=t.configurators.map((t=>i.BarcodeConfig.From(t)))),void 0!==t.engineMode&&(this.engineMode=t.engineMode),void 0!==t.live&&(this.live=t.live),void 0!==t.acceptedDocumentFormats&&(this.acceptedDocumentFormats=t.acceptedDocumentFormats.map((t=>t))),void 0!==t.returnBarcodeImage&&(this.returnBarcodeImage=t.returnBarcodeImage)}}class c extends o.a{constructor(t={}){if(super(),void 0===t.barcodes)throw new Error("barcodes must be present in constructor argument");if(this.barcodes=t.barcodes.map((t=>new a(t))),void 0===t.success)throw new Error("success must be present in constructor argument");this.success=t.success}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));class i{constructor(){this.values=new Map}}i.INSTANCE=new i},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));class i{constructor(){this.container=void 0,this.containerId=void 0}static mapValues(t,e,n){Object.keys(t).forEach((i=>{(null==n?void 0:n.includes(i))||(e[i]=t[i])}))}static mapValuesDeep(t,e){const n=t=>t&&"object"==typeof t&&!Array.isArray(t);Object.keys(t).forEach((o=>{o in e&&n(t[o])&&n(e[o])?i.mapValuesDeep(t[o],e[o]):e[o]=t[o]}))}static _fromJson(t,e){return this.mapValuesDeep(e,t),t}}},function(t,e,n){"use strict";var i,o=function(){return"undefined"==typeof i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},r=function(){var t={};return function(e){if("undefined"==typeof t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),a=[];function s(t){for(var e=-1,n=0;n<a.length;n++)if(a[n].identifier===t){e=n;break}return e}function l(t,e){for(var n={},i=[],o=0;o<t.length;o++){var r=t[o],l=e.base?r[0]+e.base:r[0],c=n[l]||0,u="".concat(l," ").concat(c);n[l]=c+1;var d=s(u),h={css:r[1],media:r[2],sourceMap:r[3]};-1!==d?(a[d].references++,a[d].updater(h)):a.push({identifier:u,updater:g(h,e),references:1}),i.push(u)}return i}function c(t){var e=document.createElement("style"),i=t.attributes||{};if("undefined"==typeof i.nonce){var o=n.nc;o&&(i.nonce=o)}if(Object.keys(i).forEach((function(t){e.setAttribute(t,i[t])})),"function"==typeof t.insert)t.insert(e);else{var a=r(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var u,d=(u=[],function(t,e){return u[t]=e,u.filter(Boolean).join("\n")});function h(t,e,n,i){var o=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(t.styleSheet)t.styleSheet.cssText=d(e,o);else{var r=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(r,a[e]):t.appendChild(r)}}function p(t,e,n){var i=n.css,o=n.media,r=n.sourceMap;if(o?t.setAttribute("media",o):t.removeAttribute("media"),r&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var f=null,m=0;function g(t,e){var n,i,o;if(e.singleton){var r=m++;n=f||(f=c(e)),i=h.bind(null,n,r,!1),o=h.bind(null,n,r,!0)}else n=c(e),i=p.bind(null,n,e),o=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else o()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=o());var n=l(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var i=0;i<n.length;i++){var o=s(n[i]);a[o].references--}for(var r=l(t,e),c=0;c<n.length;c++){var u=s(n[c]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}n=r}}}},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(i)for(var r=0;r<this.length;r++){var a=this[r][0];null!=a&&(o[a]=!0)}for(var s=0;s<t.length;s++){var l=[].concat(t[s]);i&&o[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},function(t,e,n){"use strict";var i="6.0.0-dev.3";class o{}o.VERSION=i,o.CDN_PATH="https://cdn.jsdelivr.net/npm/scanbot-web-sdk@6.0.0-dev.3/bundle/",o.DEFAULT_WASM_FOLDER="bin/complete/",o.BUILD_WITH_UI=!1;var r=n(33);class a{constructor(t,e){this.errorInWorker=null,this.createProxy=t=>new Proxy({},{get:(e,n,i)=>(...e)=>this.post(n,e,t)}),this.handleUnrecoverableError=t=>{this.errorInWorker=t;for(const e in this.continuations)this.continuations[e].reject(t),delete this.continuations[e]},this.copyArgs=this.createProxy("copy"),this.transferArgs=this.createProxy("transfer");const{requestSuffix:n=""}=e||{},i=Object(r.c)(e),o=`${t}${t.endsWith("/")?"":"/"}ScanbotSDK.Core${i}.js${n}`;if(Object(r.d)(o)){const t=new Blob([`importScripts("${o}")`]);this.instance=new Worker(URL.createObjectURL(t))}else this.instance=new Worker(o);this.continuations={},this.nextTicketId=1,this.instance.onmessage=t=>{const{log:e,logError:n}=t.data;if(e)return void console.log(...e);if(n)return void console.error(...n);const{ticket:i,result:o,recoverableError:r,unrecoverableError:a}=t.data,s=this.continuations[i];if(!s)return;const{resolve:l,reject:c}=s;delete this.continuations[i],a?(c(a),this.handleUnrecoverableError(a)):r?c(r):l(o)},this.instance.onerror=t=>{this.handleUnrecoverableError(t.error)}}post(t,e,n){return this.errorInWorker?Promise.reject(this.errorInWorker):new Promise(((i,o)=>{const a=Object(r.b)(e,"copy"==n),s=this.nextTicketId++;this.continuations[s]={resolve:i,reject:o},this.instance.postMessage({command:t,args:e,ticket:s},a)}))}destroy(){this.instance.terminate()}}var s=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class l extends Error{}class c extends Error{}class u{constructor(t,e,n){this.copyArgs=this.createProxy("copy"),this.transferArgs=this.createProxy("transfer"),t||(t=o.CDN_PATH+o.DEFAULT_WASM_FOLDER),this.core=new a(t,e),this.coreInitializationSuccessful=(()=>s(this,void 0,void 0,(function*(){if(yield this.core.copyArgs.initialize(...n)){let e;try{e=yield this.core.copyArgs.version()}catch(t){e="Error"}const n=o.VERSION;return e!==n?new c(`Version mismatch! \nVersion of ScanbotSDK.(ui2.)min.js is "${n}" \nbut the version of the loaded ScanbotSDK.Core*.js file is "${e}". \nThe ScanbotSDK.Core*.js file was loaded from ${t}.`):"OK"}return new l("WASM not initialized successfully. This can be due to an invalid license or problems loading the WASM file. Please check the console for more information.")})))()}awaitInitialized(){return s(this,void 0,void 0,(function*(){yield this.getCoreForCommand()}))}createProxy(t){return new Proxy({},{get:(e,n,i)=>(...e)=>s(this,void 0,void 0,(function*(){const i=yield this.getCoreForCommand(n),o="copy"===t?i.copyArgs:i.transferArgs;return yield o[n](...e)}))})}getCoreForCommand(t=""){return s(this,void 0,void 0,(function*(){const e=yield this.coreInitializationSuccessful;if("OK"===e||"getLicenseInfo"===t&&e instanceof l)return this.core;throw e}))}destroy(){this.core.destroy(),this.core=void 0}}class d{isValid(){return"Okay"===this.status||"Trial"===this.status}static fromJson(t){const e=new d;return e.status=t.licenseStatus,e.description=t.description,e}}var h=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class p{constructor(t,e){this._sdk=t,this._pdfOperation=e}addPage(t,e="COPY_IMAGE"){return h(this,void 0,void 0,(function*(){const n=this._sdk.getBridge(e);yield n.addPageToPdf(this._pdfOperation,t)}))}complete(){return h(this,void 0,void 0,(function*(){return yield this._sdk.bridge.copyArgs.completePdf(this._pdfOperation)}))}}var f=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class m{constructor(t,e){this._sdk=t,this._tiffOperation=e}addPage(t,e={}){return f(this,void 0,void 0,(function*(){const{binarize:n="IF_BINARIZATION_FILTER_SET",consumeImage:i="COPY_IMAGE"}=e,o=this._sdk.getBridge(i);yield o.addPageToTiff(this._tiffOperation,t,n)}))}complete(){return f(this,void 0,void 0,(function*(){return yield this._sdk.bridge.copyArgs.completeTiff(this._tiffOperation)}))}}var g=n(21);class v{static toPixelSize(t){return t+"px"}static containsString(t,e){return!!t&&-1!==t.indexOf(e)}static copy(t){return JSON.parse(JSON.stringify(t))}static getProperty(t,e){if(t&&t.hasOwnProperty(e))return t[e]}static uuid(){let t="";const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=e.length;for(let i=0;i<5;i++)t+=e.charAt(Math.floor(Math.random()*n));return t}}var A=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class b{static toDataUrl(t){return new Promise(((e,n)=>{const i=new Blob([t],{type:"image/jpeg"}),o=new FileReader;o.onload=()=>e(o.result),o.onerror=()=>n(o.error),o.readAsDataURL(i)}))}static getObjectFitSize(t,e,n=!0){const i=e.width/e.height,o=t.width/t.height;let r=0,a=0;(n?i>o:i<o)?(r=t.width,a=r/i):(a=t.height,r=a*i);const s=(t.width-r)/2,l=(t.height-a)/2;return new g.a(s,l,r,a)}static loadFromUrl(t){return new Promise(((e,n)=>{const i=document.createElement("img");i.src=t,i.onload=()=>A(this,void 0,void 0,(function*(){const t=document.createElement("canvas");t.width=i.width,t.height=i.height;const n=t.getContext("2d");n.drawImage(i,0,0);const o=n.getImageData(0,0,i.width,i.height);e(o)})),i.onerror=n}))}static saveImageData(t){const e=this.createImageDataCanvas(t),n=" ("+t.width+"x"+t.height+")";e.toBlob((t=>this.saveBlob(t,v.uuid()+n+".png")))}static createImageDataCanvas(t){const e=document.createElement("canvas");return e.className="scanbot-sdk-canvas-element",e.width=t.width,e.height=t.height,e.getContext("2d").putImageData(t,0,0),e}static saveBlob(t,e){let n=document.createElement("a");n.setAttribute("download",e);let i=URL.createObjectURL(t);n.setAttribute("href",i),n.click()}static convertImageDataWrapperToImageData(t){if(t)return new ImageData(t.data,t.width,t.height)}static wrapperToBase64(t){return b.createImageDataCanvas(b.convertImageDataWrapperToImageData(t)).toDataURL("image/png")}static toBase64(t){return A(this,void 0,void 0,(function*(){const e=yield new Promise((e=>{const n=new FileReader;n.onload=()=>e(n.result),n.readAsDataURL(new Blob([t]))}));return e.slice(e.indexOf(",")+1)}))}}class y{saveImageAsJpeg(t,e){if(!t||0===t.length)return void console.log("Data cannot be null or empty");e||(e=v.uuid()+".jpeg");let n=new Blob([t],{type:"image/jpeg"});b.saveBlob(n,e)}isCameraSupported(){return!!navigator.mediaDevices}flash(){let t=this.findFlashElement();t.style.display="block",this.animateFlashOpacity("0.5",(()=>{this.animateFlashOpacity("0.0",(()=>{t.style.opacity="1.0",t.style.display="none"}))}))}findFlashElement(){return this.getOrCreateElement("flash",{position:"fixed",top:"0",left:"0",width:"100%",height:"100%","background-color":"#fff",display:"none","z-index":"5000"})}animateFlashOpacity(t,e){const n=this.getElementByClassName("flash");setTimeout((()=>{n.style.opacity=t,e()}),150)}getOrCreateElement(t,e){let n=this.getElementByClassName(t);return n||(this.createElement(t,e),n=this.getElementByClassName(t)),n}createElement(t,e){let n=document.createElement("div");n.className=t,n.style.cssText=this.cssToString(e),document.body.append(n)}cssToString(t){let e="";return Object.keys(t).forEach((n=>{e+=n+":"+t[n]+";"})),e}getElementByClassName(t){const e=document.getElementsByClassName(t);if(0!==e.length)return e[0]}}var C=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class S{constructor(t,e){this._sdk=t,this._mrzRecognizerToken=e}recognize(t,e="COPY_IMAGE"){return C(this,void 0,void 0,(function*(){const n=this._sdk.getBridge(e);return yield n.recognizeMRZ(yield this._mrzRecognizerToken,t)}))}recognizeURL(t){return C(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),i=document.createElement("img");i.src=t,i.onload=()=>C(this,void 0,void 0,(function*(){n.width=i.width,n.height=i.height;const t=n.getContext("2d");t.drawImage(i,0,0);const o=t.getImageData(0,0,i.width,i.height),r=yield this.recognize(o);e(r||void 0)}))}))}))}release(){return C(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.releaseObject(yield this._mrzRecognizerToken)}))}}var w=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class x{constructor(t,e){this._sdk=t,this._OcrEngineToken=e}performOcr(t,e="COPY_IMAGE"){return w(this,void 0,void 0,(function*(){const n=this._sdk.getBridge(e);return yield n.performOcr(this._OcrEngineToken,t)}))}recognizeURL(t){return w(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),i=document.createElement("img");i.src=t,i.onload=()=>w(this,void 0,void 0,(function*(){n.width=i.width,n.height=i.height;const t=n.getContext("2d");t.drawImage(i,0,0);const o=t.getImageData(0,0,i.width,i.height),r=yield this.performOcr(o);e(r)}))}))}))}release(){return w(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.releaseObject(this._OcrEngineToken)}))}}var E=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class L{constructor(t,e){this._sdk=t,this._textDataScannerToken=e}recognize(t,e="COPY_IMAGE"){return E(this,void 0,void 0,(function*(){const n=this._sdk.getBridge(e);return yield n.recognizeTextLine(yield this._textDataScannerToken,t)}))}cleanRecognitionQueue(){return E(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.cleanTextLineRecognitionQueue(yield this._textDataScannerToken)}))}recognizeURL(t){return E(this,void 0,void 0,(function*(){return new Promise((e=>{const n=document.createElement("canvas"),i=document.createElement("img");i.src=t,i.onload=()=>E(this,void 0,void 0,(function*(){n.width=i.width,n.height=i.height;const t=n.getContext("2d");t.drawImage(i,0,0);const o=t.getImageData(0,0,i.width,i.height),r=yield this.recognize(o,"CONSUME_IMAGE");r&&e(r)}))}))}))}release(){return E(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.releaseObject(yield this._textDataScannerToken)}))}}var _=n(14),O=n(22),T=n(9);class k extends O.a{constructor(){super(_.a.DEFAULT_VIDEO_RESOLUTION_HD),this.ocrConfiguration=new T.GenericTextLineScannerTypes.ScannerConfiguration,this.onTextDetected=function(t){},this.finder.aspectRatio=new T.Geometry.AspectRatio({width:6,height:1}),this.userGuidance.title.text="Please hold the device over the text to start scanning"}static fromJson(t){const e=new k;return this.mapFinderConfiguration(e,t),this._fromJson(e,t)}}class D extends O.a{constructor(){super(_.a.DEFAULT_VIDEO_RESOLUTION_HD),this.ocrConfiguration=new T.GenericTextLineScannerTypes.ScannerConfiguration,this.onTextDetected=function(t){},this.finder.aspectRatio=new T.Geometry.AspectRatio({width:6,height:1}),this.userGuidance.title.text="Please hold the device over the vehicle identification number to start scanning"}static fromJson(t){const e=new D;return this.mapFinderConfiguration(e,t),this._fromJson(e,t)}}class P extends Error{constructor(t){super(t.description),this.name="LicenseError"}}class B{static throwIfMissingBuffer(t){B.throwIfMissing(t,"ImageBuffer may not be null")}static throwIfMissing(t,e){if(!t)throw new Error(e)}}var R=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class I{constructor(t,e){this._sdk=t,this._token=e}analyze(t,e="COPY_IMAGE"){return R(this,void 0,void 0,(function*(){B.throwIfMissingBuffer(t);const n=this._sdk.getBridge(e);return yield n.documentQualityAnalyzerAnalyze(this._token,t)}))}release(){return R(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.releaseObject(this._token)}))}}var F=n(16),W=n(0),M=n(43),j=n(13),z=n(3),N=n.n(z),V=n(5);const U="var(--1-sb-dvh, 1vh)";function H(){const t=Object(W.useMemo)((()=>{var t,e;return null===(e=null===(t=null===window||void 0===window?void 0:window.CSS)||void 0===t?void 0:t.supports)||void 0===e?void 0:e.call(t,"height: 100dvh")}),[]),e=()=>{var e=t?"1dvh":window.innerHeight/100+"px";document.documentElement.style.setProperty("--1-sb-dvh",e)};return Object(W.useEffect)((()=>{if(e(),!t)return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}})),null}var G=n(30),Q=n(11),Y=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n};function Z(t){const e=Object(W.useContext)(V.a).getColorValue,{styleConfig:n}=t,i=Y(t,["styleConfig"]),o=Object.assign(Object.assign({},t.style),{backgroundColor:e(n.fillColor),borderColor:e(n.strokeColor),borderWidth:n.strokeWidth,borderRadius:n.cornerRadius,borderStyle:"solid"});return W.default.createElement(z.Box,Object.assign({},i,{style:o}))}function q(t){var e;return t.visible?W.default.createElement(z.Button,{variant:"text",onClick:t.onClick,sx:Object.assign(Object.assign({flex:1},Object(Q.b)(t.foreground)),{textTransform:"none",fontSize:18,"&:hover, &:focus, &:active, &":{outline:"none",backgroundColor:"transparent"},px:0}),disableRipple:!0},W.default.createElement(Z,{styleConfig:Object.assign(Object.assign({},t.background),{cornerRadius:4}),sx:{borderStyle:"solid",px:"8px"}},null!==(e=t.icon)&&void 0!==e?e:null,V.b.getLocalizedBarcodeText(t.text))):W.default.createElement("div",{style:{display:"flex",flex:1}})}G.a;const X=W.default.createContext(null);function $(t){const e=t.mode,n="HIDDEN"===e?0:48;Object(W.useEffect)((()=>{if("HIDDEN"===e)return;const n=document.createElement("meta");return n.name="theme-color",n.content=V.b.getColorValue(t.backgroundColor),document.head.appendChild(n),()=>{document.head.removeChild(n)}}),[e]);const i="SOLID"===e?0:n,o={height:n,remainingVisibleBodyHeight:"SOLID"===e?`calc(100 * ${U} - ${n}px)`:`calc(100 * ${U})`,minTopPaddingForContent:i,minTopPaddingForViewFinder:10+i},r="SOLID"===e?{backgroundColor:V.b.getColorValue(t.backgroundColor)}:{backgroundImage:`linear-gradient(to bottom, ${V.b.getColorValue(t.backgroundColor)}, #00000000)`,position:"absolute",backgroundColor:"transparent"};return W.default.createElement(W.default.Fragment,null,"HIDDEN"!==e&&W.default.createElement(z.AppBar,{position:"static",elevation:0,sx:Object.assign({zIndex:1e5,height:n,minHeight:n},r)},W.default.createElement(z.Toolbar,{variant:"dense",sx:{height:n,minHeight:n}},W.default.createElement(z.Box,{sx:{flex:1}},t.cancelButton.visible&&W.default.createElement(W.default.Fragment,null,W.default.createElement(q,Object.assign({onClick:t.onBackPress,icon:t.cancelButton.foreground.iconVisible&&W.default.createElement(N.a,{sx:{fontSize:12,mr:"5px"}})},t.cancelButton)))),W.default.createElement(z.Box,null,W.default.createElement(z.Typography,{variant:"h6",noWrap:!0,component:"div",fontSize:18,fontWeight:600},W.default.createElement(Q.a,{config:t.title}))),W.default.createElement(z.Box,{sx:{flex:1}}))),W.default.createElement(X.Provider,{value:o},t.children))}function K(t){return{textOverflow:"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`,overflow:"hidden",whiteSpace:t>1?"normal":"nowrap",display:t>1?"-webkit-box":"block"}}function J(t){if(t.loading)return W.default.createElement(z.Skeleton,{variant:"rounded",width:t.imageSize,height:t.imageSize,style:{borderRadius:8}});if(null===t.data.barcodeImage){const e={width:t.imageSize,height:t.imageSize,backgroundColor:"#E0E0E0",borderRadius:3};return W.default.createElement(z.Box,{sx:e})}const e={width:t.imageSize,height:t.imageSize,borderRadius:8};return W.default.createElement("img",{src:t.data.barcodeImage,alt:t.data.title,style:e})}function tt(t){var e,n;const i=(null===(e=t.barcodeMappedData)||void 0===e?void 0:e.state)||"LOADING",o=(null===(n=t.barcodeMappedData)||void 0===n?void 0:n.value)||{title:"",subtitle:"",barcodeImage:""},r=!t||"LOADED"!==i,a=t.imageSize,s=t.barcodeTitle.visible||t.barcodeSubtitle.visible||t.counterForm,l=t.counterForm&&{"&:hover, &:focus, &:active, &":{borderColor:V.b.getColorValue(t.counterForm.manualCountOutlineColor),backgroundColor:"transparent"}};return W.default.createElement(z.Box,{sx:{display:"flex"},"data-sb-barcode-info":"1"},t.barcodeImageVisible&&W.default.createElement(z.Box,{sx:{pr:s?"16px":0,display:"flex",alignItems:"center",justifyContent:"center"}},W.default.createElement(J,{data:o,imageSize:a,loading:r})),s&&W.default.createElement(z.Box,{sx:{flex:1,display:"flex",flexDirection:"column",verticalAlign:"middle",justifyContent:"center",m:0,p:0,minWidth:0}},t.barcodeTitle.visible&&W.default.createElement(z.Box,{display:r?"block":"flex",sx:{alignItems:"center"}},W.default.createElement(z.Typography,{fontSize:16,fontWeight:"bold",sx:Object.assign(Object.assign({},K(t.maxNumberOfTitleLines)),Object(Q.b)(t.barcodeTitle))},r?W.default.createElement(z.Skeleton,{variant:"text"}):o.title),t.displayRightArrow&&!r&&W.default.createElement(N.a,{sx:{fontSize:16,fontWeight:"bold",color:V.b.getColorValue(t.barcodeTitle.color)}})),t.barcodeSubtitle.visible&&W.default.createElement(z.Typography,{fontSize:14,fontWeight:400,sx:Object.assign(Object.assign({},K(t.maxNumberOfSubtitleLines)),Object(Q.b)(t.barcodeSubtitle))},r?W.default.createElement(z.Skeleton,{variant:"text"}):o.subtitle),t.counterForm&&W.default.createElement(z.ButtonGroup,{variant:"outlined"},W.default.createElement(z.Button,{disabled:!t.counterForm.removeButtonEnabled,sx:l,style:{opacity:t.counterForm.removeButtonEnabled?1:.3},onClick:()=>t.counterForm.setCounter(t.counterForm.counter-1),disableRipple:!0},W.default.createElement(N.a,{sx:{color:V.b.getColorValue(t.counterForm.manualCountChangeColor)}})),W.default.createElement(z.Button,{sx:Object.assign(Object.assign({},l),{color:V.b.getColorValue(t.counterForm.manualCountChangeColor),fontWeight:"bold",fontSize:16}),onClick:t.counterForm.onNumberClick,disableRipple:!0},t.counterForm.counter),W.default.createElement(z.Button,{disabled:!t.counterForm.addButtonEnabled,sx:l,style:{opacity:t.counterForm.addButtonEnabled?1:.3},onClick:()=>t.counterForm.setCounter(t.counterForm.counter+1),disableRipple:!0},W.default.createElement(N.a,{sx:{color:V.b.getColorValue(t.counterForm.manualCountChangeColor)}})))))}j.ButtonConfiguration;function et(t){const e=Object(W.useContext)(V.a).getColorValue;return t.visible?W.default.createElement(z.Button,{onClick:t.onClick,type:t.type,sx:Object.assign(Object.assign({},t.style),{"&:hover, &:focus, &:active, &":{borderStyle:"solid",borderColor:e(t.background.strokeColor),borderWidth:t.background.strokeWidth,backgroundColor:e(t.background.fillColor),textTransform:"none",outline:"none"}}),disableRipple:!0},t.foreground.iconVisible&&t.icon&&W.default.createElement(t.icon,{sx:{color:e(t.foreground.color),pr:2}}),W.default.createElement(Q.a,{config:{visible:!0,text:t.text,color:t.foreground.color,useShadow:t.foreground.useShadow}})):null}var nt=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n};function it(t){var e,{modalOverlayColor:n}=t,i=nt(t,["modalOverlayColor"]);const o={backdrop:{style:{backgroundColor:V.b.getColorValue(n)}}},r=Object.assign(Object.assign({},i.PaperProps),{sx:Object.assign(Object.assign({},null===(e=i.PaperProps)||void 0===e?void 0:e.sx),{maxWidth:400})});return W.default.createElement(z.Dialog,Object.assign({},i,{componentsProps:o,PaperProps:r}))}function ot(t){const e=Object(W.useContext)(V.a).getColorValue,n=!t.barcodeMappedData||"LOADED"!==t.barcodeMappedData.state,i={backgroundColor:e(n?t.sheetColorLoading:t.sheetColorLoaded)},[o,r]=W.default.useState(),a=Object(W.useRef)((()=>{}));Object(W.useEffect)((()=>{t.open&&r(!1)}),[t.open]);const s=()=>{a.current=t.handleCancel,r(!0)};return W.default.createElement(it,{modalOverlayColor:t.modalOverlayColor,open:t.open&&!o,fullWidth:!0,TransitionProps:{onExited:()=>{o&&a.current()}},onClose:()=>{n||s()}},W.default.createElement(z.DialogContent,{style:i},W.default.createElement(tt,Object.assign({},t,{maxNumberOfTitleLines:2,maxNumberOfSubtitleLines:1,imageSize:68}))),W.default.createElement(z.DialogActions,{style:i},W.default.createElement(N.a,{container:!0,spacing:2,sx:{overflow:"hidden"}},W.default.createElement(N.a,{item:!0,xs:12},W.default.createElement(N.a,{color:e(t.dividerColor)})),n?W.default.createElement(N.a,{item:!0,xs:12,sx:{textAlign:"center"}},W.default.createElement(z.Box,null,W.default.createElement(z.CircularProgress,{sx:{color:e(t.loadingMessage.color),verticalAlign:"middle",mr:2}}),W.default.createElement(Q.a,{config:t.loadingMessage}))):W.default.createElement(W.default.Fragment,null,W.default.createElement(N.a,{item:!0,xs:6},W.default.createElement(et,Object.assign({style:{width:"100%"},onClick:s},t.cancelButton))),W.default.createElement(N.a,{item:!0,xs:6},W.default.createElement(et,Object.assign({style:{width:"100%"},onClick:()=>{a.current=t.handleSubmit,r(!0)}},t.submitButton)))))))}var rt=n(1);rt.h;function at(t){if(!1===t.visible)return null;const e={backgroundColor:t.active?V.b.getColorValue(t.activeBackgroundColor):V.b.getColorValue(t.backgroundColor),color:t.active?V.b.getColorValue(t.activeForegroundColor):V.b.getColorValue(t.foregroundColor)};return W.default.createElement(z.IconButton,{sx:Object.assign(Object.assign({},e),{"&:hover, &:focus":Object.assign({outline:"none"},e),width:48,height:48}),onClick:t.onClick},t.text&&W.default.createElement("span",{style:{fontSize:15}},V.b.getLocalizedBarcodeText(t.text)),t.icon&&W.default.createElement(t.icon,{style:{padding:7}}))}var st=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class lt{constructor(){this.audioFile=new Audio}initialize(t){return st(this,void 0,void 0,(function*(){t.successBeepEnabled&&(this.audioFile.src="data:audio/mp4;base64,AAAAHGZ0eXBNNEEgAAACAE00QSBpc29taXNvMgAAAAhmcmVlAAASCG1kYXQBQCKAo3/4hS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS7/8QpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpd+aIUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLwBQCKAo3/4hS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS7/8QpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpd+aIUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLwA6jQEQfEIQGIQaqctMIv9EpiYforpaDbT80WfPFRSswKfd8cy6kN/+IUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0u//EKWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaXfViFLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLwA6jQQpRY6EYNCcKDAqAAEUgC2wFy0kF7JTgecsqIp6pxd/lHO7kUuSCLFK6n2mPOKfj5aKhQPOaRtBEKFS85eIYbr71AGaAPJTSIHeIhXTcpA5i155UICz3nXk0Cz0A8QhxIhoqQIJ2Be9MIEiJ6GpuMa1fPXcJmIoxDUKpZuJozBa6iFmjy7O/genSlwPKL6xaiiL8Y1XtgBDY7ke/CAOoawOqmZm6suSVQPbxzaxZJpWFcWva4RqTil72HqDpc2N4eG3KA0JkU8G58RNabxVq9gSLwysPKIzL1fZVF1FQwllEs4YUKpPtoMw2VtepdbZHqGriAsZ5Lu154uiewW41szI4RHfpWOWSH7s1LAzlv/xClpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWl36AhS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0vAA6jQEYVEIDEQDEKCAYhAIXMdbaI5q82OvhmYS1FO11cD3Yt4EwZI+aTsqoctJJaN0FKvNqorQmK3SUWpNOtf+uKNIxX3xeTEq8LKb/8QpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpd/+IUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0u+GEKWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpeABMDQD6WqsfRABwAUSib4c3/4hS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS7/8QpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpd+EIUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS8AAAO4bW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAAAfgAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAiJ0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAAfgAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAH4AAAIAAABAAAAAAGabWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAAfQAAAF8BVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAABRW1pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABCXN0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAEAEAAAAAAfQAAAAAAAM2VzZHMAAAAAA4CAgCIAAQAEgICAFEAVAAAAAAH0AAAAvXkFgICAAhWIBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAAAUAAAQAAAAAAQAAA8AAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAYAAAABAAAAFHN0c3oAAAAAAAADAAAAAAYAAAAUc3RjbwAAAAAAAAABAAAALAAAABpzZ3BkAQAAAHJvbGwAAAACAAAAAf//AAAAHHNiZ3AAAAAAcm9sbAAAAAEAAAAGAAAAAQAAASJ1ZHRhAAABGm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAA7Wlsc3QAAAAzqW5hbQAAACtkYXRhAAAAAQAAAAAyNTAgTWlsbGlzZWNvbmRzIG9mIFNpbGVuY2UAAAApqUFSVAAAACFkYXRhAAAAAQAAAABBbmFyIFNvZnR3YXJlIExMQwAAAClhQVJUAAAAIWRhdGEAAAABAAAAAEFuYXIgU29mdHdhcmUgTExDAAAAI6lhbGIAAAAbZGF0YQAAAAEAAAAAQmxhbmsgQXVkaW8AAAAkqXRvbwAAABxkYXRhAAAAAQAAAABMYXZmNjAuMy4xMDAAAAAZY3BpbAAAABFkYXRhAAAAFQAAAAAA",yield this.play(),"MODERN_BEEP"===t.soundType&&(this.audioFile.src="data:audio/mp4;base64,AAAAHGZ0eXBNNEEgAAACAE00QSBpc29taXNvMgAAAAhmcmVlAAAEcm1kYXQBQCKAo30ghS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLwDmVAjh8QBrRiUH/88pKh3gJPmPt9t8oIUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLwDsl6UY83aVqFeq3aVmmYyFp70/kJT+A9hdePd7Z7aRSFKZBhCUP6E1rS/9+DhfmhvTknCnQzE+QHVPD6rhSIRpGIAFmBioF1XkxwAQjxKkQMc+qECgXnCAU1IcgpFDnWo02EdihsnrUx/1bJAUo+x6//p8VmoS0iuleHvPnKj9mjjHOoaDGI/s2DHcYI66Grp+5pezZuKJExJOzoyJRdmv6ltO6ibTdTDZ1YqLauKTebYOtpTWnh3/K3kBQmN3NsieqxzHeZKNiFphWuYSWMhaHIZRnRt6O/WzTXYFGrG0wBT54NCQ3wtSpqr5dHbQN2yY0jcckhLUieNtOSjS3u1NuMqWbOx1zHwlHfJKgI349OU9iZEzeN3rCVbBVdrdcAEW9Cm2Ji2FjQNkiFBViV6ofFsNVeVqpKgpsf3/iWtBG6cpMqFHjy2QhyBEnPtwTbWbm9b1u7frF3bnaVykqieEvTKfqnCYL2u4g1CLiQ4Zb8hkkTL9tnGmdMOeqIkUcHZ0zsspzvHOUXJTlssZTRjqcIsp514HJO9YhVRXALKaCRKQkbMEty3CstONNYzuhq57bbccc+/Pq22226ueWXLLbTTw4bFIoQoGWepZBRJWQFh4yui2+evKOqLp+rLKJ4LKcAtQ7XA0aLCyMRVDDOmuoYcnFEmIrpzmRQNQIJ5HWvOesgzjrK071chBhESdztJ0sMqhdAAyjegdEYPNyA4BCDQtLGRRKQQBQIhXYqGZ65Pu1S7XMxxVXEOWtJGMAARETyDKiMN4tsmFfcvmo+sHuHZrY196169rbT/sHFGNK1cnJrBK2vDu7b0AsBd9VaKrsNHL/KxFHm3Yma/+S365yvTF+abktGk7JSrS++mXLBw76AiuijMPpwzPoP4jNzZjI+R/p7zboMSKiFvZkMx8CDIPGB+K2Ee7XaOqAu8z6cWgazCp76DdzIwsmGw2TiczmQMAafEX0U6lQOAA6jQJAfCsBrSxVH+Hw8fPKIpB7JuhzAB/BwAAAw9tb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAATwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACOnRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAATwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAE4AAAgAAAEAAAAAAbJtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAVgFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAFdbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAAEhc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAQAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgABAASAgIAUQBUAAAAAARrvAAEa7wWAgIACEggGgICAAQIAAAAgc3R0cwAAAAAAAAACAAAABQAABAAAAAABAAABgAAAABxzdHNjAAAAAAAAAAEAAAABAAAABgAAAAEAAAAsc3RzegAAAAAAAAAAAAAABgAAALkAAAC6AAABIAAAAQAAAAC9AAAAGgAAABRzdGNvAAAAAAAAAAEAAAAsAAAAGnNncGQBAAAAcm9sbAAAAAIAAAAB//8AAAAcc2JncAAAAAByb2xsAAAAAQAAAAYAAAABAAAAYXVkdGEAAABZbWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAsaWxzdAAAACSpdG9vAAAAHGRhdGEAAAABAAAAAExhdmY2MC4zLjEwMA=="),"CLASSIC_BEEP"===t.soundType&&(this.audioFile.src="data:audio/mp4;base64,AAAAHGZ0eXBNNEEgAAAAAE00QSBtcDQyaXNvbQAAAAFtZGF0AAAAAAAACHchIANAaBv6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOCFO4v////////gyh+L1JkJB36Cv0yBUdzB8/8/b8vveozPf+/6eH18deTh9kOp11urWAB5ZsMnhMwSjUCF2MQub4hybjxDhHACGof0XiT9tAHVOwt4NPtPOMFr/ndlTpTNXy79GYIfXP7VkPs99ySHNOFkpNrBS1pClU3rRGHp6Dy9FBIlk4KbBNBLGMJRcWQxuVsVJCSMnGw1FuIUrBN2UJLoEMhurMxpIiyGAweBvyfNJy4FbxqDm3WDjCtzP+3yVmOjxhIBDANLYyeG05LNyCZONEOk/c4hCj3Y2XQkgTI7y/39g0a+MuEoAdbRz4gSgRJnjEGB0TnOB0LtiL0XB9kwz2SwCBB0MvIByUSWTPTsRdCA4PvEmwnNdTnJT5/kPGk4swkTgOOuWJBI0EkxFs5mmNIR6wSFql36Hn03/Lf/uHp+6aTmBY0HJ6P6X1atw/Y8vK72LCWpsq0beo5KkrrrMe1eabaDyfZRPYfgPwH4Dv4CHU663VrAA8wchbBRlqQNnYNlYNhYNigNhoTBsTCcTCgLBEQCX+XfNd+3y+piKntTerXdXpDWRpLzsKmJ4iRM4ig+I6R65pDawx8Ry4cxfeifbsbzK/TxNhafR9y2zFVicy8nCVkU6CkmLckGtqbuYvhruBP0TriLNTU1TNhW6tUCdUSyneDUWAox5RTMlF2W1san5MQRlj7Btm2bZhoqoUUAJlpaat54WVuTyOxqwzNVhPenFR9KBpuA3qrUrT+3ShOUdXAkGXmCrMBxH3XmROdVSkS8cccRMOKTN+7OOEIQrMYIcna5hipAqPHk6VSgy0gGXljIk7GR/O606SyhhgglQIZLyxxOa/ZANmzZkyZMlRoqIt/T6xZHaFLcZ6n8jSgTVoOGsK5MvOlIBBkR+AtM5hvkTG2UzEhEAcsA7bZfCZmmZmZjQnqfn/yRwXzQtlZljFYd93mGppQSDDV/oz8HKkKjElN9Pu/inFmh3IHFyXlrJ/dodwM2EUkLZff1jWCO84wYUa3JB52yTMCETuUgA0BWB+I4hDBR1xoligVhgVhgNhYdBcLCcakAb1XLO/eZ9cUtvv6cNzrRYdMWgFvJySSSSscWFxCQElKcwc2dFkyos8dHfXPYFSt0klO2wUeIUxNKf5LiWYGm57bV0dipv7Qpw9uRRu23CuNIbT7++AuwEnyFWIQP0OpdUhc7u2k2fKW3mTZZxCSb+gVCjOzNf7LzxdBpbZxYwuNkcRlqAMdRMhq+tXmbLkMGGph20w4JvwvBm+x4Wtomh4lz0GGBVGQ96+JUXhvqQQAQPRTHtn+e7SwaCKMXnEEWXevaFVrPVEX7wxIBbbcpAHXj2DQz/vO9M0FHzyQFtegQjjn+fM99jgBE2fLJs/PLcErzrmCGJdVHZ19uxTErdmR6viG6cetew2MYQFm5AIDdPmjeXifvbFcjkYQWUsqKoBQJAKMp50hLtJRCKLCTSw2f7e0wzzhr6eGhjlyOQ8blgBiR0fxcjQYM5rBBM/wzuDe972u2f/mN7u8zVqGu7QADPHgAK4PxW8nJJJJLgISwUZaaRYmFRWRBEIwQKfmepncccZoqHnVy0WnFag51Yt48agPiK7D59zNlI+6YR9SHvnKoiJCcRzsskEGDgIrLQoLEgDguNTzeNvuxVpc8wntXmUlTQMa9WLn/geS8F7ku6Vt+I9yiumFP6I5hbEGeXac1BCB3YA3gNA0rLFPwrWq//VvtF6JGKIOVA12lCnpZl8NJojK1yqVsVKp+ZqbDpq0S1duspmvSvCbwmftOnwnfuNqBCnzZfzZF9fkqxTCqlq8GmR3bGK+1uvEcF55cGGx8BNANhkk1438/rWbXeTtPGfukvhUxZBp0M5447+2SFiQW674ySiGSRHgyqcqU0x39tbz3afnWt5BKNHDYj1lzq6sg8dcJlJnSQDUEba4npgEoAqVUkksoqM0UUO3VXDo3Mablwd2GLAoXjgK071swbuWhQJ2AjGYsBx5dtOMYCyPVh+K3jxqA+IuAhTrc+3KVqmDuVmIO5TZmQbDr4vUV+0338fXQ3665PiYnII1REb2klWhUcwjqi/pMe4yYZaDbo9T1ougUKE5h1jUim2NZxM71zBZVa/tWam6wXlmFVVHGuvL76pT3PUGufbO9YwevQzCvXhsabRuJyJjz8A1Haftmewy4gZ0FWlMIO5BoXB49j0TeIiikaxP9ZHcD9oI6x2H4DajNt5WgRXj6/H72V+gj2bgMDVkIZ36j1Tl+wdO6fvFsz56a5V6t9lS+gyWSOvuQP9bqtYgqWlsthXSFkrTfNqni6jSQ5vN9Fp1iYJODbUg8Sg0lYLbNEM7oqvrggxzq13IfO9hGQ0MQVpMIAR0aSGMFWOZzpJmXG1IcjppdZkINTYN2UvrHmGUrVBHvRuueFPuy2GzQoSnMCvkT3WvaR/LoVYw7Voy47wdJee2Va623AFXWNINOpByyoc9SQU4vPQ6X0PMBLQs6GdMlx+RlC3VoMDOryeFFolCTD8B+A/A4AAANKbW9vdgAAAGxtdmhkAAAAANcxfvfXMX73AACsRAAADbEAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAdx0cmFrAAAAXHRraGQAAAAB1zF+99cxfvcAAAABAAAAAAAADbEAAAAAAAAAAAAAAAABAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAF4bWRpYQAAACBtZGhkAAAAANcxfvfXMX73AACsRAAAGABVxAAAAAAAMWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABDb3JlIE1lZGlhIEF1ZGlvAAAAAR9taW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAONzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAAABICAgBRAFQAYAAAB9AAAAfQABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAAAGAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAABgAAAAEAAAAsc3RzegAAAAAAAAAAAAAABgAAAP4AAAF+AAABjwAAAYQAAAFeAAABegAAABRzdGNvAAAAAAAAAAEAAAAsAAAA+nVkdGEAAADybWV0YQAAAAAAAAAiaGRscgAAAAAAAAAAbWRpcgAAAAAAAAAAAAAAAAAAAAAAxGlsc3QAAAC8LS0tLQAAABxtZWFuAAAAAGNvbS5hcHBsZS5pVHVuZXMAAAAUbmFtZQAAAABpVHVuU01QQgAAAIRkYXRhAAAAAQAAAAAgMDAwMDAwMDAgMDAwMDA4NDAgMDAwMDAyMEYgMDAwMDAwMDAwMDAwMERCMSAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMA=="))}))}beep(t){t.successBeepEnabled&&this.play()}play(){return st(this,void 0,void 0,(function*(){try{yield this.audioFile.play()}catch(t){}}))}}lt.INSTANCE=new lt;var ct=lt;class ut{constructor(){this.DURATION=200}vibrate(t){t.enabled&&navigator.vibrate&&navigator.vibrate(this.DURATION)}}ut.INSTANCE=new ut;var dt=ut,ht=n(12),pt=n(23),ft=n(26),mt=n(24);class gt extends W.default.Component{constructor(t){super(t),this.state={base64Image:void 0}}render(){const t="x"+this.props.barcode.count;return W.default.createElement("div",{style:{display:"flex",flexDirection:"row",backgroundColor:"white",paddingBottom:5,paddingTop:5,borderBottom:"0.5px solid gray"}},W.default.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",width:"100%"}},W.default.createElement("div",{style:{display:"flex",fontSize:15,fontWeight:400,width:"100%"}},W.default.createElement("div",{style:{flex:1}},this.props.barcode.text),W.default.createElement("div",{style:{flex:1,justifyContent:"end",display:"flex"}},t)),W.default.createElement("div",{style:{color:"gray",fontSize:13,fontWeight:300}},this.props.barcode.format)))}}function vt(t,e){return t.format===e.format&&t.text===e.text}function At(t){return t.text+t.format}class bt extends W.default.Component{constructor(t){super(t),this.state={barcodes:this.toUniqueListWithDuplicateCounter(t.barcodes)}}toUniqueListWithDuplicateCounter(t){const e=[];return t.forEach((t=>{const n=e.findIndex((e=>vt(e,t)));-1===n?(t.count=1,e.push(t)):e[n].count++})),e}update(t){this.setState({barcodes:this.toUniqueListWithDuplicateCounter(t)})}render(){return W.default.createElement("div",{style:{display:"flex",flexDirection:"column",backgroundColor:"white",padding:15}},this.state.barcodes.map(((t,e)=>W.default.createElement(gt,{key:e,barcode:t,onClick:this.props.onClick}))))}}class yt{}yt.ScanbotPrimary="#c8193c",yt.LightGray="#F5F5F5",yt.Gray="#808080",yt.DarkGray="#333333",yt.Orange="#FF5533",yt.White="#FFFFFF",yt.TransparentGreen="rgba(0, 255, 0, 0.5)",yt.TransparentGray="rgba(50, 50, 50, 0.5)",yt.TransparentBlack="rgba(0, 0, 0, 0.3)",yt.SBNegative="#FF3737";var Ct,St=yt;!function(t){t[t.None=0]="None",t[t.PushRight=1]="PushRight",t[t.PushBottom=2]="PushBottom",t[t.Pop=3]="Pop"}(Ct||(Ct={}));class wt extends W.default.Component{constructor(t){super(t),this._isVisible=!1,this.state={animation:{type:Ct.None},elements:[]}}containerStyle(t){return{height:"100%",width:"100%",position:"absolute",top:"0",left:"0",zIndex:101,transform:t,overflow:"scroll"}}render(){var t,e,n;if(this.state.animation.type===Ct.None)return null;const i=this.animation(this.state.animation.type),o=this.to(this.state.animation.type);this.previousDestination=o;const r=this.props.style;return W.default.createElement(i,{style:this.containerStyle(`${o}`),onAnimationStart:this.onAnimationStart.bind(this),onAnimationEnd:this.onAnimationEnd.bind(this),onClick:t=>{this.reset()}},W.default.createElement("div",{style:{backgroundColor:"white",height:r.sheetHeight,width:"100%",marginTop:r.sheetTopMargin,borderTopLeftRadius:20,borderTopRightRadius:20},onClick:t=>{t.stopPropagation()}},W.default.createElement("div",{style:{borderTopLeftRadius:20,borderTopRightRadius:20,backgroundColor:St.ScanbotPrimary}},W.default.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"end",height:10}},W.default.createElement("div",{style:{backgroundColor:St.White,height:3,width:33,borderRadius:5}})),W.default.createElement("div",{style:{display:"flex",height:50}},W.default.createElement("div",{style:{display:"flex",fontSize:12,flex:1,color:St.White,alignItems:"center",justifyContent:"left",paddingLeft:10,fontWeight:300},onClick:this.props.onDeleteClick},"CLEAR ALL"),W.default.createElement("div",{style:{display:"flex",fontSize:15,flex:1,color:St.White,justifyContent:"center",alignItems:"center",fontWeight:500}},(null!==(e=null===(t=this.barcodes)||void 0===t?void 0:t.length)&&void 0!==e?e:0)+" Codes"),W.default.createElement("div",{style:{display:"flex",fontSize:13,flex:1,color:St.White,justifyContent:"right",alignItems:"center",paddingRight:10}},W.default.createElement("div",{style:{fontSize:30,fontWeight:100},onClick:t=>{t.stopPropagation(),this.reset()}},"×")))),W.default.createElement(bt,{ref:t=>{null!==t&&(this.list=t)},barcodes:null!==(n=this.barcodes)&&void 0!==n?n:[]})))}reset(){this.pop()}isVisible(){return this._isVisible}push(t,e){this._isVisible=!0,this.barcodes=e,this.updateAnimationType(t)}update(t){this.barcodes=t,this.forceUpdate()}pop(){this._isVisible=!1,this.updateAnimationType(Ct.Pop)}onAnimationStart(){}onAnimationEnd(){this.state.animation.type===Ct.Pop&&this.updateAnimationType(Ct.None)}updateAnimationType(t,e){this.setState({animation:{type:t}},e)}animation(t){let e=this.from(t),n=this.to(t);this.previousDestination===n&&(e=this.previousDestination,n=this.previousDestination);const i=mt.b`from {transform: ${e};} to {transform: ${n};}`;return mt.a.div`animation: ${i} 0.5s;`}from(t){if(t===Ct.PushRight)return this.translate("X",100);if(t===Ct.PushBottom)return this.translate("Y",100);if(t===Ct.Pop){const t=this.pushType===Ct.PushRight?"X":"Y";return this.translate(t,0)}}to(t){if(t===Ct.PushRight)return this.translate("X",0);if(t===Ct.PushBottom)return this.translate("Y",0);if(t===Ct.Pop){const t=this.pushType===Ct.PushRight?"X":"Y";return this.translate(t,100)}}translate(t,e){return"translate"+t+"("+e+"%)"}componentWillUnmount(){this._isVisible=!1}}var xt=n(2),Et=function(t){return{isEnabled:function(e){return t.some((function(t){return!!e[t]}))}}},Lt={measureLayout:Et(["layout","layoutId","drag","_layoutResetTransform"]),animation:Et(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag"]),exit:Et(["exit"]),drag:Et(["drag","dragControls"]),focus:Et(["whileFocus"]),hover:Et(["whileHover","onHoverStart","onHoverEnd"]),tap:Et(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Et(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),layoutAnimation:Et(["layout","layoutId"])};var _t=Object(W.createContext)({strict:!1}),Ot=Object.keys(Lt),Tt=Ot.length;var kt=Object(W.createContext)({transformPagePoint:function(t){return t},isStatic:!1}),Dt=Object(W.createContext)({});var Pt=Object(W.createContext)(null);function Bt(t){var e=Object(W.useRef)(null);return null===e.current&&(e.current=t()),e.current}function Rt(){var t=Object(W.useContext)(Pt);if(null===t)return[!0,null];var e=t.isPresent,n=t.onExitComplete,i=t.register,o=Mt();Object(W.useEffect)((function(){return i(o)}),[]);return!e&&n?[!1,function(){return null==n?void 0:n(o)}]:[!0]}function It(t){return null===t||t.isPresent}var Ft=0,Wt=function(){return Ft++},Mt=function(){return Bt(Wt)},jt=Object(W.createContext)(null),zt="undefined"!=typeof window,Nt=zt?W.useLayoutEffect:W.useEffect;function Vt(t,e,n,i){var o=Object(W.useContext)(kt),r=Object(W.useContext)(_t),a=Object(W.useContext)(Dt).visualElement,s=Object(W.useContext)(Pt),l=function(t){var e=t.layoutId,n=Object(W.useContext)(jt);return n&&void 0!==e?n+"-"+e:e}(n),c=Object(W.useRef)(void 0);i||(i=r.renderer),!c.current&&i&&(c.current=i(t,{visualState:e,parent:a,props:Object(xt.a)(Object(xt.a)({},n),{layoutId:l}),presenceId:null==s?void 0:s.id,blockInitialAnimation:!1===(null==s?void 0:s.initial)}));var u=c.current;return Nt((function(){u&&(u.setProps(Object(xt.a)(Object(xt.a)(Object(xt.a)({},o),n),{layoutId:l})),u.isPresent=It(s),u.isPresenceRoot=!a||a.presenceId!==(null==s?void 0:s.id),u.syncRender())})),Object(W.useEffect)((function(){var t;u&&(null===(t=u.animationState)||void 0===t||t.animateChanges())})),Nt((function(){return function(){return null==u?void 0:u.notifyUnmount()}}),[]),u}function Ut(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function Ht(t){return Array.isArray(t)}function Gt(t){return"string"==typeof t||Ht(t)}function Qt(t,e,n,i,o){var r;return void 0===i&&(i={}),void 0===o&&(o={}),"string"==typeof e&&(e=null===(r=t.variants)||void 0===r?void 0:r[e]),"function"==typeof e?e(null!=n?n:t.custom,i,o):e}function Yt(t,e,n){var i=t.getProps();return Qt(i,e,null!=n?n:i.custom,function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.get()})),e}(t),function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.getVelocity()})),e}(t))}function Zt(t){var e;return"function"==typeof(null===(e=t.animate)||void 0===e?void 0:e.start)||Gt(t.initial)||Gt(t.animate)||Gt(t.whileHover)||Gt(t.whileDrag)||Gt(t.whileTap)||Gt(t.whileFocus)||Gt(t.exit)}function qt(t){return Boolean(Zt(t)||t.variants)}function Xt(t,e){var n=function(t,e){if(Zt(t)){var n=t.initial,i=t.animate;return{initial:!1===n||Gt(n)?n:void 0,animate:Gt(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,Object(W.useContext)(Dt)),i=n.initial,o=n.animate;return Object(W.useMemo)((function(){return{initial:i,animate:o}}),e?[$t(i),$t(o)]:[])}function $t(t){return Array.isArray(t)?t.join(" "):t}function Kt(t){var e=t.preloadedFeatures,n=t.createVisualElement,i=t.useRender,o=t.useVisualState,r=t.Component;return e&&function(t){for(var e in t){var n=t[e];null!==n&&(Lt[e].Component=n)}}(e),Object(W.forwardRef)((function(t,e){var a=Object(W.useContext)(kt).isStatic,s=null,l=Xt(t,a),c=o(t,a);return!a&&zt&&(l.visualElement=Vt(r,c,t,n),s=function(t,e,n){var i=[];if(Object(W.useContext)(_t),!e)return null;for(var o=0;o<Tt;o++){var r=Ot[o],a=Lt[r],s=a.isEnabled,l=a.Component;s(t)&&l&&i.push(W.createElement(l,Object(xt.a)({key:r},t,{visualElement:e})))}return i}(t,l.visualElement)),W.createElement(W.Fragment,null,W.createElement(Dt.Provider,{value:l},i(r,t,function(t,e,n){return Object(W.useCallback)((function(i){var o;i&&(null===(o=t.mount)||void 0===o||o.call(t,i)),e&&(i?e.mount(i):e.unmount()),n&&("function"==typeof n?n(i):Ut(n)&&(n.current=i))}),[e])}(c,l.visualElement,e),c,a)),s)}))}function Jt(t){function e(e,n){return void 0===n&&(n={}),Kt(t(e,n))}var n=new Map;return new Proxy(e,{get:function(t,i){return n.has(i)||n.set(i,e(i)),n.get(i)}})}var te=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function ee(t){return"string"==typeof t&&!t.includes("-")&&!!(te.indexOf(t)>-1||/[A-Z]/.test(t))}var ne={};var ie=["","X","Y","Z"],oe=["transformPerspective","x","y","z"];function re(t,e){return oe.indexOf(t)-oe.indexOf(e)}["translate","scale","rotate","skew"].forEach((function(t){return ie.forEach((function(e){return oe.push(t+e)}))}));var ae=new Set(oe);function se(t){return ae.has(t)}var le=new Set(["originX","originY","originZ"]);function ce(t){return le.has(t)}function ue(t,e){var n=e.layout,i=e.layoutId;return se(t)||ce(t)||(n||void 0!==i)&&(!!ne[t]||"opacity"===t)}var de=function(t){return null!==t&&"object"==typeof t&&t.getVelocity},he={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function pe(t){return t.startsWith("--")}var fe=function(t,e){return e&&"number"==typeof t?e.transform(t):t},me=function(t,e){return function(n){return Math.max(Math.min(n,e),t)}},ge=function(t){return t%1?Number(t.toFixed(5)):t},ve=/(-)?([\d]*\.?[\d])+/g,Ae=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,be=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function ye(t){return"string"==typeof t}var Ce=function(t){return{test:function(e){return ye(e)&&e.endsWith(t)&&1===e.split(" ").length},parse:parseFloat,transform:function(e){return""+e+t}}},Se=Ce("deg"),we=Ce("%"),xe=Ce("px"),Ee=Ce("vh"),Le=Ce("vw"),_e=Object(xt.a)(Object(xt.a)({},we),{parse:function(t){return we.parse(t)/100},transform:function(t){return we.transform(100*t)}}),Oe={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},Te=Object(xt.a)(Object(xt.a)({},Oe),{transform:me(0,1)}),ke=Object(xt.a)(Object(xt.a)({},Oe),{default:1}),De=Object(xt.a)(Object(xt.a)({},Oe),{transform:Math.round}),Pe={borderWidth:xe,borderTopWidth:xe,borderRightWidth:xe,borderBottomWidth:xe,borderLeftWidth:xe,borderRadius:xe,radius:xe,borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomRightRadius:xe,borderBottomLeftRadius:xe,width:xe,maxWidth:xe,height:xe,maxHeight:xe,size:xe,top:xe,right:xe,bottom:xe,left:xe,padding:xe,paddingTop:xe,paddingRight:xe,paddingBottom:xe,paddingLeft:xe,margin:xe,marginTop:xe,marginRight:xe,marginBottom:xe,marginLeft:xe,rotate:Se,rotateX:Se,rotateY:Se,rotateZ:Se,scale:ke,scaleX:ke,scaleY:ke,scaleZ:ke,skew:Se,skewX:Se,skewY:Se,distance:xe,translateX:xe,translateY:xe,translateZ:xe,x:xe,y:xe,z:xe,perspective:xe,transformPerspective:xe,opacity:Te,originX:_e,originY:_e,originZ:xe,zIndex:De,fillOpacity:Te,strokeOpacity:Te,numOctaves:De};function Be(t,e,n,i,o,r,a,s){var l,c=t.style,u=t.vars,d=t.transform,h=t.transformKeys,p=t.transformOrigin;h.length=0;var f=!1,m=!1,g=!0;for(var v in e){var A=e[v];if(pe(v))u[v]=A;else{var b=Pe[v],y=fe(A,b);if(se(v)){if(f=!0,d[v]=y,h.push(v),!g)continue;A!==(null!==(l=b.default)&&void 0!==l?l:0)&&(g=!1)}else if(ce(v))p[v]=y,m=!0;else if((null==n?void 0:n.isHydrated)&&(null==i?void 0:i.isHydrated)&&ne[v]){var C=ne[v].process(A,i,n),S=ne[v].applyTo;if(S)for(var w=S.length,x=0;x<w;x++)c[S[x]]=C;else c[v]=C}else c[v]=y}}i&&n&&a&&s?(c.transform=a(i.deltaFinal,i.treeScale,f?d:void 0),r&&(c.transform=r(d,c.transform)),c.transformOrigin=s(i)):(f&&(c.transform=function(t,e,n,i){var o=t.transform,r=t.transformKeys,a=e.enableHardwareAcceleration,s=void 0===a||a,l=e.allowTransformNone,c=void 0===l||l,u="";r.sort(re);for(var d=!1,h=r.length,p=0;p<h;p++){var f=r[p];u+=(he[f]||f)+"("+o[f]+") ","z"===f&&(d=!0)}return!d&&s?u+="translateZ(0)":u=u.trim(),i?u=i(o,n?"":u):c&&n&&(u="none"),u}(t,o,g,r)),m&&(c.transformOrigin=function(t){var e=t.originX,n=void 0===e?"50%":e,i=t.originY,o=void 0===i?"50%":i,r=t.originZ;return n+" "+o+" "+(void 0===r?0:r)}(p)))}var Re=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function Ie(t,e,n){for(var i in e)de(e[i])||ue(i,n)||(t[i]=e[i])}function Fe(t,e,n){var i={};return Ie(i,t.style||{},t),Object.assign(i,function(t,e,n){var i=t.transformTemplate;return Object(W.useMemo)((function(){var t={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};Be(t,e,void 0,void 0,{enableHardwareAcceleration:!n},i);var o=t.vars,r=t.style;return Object(xt.a)(Object(xt.a)({},o),r)}),[e])}(t,e,n)),t.transformValues&&(i=t.transformValues(i)),i}function We(t,e,n){var i={},o=Fe(t,e,n);return Boolean(t.drag)&&(i.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),i.style=o,i}var Me=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","_layoutResetTransform","onLayoutAnimationComplete","onViewportBoxUpdate","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover"]);function je(t){return Me.has(t)}var ze=function(t){return!je(t)};try{var Ne=n(49).default;ze=function(t){return t.startsWith("on")?!je(t):Ne(t)}}catch(t){}function Ve(t,e,n){return"string"==typeof t?t:xe.transform(e+n*t)}var Ue=function(t,e){return xe.transform(t*e)},He={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ge={offset:"strokeDashoffset",array:"strokeDasharray"};function Qe(t,e,n,i,o,r,a,s){var l=e.attrX,c=e.attrY,u=e.originX,d=e.originY,h=e.pathLength,p=e.pathSpacing,f=void 0===p?1:p,m=e.pathOffset,g=void 0===m?0:m;Be(t,Object(xt.d)(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,i,o,r,a,s),t.attrs=t.style,t.style={};var v=t.attrs,A=t.style,b=t.dimensions,y=t.totalPathLength;v.transform&&(b&&(A.transform=v.transform),delete v.transform),b&&(void 0!==u||void 0!==d||A.transform)&&(A.transformOrigin=function(t,e,n){return Ve(e,t.x,t.width)+" "+Ve(n,t.y,t.height)}(b,void 0!==u?u:.5,void 0!==d?d:.5)),void 0!==l&&(v.x=l),void 0!==c&&(v.y=c),void 0!==y&&void 0!==h&&function(t,e,n,i,o,r){void 0===i&&(i=1),void 0===o&&(o=0),void 0===r&&(r=!0);var a=r?He:Ge;t[a.offset]=Ue(-o,e);var s=Ue(n,e),l=Ue(i,e);t[a.array]=s+" "+l}(v,y,h,f,g,!1)}var Ye=function(){return Object(xt.a)(Object(xt.a)({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}})};function Ze(t,e){var n=Object(W.useMemo)((function(){var n=Ye();return Qe(n,e,void 0,void 0,{enableHardwareAcceleration:!1},t.transformTemplate),Object(xt.a)(Object(xt.a)({},n.attrs),{style:Object(xt.a)({},n.style)})}),[e]);if(t.style){var i={};Ie(i,t.style,t),n.style=Object(xt.a)(Object(xt.a)({},i),n.style)}return n}function qe(t){void 0===t&&(t=!1);return function(e,n,i,o,r){var a=o.latestValues,s=(ee(e)?Ze:We)(n,a,r),l=function(t,e,n){var i={};for(var o in t)(ze(o)||!0===n&&je(o)||!e&&!je(o))&&(i[o]=t[o]);return i}(n,"string"==typeof e,t),c=Object(xt.a)(Object(xt.a)(Object(xt.a)({},l),s),{ref:i});return Object(W.createElement)(e,c)}}var Xe=/([a-z])([A-Z])/g,$e=function(t){return t.replace(Xe,"$1-$2").toLowerCase()};function Ke(t,e){var n=e.style,i=e.vars;for(var o in Object.assign(t.style,n),i)t.style.setProperty(o,i[o])}var Je=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform"]);function tn(t,e){for(var n in Ke(t,e),e.attrs)t.setAttribute(Je.has(n)?n:$e(n),e.attrs[n])}function en(t){var e=t.style,n={};for(var i in e)(de(e[i])||ue(i,t))&&(n[i]=e[i]);return n}function nn(t){var e=en(t);for(var n in t){if(de(t[n]))e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e}function on(t){return"object"==typeof t&&"function"==typeof t.start}var rn=function(t){return Array.isArray(t)};function an(t){var e,n=de(t)?t.get():t;return e=n,Boolean(e&&"object"==typeof e&&e.mix&&e.toValue)?n.toValue():n}function sn(t,e,n,i){var o=t.scrapeMotionValuesFromProps,r=t.createRenderState,a=t.onMount,s={latestValues:cn(e,n,i,o),renderState:r()};return a&&(s.mount=function(t){return a(e,t,s)}),s}var ln=function(t){return function(e,n){var i=Object(W.useContext)(Dt),o=Object(W.useContext)(Pt);return n?sn(t,e,i,o):Bt((function(){return sn(t,e,i,o)}))}};function cn(t,e,n,i){var o={},r=!1===(null==n?void 0:n.initial),a=i(t);for(var s in a)o[s]=an(a[s]);var l=t.initial,c=t.animate,u=Zt(t),d=qt(t);e&&d&&!u&&!1!==t.inherit&&(null!=l||(l=e.initial),null!=c||(c=e.animate));var h=r||!1===l?c:l;h&&"boolean"!=typeof h&&!on(h)&&(Array.isArray(h)?h:[h]).forEach((function(e){var n=Qt(t,e);if(n){var i=n.transitionEnd;n.transition;var r=Object(xt.d)(n,["transitionEnd","transition"]);for(var a in r)o[a]=r[a];for(var a in i)o[a]=i[a]}}));return o}var un={useVisualState:ln({scrapeMotionValuesFromProps:nn,createRenderState:Ye,onMount:function(t,e,n){var i=n.renderState,o=n.latestValues;try{i.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){i.dimensions={x:0,y:0,width:0,height:0}}"path"===e.tagName&&(i.totalPathLength=e.getTotalLength()),Qe(i,o,void 0,void 0,{enableHardwareAcceleration:!1},t.transformTemplate),tn(e,i)}})};var dn,hn={useVisualState:ln({scrapeMotionValuesFromProps:en,createRenderState:Re})};function pn(t,e,n,i){var o=e.forwardMotionProps,r=void 0!==o&&o,a=ee(t)?un:hn;return Object(xt.a)(Object(xt.a)({},a),{preloadedFeatures:n,useRender:qe(r),createVisualElement:i,Component:t})}function fn(t,e,n,i){return t.addEventListener(e,n,i),function(){return t.removeEventListener(e,n,i)}}function mn(t,e,n,i){Object(W.useEffect)((function(){var o=t.current;if(n&&o)return fn(o,e,n,i)}),[t,e,n,i])}function gn(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function vn(t){return!!t.touches}!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.Exit="exit"}(dn||(dn={}));var An={pageX:0,pageY:0};function bn(t,e){void 0===e&&(e="page");var n=t.touches[0]||t.changedTouches[0]||An;return{x:n[e+"X"],y:n[e+"Y"]}}function yn(t,e){return void 0===e&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}function Cn(t,e){return void 0===e&&(e="page"),{point:vn(t)?bn(t,e):yn(t,e)}}var Sn=function(t,e){void 0===e&&(e=!1);var n,i=function(e){return t(e,Cn(e))};return e?(n=i,function(t){var e=t instanceof MouseEvent;(!e||e&&0===t.button)&&n(t)}):i},wn={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},xn={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function En(t){return zt&&null===window.onpointerdown?t:zt&&null===window.ontouchstart?xn[t]:zt&&null===window.onmousedown?wn[t]:t}function Ln(t,e,n,i){return fn(t,En(e),Sn(n,"pointerdown"===e),i)}function _n(t,e,n,i){return mn(t,En(e),n&&Sn(n,"pointerdown"===e),i)}function On(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var Tn=On("dragHorizontal"),kn=On("dragVertical");function Dn(t){var e=!1;if("y"===t)e=kn();else if("x"===t)e=Tn();else{var n=Tn(),i=kn();n&&i?e=function(){n(),i()}:(n&&n(),i&&i())}return e}function Pn(){var t=Dn(!0);return!t||(t(),!1)}function Bn(t,e,n){return function(i,o){var r;gn(i)&&!Pn()&&(null==n||n(i,o),null===(r=t.animationState)||void 0===r||r.setActive(dn.Hover,e))}}var Rn=function(t,e){return!!e&&(t===e||Rn(t,e.parentElement))};function In(t){return Object(W.useEffect)((function(){return function(){return t()}}),[])}var Fn=function(t,e){return function(n){return e(t(n))}},Wn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(Fn)};var Mn=function(t){return function(e){return t(e),null}},jn={tap:Mn((function(t){var e=t.onTap,n=t.onTapStart,i=t.onTapCancel,o=t.whileTap,r=t.visualElement,a=e||n||i||o,s=Object(W.useRef)(!1),l=Object(W.useRef)(null);function c(){var t;null===(t=l.current)||void 0===t||t.call(l),l.current=null}function u(){var t;return c(),s.current=!1,null===(t=r.animationState)||void 0===t||t.setActive(dn.Tap,!1),!Pn()}function d(t,n){u()&&(Rn(r.getInstance(),t.target)?null==e||e(t,n):null==i||i(t,n))}function h(t,e){u()&&(null==i||i(t,e))}_n(r,"pointerdown",a?function(t,e){var i;c(),s.current||(s.current=!0,l.current=Wn(Ln(window,"pointerup",d),Ln(window,"pointercancel",h)),null==n||n(t,e),null===(i=r.animationState)||void 0===i||i.setActive(dn.Tap,!0))}:void 0),In(c)})),focus:Mn((function(t){var e=t.whileFocus,n=t.visualElement;mn(n,"focus",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(dn.Focus,!0)}:void 0),mn(n,"blur",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(dn.Focus,!1)}:void 0)})),hover:Mn((function(t){var e=t.onHoverStart,n=t.onHoverEnd,i=t.whileHover,o=t.visualElement;_n(o,"pointerenter",e||i?Bn(o,!0,e):void 0),_n(o,"pointerleave",n||i?Bn(o,!1,n):void 0)}))};function zn(t,e){if(!Array.isArray(e))return!1;var n=e.length;if(n!==t.length)return!1;for(var i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}var Nn=function(t,e,n){return Math.min(Math.max(n,t),e)},Vn=.001;function Un(t){var e,n,i=t.duration,o=void 0===i?800:i,r=t.bounce,a=void 0===r?.25:r,s=t.velocity,l=void 0===s?0:s,c=t.mass,u=void 0===c?1:c,d=1-a;d=Nn(.05,1,d),o=Nn(.01,10,o/1e3),d<1?(e=function(t){var e=t*d,n=e*o,i=e-l,r=Hn(t,d),a=Math.exp(-n);return Vn-i/r*a},n=function(t){var n=t*d*o,i=n*l+l,r=Math.pow(d,2)*Math.pow(t,2)*o,a=Math.exp(-n),s=Hn(Math.pow(t,2),d);return(-e(t)+Vn>0?-1:1)*((i-r)*a)/s}):(e=function(t){return Math.exp(-t*o)*((t-l)*o+1)-.001},n=function(t){return Math.exp(-t*o)*(o*o*(l-t))});var h=function(t,e,n){for(var i=n,o=1;o<12;o++)i-=t(i)/e(i);return i}(e,n,5/o);if(o*=1e3,isNaN(h))return{stiffness:100,damping:10,duration:o};var p=Math.pow(h,2)*u;return{stiffness:p,damping:2*d*Math.sqrt(u*p),duration:o}}function Hn(t,e){return t*Math.sqrt(1-e*e)}var Gn=["duration","bounce"],Qn=["stiffness","damping","mass"];function Yn(t,e){return e.some((function(e){return void 0!==t[e]}))}function Zn(t){var e=t.from,n=void 0===e?0:e,i=t.to,o=void 0===i?1:i,r=t.restSpeed,a=void 0===r?2:r,s=t.restDelta,l=Object(xt.d)(t,["from","to","restSpeed","restDelta"]),c={done:!1,value:n},u=function(t){var e=Object(xt.a)({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!Yn(t,Qn)&&Yn(t,Gn)){var n=Un(t);(e=Object(xt.a)(Object(xt.a)(Object(xt.a)({},e),n),{velocity:0,mass:1})).isResolvedFromDuration=!0}return e}(l),d=u.stiffness,h=u.damping,p=u.mass,f=u.velocity,m=u.duration,g=u.isResolvedFromDuration,v=qn,A=qn;function b(){var t=f?-f/1e3:0,e=o-n,i=h/(2*Math.sqrt(d*p)),r=Math.sqrt(d/p)/1e3;if(null!=s||(s=Math.abs(o-n)<=1?.01:.4),i<1){var a=Hn(r,i);v=function(n){var s=Math.exp(-i*r*n);return o-s*((t+i*r*e)/a*Math.sin(a*n)+e*Math.cos(a*n))},A=function(n){var o=Math.exp(-i*r*n);return i*r*o*(Math.sin(a*n)*(t+i*r*e)/a+e*Math.cos(a*n))-o*(Math.cos(a*n)*(t+i*r*e)-a*e*Math.sin(a*n))}}else if(1===i)v=function(n){return o-Math.exp(-r*n)*(e+(t+r*e)*n)};else{var l=r*Math.sqrt(i*i-1);v=function(n){var a=Math.exp(-i*r*n),s=Math.min(l*n,300);return o-a*((t+i*r*e)*Math.sinh(s)+l*e*Math.cosh(s))/l}}}return b(),{next:function(t){var e=v(t);if(g)c.done=t>=m;else{var n=1e3*A(t),i=Math.abs(n)<=a,r=Math.abs(o-e)<=s;c.done=i&&r}return c.value=c.done?o:e,c},flipTarget:function(){var t;f=-f,n=(t=[o,n])[0],o=t[1],b()}}}Zn.needsInterpolation=function(t,e){return"string"==typeof t||"string"==typeof e};var qn=function(t){return 0},Xn=function(t,e,n){var i=e-t;return 0===i?1:(n-t)/i},$n=function(t,e,n){return-n*t+n*e+t},Kn=function(t,e){return function(n){return Boolean(ye(n)&&be.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e))}},Jn=function(t,e,n){return function(i){var o;if(!ye(i))return i;var r=i.match(ve),a=r[0],s=r[1],l=r[2],c=r[3];return(o={})[t]=parseFloat(a),o[e]=parseFloat(s),o[n]=parseFloat(l),o.alpha=void 0!==c?parseFloat(c):1,o}},ti=me(0,255),ei=Object(xt.a)(Object(xt.a)({},Oe),{transform:function(t){return Math.round(ti(t))}}),ni={test:Kn("rgb","red"),parse:Jn("red","green","blue"),transform:function(t){var e=t.red,n=t.green,i=t.blue,o=t.alpha,r=void 0===o?1:o;return"rgba("+ei.transform(e)+", "+ei.transform(n)+", "+ei.transform(i)+", "+ge(Te.transform(r))+")"}};var ii={test:Kn("#"),parse:function(t){var e="",n="",i="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),i=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),i=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,i+=i,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}},transform:ni.transform},oi={test:Kn("hsl","hue"),parse:Jn("hue","saturation","lightness"),transform:function(t){var e=t.hue,n=t.saturation,i=t.lightness,o=t.alpha,r=void 0===o?1:o;return"hsla("+Math.round(e)+", "+we.transform(ge(n))+", "+we.transform(ge(i))+", "+ge(Te.transform(r))+")"}},ri=function(t,e,n){var i=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-i)+i))},ai=[ii,ni,oi],si=function(t){return ai.find((function(e){return e.test(t)}))},li=function(t){return"'"+t+"' is not an animatable color. Use the equivalent color code instead."},ci=function(t,e){var n=si(t),i=si(e);li(t),li(e),n.transform,i.transform;var o=n.parse(t),r=i.parse(e),a=Object(xt.a)({},o),s=n===oi?$n:ri;return function(t){for(var e in a)"alpha"!==e&&(a[e]=s(o[e],r[e],t));return a.alpha=$n(o.alpha,r.alpha,t),n.transform(a)}},ui={test:function(t){return ni.test(t)||ii.test(t)||oi.test(t)},parse:function(t){return ni.test(t)?ni.parse(t):oi.test(t)?oi.parse(t):ii.parse(t)},transform:function(t){return ye(t)?t:t.hasOwnProperty("red")?ni.transform(t):oi.transform(t)}},di="${c}",hi="${n}";function pi(t){var e=[],n=0,i=t.match(Ae);i&&(n=i.length,t=t.replace(Ae,di),e.push.apply(e,i.map(ui.parse)));var o=t.match(ve);return o&&(t=t.replace(ve,hi),e.push.apply(e,o.map(Oe.parse))),{values:e,numColors:n,tokenised:t}}function fi(t){return pi(t).values}function mi(t){var e=pi(t),n=e.values,i=e.numColors,o=e.tokenised,r=n.length;return function(t){for(var e=o,n=0;n<r;n++)e=e.replace(n<i?di:hi,n<i?ui.transform(t[n]):ge(t[n]));return e}}var gi=function(t){return"number"==typeof t?0:t};var vi={test:function(t){var e,n,i,o;return isNaN(t)&&ye(t)&&(null!==(n=null===(e=t.match(ve))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(o=null===(i=t.match(Ae))||void 0===i?void 0:i.length)&&void 0!==o?o:0)>0},parse:fi,createTransformer:mi,getAnimatableNone:function(t){var e=fi(t);return mi(t)(e.map(gi))}},Ai=function(t){return"number"==typeof t};function bi(t,e){return Ai(t)?function(n){return $n(t,e,n)}:ui.test(t)?ci(t,e):wi(t,e)}var yi=function(t,e){var n=Object(xt.e)([],t),i=n.length,o=t.map((function(t,n){return bi(t,e[n])}));return function(t){for(var e=0;e<i;e++)n[e]=o[e](t);return n}},Ci=function(t,e){var n=Object(xt.a)(Object(xt.a)({},t),e),i={};for(var o in n)void 0!==t[o]&&void 0!==e[o]&&(i[o]=bi(t[o],e[o]));return function(t){for(var e in i)n[e]=i[e](t);return n}};function Si(t){for(var e=vi.parse(t),n=e.length,i=0,o=0,r=0,a=0;a<n;a++)i||"number"==typeof e[a]?i++:void 0!==e[a].hue?r++:o++;return{parsed:e,numNumbers:i,numRGB:o,numHSL:r}}var wi=function(t,e){var n=vi.createTransformer(e),i=Si(t),o=Si(e);return i.numHSL===o.numHSL&&i.numRGB===o.numRGB&&(i.numNumbers,o.numNumbers),Wn(yi(i.parsed,o.parsed),n)},xi=function(t,e){return function(n){return $n(t,e,n)}};function Ei(t,e,n){for(var i,o=[],r=n||("number"==typeof(i=t[0])?xi:"string"==typeof i?ui.test(i)?ci:wi:Array.isArray(i)?yi:"object"==typeof i?Ci:void 0),a=t.length-1,s=0;s<a;s++){var l=r(t[s],t[s+1]);if(e){var c=Array.isArray(e)?e[s]:e;l=Wn(c,l)}o.push(l)}return o}function Li(t,e,n){var i=void 0===n?{}:n,o=i.clamp,r=void 0===o||o,a=i.ease,s=i.mixer,l=t.length;e.length,!a||!Array.isArray(a)||a.length,t[0]>t[l-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());var c=Ei(e,a,s),u=2===l?function(t,e){var n=t[0],i=t[1],o=e[0];return function(t){return o(Xn(n,i,t))}}(t,c):function(t,e){var n=t.length,i=n-1;return function(o){var r=0,a=!1;if(o<=t[0]?a=!0:o>=t[i]&&(r=i-1,a=!0),!a){for(var s=1;s<n&&!(t[s]>o||s===i);s++);r=s-1}var l=Xn(t[r],t[r+1],o);return e[r](l)}}(t,c);return r?function(e){return u(Nn(t[0],t[l-1],e))}:u}var _i,Oi=function(t){return function(e){return 1-t(1-e)}},Ti=function(t){return function(e){return e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2}},ki=function(t){return function(e){return e*e*((t+1)*e-t)}},Di=function(t){return t},Pi=(_i=2,function(t){return Math.pow(t,_i)}),Bi=Oi(Pi),Ri=Ti(Pi),Ii=function(t){return 1-Math.sin(Math.acos(t))},Fi=Oi(Ii),Wi=Ti(Fi),Mi=ki(1.525),ji=Oi(Mi),zi=Ti(Mi),Ni=function(t){var e=ki(t);return function(t){return(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))}}(1.525),Vi=function(t){if(1===t||0===t)return t;var e=t*t;return t<.36363636363636365?7.5625*e:t<.7272727272727273?9.075*e-9.9*t+3.4:t<.9?12.066481994459833*e-19.63545706371191*t+8.898060941828255:10.8*t*t-20.52*t+10.72},Ui=Oi(Vi);function Hi(t,e){return t.map((function(){return e||Ri})).splice(0,t.length-1)}function Gi(t){var e=t.from,n=void 0===e?0:e,i=t.to,o=void 0===i?1:i,r=t.ease,a=t.offset,s=t.duration,l=void 0===s?300:s,c={done:!1,value:n},u=Array.isArray(o)?o:[n,o],d=function(t,e){return t.map((function(t){return t*e}))}(a&&a.length===u.length?a:function(t){var e=t.length;return t.map((function(t,n){return 0!==n?n/(e-1):0}))}(u),l);function h(){return Li(d,u,{ease:Array.isArray(r)?r:Hi(u,r)})}var p=h();return{next:function(t){return c.value=p(t),c.done=t>=l,c},flipTarget:function(){u.reverse(),p=h()}}}var Qi={keyframes:Gi,spring:Zn,decay:function(t){var e=t.velocity,n=void 0===e?0:e,i=t.from,o=void 0===i?0:i,r=t.power,a=void 0===r?.8:r,s=t.timeConstant,l=void 0===s?350:s,c=t.restDelta,u=void 0===c?.5:c,d=t.modifyTarget,h={done:!1,value:o},p=a*n,f=o+p,m=void 0===d?f:d(f);return m!==f&&(p=m-o),{next:function(t){var e=-p*Math.exp(-t/l);return h.done=!(e>u||e<-u),h.value=h.done?m:m+e,h},flipTarget:function(){}}}};var Yi=1/60*1e3,Zi="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},qi="undefined"!=typeof window?function(t){return window.requestAnimationFrame(t)}:function(t){return setTimeout((function(){return t(Zi())}),Yi)};var Xi=!0,$i=!1,Ki=!1,Ji={delta:0,timestamp:0},to=["read","update","preRender","render","postRender"],eo=to.reduce((function(t,e){return t[e]=function(t){var e=[],n=[],i=0,o=!1,r=new WeakSet,a={schedule:function(t,a,s){void 0===a&&(a=!1),void 0===s&&(s=!1);var l=s&&o,c=l?e:n;return a&&r.add(t),-1===c.indexOf(t)&&(c.push(t),l&&o&&(i=e.length)),t},cancel:function(t){var e=n.indexOf(t);-1!==e&&n.splice(e,1),r.delete(t)},process:function(s){var l;if(o=!0,e=(l=[n,e])[0],(n=l[1]).length=0,i=e.length)for(var c=0;c<i;c++){var u=e[c];u(s),r.has(u)&&(a.schedule(u),t())}o=!1}};return a}((function(){return $i=!0})),t}),{}),no=to.reduce((function(t,e){var n=eo[e];return t[e]=function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=!1),$i||so(),n.schedule(t,e,i)},t}),{}),io=to.reduce((function(t,e){return t[e]=eo[e].cancel,t}),{}),oo=to.reduce((function(t,e){return t[e]=function(){return eo[e].process(Ji)},t}),{}),ro=function(t){return eo[t].process(Ji)},ao=function(t){$i=!1,Ji.delta=Xi?Yi:Math.max(Math.min(t-Ji.timestamp,40),1),Ji.timestamp=t,Ki=!0,to.forEach(ro),Ki=!1,$i&&(Xi=!1,qi(ao))},so=function(){$i=!0,Xi=!0,Ki||qi(ao)},lo=function(){return Ji},co=no;function uo(t,e,n){return void 0===n&&(n=0),t-e-n}var ho=function(t){var e=function(e){var n=e.delta;return t(n)};return{start:function(){return co.update(e,!0)},stop:function(){return io.update(e)}}};function po(t){var e,n,i,o,r,a=t.from,s=t.autoplay,l=void 0===s||s,c=t.driver,u=void 0===c?ho:c,d=t.elapsed,h=void 0===d?0:d,p=t.repeat,f=void 0===p?0:p,m=t.repeatType,g=void 0===m?"loop":m,v=t.repeatDelay,A=void 0===v?0:v,b=t.onPlay,y=t.onStop,C=t.onComplete,S=t.onRepeat,w=t.onUpdate,x=Object(xt.d)(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),E=x.to,L=0,_=x.duration,O=!1,T=!0,k=function(t){if(Array.isArray(t.to))return Gi;if(Qi[t.type])return Qi[t.type];var e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Gi:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?Zn:Gi}(x);(null===(n=(e=k).needsInterpolation)||void 0===n?void 0:n.call(e,a,E))&&(r=Li([0,100],[a,E],{clamp:!1}),a=0,E=100);var D=k(Object(xt.a)(Object(xt.a)({},x),{from:a,to:E}));function P(){L++,"reverse"===g?h=function(t,e,n,i){return void 0===n&&(n=0),void 0===i&&(i=!0),i?uo(e+-t,e,n):e-(t-e)+n}(h,_,A,T=L%2==0):(h=uo(h,_,A),"mirror"===g&&D.flipTarget()),O=!1,S&&S()}function B(t){if(T||(t=-t),h+=t,!O){var e=D.next(Math.max(0,h));o=e.value,r&&(o=r(o)),O=T?e.done:h<=0}null==w||w(o),O&&(0===L&&(null!=_||(_=h)),L<f?function(t,e,n,i){return i?t>=e+n:t<=-n}(h,_,A,T)&&P():(i.stop(),C&&C()))}return l&&(null==b||b(),(i=u(B)).start()),{stop:function(){null==y||y(),i.stop()}}}function fo(t,e){return e?t*(1e3/e):0}var mo=function(t){return 1e3*t},go=function(t,e){return 1-3*e+3*t},vo=function(t,e){return 3*e-6*t},Ao=function(t){return 3*t},bo=function(t,e,n){return((go(e,n)*t+vo(e,n))*t+Ao(e))*t},yo=function(t,e,n){return 3*go(e,n)*t*t+2*vo(e,n)*t+Ao(e)};var Co=.1;function So(t,e,n,i){if(t===e&&n===i)return Di;for(var o=new Float32Array(11),r=0;r<11;++r)o[r]=bo(r*Co,t,n);function a(e){for(var i=0,r=1;10!==r&&o[r]<=e;++r)i+=Co;--r;var a=i+(e-o[r])/(o[r+1]-o[r])*Co,s=yo(a,t,n);return s>=.001?function(t,e,n,i){for(var o=0;o<8;++o){var r=yo(e,n,i);if(0===r)return e;e-=(bo(e,n,i)-t)/r}return e}(e,a,t,n):0===s?a:function(t,e,n,i,o){var r,a,s=0;do{(r=bo(a=e+(n-e)/2,i,o)-t)>0?n=a:e=a}while(Math.abs(r)>1e-7&&++s<10);return a}(e,i,i+Co,t,n)}return function(t){return 0===t||1===t?t:bo(a(t),e,i)}}var wo={linear:Di,easeIn:Pi,easeInOut:Ri,easeOut:Bi,circIn:Ii,circInOut:Wi,circOut:Fi,backIn:Mi,backInOut:zi,backOut:ji,anticipate:Ni,bounceIn:Ui,bounceInOut:function(t){return t<.5?.5*(1-Vi(1-2*t)):.5*Vi(2*t-1)+.5},bounceOut:Vi},xo=function(t){if(Array.isArray(t)){t.length;var e=Object(xt.c)(t,4);return So(e[0],e[1],e[2],e[3])}return"string"==typeof t?wo[t]:t},Eo=function(t,e){return"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!vi.test(e)||e.startsWith("url(")))},Lo=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},_o=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},Oo=function(){return{type:"keyframes",ease:"linear",duration:.3}},To=function(t){return{type:"keyframes",duration:.8,values:t}},ko={x:Lo,y:Lo,z:Lo,rotate:Lo,rotateX:Lo,rotateY:Lo,rotateZ:Lo,scaleX:_o,scaleY:_o,scale:_o,opacity:Oo,backgroundColor:Oo,color:Oo,default:_o},Do=new Set(["brightness","contrast","saturate","opacity"]);function Po(t){var e=t.slice(0,-1).split("("),n=e[0],i=e[1];if("drop-shadow"===n)return t;var o=(i.match(ve)||[])[0];if(!o)return t;var r=i.replace(o,""),a=Do.has(n)?1:0;return o!==i&&(a*=100),n+"("+a+r+")"}var Bo=/([a-z-]*)\(.*?\)/g,Ro=Object(xt.a)(Object(xt.a)({},vi),{getAnimatableNone:function(t){var e=t.match(Bo);return e?e.map(Po).join(" "):t}}),Io=Object(xt.a)(Object(xt.a)({},Pe),{color:ui,backgroundColor:ui,outlineColor:ui,fill:ui,stroke:ui,borderColor:ui,borderTopColor:ui,borderRightColor:ui,borderBottomColor:ui,borderLeftColor:ui,filter:Ro,WebkitFilter:Ro}),Fo=function(t){return Io[t]};function Wo(t,e){var n,i=Fo(t);return i!==Ro&&(i=vi),null===(n=i.getAnimatableNone)||void 0===n?void 0:n.call(i,e)}function Mo(t){var e=t.ease,n=t.times,i=t.yoyo,o=t.flip,r=t.loop,a=Object(xt.d)(t,["ease","times","yoyo","flip","loop"]),s=Object(xt.a)({},a);return n&&(s.offset=n),a.duration&&(s.duration=mo(a.duration)),a.repeatDelay&&(s.repeatDelay=mo(a.repeatDelay)),e&&(s.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(e)?e.map(xo):xo(e)),"tween"===a.type&&(s.type="keyframes"),(i||r||o)&&(!0,i?s.repeatType="reverse":r?s.repeatType="loop":o&&(s.repeatType="mirror"),s.repeat=r||i||o||a.repeat),"spring"!==a.type&&(s.type="keyframes"),s}function jo(t,e,n){var i,o,r,a;return Array.isArray(e.to)&&(null!==(i=t.duration)&&void 0!==i||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=Object(xt.e)([],Object(xt.c)(t.to)),t.to[0]=t.from)}(e),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=Object(xt.d)(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=Object(xt.a)(Object(xt.a)({},t),(o=n,r=e.to,a=rn(r)?To:ko[o]||ko.default,Object(xt.a)({to:r},a(r))))),Object(xt.a)(Object(xt.a)({},e),Mo(t))}function zo(t,e,n,i,o){var r,a=Uo(i,t),s=null!==(r=a.from)&&void 0!==r?r:e.get(),l=Eo(t,n);"none"===s&&l&&"string"==typeof n?s=Wo(t,n):No(s)&&"string"==typeof n?s=Vo(n):!Array.isArray(n)&&No(n)&&"string"==typeof s&&(n=Vo(s));var c=Eo(t,s);return c&&l&&!1!==a.type?function(){var i={from:s,to:n,velocity:e.getVelocity(),onComplete:o,onUpdate:function(t){return e.set(t)}};return"inertia"===a.type||"decay"===a.type?function(t){var e,n=t.from,i=void 0===n?0:n,o=t.velocity,r=void 0===o?0:o,a=t.min,s=t.max,l=t.power,c=void 0===l?.8:l,u=t.timeConstant,d=void 0===u?750:u,h=t.bounceStiffness,p=void 0===h?500:h,f=t.bounceDamping,m=void 0===f?10:f,g=t.restDelta,v=void 0===g?1:g,A=t.modifyTarget,b=t.driver,y=t.onUpdate,C=t.onComplete;function S(t){return void 0!==a&&t<a||void 0!==s&&t>s}function w(t){return void 0===a?s:void 0===s||Math.abs(a-t)<Math.abs(s-t)?a:s}function x(t){null==e||e.stop(),e=po(Object(xt.a)(Object(xt.a)({},t),{driver:b,onUpdate:function(e){var n;null==y||y(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:C}))}function E(t){x(Object(xt.a)({type:"spring",stiffness:p,damping:m,restDelta:v},t))}if(S(i))E({from:i,velocity:r,to:w(i)});else{var L=c*r+i;"undefined"!=typeof A&&(L=A(L));var _,O,T=w(L),k=T===a?-1:1;x({type:"decay",from:i,velocity:r,timeConstant:d,power:c,restDelta:v,modifyTarget:A,onUpdate:S(L)?function(t){_=O,O=t,r=fo(t-_,lo().delta),(1===k&&t>T||-1===k&&t<T)&&E({from:t,to:T,velocity:r})}:void 0})}return{stop:function(){return null==e?void 0:e.stop()}}}(Object(xt.a)(Object(xt.a)({},i),a)):po(Object(xt.a)(Object(xt.a)({},jo(a,i,t)),{onUpdate:function(t){var e;i.onUpdate(t),null===(e=a.onUpdate)||void 0===e||e.call(a,t)},onComplete:function(){var t;i.onComplete(),null===(t=a.onComplete)||void 0===t||t.call(a)}}))}:function(){var t;return e.set(n),o(),null===(t=null==a?void 0:a.onComplete)||void 0===t||t.call(a),{stop:function(){}}}}function No(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Vo(t){return"number"==typeof t?0:Wo("",t)}function Uo(t,e){return t[e]||t.default||t}function Ho(t,e,n,i){return void 0===i&&(i={}),e.start((function(o){var r,a,s=zo(t,e,n,i,o),l=function(t,e){var n;return null!==(n=(Uo(t,e)||{}).delay)&&void 0!==n?n:0}(i,t),c=function(){return a=s()};return l?r=setTimeout(c,mo(l)):c(),function(){clearTimeout(r),null==a||a.stop()}}))}function Go(t,e){-1===t.indexOf(e)&&t.push(e)}function Qo(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var Yo=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(t){var e=this;return Go(this.subscriptions,t),function(){return Qo(e.subscriptions,t)}},t.prototype.notify=function(t,e,n){var i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(var o=0;o<i;o++){var r=this.subscriptions[o];r&&r(t,e,n)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),Zo=function(){function t(t){var e,n=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Yo,this.velocityUpdateSubscribers=new Yo,this.renderSubscribers=new Yo,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),n.prev=n.current,n.current=t;var i=lo(),o=i.delta,r=i.timestamp;n.lastUpdated!==r&&(n.timeDelta=o,n.lastUpdated=r,co.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),e&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return co.postRender(n.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,e){void 0===e&&(e=!0),e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?fo(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var e=this;return this.stop(),new Promise((function(n){e.hasAnimated=!0,e.stopAnimation=t(n)})).then((function(){return e.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function qo(t){return new Zo(t)}var Xo=function(t){return function(e){return e.test(t)}},$o=[Oe,xe,we,Se,Le,Ee,{test:function(t){return"auto"===t},parse:function(t){return t}}],Ko=function(t){return $o.find(Xo(t))},Jo=Object(xt.e)(Object(xt.e)([],Object(xt.c)($o)),[ui,vi]),tr=function(t){return Jo.find(Xo(t))};function er(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,qo(n))}function nr(t,e){var n=Yt(t,e),i=n?t.makeTargetAnimatable(n,!1):{},o=i.transitionEnd,r=void 0===o?{}:o;i.transition;var a,s=Object(xt.d)(i,["transitionEnd","transition"]);for(var l in s=Object(xt.a)(Object(xt.a)({},s),r)){er(t,l,(a=s[l],rn(a)?a[a.length-1]||0:a))}}function ir(t,e){if(e)return(e[t]||e.default||e).from}function or(t,e,n){var i;void 0===n&&(n={});var o=Yt(t,e,n.custom),r=(o||{}).transition,a=void 0===r?t.getDefaultTransition()||{}:r;n.transitionOverride&&(a=n.transitionOverride);var s=o?function(){return rr(t,o,n)}:function(){return Promise.resolve()},l=(null===(i=t.variantChildren)||void 0===i?void 0:i.size)?function(i){void 0===i&&(i=0);var o=a.delayChildren,r=void 0===o?0:o,s=a.staggerChildren,l=a.staggerDirection;return function(t,e,n,i,o,r){void 0===n&&(n=0);void 0===i&&(i=0);void 0===o&&(o=1);var a=[],s=(t.variantChildren.size-1)*i,l=1===o?function(t){return void 0===t&&(t=0),t*i}:function(t){return void 0===t&&(t=0),s-t*i};return Array.from(t.variantChildren).sort(ar).forEach((function(t,i){a.push(or(t,e,Object(xt.a)(Object(xt.a)({},r),{delay:n+l(i)})).then((function(){return t.notifyAnimationComplete(e)})))})),Promise.all(a)}(t,e,r+i,s,l,n)}:function(){return Promise.resolve()},c=a.when;if(c){var u=Object(xt.c)("beforeChildren"===c?[s,l]:[l,s],2),d=u[0],h=u[1];return d().then(h)}return Promise.all([s(),l(n.delay)])}function rr(t,e,n){var i,o=void 0===n?{}:n,r=o.delay,a=void 0===r?0:r,s=o.transitionOverride,l=o.type,c=t.makeTargetAnimatable(e),u=c.transition,d=void 0===u?t.getDefaultTransition():u,h=c.transitionEnd,p=Object(xt.d)(c,["transition","transitionEnd"]);s&&(d=s);var f=[],m=l&&(null===(i=t.animationState)||void 0===i?void 0:i.getState()[l]);for(var g in p){var v=t.getValue(g),A=p[g];if(!(!v||void 0===A||m&&sr(m,g))){var b=Ho(g,v,A,Object(xt.a)({delay:a},d));f.push(b)}}return Promise.all(f).then((function(){h&&nr(t,h)}))}function ar(t,e){return t.sortNodePosition(e)}function sr(t,e){var n=t.protectedKeys,i=t.needsAnimating,o=n.hasOwnProperty(e)&&!0!==i[e];return i[e]=!1,o}var lr=[dn.Animate,dn.Hover,dn.Tap,dn.Drag,dn.Focus,dn.Exit],cr=Object(xt.e)([],Object(xt.c)(lr)).reverse(),ur=lr.length;function dr(t){return function(e){return Promise.all(e.map((function(e){var n=e.animation,i=e.options;return function(t,e,n){var i;if(void 0===n&&(n={}),t.notifyAnimationStart(),Array.isArray(e)){var o=e.map((function(e){return or(t,e,n)}));i=Promise.all(o)}else if("string"==typeof e)i=or(t,e,n);else{var r="function"==typeof e?Yt(t,e,n.custom):e;i=rr(t,r,n)}return i.then((function(){return t.notifyAnimationComplete(e)}))}(t,n,i)})))}}function hr(t){var e,n=dr(t),i=((e={})[dn.Animate]=pr(!0),e[dn.Hover]=pr(),e[dn.Tap]=pr(),e[dn.Drag]=pr(),e[dn.Focus]=pr(),e[dn.Exit]=pr(),e),o={},r=!0,a=function(e,n){var i=Yt(t,n);if(i){i.transition;var o=i.transitionEnd,r=Object(xt.d)(i,["transition","transitionEnd"]);e=Object(xt.a)(Object(xt.a)(Object(xt.a)({},e),r),o)}return e};function s(e,s){for(var l,c=t.getProps(),u=t.getVariantContext(!0)||{},d=[],h=new Set,p={},f=1/0,m=function(n){var o=cr[n],m=i[o],g=null!==(l=c[o])&&void 0!==l?l:u[o],v=Gt(g),A=o===s?m.isActive:null;!1===A&&(f=n);var b=g===u[o]&&g!==c[o]&&v;if(b&&r&&t.manuallyAnimateOnMount&&(b=!1),m.protectedKeys=Object(xt.a)({},p),!m.isActive&&null===A||!g&&!m.prevProp||on(g)||"boolean"==typeof g)return"continue";var y=function(t,e){if("string"==typeof e)return e!==t;if(Ht(e))return!zn(e,t);return!1}(m.prevProp,g)||o===s&&m.isActive&&!b&&v||n>f&&v,C=Array.isArray(g)?g:[g],S=C.reduce(a,{});!1===A&&(S={});var w=m.prevResolvedValues,x=void 0===w?{}:w,E=Object(xt.a)(Object(xt.a)({},x),S),L=function(t){y=!0,h.delete(t),m.needsAnimating[t]=!0};for(var _ in E){var O=S[_],T=x[_];p.hasOwnProperty(_)||(O!==T?rn(O)&&rn(T)?zn(O,T)?m.protectedKeys[_]=!0:L(_):void 0!==O?L(_):h.add(_):void 0!==O&&h.has(_)?L(_):m.protectedKeys[_]=!0)}m.prevProp=g,m.prevResolvedValues=S,m.isActive&&(p=Object(xt.a)(Object(xt.a)({},p),S)),r&&t.blockInitialAnimation&&(y=!1),y&&!b&&d.push.apply(d,Object(xt.e)([],Object(xt.c)(C.map((function(t){return{animation:t,options:Object(xt.a)({type:o},e)}})))))},g=0;g<ur;g++)m(g);if(o=Object(xt.a)({},p),h.size){var v={};h.forEach((function(e){var n=t.getBaseTarget(e);void 0!==n&&(v[e]=n)})),d.push({animation:v})}var A=Boolean(d.length);return r&&!1===c.initial&&!t.manuallyAnimateOnMount&&(A=!1),r=!1,A?n(d):Promise.resolve()}return{isAnimated:function(t){return void 0!==o[t]},animateChanges:s,setActive:function(e,n,o){var r;return i[e].isActive===n?Promise.resolve():(null===(r=t.variantChildren)||void 0===r||r.forEach((function(t){var i;return null===(i=t.animationState)||void 0===i?void 0:i.setActive(e,n)})),i[e].isActive=n,s(o,e))},setAnimateFunction:function(e){n=e(t)},getState:function(){return i}}}function pr(t){return void 0===t&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var fr={animation:Mn((function(t){var e=t.visualElement,n=t.animate;e.animationState||(e.animationState=hr(e)),on(n)&&Object(W.useEffect)((function(){return n.subscribe(e)}),[n])})),exit:Mn((function(t){var e=t.custom,n=t.visualElement,i=Object(xt.c)(Rt(),2),o=i[0],r=i[1],a=Object(W.useContext)(Pt);Object(W.useEffect)((function(){var t,i,s=null===(t=n.animationState)||void 0===t?void 0:t.setActive(dn.Exit,!o,{custom:null!==(i=null==a?void 0:a.custom)&&void 0!==i?i:e});!o&&(null==s||s.then(r))}),[o])}))},mr=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},gr=function(t){return mr(t)&&t.hasOwnProperty("z")},vr=function(t,e){return Math.abs(t-e)};function Ar(t,e){if(Ai(t)&&Ai(e))return vr(t,e);if(mr(t)&&mr(e)){var n=vr(t.x,e.x),i=vr(t.y,e.y),o=gr(t)&&gr(e)?vr(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(i,2)+Math.pow(o,2))}}var br=function(){function t(t,e,n){var i=this,o=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(i.lastMoveEvent&&i.lastMoveEventInfo){var t=Sr(i.lastMoveEventInfo,i.history),e=null!==i.startEvent,n=Ar(t.offset,{x:0,y:0})>=3;if(e||n){var o=t.point,r=lo().timestamp;i.history.push(Object(xt.a)(Object(xt.a)({},o),{timestamp:r}));var a=i.handlers,s=a.onStart,l=a.onMove;e||(s&&s(i.lastMoveEvent,t),i.startEvent=i.lastMoveEvent),l&&l(i.lastMoveEvent,t)}}},this.handlePointerMove=function(t,e){i.lastMoveEvent=t,i.lastMoveEventInfo=yr(e,i.transformPagePoint),gn(t)&&0===t.buttons?i.handlePointerUp(t,e):co.update(i.updatePoint,!0)},this.handlePointerUp=function(t,e){i.end();var n=i.handlers,o=n.onEnd,r=n.onSessionEnd,a=Sr(yr(e,i.transformPagePoint),i.history);i.startEvent&&o&&o(t,a),r&&r(t,a)},!(vn(t)&&t.touches.length>1)){this.handlers=e,this.transformPagePoint=o;var r=yr(Cn(t),this.transformPagePoint),a=r.point,s=lo().timestamp;this.history=[Object(xt.a)(Object(xt.a)({},a),{timestamp:s})];var l=e.onSessionStart;l&&l(t,Sr(r,this.history)),this.removeListeners=Wn(Ln(window,"pointermove",this.handlePointerMove),Ln(window,"pointerup",this.handlePointerUp),Ln(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),io.update(this.updatePoint)},t}();function yr(t,e){return e?{point:e(t.point)}:t}function Cr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Sr(t,e){var n=t.point;return{point:n,delta:Cr(n,xr(e)),offset:Cr(n,wr(e)),velocity:Er(e,.1)}}function wr(t){return t[0]}function xr(t){return t[t.length-1]}function Er(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,i=null,o=xr(t);n>=0&&(i=t[n],!(o.timestamp-i.timestamp>mo(e)));)n--;if(!i)return{x:0,y:0};var r=(o.timestamp-i.timestamp)/1e3;if(0===r)return{x:0,y:0};var a={x:(o.x-i.x)/r,y:(o.y-i.y)/r};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Lr(t){return t}function _r(t){var e=t.top;return{x:{min:t.left,max:t.right},y:{min:e,max:t.bottom}}}var Or={translate:0,scale:1,origin:0,originPoint:0};function Tr(){return{x:Object(xt.a)({},Or),y:Object(xt.a)({},Or)}}function kr(t){return[t("x"),t("y")]}function Dr(t,e,n){var i=e.min,o=e.max;return void 0!==i&&t<i?t=n?$n(i,t,n.min):Math.max(t,i):void 0!==o&&t>o&&(t=n?$n(o,t,n.max):Math.min(t,o)),t}function Pr(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Br(t,e){var n,i=e.min-t.min,o=e.max-t.max;return e.max-e.min<t.max-t.min&&(i=(n=Object(xt.c)([o,i],2))[0],o=n[1]),{min:t.min+i,max:t.min+o}}function Rr(t,e,n){return{min:Ir(t,e),max:Ir(t,n)}}function Ir(t,e){var n;return"number"==typeof t?t:null!==(n=t[e])&&void 0!==n?n:0}function Fr(t,e){return _r(function(t,e){var n=t.top,i=t.left,o=t.bottom,r=t.right;void 0===e&&(e=Lr);var a=e({x:i,y:n}),s=e({x:r,y:o});return{top:a.y,left:a.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}function Wr(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=.01),Ar(t,e)<n}function Mr(t){return t.max-t.min}function jr(t,e){var n=.5,i=Mr(t),o=Mr(e);return o>i?n=Xn(e.min,e.max-i,t.min):i>o&&(n=Xn(t.min,t.max-o,e.min)),Nn(0,1,n)}function zr(t,e,n,i){void 0===i&&(i=.5),t.origin=i,t.originPoint=$n(e.min,e.max,t.origin),t.scale=Mr(n)/Mr(e),Wr(t.scale,1,1e-4)&&(t.scale=1),t.translate=$n(n.min,n.max,t.origin)-t.originPoint,Wr(t.translate)&&(t.translate=0)}function Nr(t,e,n,i){zr(t.x,e.x,n.x,Vr(i.originX)),zr(t.y,e.y,n.y,Vr(i.originY))}function Vr(t){return"number"==typeof t?t:.5}function Ur(t,e,n){t.min=n.min+e.min,t.max=t.min+Mr(e)}var Hr=function(t,e){return t.depth-e.depth};function Gr(t){return t.projection.isEnabled||t.shouldResetTransform()}function Qr(t,e){void 0===e&&(e=[]);var n=t.parent;return n&&Qr(n,e),Gr(t)&&e.push(t),e}function Yr(t){if(!t.shouldResetTransform()){var e,n=t.getLayoutState();t.notifyBeforeLayoutMeasure(n.layout),n.isHydrated=!0,n.layout=t.measureViewportBox(),n.layoutCorrected=(e=n.layout,{x:Object(xt.a)({},e.x),y:Object(xt.a)({},e.y)}),t.notifyLayoutMeasure(n.layout,t.prevViewportBox||n.layout),co.update((function(){return t.rebaseProjectionTarget()}))}}function Zr(t,e){return{min:e.min-t.min,max:e.max-t.min}}function qr(t,e){return{x:Zr(t.x,e.x),y:Zr(t.y,e.y)}}function Xr(t,e){var n=t.getLayoutId(),i=e.getLayoutId();return n!==i||void 0===i&&t!==e}function $r(t){var e=t.getProps(),n=e.drag,i=e._dragX;return n&&!i}function Kr(t,e){t.min=e.min,t.max=e.max}function Jr(t,e,n){return n+e*(t-n)}function ta(t,e,n,i,o){return void 0!==o&&(t=Jr(t,o,i)),Jr(t,n,i)+e}function ea(t,e,n,i,o){void 0===e&&(e=0),void 0===n&&(n=1),t.min=ta(t.min,e,n,i,o),t.max=ta(t.max,e,n,i,o)}function na(t,e){var n=e.x,i=e.y;ea(t.x,n.translate,n.scale,n.originPoint),ea(t.y,i.translate,i.scale,i.originPoint)}function ia(t,e,n,i){var o=Object(xt.c)(i,3),r=o[0],a=o[1],s=o[2];t.min=e.min,t.max=e.max;var l=void 0!==n[s]?n[s]:.5,c=$n(e.min,e.max,l);ea(t,n[r],n[a],c,n.scale)}var oa=["x","scaleX","originX"],ra=["y","scaleY","originY"];function aa(t,e,n){ia(t.x,e.x,n,oa),ia(t.y,e.y,n,ra)}function sa(t,e,n,i,o){return t=Jr(t-=e,1/n,i),void 0!==o&&(t=Jr(t,1/o,i)),t}function la(t,e,n){var i=Object(xt.c)(n,3),o=i[0],r=i[1],a=i[2];!function(t,e,n,i,o){void 0===e&&(e=0),void 0===n&&(n=1),void 0===i&&(i=.5);var r=$n(t.min,t.max,i)-e;t.min=sa(t.min,e,n,r,o),t.max=sa(t.max,e,n,r,o)}(t,e[o],e[r],e[a],e.scale)}function ca(t,e){la(t.x,e,oa),la(t.y,e,ra)}var ua=new Set;function da(t,e,n){t[n]||(t[n]=[]),t[n].push(e)}function ha(t){return ua.add(t),function(){return ua.delete(t)}}function pa(){if(ua.size){var t=0,e=[[]],n=[],i=function(n){return da(e,n,t)},o=function(e){da(n,e,t),t++};ua.forEach((function(e){e(i,o),t=0})),ua.clear();for(var r=n.length,a=0;a<=r;a++)e[a]&&e[a].forEach(ma),n[a]&&n[a].forEach(ma)}}var fa,ma=function(t){return t()},ga=new WeakMap,va=function(){function t(t){var e=t.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.elastic={x:{min:0,max:1},y:{min:0,max:1}},this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=e,this.visualElement.enableLayoutProjection(),ga.set(e,this)}return t.prototype.start=function(t,e){var n=this,i=void 0===e?{}:e,o=i.snapToCursor,r=void 0!==o&&o,a=i.cursorProgress,s=this.props.transformPagePoint;this.panSession=new br(t,{onSessionStart:function(t){var e;n.stopMotion();var i=function(t){return Cn(t,"client")}(t).point;null===(e=n.cancelLayout)||void 0===e||e.call(n),n.cancelLayout=ha((function(t,e){var o=Qr(n.visualElement),s=function(t){var e=[],n=function(t){Gr(t)&&e.push(t),t.children.forEach(n)};return t.children.forEach(n),e.sort(Hr)}(n.visualElement),l=Object(xt.e)(Object(xt.e)([],Object(xt.c)(o)),Object(xt.c)(s)),c=!1;n.isLayoutDrag()&&n.visualElement.lockProjectionTarget(),e((function(){l.forEach((function(t){return t.resetTransform()}))})),t((function(){Yr(n.visualElement),s.forEach(Yr)})),e((function(){l.forEach((function(t){return t.restoreTransform()})),r&&(c=n.snapToCursor(i))})),t((function(){Boolean(n.getAxisMotionValue("x")&&!n.isExternalDrag())||n.visualElement.rebaseProjectionTarget(!0,n.visualElement.measureViewportBox(!1)),n.visualElement.scheduleUpdateLayoutProjection();var t=n.visualElement.projection;kr((function(e){if(!c){var o=t.target[e],r=o.min,s=o.max;n.cursorProgress[e]=a?a[e]:Xn(r,s,i[e])}var l=n.getAxisMotionValue(e);l&&(n.originPoint[e]=l.get())}))})),e((function(){oo.update(),oo.preRender(),oo.render(),oo.postRender()})),t((function(){return n.resolveDragConstraints()}))}))},onStart:function(t,e){var i,o,r,a=n.props,s=a.drag,l=a.dragPropagation;(!s||l||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Dn(s),n.openGlobalLock))&&(pa(),n.isDragging=!0,n.currentDirection=null,null===(o=(i=n.props).onDragStart)||void 0===o||o.call(i,t,e),null===(r=n.visualElement.animationState)||void 0===r||r.setActive(dn.Drag,!0))},onMove:function(t,e){var i,o,r,a,s=n.props,l=s.dragPropagation,c=s.dragDirectionLock;if(l||n.openGlobalLock){var u=e.offset;if(c&&null===n.currentDirection)return n.currentDirection=function(t,e){void 0===e&&(e=10);var n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(u),void(null!==n.currentDirection&&(null===(o=(i=n.props).onDirectionLock)||void 0===o||o.call(i,n.currentDirection)));n.updateAxis("x",e.point,u),n.updateAxis("y",e.point,u),null===(a=(r=n.props).onDrag)||void 0===a||a.call(r,t,e),fa=t}},onSessionEnd:function(t,e){return n.stop(t,e)}},{transformPagePoint:s})},t.prototype.resolveDragConstraints=function(){var t=this,e=this.props,n=e.dragConstraints,i=e.dragElastic,o=this.visualElement.getLayoutState().layoutCorrected;this.constraints=!!n&&(Ut(n)?this.resolveRefConstraints(o,n):function(t,e){var n=e.top,i=e.left,o=e.bottom,r=e.right;return{x:Pr(t.x,i,r),y:Pr(t.y,n,o)}}(o,n)),this.elastic=function(t){return!1===t?t=0:!0===t&&(t=.35),{x:Rr(t,"left","right"),y:Rr(t,"top","bottom")}}(i),this.constraints&&!this.hasMutatedConstraints&&kr((function(e){t.getAxisMotionValue(e)&&(t.constraints[e]=function(t,e){var n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(o[e],t.constraints[e]))}))},t.prototype.resolveRefConstraints=function(t,e){var n=this.props,i=n.onMeasureDragConstraints,o=n.transformPagePoint,r=e.current;this.constraintsBox=Fr(r,o);var a=function(t,e){return{x:Br(t.x,e.x),y:Br(t.y,e.y)}}(t,this.constraintsBox);if(i){var s=i(function(t){var e=t.x,n=t.y;return{top:n.min,bottom:n.max,left:e.min,right:e.max}}(a));this.hasMutatedConstraints=!!s,s&&(a=_r(s))}return a},t.prototype.cancelDrag=function(){var t,e;this.visualElement.unlockProjectionTarget(),null===(t=this.cancelLayout)||void 0===t||t.call(this),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(e=this.visualElement.animationState)||void 0===e||e.setActive(dn.Drag,!1)},t.prototype.stop=function(t,e){var n,i,o;null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var r=this.isDragging;if(this.cancelDrag(),r){var a=e.velocity;this.animateDragEnd(a),null===(o=(i=this.props).onDragEnd)||void 0===o||o.call(i,t,e)}},t.prototype.snapToCursor=function(t){var e=this;return kr((function(n){if(Aa(n,e.props.drag,e.currentDirection)){var i=e.getAxisMotionValue(n);if(!i)return e.cursorProgress[n]=.5,!0;var o=e.visualElement.getLayoutState().layout,r=o[n].max-o[n].min,a=o[n].min+r/2,s=t[n]-a;e.originPoint[n]=t[n],i.set(s)}})).includes(!0)},t.prototype.updateAxis=function(t,e,n){if(Aa(t,this.props.drag,this.currentDirection))return this.getAxisMotionValue(t)?this.updateAxisMotionValue(t,n):this.updateVisualElementAxis(t,e)},t.prototype.updateAxisMotionValue=function(t,e){var n=this.getAxisMotionValue(t);if(e&&n){var i=this.originPoint[t]+e[t],o=this.constraints?Dr(i,this.constraints[t],this.elastic[t]):i;n.set(o)}},t.prototype.updateVisualElementAxis=function(t,e){var n,i=this.visualElement.getLayoutState().layout[t],o=i.max-i.min,r=this.cursorProgress[t],a=function(t,e,n,i,o){var r=t-e*n;return i?Dr(r,i,o):r}(e[t],o,r,null===(n=this.constraints)||void 0===n?void 0:n[t],this.elastic[t]);this.visualElement.setProjectionTargetAxis(t,a,a+o)},t.prototype.setProps=function(t){var e=t.drag,n=void 0!==e&&e,i=t.dragDirectionLock,o=void 0!==i&&i,r=t.dragPropagation,a=void 0!==r&&r,s=t.dragConstraints,l=void 0!==s&&s,c=t.dragElastic,u=void 0===c?.35:c,d=t.dragMomentum,h=void 0===d||d,p=Object(xt.d)(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=Object(xt.a)({drag:n,dragDirectionLock:o,dragPropagation:a,dragConstraints:l,dragElastic:u,dragMomentum:h},p)},t.prototype.getAxisMotionValue=function(t){var e=this.props,n=e.layout,i=e.layoutId,o="_drag"+t.toUpperCase();return this.props[o]?this.props[o]:n||void 0!==i?void 0:this.visualElement.getValue(t,0)},t.prototype.isLayoutDrag=function(){return!this.getAxisMotionValue("x")},t.prototype.isExternalDrag=function(){var t=this.props,e=t._dragX,n=t._dragY;return e||n},t.prototype.animateDragEnd=function(t){var e=this,n=this.props,i=n.drag,o=n.dragMomentum,r=n.dragElastic,a=n.dragTransition,s=function(t,e){void 0===e&&(e=!0);var n,i=t.getProjectionParent();return!!i&&(e?ca(n=qr(i.projection.target,t.projection.target),i.getLatestValues()):n=qr(i.getLayoutState().layout,t.getLayoutState().layout),kr((function(e){return t.setProjectionTargetAxis(e,n[e].min,n[e].max,!0)})),!0)}(this.visualElement,this.isLayoutDrag()&&!this.isExternalDrag()),l=this.constraints||{};if(s&&Object.keys(l).length&&this.isLayoutDrag()){var c=this.visualElement.getProjectionParent();if(c){var u=qr(c.projection.targetFinal,l);kr((function(t){var e=u[t],n=e.min,i=e.max;l[t]={min:isNaN(n)?void 0:n,max:isNaN(i)?void 0:i}}))}}var d=kr((function(n){var c;if(Aa(n,i,e.currentDirection)){var u=null!==(c=null==l?void 0:l[n])&&void 0!==c?c:{},d=r?200:1e6,h=r?40:1e7,p=Object(xt.a)(Object(xt.a)({type:"inertia",velocity:o?t[n]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10},a),u);return e.getAxisMotionValue(n)?e.startAxisValueAnimation(n,p):e.visualElement.startLayoutAnimation(n,p,s)}}));return Promise.all(d).then((function(){var t,n;null===(n=(t=e.props).onDragTransitionEnd)||void 0===n||n.call(t)}))},t.prototype.stopMotion=function(){var t=this;kr((function(e){var n=t.getAxisMotionValue(e);n?n.stop():t.visualElement.stopLayoutAnimation()}))},t.prototype.startAxisValueAnimation=function(t,e){var n=this.getAxisMotionValue(t);if(n){var i=n.get();return n.set(i),n.set(i),Ho(t,n,0,e)}},t.prototype.scalePoint=function(){var t=this,e=this.props,n=e.drag;if(Ut(e.dragConstraints)&&this.constraintsBox){this.stopMotion();var i={x:0,y:0};kr((function(e){i[e]=jr(t.visualElement.projection.target[e],t.constraintsBox[e])})),this.updateConstraints((function(){kr((function(e){if(Aa(e,n,null)){var o=function(t,e,n){var i=t.max-t.min,o=$n(e.min,e.max-i,n);return{min:o,max:o+i}}(t.visualElement.projection.target[e],t.constraintsBox[e],i[e]),r=o.min,a=o.max;t.visualElement.setProjectionTargetAxis(e,r,a)}}))})),setTimeout(pa,1)}},t.prototype.updateConstraints=function(t){var e=this;this.cancelLayout=ha((function(n,i){var o=Qr(e.visualElement);i((function(){return o.forEach((function(t){return t.resetTransform()}))})),n((function(){return Yr(e.visualElement)})),i((function(){return o.forEach((function(t){return t.restoreTransform()}))})),n((function(){e.resolveDragConstraints()})),t&&i(t)}))},t.prototype.mount=function(t){var e=this,n=Ln(t.getInstance(),"pointerdown",(function(t){var n=e.props,i=n.drag,o=n.dragListener;i&&(void 0===o||o)&&e.start(t)})),i=fn(window,"resize",(function(){e.scalePoint()})),o=t.onLayoutUpdate((function(){e.isDragging&&e.resolveDragConstraints()})),r=t.prevDragCursor;return r&&this.start(fa,{cursorProgress:r}),function(){null==n||n(),null==i||i(),null==o||o(),e.cancelDrag()}},t}();function Aa(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}var ba,ya,Ca={pan:Mn((function(t){var e=t.onPan,n=t.onPanStart,i=t.onPanEnd,o=t.onPanSessionStart,r=t.visualElement,a=e||n||i||o,s=Object(W.useRef)(null),l=Object(W.useContext)(kt).transformPagePoint,c={onSessionStart:o,onStart:n,onMove:e,onEnd:function(t,e){s.current=null,i&&i(t,e)}};Object(W.useEffect)((function(){null!==s.current&&s.current.updateHandlers(c)})),_n(r,"pointerdown",a&&function(t){s.current=new br(t,c,{transformPagePoint:l})}),In((function(){return s.current&&s.current.end()}))})),drag:Mn((function(t){var e=t.dragControls,n=t.visualElement,i=Object(W.useContext)(kt).transformPagePoint,o=Bt((function(){return new va({visualElement:n})}));o.setProps(Object(xt.a)(Object(xt.a)({},t),{transformPagePoint:i})),Object(W.useEffect)((function(){return e&&e.subscribe(o)}),[o]),Object(W.useEffect)((function(){return o.mount(n)}),[])}))};function Sa(t){return"string"==typeof t&&t.startsWith("var(--")}!function(t){t[t.Entering=0]="Entering",t[t.Present=1]="Present",t[t.Exiting=2]="Exiting"}(ba||(ba={})),function(t){t[t.Hide=0]="Hide",t[t.Show=1]="Show"}(ya||(ya={}));var wa=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function xa(t,e,n){void 0===n&&(n=1);var i=Object(xt.c)(function(t){var e=wa.exec(t);if(!e)return[,];var n=Object(xt.c)(e,3);return[n[1],n[2]]}(t),2),o=i[0],r=i[1];if(o){var a=window.getComputedStyle(e).getPropertyValue(o);return a?a.trim():Sa(r)?xa(r,e,n+1):r}}function Ea(t,e){return t/(e.max-e.min)*100}var La="_$css";var _a={process:function(t,e,n){var i=n.target;if("string"==typeof t){if(!xe.test(t))return t;t=parseFloat(t)}return Ea(t,i.x)+"% "+Ea(t,i.y)+"%"}},Oa={borderRadius:Object(xt.a)(Object(xt.a)({},_a),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:_a,borderTopRightRadius:_a,borderBottomLeftRadius:_a,borderBottomRightRadius:_a,boxShadow:{process:function(t,e){var n=e.delta,i=e.treeScale,o=t,r=t.includes("var("),a=[];r&&(t=t.replace(wa,(function(t){return a.push(t),La})));var s=vi.parse(t);if(s.length>5)return o;var l=vi.createTransformer(t),c="number"!=typeof s[0]?1:0,u=n.x.scale*i.x,d=n.y.scale*i.y;s[0+c]/=u,s[1+c]/=d;var h=$n(u,d,.5);"number"==typeof s[2+c]&&(s[2+c]/=h),"number"==typeof s[3+c]&&(s[3+c]/=h);var p=l(s);if(r){var f=0;p=p.replace(La,(function(){var t=a[f];return f++,t}))}return p}}},Ta=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.frameTarget={x:{min:0,max:1},y:{min:0,max:1}},e.currentAnimationTarget={x:{min:0,max:1},y:{min:0,max:1}},e.isAnimating={x:!1,y:!1},e.stopAxisAnimation={x:void 0,y:void 0},e.isAnimatingTree=!1,e.animate=function(t,n,i){void 0===i&&(i={});var o=i.originBox,r=i.targetBox,a=i.visibilityAction,s=i.shouldStackAnimate,l=i.onComplete,c=i.prevParent,u=Object(xt.d)(i,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),d=e.props,h=d.visualElement,p=d.layout;if(!1===s)return e.isAnimatingTree=!1,e.safeToRemove();if(!e.isAnimatingTree||!0===s){s&&(e.isAnimatingTree=!0),n=o||n,t=r||t;var f=!1,m=h.getProjectionParent();if(m){var g=m.prevViewportBox,v=m.getLayoutState().layout;c&&(r&&(v=c.getLayoutState().layout),o&&!Xr(c,m)&&c.prevViewportBox&&(g=c.prevViewportBox)),g&&Ia(c,o,r)&&(f=!0,n=qr(g,n),t=qr(v,t))}var A=ka(n,t),b=kr((function(i){var o,r;if("position"===p){var s=t[i].max-t[i].min;n[i].max=n[i].min+s}if(!h.projection.isTargetLocked)return void 0===a?A?e.animateAxis(i,t[i],n[i],Object(xt.a)(Object(xt.a)({},u),{isRelative:f})):(null===(r=(o=e.stopAxisAnimation)[i])||void 0===r||r.call(o),h.setProjectionTargetAxis(i,t[i].min,t[i].max,f)):void h.setVisibility(a===ya.Show)}));return h.syncRender(),Promise.all(b).then((function(){e.isAnimatingTree=!1,l&&l(),h.notifyLayoutAnimationComplete()}))}},e}return Object(xt.b)(e,t),e.prototype.componentDidMount=function(){var t=this,e=this.props.visualElement;e.animateMotionValue=Ho,e.enableLayoutProjection(),this.unsubLayoutReady=e.onLayoutUpdate(this.animate),e.layoutSafeToRemove=function(){return t.safeToRemove()},function(t){for(var e in t)ne[e]=t[e]}(Oa)},e.prototype.componentWillUnmount=function(){var t=this;this.unsubLayoutReady(),kr((function(e){var n,i;return null===(i=(n=t.stopAxisAnimation)[e])||void 0===i?void 0:i.call(n)}))},e.prototype.animateAxis=function(t,e,n,i){var o,r,a=this,s=void 0===i?{}:i,l=s.transition,c=s.isRelative;if(!this.isAnimating[t]||!Ba(e,this.currentAnimationTarget[t])){null===(r=(o=this.stopAxisAnimation)[t])||void 0===r||r.call(o),this.isAnimating[t]=!0;var u=this.props.visualElement,d=this.frameTarget[t],h=u.getProjectionAnimationProgress()[t];h.clearListeners(),h.set(0),h.set(0);var p=function(){var i=h.get()/1e3;!function(t,e,n,i){t.min=$n(e.min,n.min,i),t.max=$n(e.max,n.max,i)}(d,n,e,i),u.setProjectionTargetAxis(t,d.min,d.max,c)};p();var f=h.onChange(p);this.stopAxisAnimation[t]=function(){a.isAnimating[t]=!1,h.stop(),f()},this.currentAnimationTarget[t]=e;var m=l||u.getDefaultTransition()||Ra;return Ho("x"===t?"layoutX":"layoutY",h,1e3,m&&Uo(m,"layout")).then(this.stopAxisAnimation[t])}},e.prototype.safeToRemove=function(){var t,e;null===(e=(t=this.props).safeToRemove)||void 0===e||e.call(t)},e.prototype.render=function(){return null},e}(W.Component);function ka(t,e){return!(Pa(t)||Pa(e)||Ba(t.x,e.x)&&Ba(t.y,e.y))}var Da={min:0,max:0};function Pa(t){return Ba(t.x,Da)&&Ba(t.y,Da)}function Ba(t,e){return t.min===e.min&&t.max===e.max}var Ra={duration:.45,ease:[.4,0,.1,1]};function Ia(t,e,n){return t||!t&&!(e||n)}var Fa={layoutReady:function(t){return t.notifyLayoutReady()}};function Wa(){var t=new Set;return{add:function(e){return t.add(e)},flush:function(e){var n=void 0===e?Fa:e,i=n.layoutReady,o=n.parent;ha((function(e,n){var r=Array.from(t).sort(Hr),a=o?Qr(o):[];n((function(){Object(xt.e)(Object(xt.e)([],Object(xt.c)(a)),Object(xt.c)(r)).forEach((function(t){return t.resetTransform()}))})),e((function(){r.forEach(Yr)})),n((function(){a.forEach((function(t){return t.restoreTransform()})),r.forEach(i)})),e((function(){r.forEach((function(t){t.isPresent&&(t.presence=ba.Present)}))})),n((function(){oo.preRender(),oo.render()})),e((function(){co.postRender((function(){return r.forEach(Ma)})),t.clear()}))})),pa()}}}function Ma(t){t.prevViewportBox=t.projection.target}var ja=Object(W.createContext)(Wa()),za=Object(W.createContext)(Wa());function Na(t){return!!t.forceUpdate}var Va=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(xt.b)(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.syncLayout,n=t.framerSyncLayout,i=t.visualElement;Na(e)&&e.register(i),Na(n)&&n.register(i),i.onUnmount((function(){Na(e)&&e.remove(i),Na(n)&&n.remove(i)}))},e.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,e=t.syncLayout,n=t.visualElement;return Na(e)?e.syncUpdate():(!function(t){t.shouldResetTransform()||(t.prevViewportBox=t.measureViewportBox(!1),t.rebaseProjectionTarget(!1,t.prevViewportBox))}(n),e.add(n)),null},e.prototype.componentDidUpdate=function(){var t=this.props.syncLayout;Na(t)||t.flush()},e.prototype.render=function(){return null},e}(W.default.Component);var Ua={measureLayout:function(t){var e=Object(W.useContext)(ja),n=Object(W.useContext)(za);return W.default.createElement(Va,Object(xt.a)({},t,{syncLayout:e,framerSyncLayout:n}))},layoutAnimation:function(t){var e=Object(xt.c)(Rt(),2)[1];return W.createElement(Ta,Object(xt.a)({},t,{safeToRemove:e}))}};function Ha(){return{isHydrated:!1,layout:{x:{min:0,max:1},y:{min:0,max:1}},layoutCorrected:{x:{min:0,max:1},y:{min:0,max:1}},treeScale:{x:1,y:1},delta:Tr(),deltaFinal:Tr(),deltaTransform:""}}var Ga=Ha();function Qa(t,e,n){var i=t.x,o=t.y,r="translate3d("+i.translate/e.x+"px, "+o.translate/e.y+"px, 0) ";if(n){var a=n.rotate,s=n.rotateX,l=n.rotateY;a&&(r+="rotate("+a+") "),s&&(r+="rotateX("+s+") "),l&&(r+="rotateY("+l+") ")}return r+="scale("+i.scale+", "+o.scale+")",n||r!==Za?r:""}function Ya(t){var e=t.deltaFinal;return 100*e.x.origin+"% "+100*e.y.origin+"% 0"}var Za=Qa(Ga.delta,Ga.treeScale,{x:1,y:1}),qa=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];function Xa(t,e,n,i){var o,r,a=t.delta,s=t.layout,l=t.layoutCorrected,c=t.treeScale,u=e.target;r=s,Kr((o=l).x,r.x),Kr(o.y,r.y),function(t,e,n){var i=n.length;if(i){var o,r;e.x=e.y=1;for(var a=0;a<i;a++)r=(o=n[a]).getLayoutState().delta,e.x*=r.x.scale,e.y*=r.y.scale,na(t,r),$r(o)&&aa(t,t,o.getLatestValues())}}(l,c,n),Nr(a,l,u,i)}var $a=function(){function t(){this.children=[],this.isDirty=!1}return t.prototype.add=function(t){Go(this.children,t),this.isDirty=!0},t.prototype.remove=function(t){Qo(this.children,t),this.isDirty=!0},t.prototype.forEach=function(t){this.isDirty&&this.children.sort(Hr),this.isDirty=!1,this.children.forEach(t)},t}();var Ka=function(t){var e=t.treeType,n=void 0===e?"":e,i=t.build,o=t.getBaseTarget,r=t.makeTargetAnimatable,a=t.measureViewportBox,s=t.render,l=t.readValueFromInstance,c=t.resetTransform,u=t.restoreTransform,d=t.removeValueFromRenderState,h=t.sortNodePosition,p=t.scrapeMotionValuesFromProps;return function(t,e){var f=t.parent,m=t.props,g=t.presenceId,v=t.blockInitialAnimation,A=t.visualState;void 0===e&&(e={});var b,y,C,S,w,x,E=A.latestValues,L=A.renderState,_=function(){var t=qa.map((function(){return new Yo})),e={},n={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){return qa.forEach((function(i){var o;null===(o=e[i])||void 0===o||o.call(e);var r="on"+i,a=t[r];a&&(e[i]=n[r](a))}))}};return t.forEach((function(t,e){n["on"+qa[e]]=function(e){return t.add(e)},n["notify"+qa[e]]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.notify.apply(t,Object(xt.e)([],Object(xt.c)(e)))}})),n}(),O={isEnabled:!1,isHydrated:!1,isTargetLocked:!1,target:{x:{min:0,max:1},y:{min:0,max:1}},targetFinal:{x:{min:0,max:1},y:{min:0,max:1}}},T=O,k=E,D=Ha(),P=!1,B=new Map,R=new Map,I={},F=Object(xt.a)({},E);function W(){b&&(Q.isProjectionReady()&&(aa(T.targetFinal,T.target,k),Nr(D.deltaFinal,D.layoutCorrected,T.targetFinal,E)),M(),s(b,L))}function M(){var t=E;if(S&&S.isActive()){var n=S.getCrossfadeState(Q);n&&(t=n)}i(Q,L,t,T,D,e,m)}function j(){_.notifyUpdate(E)}function z(){Q.layoutTree.forEach(ts)}var N=p(m);for(var V in N){var U=N[V];void 0!==E[V]&&de(U)&&U.set(E[V],!1)}var H=Zt(m),G=qt(m),Q=Object(xt.a)(Object(xt.a)({treeType:n,current:null,depth:f?f.depth+1:0,parent:f,children:new Set,path:f?Object(xt.e)(Object(xt.e)([],Object(xt.c)(f.path)),[f]):[],layoutTree:f?f.layoutTree:new $a,presenceId:g,projection:O,variantChildren:G?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==f?void 0:f.isMounted()),blockInitialAnimation:v,isMounted:function(){return Boolean(b)},mount:function(t){b=Q.current=t,Q.pointTo(Q),G&&f&&!H&&(x=null==f?void 0:f.addVariantChild(Q)),null==f||f.children.add(Q)},unmount:function(){io.update(j),io.render(W),io.preRender(Q.updateLayoutProjection),R.forEach((function(t){return t()})),Q.stopLayoutAnimation(),Q.layoutTree.remove(Q),null==x||x(),null==f||f.children.delete(Q),null==C||C(),_.clearAllListeners()},addVariantChild:function(t){var e,n=Q.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),function(){return n.variantChildren.delete(t)}},sortNodePosition:function(t){return h&&n===t.treeType?h(Q.getInstance(),t.getInstance()):0},getClosestVariantNode:function(){return G?Q:null==f?void 0:f.getClosestVariantNode()},scheduleUpdateLayoutProjection:f?f.scheduleUpdateLayoutProjection:function(){return co.preRender(Q.updateTreeLayoutProjection,!1,!0)},getLayoutId:function(){return m.layoutId},getInstance:function(){return b},getStaticValue:function(t){return E[t]},setStaticValue:function(t,e){return E[t]=e},getLatestValues:function(){return E},setVisibility:function(t){Q.isVisible!==t&&(Q.isVisible=t,Q.scheduleRender())},makeTargetAnimatable:function(t,e){return void 0===e&&(e=!0),r(Q,t,m,e)},addValue:function(t,e){Q.hasValue(t)&&Q.removeValue(t),B.set(t,e),E[t]=e.get(),function(t,e){var n=e.onChange((function(e){E[t]=e,m.onUpdate&&co.update(j,!1,!0)})),i=e.onRenderRequest(Q.scheduleRender);R.set(t,(function(){n(),i()}))}(t,e)},removeValue:function(t){var e;B.delete(t),null===(e=R.get(t))||void 0===e||e(),R.delete(t),delete E[t],d(t,L)},hasValue:function(t){return B.has(t)},getValue:function(t,e){var n=B.get(t);return void 0===n&&void 0!==e&&(n=qo(e),Q.addValue(t,n)),n},forEachValue:function(t){return B.forEach(t)},readValue:function(t){var n;return null!==(n=E[t])&&void 0!==n?n:l(b,t,e)},setBaseTarget:function(t,e){F[t]=e},getBaseTarget:function(t){if(o){var e=o(m,t);if(void 0!==e&&!de(e))return e}return F[t]}},_),{build:function(){return M(),L},scheduleRender:function(){co.render(W,!1,!0)},syncRender:W,setProps:function(t){m=t,_.updatePropListeners(t),I=function(t,e,n){var i;for(var o in e){var r=e[o],a=n[o];if(de(r))t.addValue(o,r);else if(de(a))t.addValue(o,qo(r));else if(a!==r)if(t.hasValue(o)){var s=t.getValue(o);!s.hasAnimated&&s.set(r)}else t.addValue(o,qo(null!==(i=t.getStaticValue(o))&&void 0!==i?i:r))}for(var o in n)void 0===e[o]&&t.removeValue(o);return e}(Q,p(m),I)},getProps:function(){return m},getVariant:function(t){var e;return null===(e=m.variants)||void 0===e?void 0:e[t]},getDefaultTransition:function(){return m.transition},getVariantContext:function(t){if(void 0===t&&(t=!1),t)return null==f?void 0:f.getVariantContext();if(!H){var e=(null==f?void 0:f.getVariantContext())||{};return void 0!==m.initial&&(e.initial=m.initial),e}for(var n={},i=0;i<is;i++){var o=ns[i],r=m[o];(Gt(r)||!1===r)&&(n[o]=r)}return n},enableLayoutProjection:function(){O.isEnabled=!0,Q.layoutTree.add(Q)},lockProjectionTarget:function(){O.isTargetLocked=!0},unlockProjectionTarget:function(){Q.stopLayoutAnimation(),O.isTargetLocked=!1},getLayoutState:function(){return D},setCrossfader:function(t){S=t},isProjectionReady:function(){return O.isEnabled&&O.isHydrated&&D.isHydrated},startLayoutAnimation:function(t,e,n){void 0===n&&(n=!1);var i=Q.getProjectionAnimationProgress()[t],o=n?O.relativeTarget[t]:O.target[t],r=o.min,a=o.max-r;return i.clearListeners(),i.set(r),i.set(r),i.onChange((function(e){Q.setProjectionTargetAxis(t,e,e+a,n)})),Q.animateMotionValue(t,i,0,e)},stopLayoutAnimation:function(){kr((function(t){return Q.getProjectionAnimationProgress()[t].stop()}))},measureViewportBox:function(t){void 0===t&&(t=!0);var n=a(b,e);return t||ca(n,E),n},getProjectionAnimationProgress:function(){return w||(w={x:qo(0),y:qo(0)}),w},setProjectionTargetAxis:function(t,e,n,i){var o;void 0===i&&(i=!1),i?(O.relativeTarget||(O.relativeTarget={x:{min:0,max:1},y:{min:0,max:1}}),o=O.relativeTarget[t]):(O.relativeTarget=void 0,o=O.target[t]),O.isHydrated=!0,o.min=e,o.max=n,P=!0,_.notifySetAxisTarget()},rebaseProjectionTarget:function(t,e){void 0===e&&(e=D.layout);var n=Q.getProjectionAnimationProgress(),i=n.x,o=n.y,r=!(O.relativeTarget||O.isTargetLocked||i.isAnimating()||o.isAnimating());(t||r)&&kr((function(t){var n=e[t],i=n.min,o=n.max;Q.setProjectionTargetAxis(t,i,o)}))},notifyLayoutReady:function(t){!function(t){var e=t.getProjectionParent();if(e){var n=qr(e.getLayoutState().layout,t.getLayoutState().layout);kr((function(e){t.setProjectionTargetAxis(e,n[e].min,n[e].max,!0)}))}else t.rebaseProjectionTarget()}(Q),Q.notifyLayoutUpdate(D.layout,Q.prevViewportBox||D.layout,t)},resetTransform:function(){return c(Q,b,m)},restoreTransform:function(){return u(b,L)},updateLayoutProjection:function(){if(Q.isProjectionReady()){var t=D.delta,e=D.treeScale,n=e.x,i=e.y,o=D.deltaTransform;Xa(D,T,Q.path,E),P&&Q.notifyViewportBoxUpdate(T.target,t),P=!1;var r=Qa(t,e);r===o&&n===e.x&&i===e.y||Q.scheduleRender(),D.deltaTransform=r}},updateTreeLayoutProjection:function(){Q.layoutTree.forEach(Ja),co.preRender(z,!1,!0)},getProjectionParent:function(){if(void 0===y){for(var t=!1,e=Q.path.length-1;e>=0;e--){var n=Q.path[e];if(n.projection.isEnabled){t=n;break}}y=t}return y},resolveRelativeTargetBox:function(){var t=Q.getProjectionParent();if(O.relativeTarget&&t&&(function(t,e){Ur(t.target.x,t.relativeTarget.x,e.target.x),Ur(t.target.y,t.relativeTarget.y,e.target.y)}(O,t.projection),$r(t))){var e=O.target;aa(e,e,t.getLatestValues())}},shouldResetTransform:function(){return Boolean(m._layoutResetTransform)},pointTo:function(t){T=t.projection,k=t.getLatestValues(),null==C||C(),C=Wn(t.onSetAxisTarget(Q.scheduleUpdateLayoutProjection),t.onLayoutAnimationComplete((function(){var t;Q.isPresent?Q.presence=ba.Present:null===(t=Q.layoutSafeToRemove)||void 0===t||t.call(Q)})))},isPresent:!0,presence:ba.Entering});return Q}};function Ja(t){t.resolveRelativeTargetBox()}function ts(t){t.updateLayoutProjection()}var es,ns=Object(xt.e)(["initial"],Object(xt.c)(lr)),is=ns.length,os=new Set(["width","height","top","left","right","bottom","x","y"]),rs=function(t){return os.has(t)},as=function(t,e){t.set(e,!1),t.set(e)},ss=function(t){return t===Oe||t===xe};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(es||(es={}));var ls=function(t,e){return parseFloat(t.split(", ")[e])},cs=function(t,e){return function(n,i){var o=i.transform;if("none"===o||!o)return 0;var r=o.match(/^matrix3d\((.+)\)$/);if(r)return ls(r[1],e);var a=o.match(/^matrix\((.+)\)$/);return a?ls(a[1],t):0}},us=new Set(["x","y","z"]),ds=oe.filter((function(t){return!us.has(t)}));var hs={width:function(t){var e=t.x;return e.max-e.min},height:function(t){var e=t.y;return e.max-e.min},top:function(t,e){var n=e.top;return parseFloat(n)},left:function(t,e){var n=e.left;return parseFloat(n)},bottom:function(t,e){var n=t.y,i=e.top;return parseFloat(i)+(n.max-n.min)},right:function(t,e){var n=t.x,i=e.left;return parseFloat(i)+(n.max-n.min)},x:cs(4,13),y:cs(5,14)},ps=function(t,e,n,i){void 0===n&&(n={}),void 0===i&&(i={}),e=Object(xt.a)({},e),i=Object(xt.a)({},i);var o=Object.keys(e).filter(rs),r=[],a=!1,s=[];if(o.forEach((function(o){var l=t.getValue(o);if(t.hasValue(o)){var c,u=n[o],d=e[o],h=Ko(u);if(rn(d))for(var p=d.length,f=null===d[0]?1:0;f<p;f++)c?Ko(d[f]):(c=Ko(d[f]))===h||ss(h)&&ss(c);else c=Ko(d);if(h!==c)if(ss(h)&&ss(c)){var m=l.get();"string"==typeof m&&l.set(parseFloat(m)),"string"==typeof d?e[o]=parseFloat(d):Array.isArray(d)&&c===xe&&(e[o]=d.map(parseFloat))}else(null==h?void 0:h.transform)&&(null==c?void 0:c.transform)&&(0===u||0===d)?0===u?l.set(c.transform(u)):e[o]=h.transform(d):(a||(r=function(t){var e=[];return ds.forEach((function(n){var i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))})),e.length&&t.syncRender(),e}(t),a=!0),s.push(o),i[o]=void 0!==i[o]?i[o]:e[o],as(l,d))}})),s.length){var l=function(t,e,n){var i=e.measureViewportBox(),o=e.getInstance(),r=getComputedStyle(o),a=r.display,s={top:r.top,left:r.left,bottom:r.bottom,right:r.right,transform:r.transform};"none"===a&&e.setStaticValue("display",t.display||"block"),e.syncRender();var l=e.measureViewportBox();return n.forEach((function(n){var o=e.getValue(n);as(o,hs[n](i,s)),t[n]=hs[n](l,r)})),t}(e,t,s);return r.length&&r.forEach((function(e){var n=Object(xt.c)(e,2),i=n[0],o=n[1];t.getValue(i).set(o)})),t.syncRender(),{target:l,transitionEnd:i}}return{target:e,transitionEnd:i}};function fs(t,e,n,i){return function(t){return Object.keys(t).some(rs)}(e)?ps(t,e,n,i):{target:e,transitionEnd:i}}var ms=function(t,e,n,i){var o=function(t,e,n){var i,o=Object(xt.d)(e,[]),r=t.getInstance();if(!(r instanceof HTMLElement))return{target:o,transitionEnd:n};for(var a in n&&(n=Object(xt.a)({},n)),t.forEachValue((function(t){var e=t.get();if(Sa(e)){var n=xa(e,r);n&&t.set(n)}})),o){var s=o[a];if(Sa(s)){var l=xa(s,r);l&&(o[a]=l,n&&(null!==(i=n[a])&&void 0!==i||(n[a]=s)))}}return{target:o,transitionEnd:n}}(t,e,i);return fs(t,e=o.target,n,i=o.transitionEnd)};var gs={treeType:"dom",readValueFromInstance:function(t,e){if(se(e)){var n=Fo(e);return n&&n.default||0}var i,o=(i=t,window.getComputedStyle(i));return(pe(e)?o.getPropertyValue(e):o[e])||0},sortNodePosition:function(t,e){return 2&t.compareDocumentPosition(e)?1:-1},getBaseTarget:function(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]},measureViewportBox:function(t,e){return Fr(t,e.transformPagePoint)},resetTransform:function(t,e,n){var i=n.transformTemplate;e.style.transform=i?i({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var n=e.vars,i=e.style;delete n[t],delete i[t]},makeTargetAnimatable:function(t,e,n,i){var o=n.transformValues;void 0===i&&(i=!0);var r=e.transition,a=e.transitionEnd,s=Object(xt.d)(e,["transition","transitionEnd"]),l=function(t,e,n){var i,o,r={};for(var a in t)r[a]=null!==(i=ir(a,e))&&void 0!==i?i:null===(o=n.getValue(a))||void 0===o?void 0:o.get();return r}(s,r||{},t);if(o&&(a&&(a=o(a)),s&&(s=o(s)),l&&(l=o(l))),i){!function(t,e,n){var i,o,r,a,s=Object.keys(e).filter((function(e){return!t.hasValue(e)})),l=s.length;if(l)for(var c=0;c<l;c++){var u=s[c],d=e[u],h=null;Array.isArray(d)&&(h=d[0]),null===h&&(h=null!==(o=null!==(i=n[u])&&void 0!==i?i:t.readValue(u))&&void 0!==o?o:e[u]),null!=h&&("string"==typeof h&&/^\-?\d*\.?\d+$/.test(h)?h=parseFloat(h):!tr(h)&&vi.test(d)&&(h=Wo(u,d)),t.addValue(u,qo(h)),null!==(r=(a=n)[u])&&void 0!==r||(a[u]=h),t.setBaseTarget(u,h))}}(t,s,l);var c=ms(t,s,l,a);a=c.transitionEnd,s=c.target}return Object(xt.a)({transition:r,transitionEnd:a},s)},scrapeMotionValuesFromProps:en,build:function(t,e,n,i,o,r,a){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden");var s=i.isEnabled&&o.isHydrated;Be(e,n,i,o,r,a.transformTemplate,s?Qa:void 0,s?Ya:void 0)},render:Ke},vs=Ka(gs),As=Ka(Object(xt.a)(Object(xt.a)({},gs),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var n;return se(e)?(null===(n=Fo(e))||void 0===n?void 0:n.default)||0:(e=Je.has(e)?e:$e(e),t.getAttribute(e))},scrapeMotionValuesFromProps:nn,build:function(t,e,n,i,o,r,a){var s=i.isEnabled&&o.isHydrated;Qe(e,n,i,o,r,a.transformTemplate,s?Qa:void 0,s?Ya:void 0)},render:tn})),bs=function(t,e){return ee(t)?As(e,{enableHardwareAcceleration:!1}):vs(e,{enableHardwareAcceleration:!0})},ys=Object(xt.a)(Object(xt.a)(Object(xt.a)(Object(xt.a)({},fr),jn),Ca),Ua),Cs=Jt((function(t,e){return pn(t,e,ys,bs)}));class Ss{constructor(t){this.highlighted=!1,this.code=t,this.points=[]}}var ws=n(6);class xs{static now(){return Date.now()}}function Es(t){var e=Bt((function(){return qo(t)}));if(Object(W.useContext)(kt).isStatic){var n=Object(xt.c)(Object(W.useState)(t),2)[1];Object(W.useEffect)((function(){return e.onChange(n)}),[])}return e}var Ls=function(t){return function(t){return"object"==typeof t&&t.mix}(t)?t.mix:void 0};function _s(t,e){var n=Es(e()),i=function(){return n.set(e())};return i(),function(t,e){Object(W.useEffect)((function(){var n=t.map((function(t){return t.onChange(e)}));return function(){return n.forEach((function(t){return t()}))}}))}(t,(function(){return co.update(i,!1,!0)})),n}function Os(t,e,n,i){var o="function"==typeof e?e:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=!Array.isArray(t[0]),i=n?0:-1,o=t[0+i],r=t[1+i],a=t[2+i],s=t[3+i],l=Li(r,a,Object(xt.a)({mixer:Ls(a[0])},s));return n?l(o):l}(e,n,i);return Array.isArray(t)?Ts(t,o):Ts([t],(function(t){var e=Object(xt.c)(t,1)[0];return o(e)}))}function Ts(t,e){var n=Bt((function(){return[]}));return _s(t,(function(){n.length=0;for(var i=t.length,o=0;o<i;o++)n[o]=t[o].get();return e(n)}))}function ks(t,e,n){void 0===n&&(n={});var i=de(t)?t:qo(t);return Ho("",i,e,n),{stop:function(){return i.stop()}}}var Ds=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n};class Ps extends W.default.Component{constructor(t){super(t),this.state={element:t.element}}update(t){this.setState({element:t})}style(t){this.customStyle=t,this.forceUpdate()}render(){var t,e,n,i,o,r,a,s,l;const c=this.state.element,u=this.props.configuration.style;!c.highlighted&&this.props.configuration.automaticSelectionEnabled&&this.props.onClick(c);const d=null!==(e=null===(t=this.customStyle)||void 0===t?void 0:t.fillColor)&&void 0!==e?e:c.highlighted?u.highlightedPolygonFillColor:u.polygonFillColor,h=null!==(i=null===(n=this.customStyle)||void 0===n?void 0:n.strokeColor)&&void 0!==i?i:c.highlighted?u.highlightedPolygonStrokeColor:u.polygonStrokeColor,p=null!==(r=null===(o=this.customStyle)||void 0===o?void 0:o.strokeWidth)&&void 0!==r?r:c.highlighted?u.highlightedPolygonStrokeWidth:u.polygonStrokeWidth,f=null!==(s=null===(a=this.customStyle)||void 0===a?void 0:a.cornerRadius)&&void 0!==s?s:c.highlighted?u.highlightedPolygonCornerRadius:u.polygonCornerRadius,m=null!==(l=this.props.animateToPoints)&&void 0!==l?l:c.points;return W.default.createElement(Bs,{points:m,onClick:()=>{this.props.onClick&&this.props.onClick(c)},fill:d,stroke:h,strokeWidth:p,cornerRadius:f})}}function Bs(t){var{points:e,cornerRadius:n}=t,i=Ds(t,["points","cornerRadius"]);const o=[e[0].x,e[0].y,e[1].x,e[1].y,e[2].x,e[2].y,e[3].x,e[3].y],r=o.map(Es),a=Os(r,(([t,e,i,o,r,a,s,l])=>{const c=[{x:t,y:e},{x:i,y:o},{x:r,y:a},{x:s,y:l}];return ws.a.toSvgPathStringWithRoundedCorners(c,n)}));return Object(W.useEffect)((()=>{const t=[];for(let e=0;e<o.length;e++)t.push(ks(r[e],o[e]));return()=>{t.forEach((t=>t.stop()))}}),[e]),W.default.createElement(Cs.path,Object.assign({d:a},i))}class Rs extends W.default.Component{constructor(t){super(t),this.state={polygonElements:[]}}update(t,e,n,i){const o=[];(class{static keepOnlyCenterMostDuplicate(t,e){const n=new Map;t.forEach((t=>{const e=At(t),i=n.get(e);i?i.push(t):n.set(e,[t])})),n.forEach(((e,i)=>{e.length<2?n.delete(i):e.forEach(((e,n)=>{t.splice(t.indexOf(e),1)}))})),n.forEach(((n,i)=>{const o=t=>{let e={x:0,y:0};return t.forEach((t=>{e.x+=t.x,e.y+=t.y})),e.x/=t.length,e.y/=t.length,e},r=e.width/2,a=n.reduce(((t,e)=>{const n=o(t.quad),i=o(e.quad);return Math.abs(r-n.x)<Math.abs(r-i.x)?t:e}));t.push(a)}))}}).keepOnlyCenterMostDuplicate(i,n),i.forEach((i=>{const r=new Ss(i);r.points=void 0===t?ws.a.scaleListToHtmlElement(i.quad,n,e.video):i.quad.map((e=>{const i=new ws.a(e.x,e.y);return i.x*=t.width/n.width,i.y*=t.height/n.height,i.y+=t.y,i.x+=t.x,i})),r.points.forEach((t=>{e.state.mirrored&&this.container&&(t.x=this.container.clientWidth-t.x)})),o.push(r)}));const r=[];this.state.polygonElements.forEach((t=>{const e=o.find((e=>vt(e.code,t.element.code)));let n=!1;void 0===e?t.updatedAt+1e3<xs.now()&&(n=!0):(t.element=e,t.polygon=W.default.createElement(Ps,{key:At(t.element.code),ref:e=>t.polygonRef=e,configuration:this.props.configuration,element:t.element,animateToPoints:e.points,onClick:this.onPolygonClick.bind(this)}),t.label=W.default.createElement(this.props.LabelComponent,Object.assign({},this.props.labelComponentConfig,{key:At(t.element.code),ref:e=>t.labelRef=e,configuration:this.props.configuration,element:t.element,animateToPoints:e.points,onClick:this.onPolygonClick.bind(this)})),t.updatedAt=xs.now()),n||r.push(t)})),o.forEach((t=>{if(void 0===this.state.polygonElements.find((e=>vt(e.element.code,t.code)))){let e,n;const i=W.default.createElement(Ps,{key:At(t.code),ref:i=>{e=i,void 0!==n&&this.props.onBarcodeFound(t.code,e,n)},configuration:this.props.configuration,element:t,onClick:this.onPolygonClick.bind(this)}),o=W.default.createElement(this.props.LabelComponent,Object.assign({},this.props.labelComponentConfig,{key:At(t.code),ref:i=>{n=i,void 0!==e&&this.props.onBarcodeFound(t.code,e,n)},configuration:this.props.configuration,element:t,onClick:this.onPolygonClick.bind(this)})),a={element:t,polygon:i,label:o,polygonRef:e,labelRef:n,updatedAt:xs.now()};r.push(a)}})),this.setState({polygonElements:r})}onPolygonClick(t){var e,n,i,o;t.highlighted=!t.highlighted,this.forceUpdate(),this.state.polygonElements.forEach((e=>{var n;const i=e.labelRef,o=e.label.props.element;i&&vt(o.code,t.code)&&(i.update(t),null===(n=e.polygonRef)||void 0===n||n.update(t))})),t.highlighted&&(null===(n=(e=this.props).onPolygonSelected)||void 0===n||n.call(e,t.code)),null===(o=(i=this.props).onPolygonClick)||void 0===o||o.call(i,t.code)}render(){var t,e;return W.default.createElement("div",{style:Object.assign({width:"100%",height:"100%",position:"absolute"},this.props.style),ref:t=>this.container=t},W.default.createElement(Cs.svg,{style:{position:"absolute",maxWidth:"100%",width:"100%",height:"100%"}},null===(t=this.state.polygonElements)||void 0===t?void 0:t.map((t=>t.polygon))),null===(e=this.state.polygonElements)||void 0===e?void 0:e.map((t=>t.label)))}}var Is=n(37),Fs=n.n(Is),Ws=n(40),Ms={insert:"head",singleton:!1},js=(Fs()(Ws.a,Ms),Ws.a.locals,n(27)),zs=n.n(js);class Ns{constructor(t){this.lastTime=0,this.lastDuration=0,this.t=0,this.element=null,this.animationClass="",this.animationClass=t}setDuration(t){const e=Date.now()/1e3,n=e-this.lastTime;this.lastDuration&&(this.t+=n%this.lastDuration/this.lastDuration,this.t-=0|this.t);const i=-t*this.t;this.element&&(this.element.style.animationDuration=`${t}s`,this.element.style.animationDelay=`${i}s`,this.element.classList.remove(this.animationClass),this.element.offsetHeight,this.element.classList.add(this.animationClass)),this.lastTime=e,this.lastDuration=t}}class Vs extends W.default.Component{constructor(){super(...arguments),this.inner1=new Ns("scanbot-shutter-rotate"),this.inner2=new Ns("scanbot-shutter-rotate")}render(){return W.default.createElement("div",{className:"scanbot-shutter-button",style:this.props.style,onClick:this.props.onClick},this.captureBackground(),this.captureInnerCircle(),this.captureSearchingInner1(),this.captureSearchingInner2())}updateAnimationSpeed(t){"searching"==t?(this.inner1.setDuration(3),this.inner2.setDuration(2)):(this.inner1.setDuration(1.5),this.inner2.setDuration(.75))}componentDidMount(){this.updateAnimationSpeed(this.props.action)}componentDidUpdate(){this.updateAnimationSpeed(this.props.action)}captureBackground(){return this.svgBase(null,W.default.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},this.path("M32 0c17.673 0 32 14.327 32 32 0 17.673-14.327 32-32 32C14.327 64 0 49.673 0 32 0 14.327 14.327 0 32 0zm0 3C15.984 3 3 15.984 3 32s12.984 29 29 29 29-12.984 29-29S48.016 3 32 3z")))}captureInnerCircle(){const{action:t}=this.props;return this.svgBase({"scanbot-shutter-button-part":!0,"scanbot-shutter-fade-in":"processing"==t||"manual"==t,"scanbot-shutter-fade-out":"searching"==t||"capturing"==t,"scanbot-shutter-pulse-fast":"processing"==t},W.default.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},W.default.createElement("circle",{cx:"32",cy:"32",r:"24",fill:this.props.color,fillRule:"nonzero"})))}captureSearchingInner1(){const{action:t}=this.props;return this.svgBase({"scanbot-shutter-button-part":!0,"scanbot-shutter-fade-in":"searching"==t||"capturing"==t,"scanbot-shutter-fade-out":"processing"==t||"manual"==t},W.default.createElement("g",{fill:"none",fillOpacity:"0.7",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},this.path("M44.24 51.476a1 1 0 01-1.066-1.692A20.981 20.981 0 0053 32c0-11.598-9.402-21-21-21a1 1 0 010-2c12.703 0 23 10.297 23 23a22.98 22.98 0 01-10.76 19.476z")),(t=>{this.inner1.element=t}))}captureSearchingInner2(){const{action:t}=this.props;return this.svgBase({"scanbot-shutter-button-part":!0,"scanbot-shutter-fade-in":"searching"==t||"capturing"==t,"scanbot-shutter-fade-out":"processing"==t||"manual"==t},W.default.createElement("g",{fill:"none",fillOpacity:"0.4",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},this.path("M46.624 35.35a1 1 0 01-1.95-.445C44.89 33.96 45 32.988 45 32c0-7.18-5.82-13-13-13a1 1 0 010-2c8.284 0 15 6.716 15 15 0 1.138-.127 2.26-.376 3.35z")),(t=>{this.inner2.element=t}))}path(t){return W.default.createElement("path",{fill:this.props.color,fillRule:"nonzero",d:t})}svgBase(t,e,n){return W.default.createElement("div",{className:zs()(t),ref:n},W.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 0 64 64"},e))}}class Us extends W.default.Component{render(){return W.default.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},W.default.createElement("mask",{id:"mask0_919_23088",style:"mask-type:alpha",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},W.default.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),W.default.createElement("g",{mask:"url(#mask0_919_23088)"},W.default.createElement("path",{d:"M9 19V17H21V19H9ZM9 13V11H21V13H9ZM9 7V5H21V7H9ZM5 20C4.45 20 3.97917 19.8042 3.5875 19.4125C3.19583 19.0208 3 18.55 3 18C3 17.45 3.19583 16.9792 3.5875 16.5875C3.97917 16.1958 4.45 16 5 16C5.55 16 6.02083 16.1958 6.4125 16.5875C6.80417 16.9792 7 17.45 7 18C7 18.55 6.80417 19.0208 6.4125 19.4125C6.02083 19.8042 5.55 20 5 20ZM5 14C4.45 14 3.97917 13.8042 3.5875 13.4125C3.19583 13.0208 3 12.55 3 12C3 11.45 3.19583 10.9792 3.5875 10.5875C3.97917 10.1958 4.45 10 5 10C5.55 10 6.02083 10.1958 6.4125 10.5875C6.80417 10.9792 7 11.45 7 12C7 12.55 6.80417 13.0208 6.4125 13.4125C6.02083 13.8042 5.55 14 5 14ZM5 8C4.45 8 3.97917 7.80417 3.5875 7.4125C3.19583 7.02083 3 6.55 3 6C3 5.45 3.19583 4.97917 3.5875 4.5875C3.97917 4.19583 4.45 4 5 4C5.55 4 6.02083 4.19583 6.4125 4.5875C6.80417 4.97917 7 5.45 7 6C7 6.55 6.80417 7.02083 6.4125 7.4125C6.02083 7.80417 5.55 8 5 8Z",fill:"white"})))}}class Hs extends W.default.Component{render(){return W.default.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},W.default.createElement("mask",{id:"mask0_919_23102",style:"mask-type:alpha",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},W.default.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),W.default.createElement("g",{mask:"url(#mask0_919_23102)"},W.default.createElement("path",{d:"M12 22C10.75 22 9.57917 21.7625 8.4875 21.2875C7.39583 20.8125 6.44583 20.1708 5.6375 19.3625C4.82917 18.5542 4.1875 17.6042 3.7125 16.5125C3.2375 15.4208 3 14.25 3 13H5C5 14.95 5.67917 16.6042 7.0375 17.9625C8.39583 19.3208 10.05 20 12 20C13.95 20 15.6042 19.3208 16.9625 17.9625C18.3208 16.6042 19 14.95 19 13C19 11.05 18.3208 9.39583 16.9625 8.0375C15.6042 6.67917 13.95 6 12 6H11.85L13.4 7.55L12 9L8 5L12 1L13.4 2.45L11.85 4H12C13.25 4 14.4208 4.2375 15.5125 4.7125C16.6042 5.1875 17.5542 5.82917 18.3625 6.6375C19.1708 7.44583 19.8125 8.39583 20.2875 9.4875C20.7625 10.5792 21 11.75 21 13C21 14.25 20.7625 15.4208 20.2875 16.5125C19.8125 17.6042 19.1708 18.5542 18.3625 19.3625C17.5542 20.1708 16.6042 20.8125 15.5125 21.2875C14.4208 21.7625 13.25 22 12 22Z",fill:"white"})))}}class Gs extends W.default.Component{constructor(t){super(t),this.state={barcodes:void 0}}update(t){this.setState({barcodes:t})}didScan(){return void 0!==this.state.barcodes}render(){var t,e;return W.default.createElement("div",{style:{position:"absolute",bottom:0,width:"100%",height:76,display:"flex",alignItems:"center",backgroundColor:St.ScanbotPrimary}},W.default.createElement("div",{style:{display:"flex",flex:1,justifyContent:"center",alignItems:"center",opacity:this.didScan()?1:.5},onClick:this.didScan()&&this.props.onBurgerClick},W.default.createElement(Us,null),W.default.createElement("div",{style:{backgroundColor:St.Orange,color:St.White,width:24,height:24,borderRadius:12,marginLeft:10,fontSize:13,lineHeight:"24px",textAlign:"center"}},null!==(e=null===(t=this.state.barcodes)||void 0===t?void 0:t.length)&&void 0!==e?e:0)),W.default.createElement("div",{style:{display:"flex",flex:1,justifyContent:"center",opacity:this.props.isShowingImage?.5:1}},W.default.createElement(Vs,{style:{left:0,bottom:0,transform:"none"},color:"#FFF",action:this.props.action,onClick:!this.props.isShowingImage&&this.props.onShutterButtonClick})),W.default.createElement("div",{style:{display:"flex",flex:1,justifyContent:"center",alignItems:"center",opacity:this.didScan()?1:.5},onClick:this.didScan()&&this.props.onScanMoreClick},W.default.createElement("div",{style:{fontSize:13,color:St.White,marginRight:10}},"Scan More"),W.default.createElement(Hs,null)))}}class Qs extends W.default.Component{render(){const t=ws.a.centerOf(this.props.points),e=ws.a.smallerSizeOfQuad(this.props.points)/40;return W.default.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{position:"absolute",left:t.x-20,top:t.y-20,transform:`scale(${e})`}},W.default.createElement("mask",{id:"mask0_910_20901",style:"mask-type:alpha",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"40",height:"40"},W.default.createElement("rect",{width:"40",height:"40",fill:"#D9D9D9"})),W.default.createElement("g",{mask:"url(#mask0_910_20901)"},W.default.createElement("rect",{x:"7",y:"13",width:"26",height:"16",fill:"white"}),W.default.createElement("path",{d:"M17.5833 27.6111L29.3611 15.8333L27.3055 13.8055L17.5833 23.5278L12.6666 18.6111L10.6389 20.6389L17.5833 27.6111ZM20 36.6666C17.713 36.6666 15.5555 36.2291 13.5278 35.3541C11.5 34.4791 9.73147 33.287 8.22219 31.7778C6.71294 30.2685 5.52081 28.5 4.64581 26.4722C3.77081 24.4444 3.33331 22.287 3.33331 20C3.33331 17.6944 3.77081 15.5278 4.64581 13.5C5.52081 11.4722 6.71294 9.70831 8.22219 8.20831C9.73147 6.70831 11.5 5.52081 13.5278 4.64581C15.5555 3.77081 17.713 3.33331 20 3.33331C22.3055 3.33331 24.4722 3.77081 26.5 4.64581C28.5278 5.52081 30.2916 6.70831 31.7916 8.20831C33.2916 9.70831 34.4791 11.4722 35.3541 13.5C36.2291 15.5278 36.6666 17.6944 36.6666 20C36.6666 22.287 36.2291 24.4444 35.3541 26.4722C34.4791 28.5 33.2916 30.2685 31.7916 31.7778C30.2916 33.287 28.5278 34.4791 26.5 35.3541C24.4722 36.2291 22.3055 36.6666 20 36.6666Z",fill:"#55BB77"})))}}var Ys=n(10);class Zs extends W.default.Component{constructor(t){super(t),this.state={elements:[],imageSize:Ys.a.empty()}}update(t){const e=[];t.barcodes.forEach((n=>{const i=new Ss(n);i.points=ws.a.scaleListToHtmlElement(n.quad,t.originalImageSize,this.image),e.push(i)})),this.setState({imageSize:Ys.a.fromHtmlElement(this.image),elements:e})}reset(){this.setState({elements:[]})}render(){return void 0===this.props.image||null===this.props.image?null:W.default.createElement("div",{className:"scanned-image-with-overlay",style:{position:"absolute",display:"flex",justifyContent:"center",alignItems:this.state.image?"normal":"center",minHeight:"300px",height:"100%",width:"100%",top:0,left:0}},W.default.createElement("img",{style:{maxWidth:"100%"},ref:t=>this.image=t,src:`${this.props.image}`}),W.default.createElement("div",{style:{position:"absolute",maxWidth:"100%",width:this.state.imageSize.width,height:this.state.imageSize.height}},this.state.elements.map(((t,e)=>W.default.createElement(Qs,{key:e,points:t.points})))))}}class qs extends W.default.Component{render(){if(!this.props.visible)return null;const t=mt.a.svg`
|
|
32
32
|
animation: rotate 2s linear infinite;
|
|
33
33
|
@keyframes rotate { 100% { transform: rotate(360deg); } }
|
|
34
|
-
`;return i.default.createElement("div",{style:{top:0,left:0,width:"100%",height:"100%",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",zIndex:100}},i.default.createElement(t,{width:"101",height:"100",viewBox:"0 0 101 100",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.default.createElement("circle",{cx:"50.5",cy:"50",r:"50",fill:"#3E3E3E","fill-opacity":"0.35"}),i.default.createElement("path",{d:"M90.5153 49.6094C91.715 49.6094 92.6933 50.5827 92.6321 51.7808C92.1218 61.7815 88.0988 71.3096 81.2342 78.6635C73.8743 86.548 63.7963 91.3454 53.036 92.0868C42.2757 92.8282 31.6351 89.4582 23.2634 82.6576C15.455 76.3147 10.1633 67.4283 8.28624 57.5922C8.06135 56.4138 8.89694 55.3155 10.0853 55.1509C11.2737 54.9864 12.3642 55.8183 12.5959 56.9954C14.3176 65.7412 19.0487 73.6367 26.0026 79.2856C33.5201 85.3922 43.0751 88.4183 52.7374 87.7526C62.3998 87.0869 71.4494 82.7789 78.0584 75.699C84.1719 69.1497 87.7754 60.68 88.2814 51.7807C88.3495 50.5829 89.3156 49.6094 90.5153 49.6094Z",fill:"white"}),i.default.createElement("path",{d:"M40.7013 23.4514C40.2751 22.2667 40.8885 20.9518 42.1022 20.6166C45.5928 19.6526 49.2351 19.3251 52.8537 19.6567C57.2305 20.0577 61.4662 21.4131 65.2628 23.6273C69.0594 25.8416 72.3246 28.861 74.8286 32.4731C77.3326 36.0851 79.0146 40.2021 79.7562 44.5341C80.4978 48.8662 80.281 53.3082 79.121 57.5475C77.9611 61.7868 75.8862 65.7204 73.0423 69.0714C70.1985 72.4225 66.6548 75.1095 62.6606 76.9436C59.3583 78.4599 55.8145 79.3627 52.202 79.6146C50.9459 79.7022 49.9301 78.6662 49.9379 77.4072C49.9457 76.1481 50.9746 75.1443 52.2293 75.0398C55.1749 74.7942 58.0613 74.0382 60.758 72.8C64.1467 71.244 67.1532 68.9642 69.5659 66.1212C71.9787 63.2781 73.7391 59.9408 74.7232 56.3442C75.7073 52.7475 75.8912 48.9789 75.262 45.3035C74.6328 41.6281 73.2058 38.1353 71.0814 35.0708C68.957 32.0062 66.1867 29.4445 62.9657 27.5659C59.7446 25.6873 56.151 24.5374 52.4377 24.1972C49.4828 23.9265 46.5092 24.1737 43.6497 24.9219C42.4316 25.2406 41.1274 24.6362 40.7013 23.4514Z",fill:"white"}),i.default.createElement("path",{d:"M39.9232 61.6554C39.1643 62.5529 37.8105 62.673 37.0094 61.813C35.7171 60.4259 34.6502 58.8388 33.8523 57.1092C32.7564 54.7336 32.1944 52.1468 32.206 49.5307C32.2175 46.9146 32.8022 44.3328 33.9189 41.967C35.0356 39.6011 36.6573 37.5088 38.6697 35.8372C40.6822 34.1656 43.0365 32.9554 45.567 32.2916C48.0975 31.6279 50.7428 31.5268 53.3166 31.9954C55.8904 32.464 58.3303 33.4911 60.4644 35.0042C62.0183 36.1059 63.3827 37.4458 64.5093 38.9707C65.2077 39.916 64.8412 41.2247 63.8197 41.8061C62.7982 42.3875 61.5108 42.0174 60.7778 41.0986C59.9824 40.1015 59.0489 39.2181 58.0027 38.4763C56.3759 37.3229 54.5161 36.5401 52.5541 36.1828C50.5922 35.8256 48.5758 35.9027 46.6469 36.4086C44.7179 36.9146 42.9233 37.8371 41.3893 39.1113C39.8553 40.3855 38.6192 41.9804 37.7679 43.7838C36.9167 45.5872 36.471 47.5552 36.4622 49.5494C36.4534 51.5436 36.8818 53.5154 37.7172 55.3262C38.2544 56.4908 38.9515 57.5705 39.7858 58.5353C40.5545 59.4244 40.6821 60.7579 39.9232 61.6554Z",fill:"white"})))}}e.default=a},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=o(n(1)),r=o(n(29));class a extends i.default.Component{render(){return this.props.text?i.default.createElement("div",{style:{position:"absolute",top:this.props.top,bottom:this.props.bottom,display:"flex",width:"100%",justifyContent:"center"}},i.default.createElement("div",{style:{padding:"5px 10px",borderRadius:5,backgroundColor:r.default.TransparentGray,color:r.default.White,fontWeight:500,fontSize:13}},this.props.text)):null}}e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeCountConfiguration=e.BarcodeCountStyleConfiguration=void 0;class o{constructor(){this.topLabelTop=20,this.sheetHeight="95%",this.sheetTopMargin="10%"}}e.BarcodeCountStyleConfiguration=o;e.BarcodeCountConfiguration=class{constructor(){this.enabled=!1,this.style=new o}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MagneticLine=void 0;e.MagneticLine=class{constructor(t,e){this.p1=t,this.p2=e}}},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});const i=n(36),r=n(12);class a{static postBlob(t,e){return o(this,void 0,void 0,(function*(){const n=yield fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e});return yield n.json()}))}static postImage(t,e){return o(this,void 0,void 0,(function*(){const n=r.ImageUtils.convertImageDataWrapperToImageData(e),o=r.ImageUtils.createImageDataCanvas(n),i=yield new Promise((t=>o.toBlob((e=>t(e)))));return yield a.postBlob(t,i)}))}static recognizeBarcodes(t,e){return o(this,void 0,void 0,(function*(){const n=yield a.postImage(t,e);return i.BarcodeResult.fromWorker(n,e)}))}}e.default=a},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.areAnyActionButtonsVisible=e.ActionButtonCapabilities=e.Props=void 0;const s=n(2),l=n(2),u=r(n(1)),c=r(n(43)),d=n(139);e.Props=class{};function f(t,e){return t&&(t.hasFacingOptions&&e.flipCameraButton.visible||t.isTorchAvailable&&e.flashButton.visible)||e.zoomButton.visible}e.ActionButtonCapabilities=class{static setFromScanner(t,e){var n;if(!t.current)return;e({hasFacingOptions:t.current.getCapabilities().facingMode.length>0,isTorchAvailable:null!==(n=t.current.getActiveCameraInfo().supportsTorchControl)&&void 0!==n&&n})}},e.areAnyActionButtonsVisible=f,e.default=function(t){const e=t.zoomSteps.findIndex((e=>e==t.defaultZoomFactor)),[n,o]=(0,u.useState)(!1),[i,r]=(0,u.useState)(e),h=t.zoomSteps[i],[p,m]=(0,u.useState)("environment"),g=(0,d.useScanningViewSize)(t.scanner),v=!!g;if((0,u.useEffect)((()=>{var e;t.torchEnabledInitially&&(null===(e=t.capabilities)||void 0===e?void 0:e.isTorchAvailable)&&v&&(()=>{a(this,void 0,void 0,(function*(){yield t.scanner.setTorchState(t.torchEnabledInitially),o(t.torchEnabledInitially)}))})()}),[t.capabilities,v]),(0,u.useEffect)((()=>{var e;v&&(null===(e=t.scanner)||void 0===e||e.setZoom(h))}),[v,h]),!t.capabilities||!g)return null;if(!f(t.capabilities,t.config))return null;const y=g.height-t.bottomPadding-c.ACTION_BUTTON_HEIGHT;return u.default.createElement(l.Box,{style:{position:"absolute",marginTop:y,marginLeft:g.width/2,transform:"translateX(-50%)",display:"flex",justifyContent:"center",zIndex:1e3}},u.default.createElement(c.default,Object.assign({},t.config.flashButton,{visible:t.capabilities.isTorchAvailable&&t.config.flashButton.visible,icon:n?s.FlashlightOn:s.FlashlightOff,active:n,onClick:()=>a(this,void 0,void 0,(function*(){yield t.scanner.setTorchState(!n),o(!n)}))})),u.default.createElement("div",{style:{width:20}}),u.default.createElement(c.default,Object.assign({},t.config.zoomButton,{text:`${h.toFixed(1)}x`,active:i!==e,onClick:()=>r((i+1)%t.zoomSteps.length)})),u.default.createElement("div",{style:{width:20}}),u.default.createElement(c.default,Object.assign({},t.config.flipCameraButton,{visible:t.capabilities.hasFacingOptions&&t.config.flipCameraButton.visible,active:"user"===p,icon:s.FlipCameraIos,onClick:()=>{var e;const n="environment"===p?"user":"environment";m(n),null===(e=t.scanner)||void 0===e||e.setCameraDirection(n)}})))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useScanningViewSize=void 0;const o=n(1);e.useScanningViewSize=function(t){var e,n;const i=null===(n=null===(e=null==t?void 0:t.camera)||void 0===e?void 0:e.video)||void 0===n?void 0:n.parentElement,r=()=>i?i.getBoundingClientRect():null,[a,s]=(0,o.useState)(r());return(0,o.useEffect)((()=>{if(i){const t=()=>s(r());t();const e=new ResizeObserver(t);return e.observe(i),()=>{e.disconnect()}}}),[i]),a}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__rest||function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.ArOverlayBarcodeInfo=void 0;const s=r(n(1)),l=n(14),u=n(5),c=r(n(78)),d=n(19),f=n(41),h=n(70),p=n(4),m=n(2);c.BarcodePolygonLabelProps;class g extends c.default{constructor(){super(...arguments),this.count=0,this.setCount=t=>{this.count=t,this.forceUpdate()}}render(){var t;const{barcodeItemConfiguration:e,barcodeItemInfoPosition:n,counterBadge:o}=this.props,i=this.state.element,r=null!==(t=this.props.animateToPoints)&&void 0!==t?t:i.points,a=i.code,c=i.highlighted,d=10,f=(u.Point.lowestY(r)+u.Point.highestY(r))/2,g=(u.Point.lowestX(r)+u.Point.highestX(r))/2,y=(()=>{const t={badgeY:f,badgeStyle:{transform:"translateX(-50%) translateY(-50%)"}};return"BELOW"===n?Object.assign(Object.assign({},t),{labelY:Math.max(u.Point.highestY(r)+d,o?f-24-d:-1/0),labelStyle:{transform:"translateX(-50%)"}}):"ABOVE"===n?Object.assign(Object.assign({},t),{labelY:Math.min(u.Point.lowestY(r)-d,o.visible?f+24+d:1/0),labelStyle:{transform:"translateX(-50%) translateY(-100%)"}}):"STACKED"===n?{badgeY:f,badgeStyle:{transform:"translateX(-50%) translateY(calc(-100% - 5px))"},labelY:f,labelStyle:{transform:o.visible?"translateX(-50%) translateY(5px)":"translateX(-50%) translateY(-50%)"}}:"DISABLED"===n?Object.assign(Object.assign({},t),{labelY:0,labelStyle:{display:"none"}}):void 0})(),b=!1===e.titleDeselected.visible&&!1===e.subtitleDeselected.visible,A={x:g,y:Math.round(y.labelY)},S={x:g,y:Math.round(y.badgeY)},C={duration:.25,easing:"linear"};return s.default.createElement(s.default.Fragment,null,s.default.createElement(l.motion.div,{ref:t=>this.label=t,style:Object.assign(Object.assign({},A),{position:"absolute",width:"100%",zIndex:100}),animate:this.props.animateToPoints?A:{},transition:C},s.default.createElement(h.StyledBox,{sx:Object.assign({p:1,maxWidth:232,cursor:"pointer",display:b?"inline-block":"block",zIndex:1500},y.labelStyle),styleConfig:c?e.backgroundSelected:e.backgroundDeselected,"data-sb-ar-barcode-info":"1",onClick:()=>{var t;return null===(t=this.props)||void 0===t?void 0:t.onClick(i)}},s.default.createElement(v,{barcode:a,barcodeImageVisible:e.imageVisible,maxNumberOfTitleLines:1,maxNumberOfSubtitleLines:1,imageSize:42,displayRightArrow:!0,barcodeTitle:c?e.titleSelected:e.titleDeselected,barcodeSubtitle:c?e.subtitleSelected:e.subtitleDeselected}))),o.visible&&this.count>0&&s.default.createElement(l.motion.div,{style:Object.assign({position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",zIndex:100},S),animate:this.props.animateToPoints?S:{},transition:C},s.default.createElement(h.StyledBox,{styleConfig:Object.assign(Object.assign({},o.background),{cornerRadius:24}),style:Object.assign(Object.assign({},y.badgeStyle),{width:48,height:48,color:p.SBTheme.getColorValue(o.foregroundColor),display:"flex",justifyContent:"center",alignItems:"center",zIndex:1500,cursor:"pointer"}),onClick:()=>{var t;return null===(t=this.props)||void 0===t?void 0:t.onClick(i)}},s.default.createElement(m.Typography,{fontSize:16,fontWeight:"500"},"x",this.count))))}}function v(t){var{barcode:e}=t,n=a(t,["barcode"]);const o=(0,s.useContext)(d.BarcodeMapperContext).useBarcodeMappedData(e);return s.default.createElement(f.BarcodeInfo,Object.assign({barcodeMappedData:o},n))}e.ArOverlayBarcodeInfo=g},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.MultipleScanningModeController=void 0;const s=r(n(1)),l=a(n(2)),u=a(n(2)),c=n(142),d=(n(57),n(145)),f=n(147),h=n(47),p=n(82),m=n(16),g=n(150),v=n(43),y=a(n(44)),b=a(n(71)),A=n(72),S=n(4),C=n(152),_=n(19),w=n(81),x=a(n(83));e.MultipleScanningModeController=function(t){const e=(0,s.useRef)(),[n,o]=(0,s.useReducer)(C.countedBarcodesReducer,[]),[i,r]=(0,s.useState)(),a=(0,s.useRef)(new Date("2001-01-01")),[O,E]=s.default.useState(null),[P,L]=(0,s.useState)(!1),B=(0,s.useMemo)((()=>"__sb_"+Math.random()),[]),[T,k]=(0,s.useState)(!0),M=(0,s.useContext)(_.BarcodeMapperContext),D=t.configuration.useCase,j=(0,s.useRef)(Object.assign(Object.assign({},(0,w.barcodeScannerViewConfigFromRtuUiConfig)(t.configuration.cameraConfiguration)),{onBarcodesDetected:e=>{(new Date).getTime()-a.current.getTime()<D.countingRepeatDelay||!t.initialScanDelayHasPassed.current||(!D.arOverlay.visible||D.arOverlay.automaticSelectionEnabled?(a.current=new Date,y.default.INSTANCE.beep(t.configuration.sound),b.default.INSTANCE.vibrate(t.configuration.vibration),o({type:"addOne",barcodes:e.barcodes})):o({type:"discover",barcodes:e.barcodes}))},_onDetectionFailed(t){},onError:t=>{},returnBarcodeImage:!0,captureDelay:1e3/60,backgroundColor:S.SBTheme.getColorValue(t.configuration.backgroundColor)}));(0,s.useEffect)((()=>{j.current.container=e.current}),[e]),(0,s.useEffect)((()=>{for(const t of n){if(t.polygonElement){const e=t.count>0?D.arOverlay.polygon.selected:D.arOverlay.polygon.deselected;t.polygonElement.style({fill:D.arOverlay.polygon.visible?S.SBTheme.getColorValue(e.fillColor):"transparent",stroke:D.arOverlay.polygon.visible?S.SBTheme.getColorValue(e.strokeColor):"transparent",strokeWidth:e.strokeWidth,cornerRadius:e.cornerRadius})}t.labelElement&&(t.labelElement.update(Object.assign(Object.assign({},t.labelElement.state.element),{highlighted:t.count>0})),t.labelElement.setCount(t.count))}}),[n]);const W=n.reduce(((t,e)=>t+e.count),0),I=s.default.createElement(f.BarcodeList,{barcodes:n.filter((t=>t.count>0)),onBarcodeChange:o,sheetContent:D.sheetContent,onNumberClick:t=>E(t),mode:D.mode}),R={numBarcodes:W,leftButton:Object.assign(Object.assign({},D.sheetContent.clearAllButton),{onClick:()=>o({type:"clear"})}),rightButton:Object.assign(Object.assign({},D.sheetContent.submitButton),{onClick:()=>{const e=n.filter((t=>t.count>0)).map((t=>M.mapBarcodeToBarcodeItem(t.barcode,"COUNTING"===D.mode?t.count:1)));t.onSubmit({items:e})}}),title:D.sheetContent.title},F=(0,h.useIsLayout)("mobile"),V="BUTTON"!==D.sheet.mode&&F?"SMALL"===D.sheet.collapsedVisibleHeight?69:128:0,z=F&&"BUTTON"===D.sheet.mode,N=z?g.CountingButtonHeight+16:0,U=(T?v.ACTION_BUTTON_HEIGHT+2*v.ACTION_BUTTON_PADDING:0)+N,H=(0,s.useContext)(m.NavigationBarSizeContext);return s.default.createElement(s.default.Fragment,null,s.default.createElement(u.default,{container:!0,sx:{display:"flex",flexDirection:F?"column":"row",height:`calc(${H.remainingVisibleBodyHeight} - ${V}px)`},alignItems:"stretch"},s.default.createElement(u.default,{id:B,item:!0,ref:e,component:"div",xs:F?12:7,zIndex:100},z&&s.default.createElement(g.CountingButton,{style:{position:"absolute",marginTop:`calc(${H.remainingVisibleBodyHeight} - ${g.CountingButtonHeight}px - 8px)`,width:"100%",display:"flex",justifyContent:"center",zIndex:100},count:W,onClick:()=>L(!P),buttonStyling:D.sheet.listButton}),s.default.createElement(A.BarcodeScanner,{viewFinderPadding:{minTopPadding:H.minTopPaddingForContent,minBottomPadding:U},arOverlay:Object.assign(Object.assign({},D.arOverlay),{counterBadge:Object.assign(Object.assign({},D.arOverlay.counterBadge),{visible:D.arOverlay.counterBadge.visible&&"COUNTING"===D.mode})}),containerId:B,barcodeScannerViewConfig:j.current,onCameraPermissionDenied:t.onCameraPermissionDenied,actionBarConfig:t.configuration.actionBar,actionBarBottomPadding:v.ACTION_BUTTON_PADDING+N,setActionButtonsVisible:k,arOnBarcodeClick:e=>{y.default.INSTANCE.beep(t.configuration.sound),b.default.INSTANCE.vibrate(t.configuration.vibration),o({type:"addOne",barcodes:[e]})},arOnBarcodeEnter:(t,e,n)=>{n&&e&&o({type:"setHtmlElements",barcode:t,labelElement:n,polygonElement:e})},scanningPaused:P&&F,cameraConfiguration:t.configuration.cameraConfiguration}),F&&s.default.createElement(c.BarcodeResultDrawer,{closedSheetVisibleHeight:V,sheetStyle:D.sheet,contentStyle:D.sheetContent,manualCountEditDialog:D.manualCountEditDialog,numBarcodes:W,onBarcodeChange:t=>o(t),drawerHeaderContentProps:R,isOpen:P,onSwipe:t=>{L("swipe-to-open"===t)}},I)),(0,h.useIsLayoutEqualOrAbove)("tablet")&&s.default.createElement(u.default,{item:!0,xs:F?12:5,component:"div",style:{paddingTop:H.minTopPaddingForContent,height:"100%",flexDirection:"column",display:"flex",backgroundColor:S.SBTheme.getColorValue(D.sheetContent.sheetColor)},zIndex:1050},s.default.createElement(l.default,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},zIndex:50},s.default.createElement(p.DrawerHeaderContent,Object.assign({},R))),I,s.default.createElement(x.default,{numBarcodes:W,style:D.sheetContent}))),s.default.createElement(d.CountEditDialog,{barcode:O,dialogStyling:D.manualCountEditDialog,onCancel:()=>E(null),setCounter:t=>{o(t),E(null)}}))}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeResultDrawer=void 0;const s=r(n(1)),l=n(1),u=a(n(2)),c=n(143),d=a(n(83)),f=n(84),h=n(16),p=n(4);e.BarcodeResultDrawer=function(t){const[e,n]=(0,l.useState)(-1),[o,i]=(0,l.useState)(!1),r=(0,l.useRef)(null),a=t.closedSheetVisibleHeight,m=(0,l.useContext)(h.NavigationBarSizeContext).height,g=()=>window.innerHeight-m,v=t=>{n(t),i(!0),setTimeout((()=>{i(!1)}),500)},y=(0,f.useDragListener)((t=>{const e=t.y-r.current.clientHeight/2;n(Math.max(document.body.clientHeight-e,a))}),((e,n)=>{if(e.y===y.startPoint.current.y)return;let o,i=document.body.clientHeight-e.y;const r=g();i<r/2&&(o="swipe-to-close"),i>r/2&&(o="swipe-to-open"),"up"===n&&(o="swipe-to-open"),"down"===n&&(o="swipe-to-close"),t.onSwipe(o)}),(()=>{v(e)}));return(0,l.useEffect)((()=>{o||y.dragOngoing||!r||(t.isOpen||e===a?t.isOpen&&e!==g()&&v(g()):v(a))}),[t.isOpen,e,y.dragOngoing]),s.createElement("div",null,s.createElement(u.default,{variant:"persistent",anchor:"bottom",open:!0,onClose:()=>{},onOpen:()=>{},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},PaperProps:{style:{height:e,overflow:"hidden",borderRadius:10,transition:o?"height 500ms":void 0,backgroundColor:p.SBTheme.getColorValue(t.contentStyle.sheetColor)},elevation:24}},s.createElement(c.BarcodeDrawerHeader,{innerRef:t=>{r.current=t},drawerHeaderContentProps:t.drawerHeaderContentProps,dragProps:y.props}),t.children,s.createElement(d.default,{numBarcodes:t.numBarcodes,style:t.contentStyle,onStartClick:()=>t.onSwipe("swipe-to-close")})))}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeDrawerHeader=e.Props=void 0;const i=o(n(1)),r=n(2),a=n(2),s=n(82);function l(){return i.default.createElement("div",{style:{width:30,height:6,backgroundColor:a.grey[300],borderRadius:3,position:"absolute",top:8,left:"calc(50% - 15px)"},"data-sb-drawer-puller":"1"})}e.Props=class{},e.BarcodeDrawerHeader=function(t){return i.default.createElement(r.Box,Object.assign({sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"center",paddingTop:2,paddingBottom:1,touchAction:"none"},ref:t.innerRef},t.dragProps),i.default.createElement(l,null),i.default.createElement(s.DrawerHeaderContent,Object.assign({},t.drawerHeaderContentProps)))}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=o(n(1));e.default=function(t){return i.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"41",height:"38",viewBox:"0 0 41 38",fill:"none"},i.default.createElement("path",{d:"M4.09514 37.0902V10.6304L0.019043 1.87823L3.18969 0.348877L7.76144 10.6304H32.6886L37.2484 0.348877L40.419 1.87823L36.3549 10.6304V37.0902H4.09514ZM15.994 22.013H24.494C24.9461 22.013 25.3211 21.8632 25.619 21.5637C25.9169 21.2641 26.0658 20.8871 26.0658 20.4325C26.0658 19.9779 25.9169 19.6038 25.619 19.3101C25.3211 19.0164 24.9461 18.8695 24.494 18.8695H15.994C15.5419 18.8695 15.167 19.0193 14.8691 19.3189C14.5712 19.6184 14.4223 19.9955 14.4223 20.45C14.4223 20.9046 14.5712 21.2788 14.8691 21.5725C15.167 21.8662 15.5419 22.013 15.994 22.013ZM7.50164 33.6837H32.9364V14.0489H7.50164V33.6837Z",fill:t.color}))}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CountEditDialog=void 0;const s=r(n(1)),l=n(4),u=n(2),c=n(42),d=n(9),f=a(n(2)),h=a(n(2)),p=n(25),m=a(n(2)),g=n(146);e.CountEditDialog=function(t){const e=!!t.barcode,[n,o]=s.default.useState(""),i=s.default.useRef(null),r={backgroundColor:l.SBTheme.getColorValue(t.dialogStyling.sheetColor)};return(0,s.useEffect)((()=>{e&&o(String(t.barcode.count))}),[e]),s.default.createElement(s.default.Fragment,null,s.default.createElement(c.StyledDialog,{open:e,modalOverlayColor:t.dialogStyling.modalOverlayColor,TransitionProps:{onEnter:()=>{var t;return null===(t=i.current)||void 0===t?void 0:t.focus()}},onClose:t.onCancel,PaperProps:{component:"form",onSubmit:e=>{e.preventDefault(),t.setCounter({type:"setCount",barcode:t.barcode.barcode,newCount:parseInt(n)||0})}}},s.default.createElement(u.DialogContent,{style:r},s.default.createElement(u.Typography,{fontSize:16,fontWeight:500,textAlign:"center"},s.default.createElement(d.StyledText,{config:t.dialogStyling.title})),s.default.createElement(u.Typography,{fontSize:14,textAlign:"center"},s.default.createElement(d.StyledText,{config:t.dialogStyling.info})),s.default.createElement(u.Box,{sx:{display:"flex",border:"2px solid",borderColor:l.SBTheme.getColorValue(t.dialogStyling.dividerColor),mh:2,mb:0,p:1,borderRadius:1}},s.default.createElement(g.StyledInput,{inputRef:i,value:n,onChange:t=>{const e=parseInt(t.target.value.replaceAll(/[^0-9]/g,""));o(e>=0?e.toString():"")},type:"text",pattern:"[0-9]*"}),t.dialogStyling.clearTextButton.visible&&s.default.createElement(m.default,{sx:{marginLeft:"auto"},onClick:()=>o(""),htmlColor:l.SBTheme.getColorValue(t.dialogStyling.clearTextButton.color)}))),s.default.createElement(u.DialogActions,{sx:Object.assign(Object.assign({},r),{pt:0})},s.default.createElement(f.default,{container:!0,spacing:2},s.default.createElement(f.default,{item:!0,xs:12},s.default.createElement(h.default,{color:l.SBTheme.getColorValue(t.dialogStyling.dividerColor)})),s.default.createElement(f.default,{item:!0,xs:6},s.default.createElement(p.DialogButton,Object.assign({style:{width:"100%"},onClick:t.onCancel},t.dialogStyling.cancelButton))),s.default.createElement(f.default,{item:!0,xs:6},s.default.createElement(p.DialogButton,Object.assign({icon:"Replay",style:{width:"100%"},onClick:()=>{},type:"submit"},t.dialogStyling.updateButton)))))))}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.StyledInput=void 0;const i=o(n(1));e.StyledInput=function(t){return t.style=Object.assign(Object.assign({},t.style),{border:"none",display:"block",outlineWidth:0,width:"100%"}),i.default.createElement("input",Object.assign({},t,{ref:t.inputRef}))}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeList=void 0;const i=o(n(1)),r=n(2),a=o(n(2)),s=o(n(2)),l=o(n(2)),u=o(n(148)),c=n(4);e.BarcodeList=function(t){const e=c.SBTheme.getColorValue(t.sheetContent.dividerColor);return i.default.createElement(i.default.Fragment,null,i.default.createElement(r.Divider,{style:{borderColor:e}}),t.barcodes.length>0&&i.default.createElement(l.default,{sx:{width:"auto",flex:1,overflowY:"auto",overflowX:"hidden"},role:"presentation"},i.default.createElement(a.default,{sx:{p:0}},t.barcodes.map((({barcode:n,count:o})=>i.default.createElement(s.default,{key:n.format+n.text,sx:{padding:0,borderBottom:`1px solid ${e}`}},i.default.createElement(u.default,{barcode:n,onDelete:()=>t.onBarcodeChange({type:"remove",barcode:n}),counterForm:t.sheetContent.manualCountChangeEnabled&&"COUNTING"===t.mode&&{counter:o,manualCountChangeColor:t.sheetContent.manualCountChangeColor,manualCountOutlineColor:t.sheetContent.manualCountOutlineColor,setCounter:e=>{t.onBarcodeChange({type:"setCount",barcode:n,newCount:e})},onNumberClick:()=>t.onNumberClick({barcode:n,count:o})},readonlyCount:"COUNTING"!==t.mode||t.sheetContent.manualCountChangeEnabled?null:o,maxNumberOfTitleLines:1,maxNumberOfSubtitleLines:1,displayRightArrow:!1,imageSize:t.sheetContent.manualCountChangeEnabled?84:40,barcodeImageVisible:t.sheetContent.barcodeItemImageVisible,barcodeTitle:t.sheetContent.barcodeItemTitle,barcodeSubtitle:t.sheetContent.barcodeItemSubtitle,swipeToDeleteConfig:t.sheetContent.swipeToDelete,sheetColor:t.sheetContent.sheetColor})))))))}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=r(n(1)),l=n(2),u=a(n(2)),c=n(41),d=a(n(149)),f=n(84),h=n(19),p=n(47),m=n(4),g=150;e.default=function(t){const[e,n]=(0,s.useState)(0),[o,i]=(0,s.useState)(!1);let r;const a=(0,f.useDragListener)((t=>{let e=a.startPoint.current.x-t.x;e<0?a.stop():n(-e)}),(t=>{if(t.x===a.startPoint.current.x)return;const e=a.startPoint.current.x-t.x;y(e>75?g:0)}),(()=>{y(0)})),v=(0,s.useContext)(h.BarcodeMapperContext).useBarcodeMappedData(t.barcode),y=e=>{const o=e>=g,a=-r.getBoundingClientRect().width;n(o?a:0),i(!0),setTimeout((()=>{i(!1),o&&t.onDelete(t.barcode)}),200)},b=(0,p.useIsLayout)("desktop")&&t.swipeToDeleteConfig.enabled,A=!b&&t.swipeToDeleteConfig.enabled;return(0,s.useEffect)((()=>{A||y(0)}),[A]),s.default.createElement(l.Box,{sx:{px:2},style:{width:"100%",paddingRight:0},ref:t=>r=t},s.default.createElement(d.default,{config:t.swipeToDeleteConfig,visibleOffset:g}),s.default.createElement(l.Box,Object.assign({sx:{width:"100%",backgroundColor:m.SBTheme.getColorValue(t.sheetColor),transform:`translateX(${e}px)`,transition:o?"transform 200ms ease-in-out":void 0,touchAction:"pan-y",display:"flex",alignItems:"center",paddingTop:"16px",paddingBottom:"16px",columnGap:"16px"}},A?a.props:{}),s.default.createElement(c.BarcodeInfo,Object.assign({barcodeMappedData:v},t)),null!==t.readonlyCount&&s.default.createElement(l.Box,{sx:{fontSize:18,marginTop:"auto",flex:1,textAlign:"right",color:m.SBTheme.getColorValue("?sbColorOnSurfaceVariant")}},"x",t.readonlyCount),b&&s.default.createElement(u.default,{sx:{height:"100%",marginLeft:"auto",cursor:"pointer",color:m.SBTheme.getColorValue("?sbColorOnSurface")},onClick:()=>t.onDelete(t.barcode)}),s.default.createElement(l.Box,{sx:{width:"0px"}})))}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Props=void 0;const i=o(n(1)),r=o(n(2)),a=n(4);e.Props=class{},e.default=function(t){return i.default.createElement("div",{style:{top:0,width:"100%",marginTop:"1px",marginLeft:"1px",height:"calc(100% - 2px)",position:"absolute",backgroundColor:a.SBTheme.getColorValue(t.config.backgroundColor),display:"flex",alignItems:"right",justifyContent:"right"}},i.default.createElement(r.default,{style:{height:"100%",color:a.SBTheme.getColorValue(t.config.iconColor),paddingRight:t.visibleOffset/2,cursor:"pointer"}}))}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CountingButton=e.CountingButtonHeight=void 0;const i=n(2),r=o(n(2)),a=o(n(1)),s=n(4),l=n(151);e.CountingButtonHeight=60,e.CountingButton=function(t){if(!t.buttonStyling.visible)return null;const n=e.CountingButtonHeight;return a.default.createElement(i.Box,{style:t.style},a.default.createElement(l.StyledBadge,{count:t.count,backgroundColor:s.SBTheme.getColorValue(t.buttonStyling.badgeBackgroundColor),foregroundColor:s.SBTheme.getColorValue(t.buttonStyling.badgeForegroundColor)},a.default.createElement(i.IconButton,{sx:{backgroundColor:s.SBTheme.getColorValue(t.buttonStyling.backgroundColor),width:n,height:n,"&:hover, &:focus":{backgroundColor:s.SBTheme.getColorValue(t.buttonStyling.activeBackgroundColor),outline:"none"}},onClick:t.onClick,disableRipple:!0,disableFocusRipple:!0},a.default.createElement(r.default,{sx:{color:s.SBTheme.getColorValue(t.buttonStyling.foregroundColor),fontSize:"24pt","&:hover, &:focus":{color:s.SBTheme.getColorValue(t.buttonStyling.activeForegroundColor)}}}))))}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.StyledBadge=void 0;const i=n(2),r=o(n(1));e.StyledBadge=function(t){return r.default.createElement(i.Badge,{anchorOrigin:{vertical:"top",horizontal:"left"},badgeContent:t.count,showZero:!0,color:"primary",overlap:"circular",slotProps:{badge:{style:{backgroundColor:t.backgroundColor,color:t.foregroundColor,fontWeight:"bold"}}}},t.children)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.countedBarcodesReducer=void 0;const o=(t,e)=>t.format===e.format&&t.text===e.text;e.countedBarcodesReducer=function(t,e){switch(e.type){case"discover":case"addOne":const n="addOne"===e.type?1:0,i=[];for(const r of t)e.barcodes.some((t=>o(t,r.barcode)))?i.push(Object.assign(Object.assign({},r),{count:r.count+n})):i.push(r);for(const r of e.barcodes)t.some((t=>o(t.barcode,r)))||i.push({barcode:r,count:n});return i;case"setCount":return t.map((t=>o(t.barcode,e.barcode)?Object.assign(Object.assign({},t),{count:e.newCount}):t));case"remove":return t.map((t=>Object.assign(Object.assign({},t),{count:o(t.barcode,e.barcode)?0:t.count})));case"clear":return t.map((t=>Object.assign(Object.assign({},t),{count:0})));case"setHtmlElements":let r=!1;const a=t.map((t=>o(t.barcode,e.barcode)?(r=!0,Object.assign(Object.assign({},t),{polygonElement:e.polygonElement,labelElement:e.labelElement})):t));return r||a.push({barcode:e.barcode,count:0,labelElement:e.labelElement,polygonElement:e.polygonElement}),a}}},function(t,e,n){"use strict";n.r(e),n.d(e,"ErrorBoundary",(function(){return a})),n.d(e,"ErrorBoundaryContext",(function(){return i})),n.d(e,"useErrorBoundary",(function(){return s})),n.d(e,"withErrorBoundary",(function(){return l}));var o=n(1);const i=Object(o.createContext)(null),r={didCatch:!1,error:null};class a extends o.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=r}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(null!==t){for(var e,n,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];null===(e=(n=this.props).onReset)||void 0===e||e.call(n,{args:i,reason:"imperative-api"}),this.setState(r)}}componentDidCatch(t,e){var n,o;null===(n=(o=this.props).onError)||void 0===n||n.call(o,t,e)}componentDidUpdate(t,e){const{didCatch:n}=this.state,{resetKeys:o}=this.props;var i,a;n&&null!==e.error&&function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.length!==e.length||t.some(((t,n)=>!Object.is(t,e[n])))}(t.resetKeys,o)&&(null===(i=(a=this.props).onReset)||void 0===i||i.call(a,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(r))}render(){const{children:t,fallbackRender:e,FallbackComponent:n,fallback:r}=this.props,{didCatch:a,error:s}=this.state;let l=t;if(a){const t={error:s,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof e)l=e(t);else if(n)l=Object(o.createElement)(n,t);else{if(null!==r&&!Object(o.isValidElement)(r))throw s;l=r}}return Object(o.createElement)(i.Provider,{value:{didCatch:a,error:s,resetErrorBoundary:this.resetErrorBoundary}},l)}}function s(){const t=Object(o.useContext)(i);!function(t){if(null==t||"boolean"!=typeof t.didCatch||"function"!=typeof t.resetErrorBoundary)throw new Error("ErrorBoundaryContext not found")}(t);const[e,n]=Object(o.useState)({error:null,hasError:!1}),r=Object(o.useMemo)((()=>({resetBoundary:()=>{t.resetErrorBoundary(),n({error:null,hasError:!1})},showBoundary:t=>n({error:t,hasError:!0})})),[t.resetErrorBoundary]);if(e.hasError)throw e.error;return r}function l(t,e){const n=Object(o.forwardRef)(((n,i)=>Object(o.createElement)(a,e,Object(o.createElement)(t,{...n,ref:i})))),i=t.displayName||t.name||"Unknown";return n.displayName="withErrorBoundary(".concat(i,")"),n}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BarcodeMappingErrorDialog=void 0;const s=r(n(1)),l=n(17),u=n(2),c=n(9),d=n(25),f=a(n(2)),h=a(n(2)),p=n(4),m=n(42);l.BarcodeItemErrorState;e.BarcodeMappingErrorDialog=function(t){const e=(0,s.useContext)(p.SBPaletteContext).getColorValue,n={backgroundColor:e(t.sheetColor)};return s.default.createElement(m.StyledDialog,{modalOverlayColor:t.modalOverlayColor,open:t.open},s.default.createElement(u.DialogContent,{sx:Object.assign(Object.assign({},n),{p:2,pb:1,textAlign:"center"})},s.default.createElement(u.Typography,{sx:{fontSize:"16pt",fontWeight:"bold"}},s.default.createElement(c.StyledText,{config:t.title})),s.default.createElement(u.Typography,{sx:{fontSize:"14pt",lineHeight:"16pt"}},s.default.createElement(c.StyledText,{config:t.subtitle}))),s.default.createElement(u.DialogActions,{sx:Object.assign(Object.assign({},n),{pt:1})},s.default.createElement(f.default,{container:!0,spacing:2},s.default.createElement(f.default,{item:!0,xs:12},s.default.createElement(h.default,{color:e(t.dividerColor)})),s.default.createElement(f.default,{item:!0,xs:6},s.default.createElement(d.DialogButton,Object.assign({style:{width:"100%"},onClick:t.handleCancel},t.cancelButton))),s.default.createElement(f.default,{item:!0,xs:6},s.default.createElement(d.DialogButton,Object.assign({icon:"Replay",style:{width:"100%"},onClick:t.handleRetry},t.retryButton))))))}},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CameraPermissionDenied=void 0;const s=n(2),l=r(n(1)),u=a(n(2)),c=n(16),d=n(4),f=n(9),h=n(40);e.CameraPermissionDenied=function(t){const e=(0,l.useContext)(c.NavigationBarSizeContext);return l.default.createElement(s.Box,{sx:{paddingTop:e.minTopPaddingForContent+"px",overflowY:"scroll",backgroundColor:d.SBTheme.getColorValue(t.config.background)}},l.default.createElement(s.Box,{sx:{height:e.remainingVisibleBodyHeight,marginLeft:"auto",marginRight:"auto",maxWidth:280,display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"}},t.config.icon.visible&&l.default.createElement(s.Box,null,l.default.createElement(s.Avatar,{sx:{width:100,height:100,backgroundColor:d.SBTheme.getColorValue(t.config.iconBackground),margin:"24px"}},l.default.createElement(u.default,{sx:{fontSize:50,color:d.SBTheme.getColorValue(t.config.icon.color)}}))),l.default.createElement(s.Typography,{sx:{fontSize:20,textAlign:"center"}},l.default.createElement(f.StyledText,{config:t.config.enableCameraTitle})),l.default.createElement(s.Typography,{sx:{fontSize:16,textAlign:"center",paddingTop:"12px"}},l.default.createElement(f.StyledText,{config:t.config.enableCameraExplanation})),l.default.createElement(s.Box,{sx:{paddingTop:"16px"}},l.default.createElement(h.StyledButton,Object.assign({},t.config.closeButton,{onClick:t.onAppClose})))))}},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentScannerProps=e.DocumentScannerState=void 0;const r=i(n(1)),a=n(1),s=i(n(20)),l=n(53),u=n(31),c=n(13),d=n(5),f=n(26),h=n(77),p=n(157),m=i(n(28)),g=n(22),v=n(162),y=i(n(24));class b extends f.ScanbotCameraState{}e.DocumentScannerState=b;class A extends f.ScanbotCameraProps{}e.DocumentScannerProps=A;class S extends f.ScannerView{constructor(t){if(super(t),this.preventAutoCapture=!1,this.defaultCaptureButtonClick=()=>o(this,void 0,void 0,(function*(){const t=yield this.detectAndCrop();this.configuration.onDocumentDetected(t)})),Object.assign(this.state,{action:this.defaultAction}),!this.isSupported()){throw Error("Camera can only be accessed if the content is served via HTTPS, or on localhost. Check DocumentScannerView.isSupported() before creating the scanner.")}if(!s.default.instance)throw Error("Initialize the SDK by calling ScanbotSDK.initialize() before using the document scanner.")}get defaultAction(){return this.isAutoCaptureEnabled()?"searching":"manual"}get enabled(){return("searching"==this.state.action||"capturing"==this.state.action||"manual"==this.state.action)&&!this.disposed}get configuration(){return this._configuration||(this._configuration=l.DocumentScannerConfiguration.fromJson(this.props.configuration)),this._configuration}get autoCaptureSensitivity(){return 3e3*(1-this.configuration.autoCaptureSensitivity)}static create(t){return o(this,void 0,void 0,(function*(){const e=document.getElementById(t.containerId);if(!e)throw Error("Unable to initialize ScanbotSDK: Cannot find container element with the id provided.");return new Promise(((n,o)=>{(0,a.render)(r.default.createElement(S,{container:e,configuration:t,onSuccess:n,onFailure:o}),e)}))}))}detectAndCrop(){return o(this,void 0,void 0,(function*(){try{if(this.enabled){this.setState({action:"processing"});const t=yield this.camera.createImageData(S.DETECT_AND_CROP_RESOLUTION,this.configuration.useImageCaptureAPI);if(!t)return;y.default.debug("Detect & Crop document of size: "+t.height*t.width);const e=new c.Size(t.width,t.height),n=yield this.bridge.postByTransferringArgs("detectAndCropDocument",[t]);return n.videoSize=e,n}}finally{this.setState({action:this.defaultAction})}}))}enableAutoCapture(){this.updateAutoCapture(!0)}disableAutoCapture(){this.updateAutoCapture(!1)}updateAutoCapture(t){this._configuration?this._configuration.autoCaptureEnabled=t:this.props.configuration.autoCaptureEnabled=t,this.setState({action:this.defaultAction})}isAutoCaptureEnabled(){return this._configuration?this._configuration.autoCaptureEnabled:this.props.configuration.autoCaptureEnabled}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return o(this,void 0,void 0,(function*(){t.componentDidMount.call(this),this.detect(),this.recognizer=yield this.bridge.postByTransferringArgs("createDocumentDetector",[{useCombinedDetector:!1,acceptedAngleScore:this.configuration.acceptedAngleScore,acceptedSizeScore:this.configuration.acceptedSizeScore}])}))}componentWillUnmount(){const t=Object.create(null,{componentWillUnmount:{get:()=>super.componentWillUnmount}});return o(this,void 0,void 0,(function*(){t.componentWillUnmount.call(this),this.handleAutoCapture(!1),yield s.default.instance.release(this.recognizer,"Document Scanner")}))}detect(){var t,e;return o(this,void 0,void 0,(function*(){try{if(!this.enabled)return;const t=yield this.detectInWebWorker();if(!t||!this.enabled)return;if(!this.outline)return;const e=this.getStatusString(t),n="OK"===e;let o=this.scalePolygonPointsToPixels(t.polygon);this.outline.update(n,o,g.Utils.getProperty(this.configuration.text.hint,e)),yield this.handleAutoCapture(n,o)}catch(n){null===(e=(t=this.configuration).onError)||void 0===e||e.call(t,n)}finally{requestAnimationFrame(this.detect.bind(this))}}))}getStatusString(t){return this.configuration.ignoreBadAspectRatio&&"OK_BadAspectRatio"===t.detectionStatus?"OK":t.detectionStatus}detectInWebWorker(){return o(this,void 0,void 0,(function*(){const t=yield this.camera.createImageData(f.ScannerView.DEFAULT_DETECTION_RESOLUTION);if(!t||!this.enabled)return;const e=[this.recognizer,t];return yield this.bridge.postByCopyingArgs("documentDetectorDetect",e)}))}handleAutoCapture(t,e){return o(this,void 0,void 0,(function*(){if(this.configuration.autoCaptureEnabled&&!this.preventAutoCapture)if(t&&!this.autoCaptureToken&&e){if(this.updateButton("capturing"),!this.polygonMovementPredicate){const t=this.getCameraFrameSize();this.polygonMovementPredicate=new v.PolygonMovementPredicate(t)}if(this.runMovementPredicate(e))return this.updateButton("searching"),clearTimeout(this.autoCaptureToken),void(this.autoCaptureToken=void 0);this.autoCaptureToken=setTimeout((()=>o(this,void 0,void 0,(function*(){if(this.autoCaptureToken=void 0,!this.enabled)return;if(!this.configuration.autoCaptureEnabled)return;const t=yield this.detectAndCrop();if(t.polygon){const e=this.scalePolygonPointsToPixels(t.polygon);if(this.runMovementPredicate(e))return}t.success&&this.configuration.onDocumentDetected&&(this.configuration.onDocumentDetected(t),this.preventAutoCapture=!0,setTimeout((()=>{this.preventAutoCapture=!1}),this.configuration.autoCaptureDelay))}))),this.autoCaptureSensitivity)}else!t&&this.autoCaptureToken&&(this.updateButton("searching"),clearTimeout(this.autoCaptureToken),this.autoCaptureToken=void 0)}))}updateButton(t){this.setState({action:t})}render(){var t,e,n;const{action:o}=this.state,{configuration:i}=this,a=null===(t=i.style)||void 0===t?void 0:t.captureButton;return r.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(e=this.configuration)||void 0===e?void 0:e.spinnerColor),r.default.createElement(m.default,{configuration:this.configuration,videoConstraints:i.videoConstraints,mirrored:i.mirrored,preferredCamera:this.configuration.preferredCamera,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}}),r.default.createElement(p.DocumentOutline,{ref:t=>{this.outline=t},style:null===(n=i.style)||void 0===n?void 0:n.outline,action:o,autoCaptureSensitivity:this.autoCaptureSensitivity}),r.default.createElement(h.ShutterButton,{color:(null==a?void 0:a.color)?a.color:"FFF",action:o,onClick:this.enabled?i.onCaptureButtonClick||this.defaultCaptureButtonClick:()=>{}}))}scalePolygonPointsToPixels(t){if(t){const e=this.getCameraFrameSize(),n=c.Size.fromHtmlElement(this.camera.video),o=u.ViewUtils.findScale(n,e);t=(t=u.ViewUtils.convertToViewportPointsFromParentSize(e,t)).map((t=>d.Point.scaleToPoint(t,o.x,o.y,o.scale)))}return t}runMovementPredicate(t){const e=this.polygonMovementPredicate.check(t);return this.polygonMovementPredicate.update(t),e}getCameraFrameSize(){return this.camera.calculateFrameSize(f.ScannerView.DEFAULT_DETECTION_RESOLUTION,this.camera.videoSize().width,this.camera.videoSize().height)}}S.DETECT_AND_CROP_RESOLUTION=0,e.default=S},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentOutline=void 0;const i=o(n(1)),r=o(n(30));n(158);const a=o(n(159));class s extends i.default.Component{constructor(){super(...arguments),this.hintLabelClassName="scanbot-document-hint-text",this.state={text:"Initializing...",ok:!1,validPoints:!1}}render(){const{ok:t,text:e,validPoints:n}=this.state,o="searching"===this.props.action||"capturing"===this.props.action,s="processing"!==this.props.action&&n,l=(0,r.default)({[this.hintLabelClassName]:!0,[`${this.hintLabelClassName}-visible`]:s,[`${this.hintLabelClassName}-hidden`]:!s});return i.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",left:0,top:0}},i.default.createElement(a.default,{ref:t=>{this.polygon=t},action:this.props.action,style:{width:"100%",height:"100%"},polygonStyle:this.props.style.polygon,pathStyle:this.props.style.path,isOk:t,isVisible:s,autoCaptureSensitivity:this.props.autoCaptureSensitivity}),o&&i.default.createElement("label",{ref:t=>this.label=t,style:this.props.style.label,className:l,dangerouslySetInnerHTML:{__html:e}}))}update(t,e,n){this.polygon.update(e,t,this.props.action),this.label&&(this.label.innerHTML=n)}}e.DocumentOutline=s},function(t,e,n){"use strict";n.r(e);var o=n(34),i=n.n(o),r=n(49),a={insert:"head",singleton:!1};i()(r.a,a);e.default=r.a.locals||{}},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.AnimatedDocumentPolygonProps=void 0;const i=o(n(1)),r=o(n(160)),a=n(14),s=o(n(161));e.AnimatedDocumentPolygonProps=class{};class l extends i.default.Component{render(){return i.default.createElement(a.motion.svg,{style:{width:"100%",height:"100%",position:"absolute",overflow:"visible"}},i.default.createElement(r.default,{ref:t=>this.polygon=t,style:this.props.polygonStyle}),i.default.createElement(s.default,{ref:t=>this.path=t,style:this.props.pathStyle,duration:this.props.autoCaptureSensitivity}))}update(t,e,n){var o;const i="processing"!==n&&!!t,r=null!==(o=this.previous)&&void 0!==o?o:t,a=this.previous?t:void 0;this.polygon.update(r,a,e,i),this.previous=t,this.previous&&"capturing"===n?this.animateCapturing():this.clearAnimation()}animateCapturing(){this.path.animate(this.previous)}clearAnimation(){this.path.clear()}}e.default=l},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=n(14),r=o(n(1)),a=n(5),s=o(n(30)),l=n(32);class u extends r.default.Component{constructor(t){super(t),this.state={points:[],animatedPoints:[],isOk:!1,isVisible:!1}}update(t,e,n,o){const i={points:t,animatedPoints:e,isOk:n,isVisible:o};this.setState(i)}pointStringOrLatestValidPoints(t){return t&&t.length>0?a.Point.toSvgString(t):a.Point.toSvgString(this.latestValidPoints)}render(){var t;this.state.points&&(this.latestValidPoints=this.state.points);const e=null!==(t=this.props.style)&&void 0!==t?t:{},n=(0,s.default)(l.DocumentLineQuad.CLASSNAME,{[`${l.DocumentLineQuad.CLASSNAME}-ok`]:this.state.isOk},{[`${l.DocumentLineQuad.CLASSNAME}-visible`]:this.state.isVisible},{[`${l.DocumentLineQuad.CLASSNAME}-hidden`]:!this.state.isVisible});return r.default.createElement(i.motion.polygon,{ref:t=>this.polygon=t,style:{strokeWidth:e.strokeWidth||2},animate:{points:this.pointStringOrLatestValidPoints(this.state.animatedPoints),opacity:this.state.isVisible?1:0,stroke:this.state.isOk?e.strokeCapturing:e.strokeSearching,fill:this.state.isOk?e.fillCapturing:e.fillSearching},onClick:()=>{},fill:"transparent",className:n})}}e.default=u},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.AnimatedPathProps=void 0;const i=o(n(1)),r=n(14),a=n(5),s=n(32);e.AnimatedPathProps=class{constructor(){this.duration=1e3}};class l extends i.default.Component{constructor(t){super(t),this.state={path:void 0}}render(){var t,e;return this.state.path?i.default.createElement(r.motion.path,{initial:{pathLength:0},animate:{pathLength:1},transition:{duration:this.props.duration/1e3,ease:"easeInOut",repeat:1/0,repeatType:"loop",repeatDelay:1},stroke:(null===(t=this.props.style)||void 0===t?void 0:t.stroke)||"white",strokeWidth:(null===(e=this.props.style)||void 0===e?void 0:e.strokeWidth)||2,strokeDasharray:"0 1",fill:"none",d:this.state.path,className:`${s.DocumentLineQuad.CLASSNAME}-path`}):null}animate(t){const e="M"+a.Point.toSvgString(t)+"z";this.setState({path:e})}clear(){this.setState({path:void 0})}}e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PolygonMovementPredicate=void 0;const o=n(5),i=n(33);class r{constructor(t,e=r.DEFAULT_SENSITIVITY){this.maxDistance=this.calculateMaxDistance(t),this.sensitivity=e}check(t){let e=!1;if(this.lastPolygon){for(var n=0;n<4;n++)if(this.isPointMoved(t[n],this.lastPolygon[n])){e=!0;break}}else e=!0;return e}reset(){this.lastPolygon=void 0}update(t){this.lastPolygon=t}isPointMoved(t,e){return i.MathUtils.distanceBetweenPoints(t,e)/this.maxDistance>this.sensitivity}calculateMaxDistance(t){let e=new o.Point(0,0),n=new o.Point(t.width,t.height);return i.MathUtils.distanceBetweenPoints(e,n)}}e.PolygonMovementPredicate=r,r.DEFAULT_SENSITIVITY=.5},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.MrzScannerState=e.MrzScannerProps=void 0;const r=i(n(1)),a=n(1),s=n(26),l=i(n(28)),u=i(n(45)),c=n(46),d=n(164);class f extends s.ScanbotCameraProps{}e.MrzScannerProps=f;class h extends s.ScanbotCameraState{}e.MrzScannerState=h;class p extends s.ScannerView{constructor(t){super(t),this.shouldComputeSize=!0,this.paused=!1,this.updateDimensionsCallback=this.updateDimensions.bind(this),Object.assign(this.state,{isFinderVisible:!0})}get configuration(){return this._configuration||(this._configuration=d.MrzScannerConfiguration.fromJson(this.props.configuration)),this._configuration}get enabled(){return!this.disposed}static create(t,e){return o(this,void 0,void 0,(function*(){const n=document.getElementById(t.containerId);if(!n)throw Error("Unable to initialize ScanbotSDK: Cannot find container element with the id provided.");return new Promise(((o,i)=>{(0,a.render)(r.default.createElement(p,{container:n,configuration:t,onSuccess:o,onFailure:i,mrzRecognizer:e}),n)}))}))}isDetectionPaused(){return this.paused}resumeDetection(){return o(this,void 0,void 0,(function*(){c.Debugger.warn("Mrz detection resumed"),yield this.resume()}))}pauseDetection(){c.Debugger.warn("Mrz detection paused"),this.pause()}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return o(this,void 0,void 0,(function*(){t.componentDidMount.call(this),window.addEventListener("resize",this.updateDimensionsCallback),yield this.resume()}))}componentWillUnmount(){super.componentWillUnmount(),this.pause(),this.props.mrzRecognizer.release(),window.removeEventListener("resize",this.updateDimensionsCallback)}updateDimensions(){return o(this,void 0,void 0,(function*(){this.shouldComputeSize=!0,this.forceUpdate()}))}resume(){return o(this,void 0,void 0,(function*(){this.paused=!1,yield this.detect()}))}pause(){this.paused=!0}detect(){var t;return o(this,void 0,void 0,(function*(){const e=this.shouldComputeSize;if(!this.enabled)return;if(this.paused)return;let n=!1;try{const o=yield this.camera.createImageData(p.FRAME_RESOLUTION);if(!o)return;e&&this.forceUpdate();const i=yield this.props.mrzRecognizer.recognize(o);if(!this.enabled)return;if(null===i)return;i?(n=!0,this.configuration.onMrzDetected(i)):this.configuration._onDetectionFailed&&(null===(t=this.configuration)||void 0===t||t._onDetectionFailed(o))}catch(t){console.log(t)}finally{n?setTimeout((()=>{requestAnimationFrame(this.detect.bind(this))}),200):requestAnimationFrame(this.detect.bind(this))}}))}saveExtractedImageData(){this.camera.saveExtractedData()}setFinderVisible(t){this.setState({isFinderVisible:t})}render(){var t;return r.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(t=this.configuration)||void 0===t?void 0:t.spinnerColor),r.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},r.default.createElement(l.default,{configuration:this.configuration,videoConstraints:this.configuration.videoConstraints,mirrored:this.configuration.mirrored,preferredCamera:this.configuration.preferredCamera,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}})),this.state.isFinderVisible&&r.default.createElement(u.default,{ref:t=>{this.finder=t},guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder}))}}p.FRAME_RESOLUTION=1200,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MrzScannerConfiguration=void 0;const o=n(15),i=n(23);class r extends i.ViewFinderScannerConfiguration{constructor(){super(o.ScannerConfiguration.DEFAULT_VIDEO_RESOLUTION_HD),this.onMrzDetected=function(t){},this.finder.aspectRatio.width=4,this.userGuidance.title.text="Please hold the device over the MRZ code to start scanning"}static fromJson(t){const e=new r;return this.mapValues(t,e,["style","videoConstraints","finder","userGuidance"]),this.mapFinderConfiguration(e,t),this.mapVideoConstraints(t,e),e}}e.MrzScannerConfiguration=r},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const l=s(n(1)),u=n(1),c=s(n(30)),d=s(n(20)),f=n(166),h=n(32),p=n(167),m=n(172),g=n(173),v=n(174),y=n(13),b=n(5),A=n(31),S=n(12),C=r(n(175));class _ extends l.default.Component{constructor(t){super(t),this.onResizeCallback=()=>{},this.MAX_ROTATIONS=4,this.BASE_SCALE=1,this.state={image:void 0,polygon:void 0,calculatedSize:y.Size.empty(),animation:{rotations:0,scale:1,duration:0},points:[],magneticLines:{horizontal:{original:[],scaled:[]},vertical:{original:[],scaled:[]}},imageMargin:b.Point.empty()},this.onResizeCallback=this.onResize.bind(this)}static create(t){return a(this,void 0,void 0,(function*(){const e=document.getElementById(t.containerId);if(!e)throw Error("Unable to initialize cropping component: Cannot find container element with the id provided.");return new Promise(((n,o)=>{(0,u.render)(l.default.createElement(_,{onReady:n,onError:o,container:e,configuration:f.CroppingViewConfiguration.fromJson(t)}),e)}))}))}componentDidMount(){var t,e,n;return a(this,void 0,void 0,(function*(){const o=null===(t=this.configuration)||void 0===t?void 0:t.image,i=yield this.detectContour(o);this.setState({image:yield S.ImageUtils.toDataUrl(o),polygon:null!==(n=null===(e=this.configuration)||void 0===e?void 0:e.polygon)&&void 0!==n?n:i.polygon,magneticLines:{vertical:{original:i.verticalLines},horizontal:{original:i.horizontalLines}}}),this.props.onReady&&this.props.onReady(this),addEventListener("resize",this.onResizeCallback),addEventListener("orientationchange",this.onResizeCallback)}))}componentWillUnmount(){return a(this,void 0,void 0,(function*(){removeEventListener("resize",this.onResizeCallback),removeEventListener("orientationchange",this.onResizeCallback)}))}onImageLoaded(t){return a(this,void 0,void 0,(function*(){y.Size.isEmpty(this.state.calculatedSize)&&(this.htmlImage=t,this.initializeSizes())}))}onResize(){const t=this.state.points.map((t=>new b.Point(t.x/this.state.calculatedSize.width,t.y/this.state.calculatedSize.height)));this.initializeSizes(t)}initializeSizes(t,e,n){const o=new y.Size(this.htmlImage.naturalWidth,this.htmlImage.naturalHeight),i=new y.Size(this.container.width(),this.container.height()),r=S.ImageUtils.getObjectFitSize(i,o),a=new y.Size(r.width,r.height),s=null!=t?t:this.state.polygon,l=A.ViewUtils.convertToViewportPointsFromParentSize(a,s),u=null!=e?e:this.state.magneticLines.horizontal.original,c=null!=n?n:this.state.magneticLines.vertical.original,d=A.ViewUtils.convertLinesToViewportLines(a,u),f=A.ViewUtils.convertLinesToViewportLines(a,c);this.setState({calculatedSize:a,points:l,magneticLines:{horizontal:{original:u,scaled:d},vertical:{original:c,scaled:f}},animation:{duration:0,rotations:this.rotations,scale:this.calculateScale(0,this.rotations,a)},imageMargin:this.calculateMargin(a)})}render(){var t,e,n,o,i,r;const a=h.DocumentLineQuad.CLASSNAME,s=(0,c.default)({[a]:!0,[`${a}-visible`]:!0}),u=this.configuration.style.polygon.width,d=(null===(t=this.state.animation)||void 0===t?void 0:t.scale)?u/this.state.animation.scale:u,f=this.configuration.style.padding||0,y=`calc(100% - 2*${f}px)`;return l.default.createElement("div",{style:{position:"relative",width:y,height:y,padding:f}},l.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.configuration.disableScroll&&l.default.createElement(v.ScrollLock,null),l.default.createElement(C.default,{ref:t=>this.magnifier=t,style:this.configuration.style.magnifier}),l.default.createElement(g.Animatable,{ref:t=>this.container=t,size:this.state.calculatedSize,rotations:null===(e=this.state.animation)||void 0===e?void 0:e.rotations,scale:null===(n=this.state.animation)||void 0===n?void 0:n.scale,duration:null===(o=this.state.animation)||void 0===o?void 0:o.duration,imageMargin:this.state.imageMargin},l.default.createElement(m.CroppingImage,{src:this.state.image,onImageLoaded:t=>this.onImageLoaded(t)}),l.default.createElement(p.DraggableDocumentPolygon,{style:{width:"100%",height:"100%",zIndex:500},size:this.state.calculatedSize,polygonStyle:{cursor:"pointer",stroke:this.configuration.style.polygon.color,strokeWidth:`${d}px`},handleStyle:this.configuration.style.polygon.handles,magneticLineStyle:this.configuration.style.magneticLines,polygonClasses:s,points:this.state.points,rotations:null===(i=this.state.animation)||void 0===i?void 0:i.rotations,scale:null===(r=this.state.animation)||void 0===r?void 0:r.scale,magneticLines:this.state.magneticLines,cornerMoveStart:this.showMagnifier.bind(this),cornerMoved:this.updateMagnifier.bind(this),cornerMoveEnd:this.hideMagnifier.bind(this)}))))}showMagnifier(t){var e;null===(e=this.magnifier)||void 0===e||e.setIsVisible(!0,(()=>{var e;null===(e=this.magnifier)||void 0===e||e.update(this.magnifierOptions(t))}))}updateMagnifier(t){var e;null===(e=this.magnifier)||void 0===e||e.update(this.magnifierOptions(t))}magnifierOptions(t){const e=new C.MagnifierOptions;return e.source=new C.MagnifierSourceImage(this.htmlImage,this.state.calculatedSize),e.container=new y.Size(this.container.width(),this.container.height()),e.origin=t.point,e.rotations=this.state.animation.rotations,e.scale=this.state.animation.scale,e}hideMagnifier(){var t;null===(t=this.magnifier)||void 0===t||t.setIsVisible(!1)}apply(){var t;return a(this,void 0,void 0,(function*(){const e=b.Point.toPolygon(this.state.points,this.state.calculatedSize),n=this.toCcwRotations(this.rotations);return{image:yield d.default.instance.cropAndRotateImageCcw(null===(t=this.configuration)||void 0===t?void 0:t.image,e,n),polygon:e,rotations:this.rotations}}))}toCcwRotations(t){return this.MAX_ROTATIONS-t%this.MAX_ROTATIONS}rotate(t){return a(this,void 0,void 0,(function*(){if(this.container.isAnimating())return void console.warn("Unable to rotate: previous rotation animation in progress");const e=this.calculateScale(this.rotations,t,this.state.calculatedSize);this.setState({animation:{rotations:this.rotations+t,scale:e,duration:1}})}))}detect(){var t;return a(this,void 0,void 0,(function*(){const e=yield this.detectContour(null===(t=this.configuration)||void 0===t?void 0:t.image);this.initializeSizes(e.polygon,e.horizontalLines,e.verticalLines)}))}dispose(){const{container:t}=this.props;if(!t)throw Error("Component wasn't created with openCroppingView. Remove component from render tree to dispose.");(0,u.render)(null,t)}get rotations(){var t,e;const n=null===(t=this.state.animation)||void 0===t?void 0:t.rotations;return n&&0!==n?n:null!==(e=this.configuration.rotations)&&void 0!==e?e:0}get configuration(){return this._configuration||(this._configuration=f.CroppingViewConfiguration.fromJson(this.props.configuration)),this._configuration}calculateScale(t,e,n){return e?(t+e)%2==0?this.BASE_SCALE:this.calculateRatio(n):this.BASE_SCALE}calculateRatio(t){return Math.min(this.container.width()/t.height,this.container.height()/t.width)}calculateMargin(t){return t.width>t.height?{x:0,y:this.container.height()/2-t.height/2}:{x:this.container.width()/2-t.width/2,y:0}}detectContour(t){return d.default.instance.detectAndCropDocument(t)}}e.default=_},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CroppingViewConfiguration=e.CroppingViewMagnifierCrosshairStyle=e.CroppingViewMagnifierBorderStyle=e.CroppingViewMagnifierStyle=e.CroppingViewStyle=e.CroppingViewPolygonStyle=e.CroppingViewPolygonHandleStyle=e.CroppingViewMagneticLineStyle=void 0;const o=n(54);class i{constructor(){this.disabled=!1,this.color="transparent"}}e.CroppingViewMagneticLineStyle=i;class r{constructor(){this.color="white",this.border="1px solid lightgray",this.size=20}}e.CroppingViewPolygonHandleStyle=r;class a{constructor(){this.color="#1ec31e",this.width=4}}e.CroppingViewPolygonStyle=a;class s{constructor(){this.padding=10}}e.CroppingViewStyle=s;class l{constructor(){this.margin=15,this.size=100,this.zoom=1.5}}e.CroppingViewMagnifierStyle=l;class u{constructor(){this.width=2,this.color="white"}}e.CroppingViewMagnifierBorderStyle=u;class c{constructor(){this.size=20,this.color="white"}}e.CroppingViewMagnifierCrosshairStyle=c;class d extends o.BaseConfiguration{constructor(){super(),this.disableScroll=!0,this.rotations=0,this.style=new s,this.style.magneticLines=new i,this.style.polygon=new a,this.style.polygon.handles=new r,this.style.magnifier=new l,this.style.magnifier.border=new u,this.style.magnifier.crosshair=new c}static fromJson(t){const e=new d;return this.mapValues(t,e,["style"]),t.style&&(this.mapValues(t.style,e.style,["polygon","magneticLines","magnifier"]),t.style.polygon&&(this.mapValues(t.style.polygon,e.style.polygon,["handles"]),t.style.polygon.handles&&this.mapValues(t.style.polygon.handles,e.style.polygon.handles)),t.style.magneticLines&&this.mapValues(t.style.magneticLines,e.style.magneticLines,[]),t.style.magnifier&&(this.mapValues(t.style.magnifier,e.style.magnifier,["border","crosshair"]),t.style.magnifier.border&&this.mapValues(t.style.magnifier.border,e.style.magnifier.border,[]),t.style.magnifier.crosshair&&this.mapValues(t.style.magnifier.crosshair,e.style.magnifier.crosshair,[]))),e}}e.CroppingViewConfiguration=d},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DraggableDocumentPolygon=void 0;const i=o(n(1)),r=n(32),a=n(168),s=n(169);class l extends i.default.Component{constructor(t){super(t),this.state={movingLine:void 0}}render(){return i.default.createElement("div",null,i.default.createElement(s.DraggableHandlesComponent,{ref:t=>this.handles=t,containerSize:this.props.size,coordinatePoints:this.props.points,rotations:this.props.rotations,scale:this.props.scale,style:this.props.handleStyle,cornerMoveStart:this.props.cornerMoveStart,cornerMoved:t=>{this.setFrame(),this.props.cornerMoved(t)},cornerMoveEnd:this.props.cornerMoveEnd,lineMoved:t=>{this.setFrame(),this.setState({movingLine:t})}}),i.default.createElement(a.MagneticLinesComponent,{style:this.props.magneticLineStyle,lines:this.props.magneticLines,movingLine:this.state.movingLine,snapTo:t=>{var e,n;null===(e=this.handles)||void 0===e||e.snapTo(t),null===(n=this.polygon)||void 0===n||n.setFrame()}}),i.default.createElement(r.DocumentLineQuad,{size:this.props.size,points:this.props.points,polygonStyle:this.props.polygonStyle,polygonClasses:this.props.polygonClasses,ref:t=>this.polygon=t}))}setFrame(){var t,e;null===(t=this.polygon)||void 0===t||t.setFrame(),null===(e=this.handles)||void 0===e||e.setFrame()}}e.DraggableDocumentPolygon=l},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.MagneticLinesComponent=void 0;const i=o(n(1)),r=n(5);class a extends i.default.Component{constructor(){super(...arguments),this.BUFFER=4}fromPoint(t){return i.default.createElement("svg",{style:{width:"100%",height:"100%",position:"absolute"}},i.default.createElement("line",{x1:t.p1.x.toString(),y1:t.p1.y.toString(),x2:t.p2.x.toString(),y2:t.p2.y.toString(),style:{stroke:this.props.style.color,strokeWidth:2}}))}componentDidUpdate(t,e,n){this.props.style.disabled||this.snapToClosestIfAnyAreClose()}render(){var t,e,n,o,r,a;return i.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},null===(n=null===(e=null===(t=this.props.lines)||void 0===t?void 0:t.horizontal)||void 0===e?void 0:e.scaled)||void 0===n?void 0:n.map((t=>this.fromPoint(t))),null===(a=null===(r=null===(o=this.props.lines)||void 0===o?void 0:o.vertical)||void 0===r?void 0:r.scaled)||void 0===a?void 0:a.map((t=>this.fromPoint(t))))}snapToClosestIfAnyAreClose(){var t,e,n,o;const i=this.props.movingLine;let r=null===(e=null===(t=this.props.lines)||void 0===t?void 0:t.vertical)||void 0===e?void 0:e.scaled;if(i.isHorizontal&&(r=null===(o=null===(n=this.props.lines)||void 0===n?void 0:n.horizontal)||void 0===o?void 0:o.scaled),!r)return;const a=this.midPoint(i.points[0].coordinates,i.points[1].coordinates),s=r.map((t=>({distance:this.distanceToLine(t,a),mLine:t})));s.sort(((t,e)=>t.distance-e.distance)),s[0].distance<this.BUFFER&&this.props.snapTo({magneticLine:s[0].mLine,polygonLine:i})}distanceToLine(t,e){const n=e.x-t.p1.x,o=e.y-t.p1.y,i=t.p2.x-t.p1.x,a=t.p2.y-t.p1.y,s=i*i+a*a;if(0===s)return 1/0;const l=(n*i+o*a)/s;let u;return u=l<=0?t.p1:l>=1?t.p2:new r.Point(t.p1.x+l*i,t.p1.y+l*a),r.Point.distance(e,u)}midPoint(t,e){return new r.Point((t.x+e.x)/2,(t.y+e.y)/2)}}e.MagneticLinesComponent=a},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DraggableHandlesComponent=void 0;const i=o(n(1)),r=n(170),a=n(171),s=n(33);class l extends i.default.Component{render(){return i.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},i.default.createElement(r.DraggablePointsContainer,{ref:t=>this.corners=t,style:this.props.style,containerSize:this.props.containerSize,scale:this.props.scale,rotations:this.props.rotations,points:this.props.coordinatePoints,cornerMoveStart:this.props.cornerMoveStart,cornerMoved:this.props.cornerMoved,cornerMoveEnd:this.props.cornerMoveEnd}),i.default.createElement(a.DraggableLinesContainer,{ref:t=>this.lines=t,style:this.props.style,containerSize:this.props.containerSize,scale:this.props.scale,rotations:this.props.rotations,points:this.props.coordinatePoints,lineMoved:this.props.lineMoved}))}setFrame(){for(let t=0;t<this.corners.POINT_COUNT;t++){const e=this.props.coordinatePoints[t];this.corners.items[t]&&(this.corners.items[t].style.left=e.x-this.corners.pointSize/2+"px",this.corners.items[t].style.top=e.y-this.corners.pointSize/2+"px");let n=this.props.coordinatePoints[this.corners.nextIndex(t)];this.lines.items[t]&&(this.lines.items[t].style.left=e.x+(n.x-e.x)/2-this.corners.pointSize/2+"px",this.lines.items[t].style.top=e.y+(n.y-e.y)/2-this.corners.pointSize/2+"px")}}snapTo(t){const e=[t.polygonLine.previousPoint,t.polygonLine.points[0].coordinates],n=[t.polygonLine.points[1].coordinates,t.polygonLine.nextPoint],o=[t.magneticLine.p1,t.magneticLine.p2];this.props.coordinatePoints[t.polygonLine.points[0].index]=s.MathUtils.intersection(e,o),this.props.coordinatePoints[t.polygonLine.points[1].index]=s.MathUtils.intersection(n,o),this.props.cornerMoveEnd(),this.setFrame()}}e.DraggableHandlesComponent=l},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DraggablePointsContainer=void 0;const i=o(n(1)),r=n(5),a=n(33),s=n(85),l=n(58);class u extends s.DraggableBaseContainer{create(){if(!this.props.points||4!==this.props.points.length)return null;const t=[];for(let e=0;e<this.POINT_COUNT;e++){const n=this.props.points[e],o=i.default.createElement("div",{style:Object.assign(Object.assign({},this.pointStyle),{left:n.x-this.pointSize/2+"px",top:n.y-this.pointSize/2+"px"}),key:e.toString(),ref:t=>this.items[e]=t,onPointerDown:t=>this.cornerTouchStart(t,e),onPointerUp:t=>this.cornerTouchEnd(t),onPointerMove:t=>this.cornerTouchMove(t,e),"data-sb-cropping-corner":e},i.default.createElement("div",{style:Object.assign({},this.invisibleHandleStyle)}));t.push(o)}return t}cornerTouchStart(t,e){t.target.setPointerCapture(t.pointerId);const n=r.Point.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),o=this.items[e],i=r.Point.fromHtmlElement(o);this.parentOffset=new r.Point(n.x-i.x,n.y-i.y),this.props.cornerMoveStart({index:e,point:this.props.points[e]})}cornerTouchMove(t,e){if(!this.parentOffset)return;const n=r.Point.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),{x:o,y:i}=(0,l.clampHandlePosition)({x:n.x-this.parentOffset.x,y:n.y-this.parentOffset.y},this.pointSize,this.props.containerSize),s=this.pointSize/2,u=this.props.points[e];this.props.points[e]=new r.Point(o+s,i+s),a.MathUtils.isConvex(this.props.points)?this.props.cornerMoved({index:e,point:this.props.points[e]}):this.props.points[e]=u}cornerTouchEnd(t){t.target.releasePointerCapture(t.pointerId),this.parentOffset=null,this.props.cornerMoveEnd()}render(){return i.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",cursor:"pointer",zIndex:500,userSelect:"none",msUserSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none"}},this.create())}}e.DraggablePointsContainer=u},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DraggableLinesContainer=void 0;const i=o(n(1)),r=n(5),a=n(85),s=n(22),l=n(33);class u extends a.DraggableBaseContainer{create(){if(!this.props.points||4!==this.props.points.length)return null;const t=[];for(let e=0;e<this.POINT_COUNT;e++){const n=this.props.points[e];let o=this.props.points[this.nextIndex(e)];const r=i.default.createElement("div",{style:Object.assign(Object.assign({},this.pointStyle),{left:n.x+(o.x-n.x)/2-this.pointSize/2+"px",top:n.y+(o.y-n.y)/2-this.pointSize/2+"px"}),key:e.toString(),ref:t=>this.items[e]=t,onPointerDown:t=>this.lineTouchStart(t,e),onPointerMove:t=>this.lineTouchMove(t,e),onPointerUp:t=>this.lineTouchEnd(t),"data-sb-cropping-side":e},i.default.createElement("div",{style:this.invisibleHandleStyle}));t.push(r)}return t}lineTouchStart(t,e){t.target.setPointerCapture(t.pointerId);const n=r.Point.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),o=this.items[e],i=r.Point.fromHtmlElement(o),a=this.props.points[e],l=this.props.points[this.nextIndex(e)];this.point0Start=s.Utils.copy(this.props.points[this.previousIndex(e)]),this.point1Start=s.Utils.copy(a),this.point2Start=s.Utils.copy(l),this.point3Start=s.Utils.copy(this.props.points[this.nextIndex(this.nextIndex(e))]),this.point1Offset=new r.Point(a.x-i.x,a.y-i.y),this.point2Offset=new r.Point(l.x-i.x,l.y-i.y),this.parentOffset=new r.Point(n.x-i.x,n.y-i.y)}lineTouchMove(t,e){if(!this.parentOffset)return;const n=r.Point.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),o=this.props.points[this.previousIndex(e)];let i=new r.Point(null,null),a=new r.Point(null,null);const s=this.props.points[this.nextIndex(e+1)],u=n.x-this.parentOffset.x,c=n.y-this.parentOffset.y;if(this.isHorizontal(e)){const t=c+this.point1Offset.y,e=c+this.point2Offset.y,n=t-this.point1Start.y;i.x=this.point1Start.x+(this.point1Start.x-this.point0Start.x)*(n/(this.point1Start.y-this.point0Start.y)),a.x=this.point2Start.x+(this.point2Start.x-this.point3Start.x)*(n/(this.point2Start.y-this.point3Start.y)),i.y=t,a.y=e}else{const t=u+this.point1Offset.x,e=u+this.point2Offset.x,n=t-this.point1Start.x;i.y=this.point1Start.y+(this.point1Start.y-this.point0Start.y)*(n/(this.point1Start.x-this.point0Start.x)),a.y=this.point2Start.y+(this.point2Start.y-this.point3Start.y)*(n/(this.point2Start.x-this.point3Start.x)),i.x=t,a.x=e}i=r.Point.clamp(i,this.props.containerSize),a=r.Point.clamp(a,this.props.containerSize),this.isNearOpposingPoint(this.point1Start,i,o,this.isHorizontal(e)?"y":"x")||this.isNearOpposingPoint(this.point1Start,a,s,this.isHorizontal(e)?"y":"x")||this.areEdgesCrossing(o,i,a,s)||l.MathUtils.isConvex([o,i,a,s])&&(this.props.points[e].x=i.x,this.props.points[e].y=i.y,this.props.points[this.nextIndex(e)].x=a.x,this.props.points[this.nextIndex(e)].y=a.y,this.props.lineMoved({points:[{index:e,coordinates:i},{index:this.nextIndex(e),coordinates:a}],previousPoint:o,nextPoint:s,isHorizontal:this.isHorizontal(e)}))}lineTouchEnd(t){t.target.releasePointerCapture(t.pointerId),this.parentOffset=null}isNearOpposingPoint(t,e,n,o){if(t[o]>n[o]){if(e[o]-10<n[o])return!0}else if(e[o]>n[o]-10)return!0;return!1}areEdgesCrossing(t,e,n,o){const i=t.x,r=t.y,a=e.x,s=e.y,l=n.x,u=n.y,c=o.x,d=o.y;return((i-l)*(s-u)-(r-u)*(a-l))*((i-c)*(s-d)-(r-d)*(a-c))<0&&((l-i)*(d-r)-(u-r)*(c-i))*((l-a)*(d-s)-(u-s)*(c-a))<0}render(){return i.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},this.create())}}e.DraggableLinesContainer=u},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CroppingImage=void 0;const i=o(n(1));class r extends i.default.Component{render(){return i.default.createElement("img",{ref:t=>this.image=t,style:{width:"100%",height:"100%",objectFit:"cover",position:"absolute"},src:this.props.src,alt:".",onLoad:t=>{t.target&&this.props.onImageLoaded(t.target)}})}}e.CroppingImage=r},function(t,e,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Animatable=void 0;const s=a(n(1)),l=r(n(27));class u extends s.default.Component{constructor(){super(...arguments),this.animating=!1}width(){return this.container.offsetWidth-2*this.container.offsetLeft}height(){return this.container.offsetHeight-2*this.container.offsetTop}isAnimating(){return this.animating}render(){const{size:t,imageMargin:e,rotations:n,scale:o,duration:i}=this.props,r=90*(n-1),a=90*n;this.previousScale||(this.previousScale=1);const u=l.keyframes`
|
|
34
|
+
`;return W.default.createElement("div",{style:{top:0,left:0,width:"100%",height:"100%",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",zIndex:100}},W.default.createElement(t,{width:"101",height:"100",viewBox:"0 0 101 100",fill:"none",xmlns:"http://www.w3.org/2000/svg"},W.default.createElement("circle",{cx:"50.5",cy:"50",r:"50",fill:"#3E3E3E","fill-opacity":"0.35"}),W.default.createElement("path",{d:"M90.5153 49.6094C91.715 49.6094 92.6933 50.5827 92.6321 51.7808C92.1218 61.7815 88.0988 71.3096 81.2342 78.6635C73.8743 86.548 63.7963 91.3454 53.036 92.0868C42.2757 92.8282 31.6351 89.4582 23.2634 82.6576C15.455 76.3147 10.1633 67.4283 8.28624 57.5922C8.06135 56.4138 8.89694 55.3155 10.0853 55.1509C11.2737 54.9864 12.3642 55.8183 12.5959 56.9954C14.3176 65.7412 19.0487 73.6367 26.0026 79.2856C33.5201 85.3922 43.0751 88.4183 52.7374 87.7526C62.3998 87.0869 71.4494 82.7789 78.0584 75.699C84.1719 69.1497 87.7754 60.68 88.2814 51.7807C88.3495 50.5829 89.3156 49.6094 90.5153 49.6094Z",fill:"white"}),W.default.createElement("path",{d:"M40.7013 23.4514C40.2751 22.2667 40.8885 20.9518 42.1022 20.6166C45.5928 19.6526 49.2351 19.3251 52.8537 19.6567C57.2305 20.0577 61.4662 21.4131 65.2628 23.6273C69.0594 25.8416 72.3246 28.861 74.8286 32.4731C77.3326 36.0851 79.0146 40.2021 79.7562 44.5341C80.4978 48.8662 80.281 53.3082 79.121 57.5475C77.9611 61.7868 75.8862 65.7204 73.0423 69.0714C70.1985 72.4225 66.6548 75.1095 62.6606 76.9436C59.3583 78.4599 55.8145 79.3627 52.202 79.6146C50.9459 79.7022 49.9301 78.6662 49.9379 77.4072C49.9457 76.1481 50.9746 75.1443 52.2293 75.0398C55.1749 74.7942 58.0613 74.0382 60.758 72.8C64.1467 71.244 67.1532 68.9642 69.5659 66.1212C71.9787 63.2781 73.7391 59.9408 74.7232 56.3442C75.7073 52.7475 75.8912 48.9789 75.262 45.3035C74.6328 41.6281 73.2058 38.1353 71.0814 35.0708C68.957 32.0062 66.1867 29.4445 62.9657 27.5659C59.7446 25.6873 56.151 24.5374 52.4377 24.1972C49.4828 23.9265 46.5092 24.1737 43.6497 24.9219C42.4316 25.2406 41.1274 24.6362 40.7013 23.4514Z",fill:"white"}),W.default.createElement("path",{d:"M39.9232 61.6554C39.1643 62.5529 37.8105 62.673 37.0094 61.813C35.7171 60.4259 34.6502 58.8388 33.8523 57.1092C32.7564 54.7336 32.1944 52.1468 32.206 49.5307C32.2175 46.9146 32.8022 44.3328 33.9189 41.967C35.0356 39.6011 36.6573 37.5088 38.6697 35.8372C40.6822 34.1656 43.0365 32.9554 45.567 32.2916C48.0975 31.6279 50.7428 31.5268 53.3166 31.9954C55.8904 32.464 58.3303 33.4911 60.4644 35.0042C62.0183 36.1059 63.3827 37.4458 64.5093 38.9707C65.2077 39.916 64.8412 41.2247 63.8197 41.8061C62.7982 42.3875 61.5108 42.0174 60.7778 41.0986C59.9824 40.1015 59.0489 39.2181 58.0027 38.4763C56.3759 37.3229 54.5161 36.5401 52.5541 36.1828C50.5922 35.8256 48.5758 35.9027 46.6469 36.4086C44.7179 36.9146 42.9233 37.8371 41.3893 39.1113C39.8553 40.3855 38.6192 41.9804 37.7679 43.7838C36.9167 45.5872 36.471 47.5552 36.4622 49.5494C36.4534 51.5436 36.8818 53.5154 37.7172 55.3262C38.2544 56.4908 38.9515 57.5705 39.7858 58.5353C40.5545 59.4244 40.6821 60.7579 39.9232 61.6554Z",fill:"white"})))}}class Xs extends W.default.Component{render(){return this.props.text?W.default.createElement("div",{style:{position:"absolute",top:this.props.top,bottom:this.props.bottom,display:"flex",width:"100%",justifyContent:"center"}},W.default.createElement("div",{style:{padding:"5px 10px",borderRadius:5,backgroundColor:St.TransparentGray,color:St.White,fontWeight:500,fontSize:13}},this.props.text)):null}}class $s extends W.default.Component{constructor(t){super(t),this.state={element:t.element}}style(t){this.customStyle=t,this.forceUpdate()}update(t){this.setState({element:t})}formatText(t,e){if("None"!==e)return"Text"===e?t.text:t.format+" ("+t.text+")"}render(){var t,e,n,i,o;const r=this.state.element,a=this.props.configuration.style,s=this.formatText(r.code,this.props.configuration.textFormat),l=ws.a.width(null!==(t=this.props.animateToPoints)&&void 0!==t?t:r.points);if(!s)return null;if(!r.points)return null;const c=null!==(n=null===(e=this.customStyle)||void 0===e?void 0:e.backgroundColor)&&void 0!==n?n:r.highlighted?a.highlightedTextBackgroundColor:a.textBackgroundColor,u=null!==(o=null===(i=this.customStyle)||void 0===i?void 0:i.textColor)&&void 0!==o?o:r.highlighted?a.highlightedTextColor:a.textColor;return W.default.createElement(Cs.div,{ref:t=>this.label=t,onClick:()=>{this.props.onClick&&this.props.onClick(r)},style:{x:ws.a.lowestX(r.points),y:ws.a.highestY(r.points)+3,backgroundColor:c,fontSize:12,width:l,overflow:"hidden",color:u,borderRadius:5,position:"absolute",padding:"3px 7px",textAlign:"center",maxHeight:50,lineBreak:"anywhere",lineHeight:"22px",WebkitLineClamp:2,display:"-webkit-box",WebkitBoxOrient:"vertical"},animate:this.props.animateToPoints?{x:ws.a.lowestX(this.props.animateToPoints),y:ws.a.highestY(this.props.animateToPoints)+30}:{}},s)}}class Ks{constructor(){this.defaultFillColor="rgba(255, 0, 0, 0.3)",this.defaultHighlightedFillColor="rgba(0, 255, 0, 0.3)",this.polygonStrokeColor="rgba(255, 0, 0, 1)",this.polygonFillColor=this.defaultFillColor,this.polygonStrokeWidth=1,this.polygonCornerRadius=0,this.highlightedPolygonStrokeColor="rgba(0, 255, 0, 1)",this.highlightedPolygonFillColor=this.defaultHighlightedFillColor,this.highlightedPolygonStrokeWidth=2,this.highlightedPolygonCornerRadius=0,this.textColor="white",this.textBackgroundColor="rgba(255, 0, 0, 0.9)",this.highlightedTextColor="white",this.highlightedTextBackgroundColor="rgba(0, 255, 0, 0.9)"}}class Js{constructor(){this.visible=!1,this.textFormat="Text",this.automaticSelectionEnabled=!1,this.style=new Ks}}class tl{constructor(){this.topLabelTop=20,this.sheetHeight="95%",this.sheetTopMargin="10%"}}class el{constructor(){this.enabled=!1,this.style=new tl}}class nl extends O.a{constructor(){super(_.a.DEFAULT_VIDEO_RESOLUTION_HD),this.captureDelay=1e3,this.overlay=new Js,this.detectionParameters=new T.BarcodeScannerTypes.BarcodeRecognizerParameters,this.scanAndCount=new el,this.onBarcodesDetected=function(t){}}static fromJson(t){const e=new nl;return this.mapValues(t,e,["style","videoConstraints","overlay","scanAndCount","finder","userGuidance"]),this.mapFinderConfiguration(e,t),t.overlay&&(this.mapValues(t.overlay,e.overlay,["style"]),t.overlay.style&&this.mapValues(t.overlay.style,e.overlay.style)),t.scanAndCount&&(this.mapValues(t.scanAndCount,e.scanAndCount,["style"]),t.scanAndCount.style&&this.mapValues(t.scanAndCount.style,e.scanAndCount.style)),this.mapVideoConstraints(t,e),e}}class il{constructor(t){this.coreResult=t,this.barcodes=[],this.originalImageSize=null,this.barcodes=t.barcodes,t.originalImage&&(this.originalImageSize=new Ys.a(t.originalImage.width,t.originalImage.height))}isEmpty(){return 0===this.barcodes.length}}class ol{static warn(t){console.warn("[ScanbotSDK]",t)}}class rl{static convertLinesToViewportLines(t,e){if(e&&t)return e.map((e=>({start:new ws.a(e.start.x*t.width,e.start.y*t.height),end:new ws.a(e.end.x*t.width,e.end.y*t.height)})))}static convertToViewportPointsFromParentSize(t,e){return e?Ys.a.isEmpty(t)?void 0:e.map((e=>ws.a.scaleUpTo(e,t))):Ys.a.toPolygon(t)}static calculateScale(t){let e,n=0,i=0;return 1>t.width/t.height?(e=t.height/1,n=(1-t.width/e)/2):(e=t.width/1,i=(1-t.height/e)/2),{x:n,y:i,containerScale:e}}static findScale(t,e){let n,i=0,o=0;return e.ratio(!0)>t.ratio(!0)?(n=t.width/e.width,o=(e.height-t.height/n)/2):(n=t.height/e.height,i=(e.width-t.width/n)/2),{x:i,y:o,scale:n}}static preventDefaultCallback(t){t.preventDefault()}static disableScreenMovement(){document.addEventListener("touchmove",rl.preventDefaultCallback,{passive:!1}),document.body.scrollTop=document.documentElement.scrollTop=0,document.documentElement.style.overflow="hidden"}static enableScreenMovement(){document.removeEventListener("touchmove",rl.preventDefaultCallback),document.documentElement.style.overflow="auto"}static findContainerOrThrow(t){var e;const n=null!==(e=t.container)&&void 0!==e?e:document.getElementById(t.containerId);if(!n)throw Error("Unable to initialize scanner: Cannot find container element either from 'container' property or with the containerId property provided.");return n}}var al=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};ht.a;ht.b;class sl extends ht.c{constructor(t){var e;super(t),this.shouldComputeSize=!0,this.paused=!1,this.barcodeRecognizerHandle=null,this.barcodes=[],this.detectionRunning=!1,this.updateDimensionsCallback=this.updateDimensions.bind(this),this.backendurl=void 0,this.desiredRecognitionResolution=void 0,this.desiredRecognitionResolution=this.configuration.desiredRecognitionResolution,Object.assign(this.state,{isFinderVisible:null===(e=this.configuration.finder.visible)||void 0===e||e,zoom:void 0,action:"manual",image:void 0,bottomHintText:void 0})}get configuration(){return this._configuration||(this._configuration=nl.fromJson(this.props.configuration)),this._configuration}get enabled(){return!this.disposed}static create(t){return al(this,void 0,void 0,(function*(){const e=rl.findContainerOrThrow(t);return new Promise(((n,i)=>{Object(W.render)(W.default.createElement(sl,{container:e,configuration:t,onSuccess:n,onFailure:i}),e)}))}))}isDetectionPaused(){return this.paused}resumeDetection(){return al(this,void 0,void 0,(function*(){ol.warn("Barcode detection resumed"),yield this.resume()}))}pauseDetection(){ol.warn("Barcode detection paused"),this.pause()}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return al(this,void 0,void 0,(function*(){t.componentDidMount.call(this),window.addEventListener("resize",this.updateDimensionsCallback),yield this.resume()}))}componentWillUnmount(){super.componentWillUnmount(),this.pause(),window.removeEventListener("resize",this.updateDimensionsCallback),this.barcodeRecognizerHandle&&this.bridge.copyArgs.releaseObject(this.barcodeRecognizerHandle).catch((t=>{var e,n;return null===(n=(e=this.props.configuration).onError)||void 0===n?void 0:n.call(e,t)}))}updateDimensions(){return al(this,void 0,void 0,(function*(){this.shouldComputeSize=!0,this.forceUpdate()}))}resume(){return al(this,void 0,void 0,(function*(){this.paused=!1,yield this.detect()}))}pause(){this.paused=!0}detect(){var t,e,n,i,o;return al(this,void 0,void 0,(function*(){if(!this.enabled)return;if(this.paused)return;if(null===(t=this.configuration.scanAndCount)||void 0===t?void 0:t.enabled)return;if(this.detectionRunning)return;let r=!1;try{this.detectionRunning=!0;const t=yield this.recognizeBarcodes(!0,this.shouldComputeSize);if(this.shouldComputeSize=!1,!t)return;const a=new il(t);a.isEmpty()?this.configuration._onDetectionFailed&&(null===(e=this.configuration)||void 0===e||e._onDetectionFailed(t.originalImage)):(r=!0,this.configuration.overlay.visible||this.configuration.onBarcodesDetected(a)),null===(n=this.overlay)||void 0===n||n.update(null===(i=this.finder)||void 0===i?void 0:i.holeRect,this.camera,a.originalImageSize,a.barcodes)}catch(t){console.log(t)}finally{this.detectionRunning=!1;const t=()=>requestAnimationFrame((()=>this.detect())),e=(null===(o=this.configuration.overlay)||void 0===o?void 0:o.visible)?0:this.configuration.captureDelay;r&&0!=e?setTimeout(t,e):t()}}))}setUseBackendService(t){console.log("Now using backend service for recognition: ",t),this.backendurl=t}recognizeBarcodes(t,e){var n,i,o,r,a,s,l,c;return al(this,void 0,void 0,(function*(){try{window&&window.__SB_DEBUG_BARCODESCANNER_FORCE_DETERMINISTIC_MODE&&(t=!1);const l=t?ht.c.DEFAULT_DETECTION_RESOLUTION:ht.c.DETECTION_RESULTION_4K,c=null!==(n=this.desiredRecognitionResolution)&&void 0!==n?n:l;this.camera.finderFrame=null===(i=this.finder)||void 0===i?void 0:i.holeRect;const u=yield null===(o=this.camera)||void 0===o?void 0:o.createImageData(c,!1);if(!u)return;e&&this.forceUpdate(),(null===(r=this.configuration.scanAndCount)||void 0===r?void 0:r.enabled)&&(this.setState({image:b.wrapperToBase64(u)}),void 0!==this.desiredRecognitionResolution?console.log("Recognizing barcodes with custom resolution:",this.desiredRecognitionResolution):console.log("Recognizing barcodes with max resolution:",ht.c.DETECTION_RESULTION_4K,"(the actual resolution depends on your device and may be lower)"));new Ys.a(u.width,u.height);this.barcodeRecognizerHandle||(this.barcodeRecognizerHandle=yield this.bridge.copyArgs.createBarcodeRecognizer(new T.BarcodeScannerTypes.BarcodeRecognizerParameters(Object.assign(Object.assign({},this.configuration.detectionParameters),{live:t}))));const d=yield this.bridge.transferArgs.recognizeBarcodes(this.barcodeRecognizerHandle,u);if(!this.enabled)return;return null===d?void(null===(s=(a=this.props).onLicenseError)||void 0===s||s.call(a)):(this.camera.reusableImageBuffer=d.originalImage.data,d)}catch(t){return void(null===(c=(l=this.props.configuration).onError)||void 0===c||c.call(l,t))}}))}setRecognitionResolution(t){this.desiredRecognitionResolution=t}getResolution(){return al(this,void 0,void 0,(function*(){return new Promise(((t,e)=>{const n=this.camera.videoSize();n.width>0&&n.height>0?t(Ys.a.fromJson(n)):this.camera.didLoadVideo=()=>{const e=this.camera.videoSize();t(Ys.a.fromJson(e))}}))}))}saveExtractedImageData(){this.camera.saveExtractedData()}setFinderVisible(t){this.setState({isFinderVisible:t})}setZoom(t){this.setState({zoom:t})}setCameraDirection(t){this.camera.setDirection(t)}updateTorch(t){this.camera.videoStream.updateTorch(t)}getCapabilities(){return this.camera.videoStream.getCapabilities()}render(){var t,e,n,i,o,r,a;const s=(null===(t=this.configuration.scanAndCount)||void 0===t?void 0:t.enabled)?"Tap the shutter button to scan":void 0;return W.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"black",minHeight:"100px"}},this.renderSpinner(null===(e=this.configuration)||void 0===e?void 0:e.spinnerColor),W.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},W.default.createElement(pt.a,{configuration:this.configuration,videoConstraints:this.configuration.videoConstraints,mirrored:this.configuration.mirrored,preferredCamera:this.configuration.preferredCamera,zoom:null!==(n=this.state.zoom)&&void 0!==n?n:this.configuration.zoom,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}})),W.default.createElement(Xs,{top:null===(i=this.configuration.scanAndCount)||void 0===i?void 0:i.style.topLabelTop,text:s}),W.default.createElement(Zs,{ref:t=>this.scannedImage=t,image:this.state.image}),this.state.isFinderVisible&&W.default.createElement(ft.a,{ref:t=>{this.finder=t},padding:this.props.viewFinderPadding,guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder}),W.default.createElement(Xs,{bottom:100,text:this.state.bottomHintText}),W.default.createElement(qs,{visible:"processing"===this.state.action}),(null===(o=this.configuration.overlay)||void 0===o?void 0:o.visible)&&W.default.createElement(Rs,{ref:t=>{t&&(this.overlay=t)},configuration:this.configuration.overlay,onPolygonSelected:t=>{const e=new il({barcodes:[t]});this.configuration.onBarcodesDetected(e)},onBarcodeFound:(t,e,n)=>{var i;(null===(i=this.configuration.overlay)||void 0===i?void 0:i.onBarcodeFound)&&this.configuration.overlay.onBarcodeFound(t,e,n)},LabelComponent:$s,labelComponentConfig:{}}),(null===(r=this.configuration.scanAndCount)||void 0===r?void 0:r.enabled)&&W.default.createElement(Gs,{ref:t=>this.bottomActionBar=t,action:this.state.action,isShowingImage:void 0!==this.state.image,onBurgerClick:()=>{this.popup.push(Ct.PushBottom,this.barcodes)},onShutterButtonClick:()=>al(this,void 0,void 0,(function*(){(new y).flash(),this.setState({action:"processing"});const t=(new Date).getTime();let e=yield this.recognizeBarcodes(!1,!1);const n=new il(null!=e?e:{barcodes:[]});console.log("Recognition took:",((new Date).getTime()-t)/1e3);const i=this.countLabelText(n.barcodes);this.setState({action:"manual",bottomHintText:i}),this.scannedImage.update(n),this.barcodes.push(...n.barcodes),this.bottomActionBar.update(this.barcodes),n.barcodes.length>0&&this.configuration.onBarcodesDetected(n)})),onScanMoreClick:()=>{this.resetCountImage()}}),W.default.createElement(wt,{ref:t=>this.popup=t,style:null===(a=this.configuration.scanAndCount)||void 0===a?void 0:a.style,onDeleteClick:()=>{if(confirm("Are you sure you want to delete all scanned barcodes?")){for(;this.barcodes.length>0;)this.barcodes.pop();console.log("Cleared barcodes",this.barcodes.length),this.popup.update(this.barcodes),this.bottomActionBar.update(void 0),this.resetCountImage(),this.popup.reset()}}}))}resetCountImage(){this.scannedImage.reset(),this.setState({image:void 0,bottomHintText:void 0})}countLabelText(t){return 0==t.length?"No codes scanned. Try again?":1==t.length?"1 Code Scanned":`${t.length} Codes Scanned`}}function ll(t,e){return t&&(t.hasFacingOptions&&e.flipCameraButton.visible||t.isTorchAvailable&&e.flashButton.visible)||e.zoomButton.visible}function cl(t){const e=t.zoomSteps.findIndex((e=>e==t.defaultZoomFactor)),[n,i]=Object(W.useState)(t.torchEnabledInitially),[o,r]=Object(W.useState)(e),a=t.zoomSteps[o],[s,l]=Object(W.useState)("BACK"==t.initialCameraModule?"environment":"user"),c=function(t){var e,n;const i=null===(n=null===(e=null==t?void 0:t.camera)||void 0===e?void 0:e.video)||void 0===n?void 0:n.parentElement,o=()=>i?i.getBoundingClientRect():null,[r,a]=Object(W.useState)(o());return Object(W.useEffect)((()=>{if(i){const t=()=>a(o());t();const e=new ResizeObserver(t);return e.observe(i),()=>{e.disconnect()}}}),[i]),r}(t.scanner),u=!!c;if(Object(W.useEffect)((()=>{var e;(null===(e=t.capabilities)||void 0===e?void 0:e.isTorchAvailable)&&u&&t.scanner.setTorchState(n)}),[t.capabilities,u,n]),Object(W.useEffect)((()=>{var e;u&&(null===(e=t.scanner)||void 0===e||e.setZoom(a))}),[u,a]),!t.capabilities||!c)return null;if(!ll(t.capabilities,t.config))return null;const d=c.height-t.bottomPadding-48;return W.default.createElement(z.Box,{style:{position:"absolute",marginTop:d,marginLeft:c.width/2,transform:"translateX(-50%)",display:"flex",justifyContent:"center",zIndex:1e3}},W.default.createElement(at,Object.assign({},t.config.flashButton,{visible:t.capabilities.isTorchAvailable&&t.config.flashButton.visible,icon:n?z.FlashlightOn:z.FlashlightOff,active:n,onClick:()=>i(!n)})),W.default.createElement("div",{style:{width:20}}),W.default.createElement(at,Object.assign({},t.config.zoomButton,{text:`${a.toFixed(1)}x`,active:o!==e,onClick:()=>r((o+1)%t.zoomSteps.length)})),W.default.createElement("div",{style:{width:20}}),W.default.createElement(at,Object.assign({},t.config.flipCameraButton,{visible:t.capabilities.hasFacingOptions&&t.config.flipCameraButton.visible,active:"user"===s,icon:z.FlipCameraIos,onClick:()=>{var e;const n="environment"===s?"user":"environment";l(n),null===(e=t.scanner)||void 0===e||e.setCameraDirection(n)}})))}const ul=Object(W.createContext)(null);class dl{static compute(t,e,n){const i=(ws.a.lowestY(t)+ws.a.highestY(t))/2,o={badgeY:i,badgeStyle:{transform:"translateX(-50%) translateY(-50%)"}};return"BELOW"===n?Object.assign(Object.assign({},o),{labelY:Math.max(ws.a.highestY(t)+dl.LABEL_AND_BADGE_PADDING,e?i-dl.AR_BADGE_SIZE/2-dl.LABEL_AND_BADGE_PADDING:-1/0),labelStyle:{transform:"translateX(-50%)"}}):"ABOVE"===n?Object.assign(Object.assign({},o),{labelY:Math.min(ws.a.lowestY(t)-dl.LABEL_AND_BADGE_PADDING,e.visible?i+dl.AR_BADGE_SIZE/2+dl.LABEL_AND_BADGE_PADDING:1/0),labelStyle:{transform:"translateX(-50%) translateY(-100%)"}}):"STACKED"===n?{badgeY:i,badgeStyle:{transform:`translateX(-50%) translateY(calc(-100% - ${dl.LABEL_AND_BADGE_PADDING/2}px))`},labelY:i,labelStyle:{transform:e.visible?`translateX(-50%) translateY(${dl.LABEL_AND_BADGE_PADDING/2}px)`:"translateX(-50%) translateY(-50%)"}}:"DISABLED"===n?Object.assign(Object.assign({},o),{labelY:0,labelStyle:{display:"none"}}):void 0}}dl.AR_BADGE_SIZE=48,dl.LABEL_AND_BADGE_PADDING=10;var hl=dl;function pl(t){return t.style.visible?""==t.content?null:W.default.createElement(Cs.div,{style:Object.assign({position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",zIndex:100},t.positionBadge),animate:t.animateToPoints?t.positionBadge:{},transition:t.transition},W.default.createElement(Z,{styleConfig:Object.assign(Object.assign({},t.style.background),{cornerRadius:hl.AR_BADGE_SIZE/2}),style:Object.assign(Object.assign({},t.verticalPositions.badgeStyle),{width:hl.AR_BADGE_SIZE,height:hl.AR_BADGE_SIZE,color:V.b.getColorValue(t.style.foregroundColor),display:"flex",justifyContent:"center",alignItems:"center",zIndex:1500,cursor:"pointer"}),onClick:()=>null==t?void 0:t.onClick()},W.default.createElement(z.Typography,{fontSize:16,fontWeight:"500",style:{display:"flex",justifyContent:"center",alignItems:"center"}},t.content))):null}var fl=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n};class ml extends $s{constructor(){super(...arguments),this.count=0,this.setCount=t=>{this.count=t,this.forceUpdate()}}styleBadge(t,e){this.customBadgeStyle=t,this.customBadgeContent=e,this.forceUpdate()}badgeContent(){return this.customBadgeContent?this.customBadgeContent:0===this.count?"":"x"+this.count}render(){var t,e;let{barcodeItemConfiguration:n,barcodeItemInfoPosition:i,counterBadge:o}=this.props;const r=n,a=this.state.element,s=null!==(t=this.props.animateToPoints)&&void 0!==t?t:a.points,l=a.code,c=a.highlighted,u=(ws.a.lowestX(s)+ws.a.highestX(s))/2;void 0===i&&(i="BELOW");const d=hl.compute(s,o,i),h=void 0===r||!1===r.titleDeselected.visible&&!1===r.subtitleDeselected.visible,p={x:u,y:Math.round(d.labelY)},f={x:u,y:Math.round(d.badgeY)},m={duration:.25,easing:"linear"};return W.default.createElement(W.default.Fragment,null,r&&W.default.createElement(Cs.div,{ref:t=>this.label=t,style:Object.assign(Object.assign({},p),{position:"absolute",width:"100%",zIndex:100}),animate:this.props.animateToPoints?p:{},transition:m},W.default.createElement(Z,{sx:Object.assign({p:1,maxWidth:232,cursor:"pointer",display:h?"inline-block":"block",zIndex:1500},d.labelStyle),styleConfig:c?r.backgroundSelected:r.backgroundDeselected,"data-sb-ar-barcode-info":"1",onClick:()=>{var t;return null===(t=this.props)||void 0===t?void 0:t.onClick(a)}},W.default.createElement(gl,{barcode:l,barcodeImageVisible:r.imageVisible,maxNumberOfTitleLines:1,maxNumberOfSubtitleLines:1,imageSize:42,displayRightArrow:!0,barcodeTitle:c?r.titleSelected:r.titleDeselected,barcodeSubtitle:c?r.subtitleSelected:r.subtitleDeselected}))),W.default.createElement(pl,{onClick:()=>{var t;return null===(t=this.props)||void 0===t?void 0:t.onClick(a)},style:null!==(e=this.customBadgeStyle)&&void 0!==e?e:o,positionBadge:f,content:this.badgeContent(),verticalPositions:d,transition:m,animateToPoints:this.props.animateToPoints}))}}function gl(t){var{barcode:e}=t,n=fl(t,["barcode"]);const i=Object(W.useContext)(ul).useBarcodeMappedData(e);return W.default.createElement(tt,Object.assign({barcodeMappedData:i},n))}var vl=n(8);function Al(t){const e=Object(W.useRef)(),n=Object(W.useRef)(null),[i,o]=(Object(W.useContext)(X),Object(W.useState)(void 0)),[r,a]=Object(W.useState)(!1);Object(W.useEffect)((()=>{var n,i;t.scanningPaused?null===(n=e.current)||void 0===n||n.pause():null===(i=e.current)||void 0===i||i.resume()}),[t.scanningPaused]);const s=function(t){const e=new Js;e.visible=t.visible;const n=t.polygon instanceof vl.c,i=t.polygon,o=t,r=n?i.selected:o.polygon.partiallyScanned,a=n?i.deselected:o.polygon.partiallyScanned;return t.polygon.visible?(e.style.highlightedPolygonFillColor=V.b.getColorValue(r.fillColor),e.style.highlightedPolygonStrokeColor=V.b.getColorValue(r.strokeColor),e.style.highlightedPolygonStrokeWidth=r.strokeWidth,e.style.highlightedPolygonCornerRadius=r.cornerRadius,e.style.polygonFillColor=V.b.getColorValue(a.fillColor),e.style.polygonStrokeColor=V.b.getColorValue(a.strokeColor),e.style.polygonStrokeWidth=a.strokeWidth,e.style.polygonCornerRadius=a.cornerRadius):(e.style.highlightedPolygonFillColor="transparent",e.style.highlightedPolygonStrokeColor="transparent",e.style.polygonFillColor="transparent",e.style.polygonStrokeColor="transparent"),e.automaticSelectionEnabled=!1,e}(t.arOverlay),l=Object.assign(Object.assign({},t.barcodeScannerViewConfig),{onBarcodesDetected:i=>{var o,r,a,s,l,c;null===(o=n.current)||void 0===o||o.update(null===(a=null===(r=e.current)||void 0===r?void 0:r.finder)||void 0===a?void 0:a.holeRect,null===(s=e.current)||void 0===s?void 0:s.camera,i.originalImageSize,i.barcodes),null===(c=(l=t.barcodeScannerViewConfig).onBarcodesDetected)||void 0===c||c.call(l,i)},_onDetectionFailed:i=>{var o,r,a,s,l,c;null===(o=n.current)||void 0===o||o.update(null===(a=null===(r=e.current)||void 0===r?void 0:r.finder)||void 0===a?void 0:a.holeRect,null===(s=e.current)||void 0===s?void 0:s.camera,new Ys.a(i.width,i.height),[]),null===(c=(l=t.barcodeScannerViewConfig)._onDetectionFailed)||void 0===c||c.call(l,i)}});return Object(W.useEffect)((()=>{const e=ll(i,t.actionBarConfig);t.setActionButtonsVisible(e),a(e)}),[i,t.actionBarConfig]),W.default.createElement(W.default.Fragment,null,t.arOverlay.visible&&W.default.createElement(Rs,{style:{zIndex:1e3,position:"absolute"},ref:n,LabelComponent:ml,labelComponentConfig:t.arOverlay,onBarcodeFound:t.arOnBarcodeEnter,onPolygonClick:t.arOnBarcodeClick,configuration:s}),W.default.createElement(cl,{config:t.actionBarConfig,scanner:e.current,capabilities:i,bottomPadding:t.actionBarBottomPadding,torchEnabledInitially:t.cameraConfiguration.flashEnabled,zoomSteps:t.cameraConfiguration.zoomSteps,defaultZoomFactor:t.cameraConfiguration.defaultZoomFactor,initialCameraModule:t.cameraConfiguration.cameraModule}),W.default.createElement(sl,{ref:e,viewFinderPadding:t.viewFinderPadding,configuration:l,onSuccess:()=>class{static setFromScanner(t,e){var n;if(!t.current)return;const i=t.current.getCapabilities();e({hasFacingOptions:(null==i?void 0:i.facingMode)&&i.facingMode.length>0,isTorchAvailable:null!==(n=t.current.getActiveCameraInfo().supportsTorchControl)&&void 0!==n&&n})}}.setFromScanner(e,o),onFailure:t.onCameraPermissionDenied,onLicenseError:t.onLicenseError}))}function bl(t){return Object(W.useMemo)((()=>{const e=(new nl).videoConstraints;return e.width.ideal=t.cameraConfiguration.idealPreviewResolution.width,e.height.ideal=t.cameraConfiguration.idealPreviewResolution.height,e.facingMode="FRONT"===t.cameraConfiguration.cameraModule?"user":"environment",{videoConstraints:e,backgroundColor:V.b.getColorValue(t.backgroundColor),userGuidance:t.userGuidance,finder:t.viewFinder,detectionParameters:new T.BarcodeScannerTypes.BarcodeRecognizerParameters({live:!0,engineMode:t.recognizerConfiguration.engineMode,configurators:[new T.BarcodeConfigs.GroupCommonConfig({formats:t.recognizerConfiguration.barcodeFormats.length>0?t.recognizerConfiguration.barcodeFormats:void 0,regexFilter:t.recognizerConfiguration.barcodesRegexFilter,gs1Handling:t.recognizerConfiguration.gs1Handling})]}),desiredRecognitionResolution:t.recognizerConfiguration.maximumRecognizerResolution}}),[t])}var yl=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};function Cl(t){const[e,n]=Object(W.useState)(null),[i,o]=Object(W.useState)(!0),r=Object(W.useMemo)((()=>"__sb_"+Math.random()),[]),a=t.barcodeMapper,s=t.configuration.useCase,l=Object.assign(Object.assign({},bl(t.configuration)),{onBarcodesDetected:e=>{e.barcodes.length>0&&!s.arOverlay.visible&&t.scanningEnabled.current&&n(e.barcodes[0])},onError:t.onError,containerId:r,captureDelay:0}),c=n=>yl(this,void 0,void 0,(function*(){let i;i=null===e?[]:[new j.BarcodeScannerUIItem({count:1,barcode:n})];const o={items:i};t.onSubmit(o)}));Object(W.useEffect)((()=>{e&&(ct.INSTANCE.beep(t.configuration.sound),dt.INSTANCE.vibrate(t.configuration.vibration))}),[e]),Object(W.useEffect)((()=>{null===e||s.confirmationSheetEnabled||c(e)}),[e,s.confirmationSheetEnabled]);const u=a.useBarcodeMappedData(e);Object(W.useEffect)((()=>{"FAILED"===(null==u?void 0:u.state)&&n(null)}),[null==u?void 0:u.state]);const d=Object(W.useContext)(X);return W.default.createElement(W.default.Fragment,null,W.default.createElement(ul.Provider,{value:t.barcodeMapper},W.default.createElement(ot,Object.assign({open:!!u&&["LOADED","LOADING"].includes(u.state)&&s.confirmationSheetEnabled,handleCancel:()=>{n(null)},handleSubmit:()=>{c(e)},barcodeMappedData:u},{sheetColorLoaded:(h=s).sheetColor,sheetColorLoading:h.barcodeInfoMapping.sheetColor,barcodeImageVisible:h.barcodeImageVisible,barcodeTitle:h.barcodeTitle,barcodeSubtitle:h.barcodeSubtitle,cancelButton:h.cancelButton,submitButton:h.submitButton,dividerColor:h.dividerColor,loadingMessage:h.barcodeInfoMapping.loadingMessage},{displayRightArrow:!1,modalOverlayColor:s.modalOverlayColor})),W.default.createElement(z.Box,{id:r,sx:{width:"100%",height:d.remainingVisibleBodyHeight}},W.default.createElement(Al,{cameraConfiguration:t.configuration.cameraConfiguration,scanningPaused:null!==e,setActionButtonsVisible:o,viewFinderPadding:{minTopPadding:d.minTopPaddingForViewFinder,minBottomPadding:i?80:0},barcodeScannerViewConfig:l,arOnBarcodeClick:t=>n(t),arOnBarcodeEnter:e=>{s.arOverlay.automaticSelectionEnabled&&t.scanningEnabled.current&&n(e)},arOverlay:Object.assign(Object.assign({},s.arOverlay),{counterBadge:Object.assign(Object.assign({},s.arOverlay.counterBadge),{visible:!1})}),containerId:r,actionBarConfig:t.configuration.actionBar,actionBarBottomPadding:16,onCameraPermissionDenied:t.onCameraPermissionDenied,onLicenseError:t.onError}))));var h}function Sl(t){const e=Object.assign(Object.assign({},t.title),{text:V.b.getLocalizedBarcodeText(t.title.text,t.textReplacementArgs)});return W.default.createElement(W.default.Fragment,null,W.default.createElement(q,Object.assign({},t.leftButton)),W.default.createElement(z.Typography,{sx:{flex:2,textAlign:"center",fontWeight:600,fontSize:18}},W.default.createElement(Q.a,{config:e})),W.default.createElement(q,Object.assign({},t.rightButton)))}function wl(){return W.default.createElement("div",{style:{width:30,height:6,backgroundColor:z.grey[300],borderRadius:3,position:"absolute",top:8,left:"calc(50% - 15px)"},"data-sb-drawer-puller":"1"})}function xl(t){return W.default.createElement(z.Box,Object.assign({sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"center",paddingTop:2,paddingBottom:1,touchAction:"none"},ref:t.innerRef},t.dragProps),W.default.createElement(wl,null),W.default.createElement(Sl,Object.assign({},t.drawerHeaderContentProps)))}function El(t){return W.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"41",height:"38",viewBox:"0 0 41 38",fill:"none"},W.default.createElement("path",{d:"M4.09514 37.0902V10.6304L0.019043 1.87823L3.18969 0.348877L7.76144 10.6304H32.6886L37.2484 0.348877L40.419 1.87823L36.3549 10.6304V37.0902H4.09514ZM15.994 22.013H24.494C24.9461 22.013 25.3211 21.8632 25.619 21.5637C25.9169 21.2641 26.0658 20.8871 26.0658 20.4325C26.0658 19.9779 25.9169 19.6038 25.619 19.3101C25.3211 19.0164 24.9461 18.8695 24.494 18.8695H15.994C15.5419 18.8695 15.167 19.0193 14.8691 19.3189C14.5712 19.6184 14.4223 19.9955 14.4223 20.45C14.4223 20.9046 14.5712 21.2788 14.8691 21.5725C15.167 21.8662 15.5419 22.013 15.994 22.013ZM7.50164 33.6837H32.9364V14.0489H7.50164V33.6837Z",fill:t.color}))}function Ll(t){return t.isVisible?W.default.createElement("div",{style:{display:"flex",alignItems:"center",flexDirection:"column",marginTop:"auto",marginBottom:"auto",overflowY:"scroll"}},t.style.placeholderIcon.visible&&W.default.createElement(z.Avatar,{style:{backgroundColor:V.b.getColorValue(t.style.placeholderIconBackground),width:100,height:100}},W.default.createElement(El,{color:V.b.getColorValue(t.style.placeholderIcon.color)})),W.default.createElement(z.Typography,{style:{marginTop:20},variant:"h6"},W.default.createElement(Q.a,{config:t.style.placeholderTitle})),W.default.createElement(z.Typography,{style:{marginTop:20,paddingLeft:"10%",paddingRight:"10%",maxWidth:400,textAlign:"center"},variant:"body2"},W.default.createElement(Q.a,{config:t.style.placeholderSubtitle})),t.onStartClick&&t.style.startScanningButton.visible&&W.default.createElement(et,Object.assign({style:{width:"60%",marginTop:20}},t.style.startScanningButton,{visible:!0,onClick:t.onStartClick}))):null}function _l(t,e,n){const i=Object(W.useRef)(),o=Object(W.useRef)(null),[r,a]=Object(W.useState)(),[s,l]=Object(W.useState)(!1),c=Object(W.useRef)([]),u=t=>{let n="none";if(c.current.length>0){const e=200,i=((t,e)=>{let n=t[0],i=Math.abs(n.time-e);for(let o=1;o<t.length;o++){const r=Math.abs(t[o].time-e);r<i&&(n=t[o],i=r)}return n})(c.current,t.timeStamp-e),o=i.y-t.clientY,r=100;o>r?n="up":o<-r&&(n="down")}c.current.splice(0,c.current.length),e(new ws.a(t.clientX,t.clientY),n)},d={onPointerDown:t=>{t.target.setPointerCapture(t.pointerId),l(!0),o.current=new ws.a(t.clientX,t.clientY),a(ws.a.empty()),t.stopPropagation()},onPointerMove:e=>{if(!s)return;const n=new ws.a(e.clientX,e.clientY);i.current=e,a(n),t(n),c.current.push({x:e.clientX,y:e.clientY,time:e.timeStamp})},onPointerUp:t=>{t.target.releasePointerCapture(t.pointerId),l(!1),u(t)},onPointerCancel:t=>{t.target.releasePointerCapture(t.pointerId),l(!1),n()}};return{startPoint:o,currentPoint:r,props:d,stop:()=>{i.current.stopPropagation()},dragOngoing:s}}var Ol=n(31);function Tl(t){const[e,n]=Object(W.useState)(0),[i,o]=Object(W.useState)(!1),r=Object(W.useRef)(null),a=Object(W.useContext)(X).height,s=t=>{n(t),o(!0),setTimeout((()=>{o(!1)}),500)},l=e=>{const n=e-c.startPoint.current.y;return Object(Ol.a)((t.isOpen?100:0)-100*n/(window.innerHeight-a-t.closedSheetVisibleHeight),0,100)},c=_l((t=>{n(l(t.y))}),((e,n)=>{if(e.y===c.startPoint.current.y)return;let i;i=l(e.y)<50?"swipe-to-close":"swipe-to-open","up"===n&&(i="swipe-to-open"),"down"===n&&(i="swipe-to-close"),t.onSwipe(i)}),(()=>{}));return Object(W.useEffect)((()=>{i||c.dragOngoing||!r||(t.isOpen||0===e?t.isOpen&&100!==e&&s(100):s(0))}),[t.isOpen,e,c.dragOngoing]),W.createElement("div",null,W.createElement(N.a,{variant:"persistent",anchor:"bottom",open:!0,onClose:()=>{},onOpen:()=>{},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},PaperProps:{style:{height:`calc((100 * ${U} - ${a}px - ${t.closedSheetVisibleHeight}px) * ${e} / 100 + ${t.closedSheetVisibleHeight}px)`,overflow:"hidden",borderRadius:10,borderBottomLeftRadius:0,borderBottomRightRadius:0,transition:i?"height 500ms":void 0,backgroundColor:V.b.getColorValue(t.contentStyle.sheetColor)},elevation:24}},W.createElement(xl,{innerRef:t=>{r.current=t},drawerHeaderContentProps:t.drawerHeaderContentProps,dragProps:c.props}),t.children,W.createElement(Ll,{isVisible:t.isPlaceholderVisible,style:t.contentStyle,onStartClick:()=>t.onSwipe("swipe-to-close")})))}var kl=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n};function Dl(t){var{inputRef:e}=t,n=kl(t,["inputRef"]);const i=Object.assign(Object.assign({},n),{style:Object.assign(Object.assign({},n.style||{}),{border:"none",display:"block",outlineWidth:0,width:"100%"})});return W.default.createElement("input",Object.assign({},i,{ref:e}))}function Pl(t){const e=!!t.barcode,[n,i]=W.default.useState(""),o=W.default.useRef(null),r={backgroundColor:V.b.getColorValue(t.dialogStyling.sheetColor)};return Object(W.useEffect)((()=>{e&&i(String(t.barcode.count))}),[e]),W.default.createElement(W.default.Fragment,null,W.default.createElement(it,{open:e,modalOverlayColor:t.dialogStyling.modalOverlayColor,TransitionProps:{onEnter:()=>{var t;return null===(t=o.current)||void 0===t?void 0:t.focus()}},onClose:t.onCancel,PaperProps:{component:"form",onSubmit:e=>{e.preventDefault(),t.setCounter({type:"setCount",barcodes:[t.barcode.barcode],computeNewCount:()=>parseInt(n)||0})}}},W.default.createElement(z.DialogContent,{style:r},W.default.createElement(z.Typography,{fontSize:16,fontWeight:500,textAlign:"center"},W.default.createElement(Q.a,{config:t.dialogStyling.title})),W.default.createElement(z.Typography,{fontSize:14,textAlign:"center"},W.default.createElement(Q.a,{config:t.dialogStyling.info})),W.default.createElement(z.Box,{sx:{display:"flex",border:"2px solid",borderColor:V.b.getColorValue(t.dialogStyling.dividerColor),mh:2,mb:0,p:1,borderRadius:1}},W.default.createElement(Dl,{inputRef:o,value:n,onChange:t=>{const e=parseInt(t.target.value.replaceAll(/[^0-9]/g,""));i(e>=0?e.toString():"")},type:"text",pattern:"[0-9]*"}),t.dialogStyling.clearTextButton.visible&&W.default.createElement(N.a,{sx:{marginLeft:"auto",paddingLeft:1},onClick:()=>i(""),htmlColor:V.b.getColorValue(t.dialogStyling.clearTextButton.color)}))),W.default.createElement(z.DialogActions,{sx:Object.assign(Object.assign({},r),{pt:0})},W.default.createElement(N.a,{container:!0,spacing:2},W.default.createElement(N.a,{item:!0,xs:12},W.default.createElement(N.a,{color:V.b.getColorValue(t.dialogStyling.dividerColor)})),W.default.createElement(N.a,{item:!0,xs:6},W.default.createElement(et,Object.assign({style:{width:"100%"},onClick:t.onCancel},t.dialogStyling.cancelButton))),W.default.createElement(N.a,{item:!0,xs:6},W.default.createElement(et,Object.assign({icon:z.Replay,style:{width:"100%"},onClick:()=>{},type:"submit"},t.dialogStyling.updateButton)))))))}function Bl(t){return W.default.createElement("div",{style:{top:0,width:"100%",marginTop:"1px",marginLeft:"1px",height:"calc(100% - 2px)",position:"absolute",backgroundColor:V.b.getColorValue(t.config.backgroundColor),display:"flex",alignItems:"right",justifyContent:"right"}},W.default.createElement(N.a,{style:{height:"100%",color:V.b.getColorValue(t.config.iconColor),paddingRight:t.visibleOffset/2,cursor:"pointer"}}))}const Rl=0,Il=800,Fl=1200;function Wl(t){switch(t){case"mobile":return Object(z.useMediaQuery)("(min-width:"+Rl+"px) and (max-width:"+(Il-1)+"px)");case"tablet":return Object(z.useMediaQuery)("(min-width:"+Il+"px) and (max-width:"+(Fl-1)+"px)");case"desktop":return Object(z.useMediaQuery)("(min-width:"+Fl+"px)")}}const Ml=150;function jl(t){const[e,n]=Object(W.useState)(0),[i,o]=Object(W.useState)(!1);let r;const a=_l((t=>{let e=a.startPoint.current.x-t.x;e<0?a.stop():n(-e)}),(e=>{if(e.x===a.startPoint.current.x)return;if(a.startPoint.current.x-e.x>75){const e=t.animateBackAfterDelete?()=>{c(0)}:void 0;c(Ml,e)}else c(0)}),(()=>{c(0)})),s=Object(W.useContext)(ul),l=s.useBarcodeMappedData(t.barcode,t.expectedBarcode);Object(W.useEffect)((()=>{const e={barcode:t.barcode,callback:()=>t.onDelete(t.barcode)};return s.addOnEvictionListener(e),()=>{s.removeOnEvictionListener(e)}}),[]);const c=(e,i)=>{const a=e>=Ml,s=-r.getBoundingClientRect().width;n(a?s:0),o(!0),setTimeout((()=>{o(!1),a&&t.onDelete(t.barcode),i&&i()}),200)},u=Wl("desktop")&&t.swipeToDeleteConfig.enabled,d=!u&&t.swipeToDeleteConfig.enabled;return Object(W.useEffect)((()=>{d||c(0)}),[d]),W.default.createElement(z.Box,{sx:{px:2},style:{width:"100%",paddingRight:0},ref:t=>{t&&(r=t)}},W.default.createElement(Bl,{config:t.swipeToDeleteConfig,visibleOffset:Ml}),W.default.createElement(z.Box,Object.assign({sx:{width:"100%",backgroundColor:V.b.getColorValue(t.sheetColor),transform:`translateX(${e}px)`,transition:i?"transform 200ms ease-in-out":void 0,touchAction:"pan-y",display:"flex",alignItems:"center",paddingTop:"16px",paddingBottom:"16px",columnGap:"16px"}},d?a.props:{}),W.default.createElement(tt,Object.assign({barcodeMappedData:l},t)),null!==t.readonlyCount&&W.default.createElement(z.Box,{sx:{fontSize:18,marginTop:"auto",flex:1,textAlign:"right",color:V.b.getColorValue("?sbColorOnSurfaceVariant")}},"x",t.readonlyCount),u&&W.default.createElement(N.a,{sx:{height:"100%",marginLeft:"auto",cursor:"pointer",color:V.b.getColorValue("?sbColorOnSurface")},onClick:()=>t.onDelete(t.barcode)}),W.default.createElement(z.Box,{sx:{width:"0px"}})))}function zl(t){const e=V.b.getColorValue(t.sheetContent.dividerColor),n=t.sheetContent.manualCountChangeEnabled&&"COUNTING"===t.mode,i=(e,n)=>{let i=t.indicatorColor.partial;return n===e.count?i=t.indicatorColor.complete:0===n&&(i=t.indicatorColor.notScanned),V.b.getColorValue(i)};return W.default.createElement(W.default.Fragment,null,W.default.createElement(z.Divider,{style:{borderColor:e}}),t.barcodes.length>0&&W.default.createElement(N.a,{sx:{width:"auto",flex:1,overflowY:"auto",overflowX:"hidden"},role:"presentation"},W.default.createElement(N.a,{sx:{p:0}},t.barcodes.map((({barcode:o,count:r},a)=>{const s=t.expectedBarcodes.find((t=>t.barcodeValue===o.text));return W.default.createElement(N.a,{key:a,sx:{padding:0,borderBottom:`1px solid ${e}`}},t.indicatorColor&&W.default.createElement("div",{style:{display:"flex",width:4,height:"100%",backgroundColor:i(s,r),position:"absolute"}}),W.default.createElement(jl,{expectedBarcode:s,barcode:o,animateBackAfterDelete:t.animateBackAfterDelete,onDelete:()=>t.onBarcodeChange({type:"remove",barcode:o}),counterForm:n&&{counter:r,manualCountChangeColor:t.sheetContent.manualCountChangeColor,manualCountOutlineColor:t.sheetContent.manualCountOutlineColor,addButtonEnabled:void 0===s||s.count>r,removeButtonEnabled:void 0===s||r>0,setCounter:e=>{t.onBarcodeChange({type:"setCount",barcodes:[o],computeNewCount:()=>e})},onNumberClick:()=>t.onNumberClick({barcode:o,count:r})},readonlyCount:"COUNTING"!==t.mode||t.sheetContent.manualCountChangeEnabled?null:r,maxNumberOfTitleLines:1,maxNumberOfSubtitleLines:1,displayRightArrow:!1,imageSize:n?84:40,barcodeImageVisible:t.sheetContent.barcodeItemImageVisible,barcodeTitle:t.sheetContent.barcodeItemTitle,barcodeSubtitle:t.sheetContent.barcodeItemSubtitle,swipeToDeleteConfig:t.sheetContent.swipeToDelete,sheetColor:t.sheetContent.sheetColor}))})))))}function Nl(t){return W.default.createElement(z.Badge,{anchorOrigin:{vertical:"top",horizontal:"left"},badgeContent:t.text,showZero:!0,color:"primary",overlap:"circular",slotProps:{badge:{style:{backgroundColor:t.backgroundColor,color:t.foregroundColor,fontWeight:"bold"}}}},t.children)}function Vl(t){if(!t.buttonStyling.visible)return null;return W.default.createElement(z.Box,{style:t.style},W.default.createElement(Nl,{text:t.text,backgroundColor:V.b.getColorValue(t.buttonStyling.badgeBackgroundColor),foregroundColor:V.b.getColorValue(t.buttonStyling.badgeForegroundColor)},W.default.createElement(z.IconButton,{sx:{backgroundColor:V.b.getColorValue(t.buttonStyling.backgroundColor),width:60,height:60,"&:hover, &:focus":{backgroundColor:V.b.getColorValue(t.buttonStyling.activeBackgroundColor),outline:"none"}},onClick:t.onClick,disableRipple:!0,disableFocusRipple:!0},W.default.createElement(N.a,{sx:{color:V.b.getColorValue(t.buttonStyling.foregroundColor),fontSize:"24pt","&:hover, &:focus":{color:V.b.getColorValue(t.buttonStyling.activeForegroundColor)}}}))))}const Ul=(t,e)=>(null===t.format||null===e.format||t.format===e.format)&&t.text===e.text;function Hl(t,e){switch(e.type){case"setCount":{let n=[...t];for(const t of e.barcodes){const i=n.findIndex((e=>Ul(e.barcode,t)));if(-1===i)n.push({barcode:t,count:e.computeNewCount(0)});else{const t=n[i];n[i]=Object.assign(Object.assign({},t),{count:e.computeNewCount(t.count,t)})}}return n}case"remove":return t.map((t=>Object.assign(Object.assign({},t),{count:Ul(t.barcode,e.barcode)?0:t.count})));case"clear":return t.map((t=>Object.assign(Object.assign({},t),{count:0})));case"setHtmlElements":let n=!1;const i=t.map((t=>Ul(t.barcode,e.barcode)?(n=!0,Object.assign(Object.assign({},t),{polygonElement:e.polygonElement,labelElement:e.labelElement})):t));return n||i.push({barcode:e.barcode,count:0,labelElement:e.labelElement,polygonElement:e.polygonElement}),i}}class Gl{constructor(t,e){this.expectedCount=t,this.foundCount=e}isFulFilled(){return void 0!==this.expectedCount&&void 0!==this.foundCount&&this.expectedCount===this.foundCount}toString(){return`${this.foundCount}/${this.expectedCount}`}}function Ql(t){const e=Object(W.useContext)(V.a).getColorValue,n={backgroundColor:e(t.sheetColor)};return W.default.createElement(it,{modalOverlayColor:t.modalOverlayColor,open:t.open},W.default.createElement(z.DialogContent,{sx:Object.assign(Object.assign({},n),{p:2,pb:1,textAlign:"center"})},W.default.createElement(z.Typography,{sx:{fontSize:"16pt",fontWeight:"bold"}},W.default.createElement(Q.a,{config:t.title})),W.default.createElement(z.Typography,{sx:{fontSize:"14pt",lineHeight:"16pt"}},W.default.createElement(Q.a,{config:t.subtitle}))),W.default.createElement(z.DialogActions,{sx:Object.assign(Object.assign({},n),{pt:1})},W.default.createElement(N.a,{container:!0,spacing:2},W.default.createElement(N.a,{item:!0,xs:12},W.default.createElement(N.a,{color:e(t.dividerColor)})),W.default.createElement(N.a,{item:!0,xs:6},W.default.createElement(et,Object.assign({style:{width:"100%"},icon:t.cancelButton.icon,onClick:t.cancelButton.onClick},t.cancelButton.style))),W.default.createElement(N.a,{item:!0,xs:6},W.default.createElement(et,Object.assign({style:{width:"100%"},icon:t.okButton.icon,onClick:t.okButton.onClick},t.okButton.style))))))}function Yl(t){return t.open?W.default.createElement(Ql,{open:t.open,dividerColor:t.style.dividerColor,modalOverlayColor:t.style.modalOverlayColor,sheetColor:t.style.sheetColor,title:t.style.title,subtitle:t.style.subtitle,cancelButton:{style:t.style.cancelButton,onClick:t.onDismiss},okButton:{style:t.style.okButton,onClick:t.onSubmit}}):null}class Zl{constructor(t,e,n){this.barcodeItemSubtitleText=t,this.foundBarcodes=e,this.getExpectedBarcode=n}useBarcodeMappedData(t,e){var n,i,o;const r=null!==(i=null===(n=this.foundBarcodes.find((e=>Ul(e.barcode,t))))||void 0===n?void 0:n.count.toString())&&void 0!==i?i:"0",a=this.getExpectedBarcode(t);return{state:"LOADED",value:{title:`${null!==(o=e.title)&&void 0!==o?o:t.text}`,subtitle:V.b.getLocalizedBarcodeText(this.barcodeItemSubtitleText,[r,null==a?void 0:a.count.toString()]),barcodeImage:a.image}}}addOnEvictionListener(){}removeOnEvictionListener(){}}var ql=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};function Xl(t){const e=Object(W.useRef)(),[n,i]=Object(W.useReducer)(Hl,[]),o=Object(W.useRef)(new Date("2001-01-01")),[r,a]=W.default.useState(null),[s,l]=Object(W.useState)(!1),c=Object(W.useMemo)((()=>"__sb_"+Math.random()),[]),[u,d]=Object(W.useState)(!0),h=t.barcodeMapper,[p,f]=Object(W.useState)(null),m="FindAndPickScanningMode"===t.configuration.useCase._type,g=t.configuration.useCase,v=m?"COUNTING":g.mode,A=(e,n)=>{var i;if(o.current=new Date,!n)return e;const r=null===(i=S().find((t=>t.barcodeValue===n.barcode.text)))||void 0===i?void 0:i.count;return void 0===r||r===e?e:(ct.INSTANCE.beep(t.configuration.sound),dt.INSTANCE.vibrate(t.configuration.vibration),e+1)},b=Object(W.useRef)(Object.assign(Object.assign({},bl(t.configuration)),{onBarcodesDetected:e=>{if((new Date).getTime()-o.current.getTime()<g.countingRepeatDelay||!t.scanningEnabled.current)return;if(m){if(!g.arOverlay.automaticSelectionEnabled)return;return void i({type:"setCount",barcodes:e.barcodes,computeNewCount:A})}const n=g.arOverlay;if(!n.visible||n.automaticSelectionEnabled){let n=!1;i({type:"setCount",barcodes:e.barcodes,computeNewCount:e=>{let i="COUNTING"===v?e+1:1;return i===e||n||(o.current=new Date,ct.INSTANCE.beep(t.configuration.sound),dt.INSTANCE.vibrate(t.configuration.vibration)),i}})}else i({type:"setCount",barcodes:e.barcodes,computeNewCount:t=>t})},_onDetectionFailed(t){},onError:t.onError,captureDelay:1e3/60}));Object(W.useEffect)((()=>{if(m){const e=S();for(const n of e)i({type:"setCount",barcodes:[(t=n.barcodeValue,new T.BarcodeScannerTypes.BarcodeItem({text:t,format:null,quad:[],sourceImage:null,rawBytes:null,upcEanExtension:null,parsedDocument:null}))],computeNewCount:()=>0})}var t}),[]),Object(W.useEffect)((()=>{b.current.container=e.current}),[e]),Object(W.useEffect)((()=>{if(m)for(const t of n){const e=g.arOverlay,n=t.polygonElement,i=t.labelElement;if(x(t.barcode)){const o=F(t.barcode);let r=t.count+"/"+o.expectedCount;g.arOverlay.automaticSelectionEnabled||0!==t.count||(r=W.default.createElement(z.TouchApp,null)),o.isFulFilled()?(null==n||n.style(V.b.getPolygonColorValues(e.polygon.completed,e.polygon.visible)),null==i||i.styleBadge(e.badge.completed,W.default.createElement(z.Check,null))):(null==n||n.style(V.b.getPolygonColorValues(e.polygon.partiallyScanned,e.polygon.visible)),null==i||i.styleBadge(e.badge.partiallyScanned,r))}else null==n||n.style(V.b.getPolygonColorValues(e.polygon.rejected,e.polygon.visible)),null==i||i.styleBadge(e.badge.rejected,W.default.createElement(z.Close,null))}else for(const t of n){if(t.polygonElement){const e=g.arOverlay.polygon,n=t.count>0?e.selected:e.deselected;t.polygonElement.style(V.b.getPolygonColorValues(n,e.visible))}t.labelElement&&(t.labelElement.update(Object.assign(Object.assign({},t.labelElement.state.element),{highlighted:t.count>0})),t.labelElement.setCount(t.count))}}),[n]);const y=n.reduce(((t,e)=>t+e.count),0),C=()=>S().every((t=>n.some((e=>e.barcode.text===t.barcodeValue&&e.count===t.count)))),S=()=>m?g.expectedBarcodes:[],w=t=>S().find((e=>e.barcodeValue===t.text)),x=t=>!!w(t),E=()=>m?n.filter((t=>x(t.barcode))):n.filter((t=>t.count>0)),L=()=>ql(this,void 0,void 0,(function*(){const e=E().map((t=>new j.BarcodeScannerUIItem({count:"COUNTING"===v?t.count:1,barcode:t.barcode})));t.onSubmit({items:e})})),_=W.default.createElement(zl,{expectedBarcodes:S(),barcodes:E(),animateBackAfterDelete:m,onBarcodeChange:i,sheetContent:g.sheetContent,onNumberClick:t=>a(t),mode:v,indicatorColor:m&&{partial:g.scanningPartiallyColor,complete:g.scanningCompletedColor,notScanned:g.scanningNotScannedColor}}),O={textReplacementArgs:[y.toString()],leftButton:Object.assign(Object.assign({},g.sheetContent.clearAllButton),{onClick:()=>i({type:"clear"})}),rightButton:Object.assign(Object.assign({},g.sheetContent.submitButton),{onClick:()=>ql(this,void 0,void 0,(function*(){if(m){const t=g;let e=null;t.partialScannedAlertDialogEnabled&&!C()&&(e=t.partialScannedAlertDialog),t.confirmationAlertDialogEnabled&&C()&&(e=t.confirmationAlertDialog),e?f(e):yield L()}else yield L()}))}),title:g.sheetContent.title},k=Wl("mobile"),D="BUTTON"!==g.sheet.mode&&k?"SMALL"===g.sheet.collapsedVisibleHeight?69:128:0,P=k&&"BUTTON"===g.sheet.mode,B=P?76:0,R=(u?80:0)+B,I=Object(W.useContext)(X),F=t=>{const e=n.find((e=>e.barcode.text===t.text)),i=w(t);return new Gl(null==i?void 0:i.count,null==e?void 0:e.count)},M=S().reduce(((t,e)=>t+e.count),0);m&&O.textReplacementArgs.push(M.toString());const U=m?new Zl(g.sheetContent.barcodeItemSubtitle.text,n,w):h;return W.default.createElement(W.default.Fragment,null,W.default.createElement(ul.Provider,{value:U},W.default.createElement(N.a,{container:!0,sx:{display:"flex",flexDirection:k?"column":"row",height:`calc(${I.remainingVisibleBodyHeight} - ${D}px)`},alignItems:"stretch"},W.default.createElement(N.a,{id:c,item:!0,ref:e,component:"div",xs:k?12:7,zIndex:100},P&&W.default.createElement(Vl,{style:{position:"absolute",marginTop:`calc(${I.remainingVisibleBodyHeight} - 60px - 8px)`,width:"100%",display:"flex",justifyContent:"center",zIndex:1100},text:m?`${y}/${M}`:y.toString(),onClick:()=>l(!s),buttonStyling:g.sheet.listButton}),W.default.createElement(Al,{viewFinderPadding:{minTopPadding:I.minTopPaddingForContent,minBottomPadding:R},arOverlay:(()=>{if(m){const t=g.arOverlay;return Object.assign(Object.assign({},t),{counterBadge:Object.assign({},t.badge.partiallyScanned)})}const t=g.arOverlay,e=t.counterBadge;return Object.assign(Object.assign({},t),{counterBadge:Object.assign(Object.assign({},e),{visible:e.visible&&"COUNTING"===v})})})(),containerId:c,barcodeScannerViewConfig:b.current,onCameraPermissionDenied:t.onCameraPermissionDenied,actionBarConfig:t.configuration.actionBar,actionBarBottomPadding:16+B,setActionButtonsVisible:d,arOnBarcodeClick:e=>{i({type:"setCount",barcodes:[e],computeNewCount:(e,n)=>{if(m)return A(e,n);const i="UNIQUE"===v?1-e:e+1;return i>0&&(ct.INSTANCE.beep(t.configuration.sound),dt.INSTANCE.vibrate(t.configuration.vibration)),i}})},arOnBarcodeEnter:(t,e,n)=>{n&&e&&i({type:"setHtmlElements",barcode:t,labelElement:n,polygonElement:e})},scanningPaused:s&&k,cameraConfiguration:t.configuration.cameraConfiguration,onLicenseError:t.onError}),k&&W.default.createElement(Tl,{closedSheetVisibleHeight:D,sheetStyle:g.sheet,contentStyle:g.sheetContent,manualCountEditDialog:g.manualCountEditDialog,isPlaceholderVisible:!m&&0===y,onBarcodeChange:t=>i(t),drawerHeaderContentProps:O,isOpen:s,onSwipe:t=>{l("swipe-to-open"===t)}},_)),function(t){switch(t){case"mobile":return Object(z.useMediaQuery)("(min-width:"+Rl+"px)");case"tablet":return Object(z.useMediaQuery)("(min-width:"+Il+"px)");case"desktop":return Object(z.useMediaQuery)("(min-width:"+Fl+"px)")}}("tablet")&&W.default.createElement(N.a,{item:!0,xs:k?12:5,component:"div",style:{paddingTop:I.minTopPaddingForContent,height:"100%",flexDirection:"column",display:"flex",backgroundColor:V.b.getColorValue(g.sheetContent.sheetColor)},zIndex:1050},W.default.createElement(N.a,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},zIndex:50},W.default.createElement(Sl,Object.assign({},O))),_,W.default.createElement(Ll,{isVisible:!m&&0===y,style:g.sheetContent}))),W.default.createElement(Pl,{barcode:r,dialogStyling:g.manualCountEditDialog,onCancel:()=>a(null),setCounter:t=>{if(m){const e=w(t.barcodes[0]);t.computeNewCount()>e.count&&(t.computeNewCount=()=>e.count)}i(t),a(null)}}),W.default.createElement(Yl,{open:null!==p,style:p,onDismiss:()=>f(null),onSubmit:L})))}const $l=Object(W.createContext)(null),Kl={didCatch:!1,error:null};class Jl extends W.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Kl}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(null!==t){for(var e,n,i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];null===(e=(n=this.props).onReset)||void 0===e||e.call(n,{args:o,reason:"imperative-api"}),this.setState(Kl)}}componentDidCatch(t,e){var n,i;null===(n=(i=this.props).onError)||void 0===n||n.call(i,t,e)}componentDidUpdate(t,e){const{didCatch:n}=this.state,{resetKeys:i}=this.props;var o,r;n&&null!==e.error&&function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.length!==e.length||t.some(((t,n)=>!Object.is(t,e[n])))}(t.resetKeys,i)&&(null===(o=(r=this.props).onReset)||void 0===o||o.call(r,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(Kl))}render(){const{children:t,fallbackRender:e,FallbackComponent:n,fallback:i}=this.props,{didCatch:o,error:r}=this.state;let a=t;if(o){const t={error:r,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof e)a=e(t);else if(n)a=Object(W.createElement)(n,t);else{if(null!==i&&!Object(W.isValidElement)(i))throw r;a=i}}return Object(W.createElement)($l.Provider,{value:{didCatch:o,error:r,resetErrorBoundary:this.resetErrorBoundary}},a)}}function tc(t){const e=Object(W.useRef)(!0);Object(W.useEffect)((()=>(e.current=!0,()=>{e.current=!1})));const[,n]=Object(W.useReducer)((t=>t+1),0),i=Object(W.useRef)();return Object(W.useMemo)((()=>{i.current={loading:!0,value:void 0,error:null}}),[t]),function(t,e){Object(W.useMemo)((()=>{t&&t.then((t=>{e({loading:!1,error:null,value:t})})).catch((t=>{e({loading:!1,error:{reason:t},value:void 0})}))}),[t])}(t,(t=>{i.current=t,e.current&&n()})),t?i.current:null}var ec=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class nc{constructor(t,e){this.barcodeItemMapper=t,this.onError=e,this.cache=new Map,this.cacheEntryPendingRetries=[],this.hash=t=>At(t),this.onEvictionListeners=new Set}getBarcodeMappedData(t){const e=this.hash(t);if(!this.cache.has(e)){const n=(()=>ec(this,void 0,void 0,(function*(){if(this.barcodeItemMapper){const e=new j.BarcodeScannerUIItem({count:1,barcode:t});return this.barcodeItemMapper(e)}{const e=yield b.toDataUrl(yield fu.instance.imageToJpeg(t.sourceImage));return{title:t.text,subtitle:t.format,barcodeImage:e}}})))();this.cache.set(e,n)}return this.cache.get(e)}useBarcodeMappedData(t){const e=Object(W.useRef)(!1),n=tc(t&&this.getBarcodeMappedData(t));if(Object(W.useEffect)((()=>{n&&n.error&&(e.current=!1,this.cacheEntryPendingRetries.push({barcode:t,retry:()=>{this.cache.delete(this.hash(t)),e.current=!0}}),this.onError((()=>{for(const t of this.cacheEntryPendingRetries)t.retry();this.cacheEntryPendingRetries.length=0}),(()=>{e.current=!0;for(const t of this.cacheEntryPendingRetries)for(const e of this.onEvictionListeners)this.hash(e.barcode)==this.hash(t.barcode)&&e.callback();this.cacheEntryPendingRetries.length=0})))}),[n&&n.error]),!n)return null;let i;return i=n.value?"LOADED":n.error&&!e.current?"RETRY_DIALOG_OPEN":n.error?"FAILED":"LOADING",{value:n.value,state:i}}addOnEvictionListener(t){this.onEvictionListeners.add(t)}removeOnEvictionListener(t){this.onEvictionListeners.delete(t)}}j.BarcodeItemErrorState;function ic(t){return W.default.createElement(Ql,{open:t.open,dividerColor:t.dividerColor,modalOverlayColor:t.modalOverlayColor,sheetColor:t.sheetColor,title:t.title,subtitle:t.subtitle,cancelButton:{style:t.cancelButton,onClick:t.handleCancel},okButton:{style:t.retryButton,icon:z.Replay,onClick:t.handleRetry}})}function oc(t){const e=Object(W.useContext)(X);return W.default.createElement(z.Box,{sx:{paddingTop:e.minTopPaddingForContent+"px",overflowY:"scroll",backgroundColor:V.b.getColorValue(t.config.background)}},W.default.createElement(z.Box,{sx:{height:e.remainingVisibleBodyHeight,marginLeft:"auto",marginRight:"auto",maxWidth:280,display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"}},t.config.icon.visible&&W.default.createElement(z.Box,null,W.default.createElement(z.Avatar,{sx:{width:100,height:100,backgroundColor:V.b.getColorValue(t.config.iconBackground),margin:"24px"}},W.default.createElement(N.a,{sx:{fontSize:50,color:V.b.getColorValue(t.config.icon.color)}}))),W.default.createElement(z.Typography,{sx:{fontSize:20,textAlign:"center"}},W.default.createElement(Q.a,{config:t.config.enableCameraTitle})),W.default.createElement(z.Typography,{sx:{fontSize:16,textAlign:"center",paddingTop:"12px"}},W.default.createElement(Q.a,{config:t.config.enableCameraExplanation})),W.default.createElement(z.Box,{sx:{paddingTop:"16px"}},W.default.createElement(q,Object.assign({},t.config.closeButton,{onClick:t.onAppClose})))))}function rc(t){const e=Object(W.useRef)(Object(z.createTheme)({palette:{primary:{main:St.ScanbotPrimary},secondary:{main:St.DarkGray}}})),[n,i]=Object(W.useState)(!1),[o,r]=Object(W.useState)(!1),[a,s]=Object(W.useState)(t.configuration.timeouts.initialScanDelay<=0),l=Object(W.useRef)(!1),c=Object(W.useRef)(),u=Object(W.useRef)(),d=t.configuration.useCase,h="FindAndPickScanningMode"===d._type?null:d.barcodeInfoMapping,p=Object(W.useMemo)((()=>new nc(null==h?void 0:h.barcodeItemMapper,((t,e)=>{i(!0),c.current=()=>{i(!1),t()},u.current=()=>{i(!1),e()}}))),[]);let f;if(Object(W.useMemo)((()=>{V.b.setPalette(t.configuration.palette),V.b.setBarcodeTextLocalization(t.configuration.localization)}),[t.configuration]),Object(W.useEffect)((()=>{if(t.configuration.timeouts.autoCancelTimeout>0){const e=setTimeout((()=>{t.onClose()}),t.configuration.timeouts.autoCancelTimeout);return()=>{clearTimeout(e)}}}),[]),Object(W.useEffect)((()=>{if(t.configuration.timeouts.initialScanDelay>0){const e=setTimeout((()=>{s(!0)}),t.configuration.timeouts.initialScanDelay);return()=>{clearTimeout(e)}}}),[]),Object(W.useEffect)((()=>{l.current=!n&&a}),[n,a]),"SingleScanningMode"===d._type)f=W.default.createElement(Cl,{configuration:t.configuration,barcodeMapper:p,onClose:t.onClose,onSubmit:t.onSubmit,onError:t.onError,onCameraPermissionDenied:()=>r(!0),scanningEnabled:l});else{if("MultipleScanningMode"!==d._type&&"FindAndPickScanningMode"!==d._type)throw new Error("Unsupported use case type");f=W.default.createElement(Xl,{configuration:t.configuration,barcodeMapper:p,onSubmit:t.onSubmit,onError:t.onError,onCameraPermissionDenied:()=>r(!0),scanningEnabled:l})}return W.default.createElement(W.default.Fragment,null,W.default.createElement(H,null),W.default.createElement(Jl,{onError:t.onError,fallback:W.default.createElement("div",null,"Error")},W.default.createElement(V.a.Provider,{value:Object(V.c)(t.configuration.palette)},W.default.createElement(z.ThemeProvider,{theme:e.current},h&&W.default.createElement(ic,Object.assign({open:n,handleCancel:u.current,handleRetry:c.current,modalOverlayColor:h.modalOverlayColor,dividerColor:h.dividerColor,sheetColor:h.sheetColor},h.errorState)),W.default.createElement(N.a,{sx:{height:`100 * ${U}`,width:"100vw",backgroundColor:V.b.getColorValue(t.configuration.backgroundColor)}},W.default.createElement($,Object.assign({onBackPress:t.onClose},t.configuration.topBar),!o&&f,o&&W.default.createElement(oc,{onAppClose:t.onClose,config:t.configuration.cameraPermission})))))))}var ac=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class sc{static createBarcodeScanner(t){return new Promise(((e,n)=>{ct.INSTANCE.initialize(t.sound);const i=sc.createContainer("barcode-scanner-controller"),o=Object(M.createRoot)(i),r=()=>ac(this,void 0,void 0,(function*(){return new Promise((t=>{window.setTimeout((()=>{o.unmount(),document.body.removeChild(i),t()}),0)}))})),a=t=>ac(this,void 0,void 0,(function*(){yield r(),n(t)}));o.render(W.default.createElement(rc,{configuration:t,onClose:()=>ac(this,void 0,void 0,(function*(){yield r(),e(null)})),onSubmit:t=>ac(this,void 0,void 0,(function*(){yield r(),e(t)})),onError:a})),(()=>{ac(this,void 0,void 0,(function*(){try{const t=yield fu.instance.getLicenseInfo();t.isValid()||(yield a(new P(t)))}catch(t){yield a(t)}}))})()}))}static createContainer(t){const e=document.createElement("div");return e.id=t,e.style.position="fixed",e.style.width="100%",e.style.height="100%",e.style.zIndex="1000",e.style.top="0",e.style.backgroundColor="rgba(0, 0, 0, 0.5)",document.body.appendChild(e),e}}sc.Config=j;var lc=sc,cc=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class uc{constructor(t,e){this._sdk=t,this._recognizer=e}recognize(t,e,n="COPY_IMAGE"){return cc(this,void 0,void 0,(function*(){const i=this._sdk.getBridge(n);return yield i.genericDocumentRecognizerRecognize(this._recognizer,t,new T.GenericDocumentRecognizerTypes.RecognitionParameters(e))}))}release(){return cc(this,void 0,void 0,(function*(){yield this._sdk.bridge.copyArgs.releaseObject(this._recognizer)}))}}const dc={OK:"Capturing your document... Please do not move the camera.",OK_SMALL_SIZE:"The document is too small. Try moving closer.",OK_BAD_ANGLES:"This is a bad camera angle. Hold the device straight over the document.",OK_BAD_ASPECT_RATIO:"Rotate the device sideways, so that the document fits better into the screen.",OK_OFF_CENTER:"Try holding the device at the center of the document.",ERROR_NOTHING_DETECTED:"Please hold the device over a document to start scanning.",ERROR_TOO_DARK:"It is too dark. Try turning on a light.",ERROR_NOISE:"Please move the document to a clear surface.",NOT_ACQUIRED:"Scanning failed."};class hc{constructor(t){this.hint=t}}class pc{constructor(){this.outline=new fc,this.captureButton=new Ac}}class fc{constructor(){this.polygon=new mc,this.path=new gc,this.label=new vc}}class mc{constructor(){this.strokeCapturing="green",this.strokeSearching="yellow",this.fillCapturing="transparent",this.fillSearching="transparent"}}class gc{constructor(){this.stroke="green",this.strokeWidth=4}}class vc{}class Ac{constructor(){this.color="#FFF"}}class bc extends _.a{constructor(){super(_.a.DEFAULT_VIDEO_RESOLUTION_4K),this.detectionParameters=new T.DocumentDetectorTypes.DetectionParameters,this.autoCaptureEnabled=!0,this.autoCaptureSensitivity=.66,this.autoCaptureDelay=1e3,this.ignoreBadAspectRatio=!0,this.useImageCaptureAPI=!1,this.text=new hc(dc),this.style=new pc,this.onDocumentDetected=function(t){}}static fromJson(t){var e;const n=new bc;if(this.mapValues(t,n,["text","style","videoConstraints","detectionParameters"]),n.detectionParameters=new T.DocumentDetectorTypes.DetectionParameters(null!==(e=t.detectionParameters)&&void 0!==e?e:{}),t.text&&t.text.hint&&this.mapValues(t.text.hint,n.text.hint),t.style){this.mapValues(t.style,n.style,["outline","captureButton"]);const e=t.style.outline;if(e){this.mapValues(e,n.style.outline,["polygon","path","label"]);const t=e.polygon;t&&this.mapValues(t,n.style.outline.polygon);const i=e.path;i&&this.mapValues(i,n.style.outline.path);const o=e.label;o&&this.mapValues(o,n.style.outline.label)}const i=t.style.captureButton;i&&this.mapValues(i,n.style.captureButton)}return this.mapVideoConstraints(t,n),n}}var yc=n(41),Cc={insert:"head",singleton:!1};Fs()(yc.a,Cc),yc.a.locals;class Sc extends W.default.Component{constructor(){super(...arguments),this.LINE_COUNT=4}render(){return W.default.createElement("svg",{style:{width:"100%",height:"100%",position:"absolute",overflow:"visible",fill:this.props.polygonStyle.fill}},this.fill())}fill(){if(!this.props.points||0===this.props.points.length)return null;const t=[];for(let e=0;e<this.LINE_COUNT;e++){const n=this.props.points[e],i=this.props.points[(e+1)%this.LINE_COUNT];t.push(W.default.createElement("line",{key:e,style:this.props.polygonStyle,className:this.props.polygonClasses,x1:n.x,y1:n.y,x2:i.x,y2:i.y}))}return t}setFrame(){window.requestAnimationFrame((()=>this.forceUpdate()))}}Sc.CLASSNAME="scanbot-document-outline";class wc extends W.default.Component{constructor(t){super(t),this.state={points:[],animatedPoints:[],isOk:!1,isVisible:!1}}update(t,e,n,i){const o={points:t,animatedPoints:e,isOk:n,isVisible:i};this.setState(o)}pointStringOrLatestValidPoints(t){return t&&t.length>0?ws.a.toSvgString(t):ws.a.toSvgString(this.latestValidPoints)}render(){var t;this.state.points&&(this.latestValidPoints=this.state.points);const e=null!==(t=this.props.style)&&void 0!==t?t:{},n=zs()(Sc.CLASSNAME,{[`${Sc.CLASSNAME}-ok`]:this.state.isOk},{[`${Sc.CLASSNAME}-visible`]:this.state.isVisible},{[`${Sc.CLASSNAME}-hidden`]:!this.state.isVisible});return W.default.createElement(Cs.polygon,{ref:t=>this.polygon=t,style:{strokeWidth:e.strokeWidth||2},animate:{points:this.pointStringOrLatestValidPoints(this.state.animatedPoints),opacity:this.state.isVisible?1:0,stroke:this.state.isOk?e.strokeCapturing:e.strokeSearching,fill:this.state.isOk?e.fillCapturing:e.fillSearching},onClick:()=>{},fill:"transparent",className:n})}}var xc=wc;class Ec extends W.default.Component{constructor(t){super(t),this.state={path:void 0}}render(){var t,e;return this.state.path?W.default.createElement(Cs.path,{pathLength:"1",strokeDasharray:"1 1",initial:{strokeDashoffset:1},animate:{strokeDashoffset:0},transition:{duration:this.props.duration/1e3,ease:"easeInOut",repeat:0,repeatType:"loop",repeatDelay:1},stroke:(null===(t=this.props.style)||void 0===t?void 0:t.stroke)||"white",strokeWidth:(null===(e=this.props.style)||void 0===e?void 0:e.strokeWidth)||2,fill:"none",d:this.state.path,className:`${Sc.CLASSNAME}-path`}):null}animate(t){const e="M"+ws.a.toSvgString(t)+"z";this.setState({path:e})}clear(){this.setState({path:void 0})}}class Lc extends W.default.Component{render(){return W.default.createElement(Cs.svg,{style:{width:"100%",height:"100%",position:"absolute",overflow:"visible"}},W.default.createElement(xc,{ref:t=>this.polygon=t,style:this.props.polygonStyle}),W.default.createElement(Ec,{ref:t=>this.path=t,style:this.props.pathStyle,duration:this.props.autoCaptureSensitivity}))}update(t,e,n){var i;const o="processing"!==n&&!!t,r=null!==(i=this.previous)&&void 0!==i?i:t,a=this.previous?t:void 0;this.polygon.update(r,a,e,o),this.previous=t,this.previous&&"capturing"===n?this.animateCapturing():this.clearAnimation()}animateCapturing(){this.path.animate(this.previous)}clearAnimation(){this.path.clear()}}class _c extends W.default.Component{constructor(){super(...arguments),this.hintLabelClassName="scanbot-document-hint-text",this.state={text:"Initializing...",ok:!1,validPoints:!1}}render(){const{ok:t,text:e,validPoints:n}=this.state,i="searching"===this.props.action||"capturing"===this.props.action,o="processing"!==this.props.action&&n,r=zs()({[this.hintLabelClassName]:!0,[`${this.hintLabelClassName}-visible`]:o,[`${this.hintLabelClassName}-hidden`]:!o});return W.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",left:0,top:0}},W.default.createElement(Lc,{ref:t=>{this.polygon=t},action:this.props.action,style:{width:"100%",height:"100%"},polygonStyle:this.props.style.polygon,pathStyle:this.props.style.path,isOk:t,isVisible:o,autoCaptureSensitivity:this.props.autoCaptureSensitivity}),i&&W.default.createElement("label",{ref:t=>this.label=t,style:this.props.style.label,className:r,dangerouslySetInnerHTML:{__html:e}}))}update(t,e,n){this.polygon.update(e,t,this.props.action),this.label&&(this.label.innerHTML=n)}}class Oc{static isConvex(t){if(t.length<4)return!0;let e=!1,n=t.length;for(let i=0;i<n;i++){const o=t[(i+2)%n].x-t[(i+1)%n].x,r=t[(i+2)%n].y-t[(i+1)%n].y,a=t[i].x-t[(i+1)%n].x,s=o*(t[i].y-t[(i+1)%n].y)-r*a;if(0==i)e=s>0;else if(e!=s>0)return!1}return!0}static distanceBetweenPoints(t,e){return Math.pow(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2),.5)}static intersection(t,e){const n=t[0],i=ws.a.subtract(t[1],n),o=e[0],r=ws.a.subtract(e[1],o);if(0===ws.a.cross(i,r))return;const a=ws.a.cross(ws.a.subtract(o,n),i)/ws.a.cross(i,r);return ws.a.add(o,ws.a.multiply(r,a))}}class Tc{constructor(t,e=Tc.DEFAULT_SENSITIVITY){this.maxDistance=this.calculateMaxDistance(t),this.sensitivity=e}check(t){let e=!1;if(this.lastPolygon){for(var n=0;n<4;n++)if(this.isPointMoved(t[n],this.lastPolygon[n])){e=!0;break}}else e=!0;return e}reset(){this.lastPolygon=void 0}update(t){this.lastPolygon=t}isPointMoved(t,e){return Oc.distanceBetweenPoints(t,e)/this.maxDistance>this.sensitivity}calculateMaxDistance(t){let e=new ws.a(0,0),n=new ws.a(t.width,t.height);return Oc.distanceBetweenPoints(e,n)}}Tc.DEFAULT_SENSITIVITY=.5;var kc=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};ht.b;ht.a;class Dc extends ht.c{constructor(t){if(super(t),this.preventAutoCapture=!1,this.defaultCaptureButtonClick=()=>kc(this,void 0,void 0,(function*(){const t=yield this.detectAndCrop();this.configuration.onDocumentDetected(t)})),Object.assign(this.state,{action:this.defaultAction}),!this.isSupported()){throw Error("Camera can only be accessed if the content is served via HTTPS, or on localhost. Check DocumentScannerView.isSupported() before creating the scanner.")}if(!fu.instance)throw Error("Initialize the SDK by calling ScanbotSDK.initialize() before using the document scanner.")}get defaultAction(){return this.isAutoCaptureEnabled()?"searching":"manual"}get enabled(){return("searching"==this.state.action||"capturing"==this.state.action||"manual"==this.state.action)&&!this.disposed}get configuration(){return this._configuration||(this._configuration=bc.fromJson(this.props.configuration)),this._configuration}get autoCaptureSensitivity(){return 3e3*(1-this.configuration.autoCaptureSensitivity)}static create(t){return kc(this,void 0,void 0,(function*(){const e=document.getElementById(t.containerId);if(!e)throw Error("Unable to initialize ScanbotSDK: Cannot find container element with the id provided.");return new Promise(((n,i)=>{Object(W.render)(W.default.createElement(Dc,{container:e,configuration:t,onSuccess:n,onFailure:i}),e)}))}))}detectAndCrop(){var t,e,n;return kc(this,void 0,void 0,(function*(){try{if(this.enabled){this.setState({action:"processing"});const e=yield null===(t=this.camera)||void 0===t?void 0:t.createImageData(Dc.DETECT_AND_CROP_RESOLUTION,this.configuration.useImageCaptureAPI);if(!e)return;return F.a.debug("Detect & Crop document of size: "+e.height*e.width),yield this.bridge.transferArgs.detectAndCropDocument(e)}}catch(t){null===(n=(e=this.configuration).onError)||void 0===n||n.call(e,t)}finally{this.setState({action:this.defaultAction})}}))}enableAutoCapture(){this.updateAutoCapture(!0)}disableAutoCapture(){this.updateAutoCapture(!1)}updateAutoCapture(t){this._configuration?this._configuration.autoCaptureEnabled=t:this.props.configuration.autoCaptureEnabled=t,this.setState({action:this.defaultAction})}isAutoCaptureEnabled(){return this._configuration?this._configuration.autoCaptureEnabled:this.props.configuration.autoCaptureEnabled}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return kc(this,void 0,void 0,(function*(){t.componentDidMount.call(this),this.detect(),this.recognizer=this.bridge.copyArgs.createDocumentDetector(new T.DocumentDetectorTypes.DetectionParameters(this.configuration.detectionParameters)),this.recognizer.catch((t=>{var e,n;return null===(n=(e=this.configuration).onError)||void 0===n?void 0:n.call(e,t)}))}))}componentWillUnmount(){const t=Object.create(null,{componentWillUnmount:{get:()=>super.componentWillUnmount}});return kc(this,void 0,void 0,(function*(){t.componentWillUnmount.call(this),this.handleAutoCapture(!1),yield fu.instance.release(yield this.recognizer,"Document Scanner")}))}detect(){var t,e;return kc(this,void 0,void 0,(function*(){try{if(!this.enabled)return;const t=yield this.detectInWebWorker();if(!t||!this.enabled)return;if(!this.outline)return;this.camera.reusableImageBuffer=t.originalImage.data;const e=this.getStatusString(t),n="OK"===e,i=e.startsWith("OK")?this.scalePolygonPointsToPixels(t.pointsNormalized):void 0;this.outline.update(n,i,v.getProperty(this.configuration.text.hint,e)),yield this.handleAutoCapture(n,i)}catch(n){null===(e=(t=this.configuration).onError)||void 0===e||e.call(t,n)}finally{requestAnimationFrame(this.detect.bind(this))}}))}getStatusString(t){return this.configuration.ignoreBadAspectRatio&&"OK_BAD_ASPECT_RATIO"===t.status?"OK":t.status}detectInWebWorker(){var t,e,n;return kc(this,void 0,void 0,(function*(){try{const e=yield null===(t=this.camera)||void 0===t?void 0:t.createImageData(ht.c.DEFAULT_DETECTION_RESOLUTION,!1);return e&&this.enabled?yield this.bridge.transferArgs.documentDetectorDetect(yield this.recognizer,e):null}catch(t){return null===(n=(e=this.configuration).onError)||void 0===n||n.call(e,t),null}}))}handleAutoCapture(t,e){return kc(this,void 0,void 0,(function*(){if(this.configuration.autoCaptureEnabled&&!this.preventAutoCapture)if(t&&!this.autoCaptureToken&&e){if(this.updateButton("capturing"),!this.polygonMovementPredicate){const t=this.getCameraFrameSize();this.polygonMovementPredicate=new Tc(t)}if(this.runMovementPredicate(e))return this.updateButton("searching"),clearTimeout(this.autoCaptureToken),void(this.autoCaptureToken=void 0);this.autoCaptureToken=setTimeout((()=>kc(this,void 0,void 0,(function*(){if(this.autoCaptureToken=void 0,!this.enabled)return;if(!this.configuration.autoCaptureEnabled)return;const t=yield this.detectAndCrop();if(null==t?void 0:t.pointsNormalized){const e=this.scalePolygonPointsToPixels(t.pointsNormalized);if(this.runMovementPredicate(e))return}(null==t?void 0:t.status.startsWith("OK"))&&this.configuration.onDocumentDetected&&(this.configuration.onDocumentDetected(t),this.preventAutoCapture=!0,setTimeout((()=>{this.preventAutoCapture=!1}),this.configuration.autoCaptureDelay))}))),this.autoCaptureSensitivity)}else!t&&this.autoCaptureToken&&(this.updateButton("searching"),clearTimeout(this.autoCaptureToken),this.autoCaptureToken=void 0)}))}updateButton(t){this.setState({action:t})}render(){var t,e,n;const{action:i}=this.state,{configuration:o}=this,r=null===(t=o.style)||void 0===t?void 0:t.captureButton;return W.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(e=this.configuration)||void 0===e?void 0:e.spinnerColor),W.default.createElement(pt.a,{configuration:this.configuration,videoConstraints:o.videoConstraints,mirrored:o.mirrored,preferredCamera:this.configuration.preferredCamera,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}}),W.default.createElement(_c,{ref:t=>{this.outline=t},style:null===(n=o.style)||void 0===n?void 0:n.outline,action:i,autoCaptureSensitivity:this.autoCaptureSensitivity}),W.default.createElement(Vs,{color:(null==r?void 0:r.color)?r.color:"FFF",action:i,onClick:this.enabled?o.onCaptureButtonClick||this.defaultCaptureButtonClick:()=>{}}))}scalePolygonPointsToPixels(t){if(t){const e=this.getCameraFrameSize(),n=Ys.a.fromHtmlElement(this.camera.video),i=rl.findScale(n,e);t=(t=rl.convertToViewportPointsFromParentSize(e,t)).map((t=>ws.a.scaleToPoint(t,i.x,i.y,i.scale)))}return t}runMovementPredicate(t){const e=this.polygonMovementPredicate.check(t);return this.polygonMovementPredicate.update(t),e}getCameraFrameSize(){return this.camera.calculateFrameSize(ht.c.DEFAULT_DETECTION_RESOLUTION,this.camera.videoSize().width,this.camera.videoSize().height)}}Dc.DETECT_AND_CROP_RESOLUTION=0;var Pc=Dc;class Bc extends O.a{constructor(){super(_.a.DEFAULT_VIDEO_RESOLUTION_HD),this.recognizerConfiguration=new T.MRZTypes.RecognizerConfiguration,this.onMrzDetected=function(t){},this.finder.aspectRatio=new T.Geometry.AspectRatio({width:4,height:1}),this.userGuidance.title.text="Please hold the device over the MRZ code to start scanning"}static fromJson(t){const e=new Bc;return this.mapValues(t,e,["style","videoConstraints","finder","userGuidance"]),this.mapFinderConfiguration(e,t),this.mapVideoConstraints(t,e),e}}var Rc=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};ht.a;ht.b;class Ic extends ht.c{constructor(t){super(t),this.shouldComputeSize=!0,this.paused=!1,this.updateDimensionsCallback=this.updateDimensions.bind(this),Object.assign(this.state,{isFinderVisible:!0})}get configuration(){return this._configuration||(this._configuration=Bc.fromJson(this.props.configuration)),this._configuration}get enabled(){return!this.disposed}static create(t,e){return Rc(this,void 0,void 0,(function*(){const n=document.getElementById(t.containerId);if(!n)throw Error("Unable to initialize ScanbotSDK: Cannot find container element with the id provided.");return new Promise(((i,o)=>{Object(W.render)(W.default.createElement(Ic,{container:n,configuration:t,onSuccess:i,onFailure:o,mrzRecognizer:e}),n)}))}))}isDetectionPaused(){return this.paused}resumeDetection(){return Rc(this,void 0,void 0,(function*(){ol.warn("Mrz detection resumed"),yield this.resume()}))}pauseDetection(){ol.warn("Mrz detection paused"),this.pause()}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return Rc(this,void 0,void 0,(function*(){t.componentDidMount.call(this),window.addEventListener("resize",this.updateDimensionsCallback),yield this.resume()}))}componentWillUnmount(){super.componentWillUnmount(),this.pause(),this.props.mrzRecognizer.release(),window.removeEventListener("resize",this.updateDimensionsCallback)}updateDimensions(){return Rc(this,void 0,void 0,(function*(){this.shouldComputeSize=!0,this.forceUpdate()}))}resume(){return Rc(this,void 0,void 0,(function*(){this.paused=!1,yield this.detect()}))}pause(){this.paused=!0}detect(){var t,e,n,i,o;return Rc(this,void 0,void 0,(function*(){const r=this.shouldComputeSize;if(!this.enabled)return;if(this.paused)return;let a=!1;try{this.camera.finderFrame=null===(t=this.finder)||void 0===t?void 0:t.holeRect;const i=yield null===(e=this.camera)||void 0===e?void 0:e.createImageData(Ic.FRAME_RESOLUTION);if(!i)return;r&&this.forceUpdate();const o=yield this.props.mrzRecognizer.recognize(i,"CONSUME_IMAGE");if(!this.enabled)return;if(null===o)return;this.camera.reusableImageBuffer=null==o?void 0:o.originalImage.data,o.recognitionSuccessful?(delete o.originalImage,a=!0,this.configuration.onMrzDetected(o)):this.configuration._onDetectionFailed&&(null===(n=this.configuration)||void 0===n||n._onDetectionFailed(o.originalImage))}catch(t){null===(o=(i=this.configuration).onError)||void 0===o||o.call(i,t)}finally{a?setTimeout((()=>{requestAnimationFrame(this.detect.bind(this))}),200):requestAnimationFrame(this.detect.bind(this))}}))}saveExtractedImageData(){this.camera.saveExtractedData()}setFinderVisible(t){this.setState({isFinderVisible:t})}render(){var t;return W.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(t=this.configuration)||void 0===t?void 0:t.spinnerColor),W.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},W.default.createElement(pt.a,{configuration:this.configuration,videoConstraints:this.configuration.videoConstraints,mirrored:this.configuration.mirrored,preferredCamera:this.configuration.preferredCamera,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}})),this.state.isFinderVisible&&W.default.createElement(ft.a,{ref:t=>{this.finder=t},guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder}))}}Ic.FRAME_RESOLUTION=1200;var Fc=Ic,Wc=n(36);class Mc{constructor(){this.disabled=!1,this.color="transparent"}}class jc{constructor(){this.color="white",this.border="1px solid lightgray",this.size=20}}class zc{constructor(){this.color="#1ec31e",this.width=4}}class Nc{constructor(){this.padding=10}}class Vc{constructor(){this.margin=15,this.size=100,this.zoom=1.5}}class Uc{constructor(){this.width=2,this.color="white"}}class Hc{constructor(){this.size=20,this.color="white"}}class Gc extends Wc.a{constructor(){super(),this.disableScroll=!0,this.rotations=0,this.style=new Nc,this.style.magneticLines=new Mc,this.style.polygon=new zc,this.style.polygon.handles=new jc,this.style.magnifier=new Vc,this.style.magnifier.border=new Uc,this.style.magnifier.crosshair=new Hc}static fromJson(t){const e=new Gc;return this.mapValues(t,e,["style"]),t.style&&(this.mapValues(t.style,e.style,["polygon","magneticLines","magnifier"]),t.style.polygon&&(this.mapValues(t.style.polygon,e.style.polygon,["handles"]),t.style.polygon.handles&&this.mapValues(t.style.polygon.handles,e.style.polygon.handles)),t.style.magneticLines&&this.mapValues(t.style.magneticLines,e.style.magneticLines,[]),t.style.magnifier&&(this.mapValues(t.style.magnifier,e.style.magnifier,["border","crosshair"]),t.style.magnifier.border&&this.mapValues(t.style.magnifier.border,e.style.magnifier.border,[]),t.style.magnifier.crosshair&&this.mapValues(t.style.magnifier.crosshair,e.style.magnifier.crosshair,[]))),e}}class Qc extends W.default.Component{constructor(){super(...arguments),this.BUFFER=4}fromPoint(t){return W.default.createElement("svg",{style:{width:"100%",height:"100%",position:"absolute"}},W.default.createElement("line",{x1:t.start.x.toString(),y1:t.start.y.toString(),x2:t.end.x.toString(),y2:t.end.y.toString(),style:{stroke:this.props.style.color,strokeWidth:2}}))}componentDidUpdate(t,e,n){this.props.style.disabled||this.snapToClosestIfAnyAreClose()}render(){var t,e,n,i,o,r;return W.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},null===(n=null===(e=null===(t=this.props.lines)||void 0===t?void 0:t.horizontal)||void 0===e?void 0:e.scaled)||void 0===n?void 0:n.map((t=>this.fromPoint(t))),null===(r=null===(o=null===(i=this.props.lines)||void 0===i?void 0:i.vertical)||void 0===o?void 0:o.scaled)||void 0===r?void 0:r.map((t=>this.fromPoint(t))))}snapToClosestIfAnyAreClose(){var t,e,n,i;const o=this.props.movingLine;let r=null===(e=null===(t=this.props.lines)||void 0===t?void 0:t.vertical)||void 0===e?void 0:e.scaled;if(o.isHorizontal&&(r=null===(i=null===(n=this.props.lines)||void 0===n?void 0:n.horizontal)||void 0===i?void 0:i.scaled),!r)return;const a=this.midPoint(o.points[0].coordinates,o.points[1].coordinates),s=r.map((t=>({distance:this.distanceToLine(t,a),mLine:t})));s.sort(((t,e)=>t.distance-e.distance)),s[0].distance<this.BUFFER&&this.props.snapTo({magneticLine:s[0].mLine,polygonLine:o})}distanceToLine(t,e){const n=e.x-t.start.x,i=e.y-t.start.y,o=t.end.x-t.start.x,r=t.end.y-t.start.y,a=o*o+r*r;if(0===a)return 1/0;const s=(n*o+i*r)/a;let l;return l=s<=0?t.start:s>=1?t.end:new ws.a(t.start.x+s*o,t.start.y+s*r),ws.a.distance(e,l)}midPoint(t,e){return new ws.a((t.x+e.x)/2,(t.y+e.y)/2)}}class Yc extends W.default.Component{constructor(){super(...arguments),this.POINT_COUNT=4,this.items=[],this.DRAG_BUFFER=5}get pointSize(){var t,e;return(null===(t=this.props.style)||void 0===t?void 0:t.size)?(null===(e=this.props)||void 0===e?void 0:e.scale)?this.props.style.size/this.props.scale:this.props.style.size:0}get pointStyle(){var t,e;return{width:this.pointSize+"px",height:this.pointSize+"px",border:null===(t=this.props.style)||void 0===t?void 0:t.border,borderRadius:this.pointSize/2+"px",backgroundColor:null===(e=this.props.style)||void 0===e?void 0:e.color,position:"absolute",cursor:"pointer",zIndex:500}}nextIndex(t){return(t+1)%this.POINT_COUNT}previousIndex(t){return(t-1+this.POINT_COUNT)%this.POINT_COUNT}isHorizontal(t){return t%2==0}isOutOfBounds(t,e){return t<-this.DRAG_BUFFER||t>e+this.DRAG_BUFFER}get invisibleHandleStyle(){return{width:"50px",height:"50px",opacity:0,position:"relative",top:this.pointSize/2-25+"px",left:this.pointSize/2-25+"px",borderRadius:"25px"}}}class Zc extends Yc{create(){if(!this.props.points||4!==this.props.points.length)return null;const t=[];for(let e=0;e<this.POINT_COUNT;e++){const n=this.props.points[e],i=W.default.createElement("div",{style:Object.assign(Object.assign({},this.pointStyle),{left:n.x-this.pointSize/2+"px",top:n.y-this.pointSize/2+"px"}),key:e.toString(),ref:t=>this.items[e]=t,onPointerDown:t=>this.cornerTouchStart(t,e),onPointerUp:t=>this.cornerTouchEnd(t),onPointerMove:t=>this.cornerTouchMove(t,e),"data-sb-cropping-corner":e},W.default.createElement("div",{style:Object.assign({},this.invisibleHandleStyle)}));t.push(i)}return t}cornerTouchStart(t,e){t.target.setPointerCapture(t.pointerId);const n=ws.a.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),i=this.items[e],o=ws.a.fromHtmlElement(i);this.parentOffset=new ws.a(n.x-o.x,n.y-o.y),this.props.cornerMoveStart({index:e,point:this.props.points[e]})}cornerTouchMove(t,e){if(!this.parentOffset)return;const n=ws.a.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),{x:i,y:o}=Object(Ol.b)({x:n.x-this.parentOffset.x,y:n.y-this.parentOffset.y},this.pointSize,this.props.containerSize),r=this.pointSize/2,a=this.props.points[e];this.props.points[e]=new ws.a(i+r,o+r),Oc.isConvex(this.props.points)?this.props.cornerMoved({index:e,point:this.props.points[e]}):this.props.points[e]=a}cornerTouchEnd(t){t.target.releasePointerCapture(t.pointerId),this.parentOffset=null,this.props.cornerMoveEnd()}render(){return W.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",cursor:"pointer",zIndex:500,userSelect:"none",msUserSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none"}},this.create())}}class qc extends Yc{create(){if(!this.props.points||4!==this.props.points.length)return null;const t=[];for(let e=0;e<this.POINT_COUNT;e++){const n=this.props.points[e];let i=this.props.points[this.nextIndex(e)];const o=W.default.createElement("div",{style:Object.assign(Object.assign({},this.pointStyle),{left:n.x+(i.x-n.x)/2-this.pointSize/2+"px",top:n.y+(i.y-n.y)/2-this.pointSize/2+"px"}),key:e.toString(),ref:t=>this.items[e]=t,onPointerDown:t=>this.lineTouchStart(t,e),onPointerMove:t=>this.lineTouchMove(t,e),onPointerUp:t=>this.lineTouchEnd(t),"data-sb-cropping-side":e},W.default.createElement("div",{style:this.invisibleHandleStyle}));t.push(o)}return t}lineTouchStart(t,e){t.target.setPointerCapture(t.pointerId);const n=ws.a.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),i=this.items[e],o=ws.a.fromHtmlElement(i),r=this.props.points[e],a=this.props.points[this.nextIndex(e)];this.point0Start=v.copy(this.props.points[this.previousIndex(e)]),this.point1Start=v.copy(r),this.point2Start=v.copy(a),this.point3Start=v.copy(this.props.points[this.nextIndex(this.nextIndex(e))]),this.point1Offset=new ws.a(r.x-o.x,r.y-o.y),this.point2Offset=new ws.a(a.x-o.x,a.y-o.y),this.parentOffset=new ws.a(n.x-o.x,n.y-o.y)}lineTouchMove(t,e){if(!this.parentOffset)return;const n=ws.a.fromCoordinates(t.clientX,t.clientY,this.props.rotations,this.props.scale),i=this.props.points[this.previousIndex(e)];let o=new ws.a(null,null),r=new ws.a(null,null);const a=this.props.points[this.nextIndex(e+1)],s=n.x-this.parentOffset.x,l=n.y-this.parentOffset.y;if(this.isHorizontal(e)){const t=l+this.point1Offset.y,e=l+this.point2Offset.y,n=t-this.point1Start.y;o.x=this.point1Start.x+(this.point1Start.x-this.point0Start.x)*(n/(this.point1Start.y-this.point0Start.y)),r.x=this.point2Start.x+(this.point2Start.x-this.point3Start.x)*(n/(this.point2Start.y-this.point3Start.y)),o.y=t,r.y=e}else{const t=s+this.point1Offset.x,e=s+this.point2Offset.x,n=t-this.point1Start.x;o.y=this.point1Start.y+(this.point1Start.y-this.point0Start.y)*(n/(this.point1Start.x-this.point0Start.x)),r.y=this.point2Start.y+(this.point2Start.y-this.point3Start.y)*(n/(this.point2Start.x-this.point3Start.x)),o.x=t,r.x=e}o=ws.a.clamp(o,this.props.containerSize),r=ws.a.clamp(r,this.props.containerSize),this.isNearOpposingPoint(this.point1Start,o,i,this.isHorizontal(e)?"y":"x")||this.isNearOpposingPoint(this.point1Start,r,a,this.isHorizontal(e)?"y":"x")||this.areEdgesCrossing(i,o,r,a)||Oc.isConvex([i,o,r,a])&&(this.props.points[e].x=o.x,this.props.points[e].y=o.y,this.props.points[this.nextIndex(e)].x=r.x,this.props.points[this.nextIndex(e)].y=r.y,this.props.lineMoved({points:[{index:e,coordinates:o},{index:this.nextIndex(e),coordinates:r}],previousPoint:i,nextPoint:a,isHorizontal:this.isHorizontal(e)}))}lineTouchEnd(t){t.target.releasePointerCapture(t.pointerId),this.parentOffset=null}isNearOpposingPoint(t,e,n,i){if(t[i]>n[i]){if(e[i]-10<n[i])return!0}else if(e[i]>n[i]-10)return!0;return!1}areEdgesCrossing(t,e,n,i){const o=t.x,r=t.y,a=e.x,s=e.y,l=n.x,c=n.y,u=i.x,d=i.y;return((o-l)*(s-c)-(r-c)*(a-l))*((o-u)*(s-d)-(r-d)*(a-u))<0&&((l-o)*(d-r)-(c-r)*(u-o))*((l-a)*(d-s)-(c-s)*(u-a))<0}render(){return W.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},this.create())}}class Xc extends W.default.Component{render(){return W.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"}},W.default.createElement(Zc,{ref:t=>this.corners=t,style:this.props.style,containerSize:this.props.containerSize,scale:this.props.scale,rotations:this.props.rotations,points:this.props.coordinatePoints,cornerMoveStart:this.props.cornerMoveStart,cornerMoved:this.props.cornerMoved,cornerMoveEnd:this.props.cornerMoveEnd}),W.default.createElement(qc,{ref:t=>this.lines=t,style:this.props.style,containerSize:this.props.containerSize,scale:this.props.scale,rotations:this.props.rotations,points:this.props.coordinatePoints,lineMoved:this.props.lineMoved}))}setFrame(){for(let t=0;t<this.corners.POINT_COUNT;t++){const e=this.props.coordinatePoints[t];this.corners.items[t]&&(this.corners.items[t].style.left=e.x-this.corners.pointSize/2+"px",this.corners.items[t].style.top=e.y-this.corners.pointSize/2+"px");let n=this.props.coordinatePoints[this.corners.nextIndex(t)];this.lines.items[t]&&(this.lines.items[t].style.left=e.x+(n.x-e.x)/2-this.corners.pointSize/2+"px",this.lines.items[t].style.top=e.y+(n.y-e.y)/2-this.corners.pointSize/2+"px")}}snapTo(t){const e=[t.polygonLine.previousPoint,t.polygonLine.points[0].coordinates],n=[t.polygonLine.points[1].coordinates,t.polygonLine.nextPoint],i=[t.magneticLine.start,t.magneticLine.end];this.props.coordinatePoints[t.polygonLine.points[0].index]=Oc.intersection(e,i),this.props.coordinatePoints[t.polygonLine.points[1].index]=Oc.intersection(n,i),this.props.cornerMoveEnd(),this.setFrame()}}class $c extends W.default.Component{constructor(t){super(t),this.state={movingLine:void 0}}render(){return W.default.createElement("div",null,W.default.createElement(Xc,{ref:t=>this.handles=t,containerSize:this.props.size,coordinatePoints:this.props.points,rotations:this.props.rotations,scale:this.props.scale,style:this.props.handleStyle,cornerMoveStart:this.props.cornerMoveStart,cornerMoved:t=>{this.setFrame(),this.props.cornerMoved(t)},cornerMoveEnd:this.props.cornerMoveEnd,lineMoved:t=>{this.setFrame(),this.setState({movingLine:t})}}),W.default.createElement(Qc,{style:this.props.magneticLineStyle,lines:this.props.magneticLines,movingLine:this.state.movingLine,snapTo:t=>{var e,n;null===(e=this.handles)||void 0===e||e.snapTo(t),null===(n=this.polygon)||void 0===n||n.setFrame()}}),W.default.createElement(Sc,{size:this.props.size,points:this.props.points,polygonStyle:this.props.polygonStyle,polygonClasses:this.props.polygonClasses,ref:t=>this.polygon=t}))}setFrame(){var t,e;null===(t=this.polygon)||void 0===t||t.setFrame(),null===(e=this.handles)||void 0===e||e.setFrame()}}class Kc extends W.default.Component{render(){return W.default.createElement("img",{ref:t=>this.image=t,style:{width:"100%",height:"100%",objectFit:"cover",position:"absolute"},src:this.props.src,alt:".",onLoad:t=>{t.target&&this.props.onImageLoaded(t.target)}})}}class Jc extends W.default.Component{constructor(){super(...arguments),this.animating=!1}width(){return this.container.offsetWidth-2*this.container.offsetLeft}height(){return this.container.offsetHeight-2*this.container.offsetTop}isAnimating(){return this.animating}render(){const{size:t,imageMargin:e,rotations:n,scale:i,duration:o}=this.props,r=90*(n-1),a=90*n;this.previousScale||(this.previousScale=1);const s=mt.b`
|
|
35
35
|
from {transform: rotate(${r}deg) scale(${this.previousScale}); }
|
|
36
|
-
to {transform: rotate(${a}deg) scale(${
|
|
37
|
-
}`,c=l.default.div`position: absolute; animation: ${u} ${i}s;`;return this.previousScale=o,s.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"},ref:t=>this.container=t},s.default.createElement(c,{style:{width:this.calculate(t,"width"),height:this.calculate(t,"height"),transform:`rotate(${a}deg) scale(${o})`,marginTop:this.marginWithAspect(e,"y",t),marginLeft:this.marginWithAspect(e,"x",t)},onAnimationStart:()=>{this.animating=!0},onAnimationEnd:()=>{this.animating=!1}},this.props.children))}marginWithAspect(t,e,n){if(!t||!n)return 0;n.width,n.height;return t[e]}calculate(t,e){return t?t[e]:"100%"}}e.Animatable=u},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollLock=void 0;const i=o(n(1)),r=n(31);class a extends i.default.Component{componentDidMount(){r.ViewUtils.disableScreenMovement()}componentWillUnmount(){r.ViewUtils.enableScreenMovement()}render(){return i.default.createElement("div",null)}}e.ScrollLock=a},function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.MagnifierViewProps=e.MagnifierCrosshair=e.MagnifierOptions=e.MagnifierSourceImage=void 0;const i=o(n(1)),r=n(5),a=n(21),s=n(13);e.MagnifierSourceImage=class{constructor(t,e){this.element=t,this.size=e}};e.MagnifierOptions=class{};class l extends i.default.Component{render(){return i.default.createElement("div",{style:this.props.style},i.default.createElement("svg",null,this.vertical(),this.horizontal()))}half(){return this.props.size/2}vertical(){const t=this.half();return i.default.createElement("line",{x1:t,y1:0,x2:t,y2:this.props.size,stroke:this.props.color,strokeWidth:"2"})}horizontal(){const t=this.half();return i.default.createElement("line",{x1:0,y1:t,x2:this.props.size,y2:t,stroke:this.props.color,strokeWidth:"2"})}}e.MagnifierCrosshair=l;e.MagnifierViewProps=class{};class u extends i.default.Component{get crosshairSize(){var t,e;return null===(e=null===(t=this.props.style)||void 0===t?void 0:t.crosshair)||void 0===e?void 0:e.size}constructor(t){super(t),this.MAX_ROTATIONS=4,this.state={frame:a.Frame.empty(),cropImageFitSize:s.Size.empty(),rotation:{count:0,scale:1},margin:{left:this.props.style.margin,top:this.props.style.margin},container:{width:0},scale:{width:1,height:1}}}style(){return{container:{marginLeft:this.state.margin.left,marginTop:this.state.margin.top,width:this.state.frame.width,height:this.state.frame.height,borderRadius:this.props.style.size/2,border:this.props.style.border.width+"px solid "+this.props.style.border.color,position:"absolute",overflow:"hidden",zIndex:50,transform:"rotate("+90*this.state.rotation.count+"deg)"},image:{width:this.state.cropImageFitSize.width*this.props.style.zoom,height:this.state.cropImageFitSize.height*this.props.style.zoom,marginLeft:-this.state.frame.x,marginTop:-this.state.frame.y,objectFit:"cover"},crosshair:{margin:"auto",position:"absolute",width:this.crosshairSize,height:this.crosshairSize,top:this.state.frame.height/2-this.crosshairSize/2,left:this.state.frame.width/2-this.crosshairSize/2}}}render(){return this.state.visible?i.default.createElement("div",{style:this.style().container},i.default.createElement("img",{style:this.style().image,ref:t=>this.destination=t,src:this.props.src,alt:"."}),i.default.createElement(l,{style:this.style().crosshair,size:this.crosshairSize,color:this.props.style.crosshair.color})):null}update(t){if(!this.state.visible)return;this.destination.src=t.source.element.src;const e=a.Frame.fromPoint(r.Point.scaleUpTo(t.origin,new s.Size(this.props.style.zoom,this.props.style.zoom)),this.props.style.size),n=t.container.width-(this.props.style.margin+this.props.style.size),o=this.isPointTopLeft(t.origin,t.source.size,t.rotations);this.setState({frame:e,cropImageFitSize:t.source.size,rotation:{count:t.rotations,scale:t.scale},margin:{left:o?n:this.props.style.margin},container:{width:t.container.width},scale:{width:t.source.size.width/t.container.width,height:t.source.size.height/t.container.height}})}isPointTopLeft(t,e,n){const o=t.x,i=t.y,r=this.normalizeRotations(n),a=this.state.container.width/4;return 0===r?o<a&&i<a:1===r?o<a&&i>e.height-a:2===r?o>e.width-a&&i>e.height-a:o>e.width-a&&i<a}setIsVisible(t,e){this.setState({visible:t},e)}normalizeRotations(t){return t%this.MAX_ROTATIONS}}e.default=u},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function s(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((o=o.apply(t,e||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.TextDataScannerState=e.TextDataScannerProps=void 0;const r=i(n(1)),a=n(1),s=n(26),l=i(n(28)),u=i(n(45)),c=n(46);class d extends s.ScanbotCameraProps{}e.TextDataScannerProps=d;class f extends s.ScanbotCameraState{}e.TextDataScannerState=f;class h extends s.ScannerView{constructor(t){super(t),this.shouldComputeSize=!0,this.paused=!1,this.updateDimensionsCallback=this.updateDimensions.bind(this),Object.assign(this.state,{isFinderVisible:!0})}get configuration(){return this.props.configuration}get enabled(){return!this.disposed}static create(t,e,n){return o(this,void 0,void 0,(function*(){const o=document.getElementById(t.containerId);if(!o)throw Error("Unable to initialize ScanbotSDK: Cannot find container element with the id provided.");return new Promise(((i,s)=>{(0,a.render)(r.default.createElement(h,{container:o,configuration:t,onTextDetected:e,onSuccess:i,onFailure:s,textDataScanner:n}),o)}))}))}isDetectionPaused(){return this.paused}resumeDetection(){return o(this,void 0,void 0,(function*(){c.Debugger.warn("TextData detection resumed"),yield this.resume()}))}pauseDetection(){c.Debugger.warn("TextData detection paused"),this.pause()}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return o(this,void 0,void 0,(function*(){t.componentDidMount.call(this),window.addEventListener("resize",this.updateDimensionsCallback),yield this.resume()}))}componentWillUnmount(){super.componentWillUnmount(),this.pause(),this.props.textDataScanner.release(),window.removeEventListener("resize",this.updateDimensionsCallback)}updateDimensions(){return o(this,void 0,void 0,(function*(){this.shouldComputeSize=!0,this.forceUpdate()}))}resume(){return o(this,void 0,void 0,(function*(){this.paused=!1,yield this.detect()}))}pause(){this.props.textDataScanner.cleanRecognitionQueue(),this.paused=!0}detect(){return o(this,void 0,void 0,(function*(){const t=this.shouldComputeSize;if(!this.enabled)return;if(this.paused)return;let e=!1;try{const n=yield this.camera.createImageData(h.FRAME_RESOLUTION);if(!n)return;t&&this.forceUpdate();const o=yield this.props.textDataScanner.recognize(n);if(!this.enabled)return;if(null===o)return;o&&(e=!0,this.props.onTextDetected(o))}catch(t){console.log(t)}finally{e?setTimeout((()=>{requestAnimationFrame(this.detect.bind(this))}),200):requestAnimationFrame(this.detect.bind(this))}}))}saveExtractedImageData(){this.camera.saveExtractedData()}render(){var t;return r.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(t=this.configuration)||void 0===t?void 0:t.spinnerColor),r.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},r.default.createElement(l.default,{configuration:this.configuration,videoConstraints:this.configuration.videoConstraints,mirrored:this.configuration.mirrored,preferredCamera:this.configuration.preferredCamera,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}})),this.state.isFinderVisible&&r.default.createElement(u.default,{ref:t=>{this.finder=t},guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder}))}}h.FRAME_RESOLUTION=1200,e.default=h},function(t,e,n){"use strict";n.r(e);var o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}((function(t){return o.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91}));e.default=i}])}));
|
|
36
|
+
to {transform: rotate(${a}deg) scale(${i});
|
|
37
|
+
}`,l=mt.a.div`position: absolute; animation: ${s} ${o}s;`;return this.previousScale=i,W.default.createElement("div",{style:{width:"100%",height:"100%",position:"absolute"},ref:t=>this.container=t},W.default.createElement(l,{style:{width:this.calculate(t,"width"),height:this.calculate(t,"height"),transform:`rotate(${a}deg) scale(${i})`,marginTop:this.marginWithAspect(e,"y",t),marginLeft:this.marginWithAspect(e,"x",t)},onAnimationStart:()=>{this.animating=!0},onAnimationEnd:()=>{this.animating=!1}},this.props.children))}marginWithAspect(t,e,n){if(!t||!n)return 0;n.width,n.height;return t[e]}calculate(t,e){return t?t[e]:"100%"}}class tu extends W.default.Component{componentDidMount(){rl.disableScreenMovement()}componentWillUnmount(){rl.enableScreenMovement()}render(){return W.default.createElement("div",null)}}class eu{constructor(t,e){this.element=t,this.size=e}}class nu{}class iu extends W.default.Component{render(){return W.default.createElement("div",{style:this.props.style},W.default.createElement("svg",null,this.vertical(),this.horizontal()))}half(){return this.props.size/2}vertical(){const t=this.half();return W.default.createElement("line",{x1:t,y1:0,x2:t,y2:this.props.size,stroke:this.props.color,strokeWidth:"2"})}horizontal(){const t=this.half();return W.default.createElement("line",{x1:0,y1:t,x2:this.props.size,y2:t,stroke:this.props.color,strokeWidth:"2"})}}class ou extends W.default.Component{get crosshairSize(){var t,e;return null===(e=null===(t=this.props.style)||void 0===t?void 0:t.crosshair)||void 0===e?void 0:e.size}constructor(t){super(t),this.MAX_ROTATIONS=4,this.state={frame:g.a.empty(),cropImageFitSize:Ys.a.empty(),rotation:{count:0,scale:1},margin:{left:this.props.style.margin,top:this.props.style.margin},container:{width:0},scale:{width:1,height:1}}}style(){return{container:{marginLeft:this.state.margin.left,marginTop:this.state.margin.top,width:this.state.frame.width,height:this.state.frame.height,borderRadius:this.props.style.size/2,border:this.props.style.border.width+"px solid "+this.props.style.border.color,position:"absolute",overflow:"hidden",zIndex:50,transform:"rotate("+90*this.state.rotation.count+"deg)"},image:{width:this.state.cropImageFitSize.width*this.props.style.zoom,height:this.state.cropImageFitSize.height*this.props.style.zoom,marginLeft:-this.state.frame.x,marginTop:-this.state.frame.y,objectFit:"cover"},crosshair:{margin:"auto",position:"absolute",width:this.crosshairSize,height:this.crosshairSize,top:this.state.frame.height/2-this.crosshairSize/2,left:this.state.frame.width/2-this.crosshairSize/2}}}render(){return this.state.visible?W.default.createElement("div",{style:this.style().container},W.default.createElement("img",{style:this.style().image,ref:t=>this.destination=t,src:this.props.src,alt:"."}),W.default.createElement(iu,{style:this.style().crosshair,size:this.crosshairSize,color:this.props.style.crosshair.color})):null}update(t){if(!this.state.visible)return;this.destination.src=t.source.element.src;const e=g.a.fromPoint(ws.a.scaleUpTo(t.origin,new Ys.a(this.props.style.zoom,this.props.style.zoom)),this.props.style.size),n=t.container.width-(this.props.style.margin+this.props.style.size),i=this.isPointTopLeft(t.origin,t.source.size,t.rotations);this.setState({frame:e,cropImageFitSize:t.source.size,rotation:{count:t.rotations,scale:t.scale},margin:{left:i?n:this.props.style.margin},container:{width:t.container.width},scale:{width:t.source.size.width/t.container.width,height:t.source.size.height/t.container.height}})}isPointTopLeft(t,e,n){const i=t.x,o=t.y,r=this.normalizeRotations(n),a=this.state.container.width/4;return 0===r?i<a&&o<a:1===r?i<a&&o>e.height-a:2===r?i>e.width-a&&o>e.height-a:i>e.width-a&&o<a}setIsVisible(t,e){this.setState({visible:t},e)}normalizeRotations(t){return t%this.MAX_ROTATIONS}}var ru=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class au extends W.default.Component{constructor(t){super(t),this.onResizeCallback=()=>{},this.MAX_ROTATIONS=4,this.BASE_SCALE=1,this.state={image:void 0,documentDetectionResult:void 0,polygon:void 0,calculatedSize:Ys.a.empty(),animation:{rotations:0,scale:1,duration:0},points:[],magneticLines:{horizontal:{original:[],scaled:[]},vertical:{original:[],scaled:[]}},imageMargin:ws.a.empty()},this.onResizeCallback=this.onResize.bind(this)}static create(t){return ru(this,void 0,void 0,(function*(){const e=document.getElementById(t.containerId);if(!e)throw Error("Unable to initialize cropping component: Cannot find container element with the id provided.");return new Promise(((n,i)=>{Object(W.render)(W.default.createElement(au,{onReady:n,onError:i,container:e,configuration:Gc.fromJson(t)}),e)}))}))}componentDidMount(){var t,e,n;return ru(this,void 0,void 0,(function*(){const i=null===(t=this.configuration)||void 0===t?void 0:t.image,o=yield fu.instance.detectAndCropDocument(i),r=yield b.toDataUrl(yield fu.instance.imageToJpeg(i));this.setState({documentDetectionResult:o,image:r,polygon:null!==(n=null===(e=this.configuration)||void 0===e?void 0:e.polygon)&&void 0!==n?n:o.pointsNormalized,magneticLines:{vertical:{original:o.verticalLinesNormalized},horizontal:{original:o.horizontalLinesNormalized}}}),this.props.onReady&&this.props.onReady(this),addEventListener("resize",this.onResizeCallback),addEventListener("orientationchange",this.onResizeCallback)}))}componentWillUnmount(){return ru(this,void 0,void 0,(function*(){removeEventListener("resize",this.onResizeCallback),removeEventListener("orientationchange",this.onResizeCallback)}))}onImageLoaded(t){return ru(this,void 0,void 0,(function*(){Ys.a.isEmpty(this.state.calculatedSize)&&(this.htmlImage=t,this.initializeSizes())}))}onResize(){const t=this.state.points.map((t=>new ws.a(t.x/this.state.calculatedSize.width,t.y/this.state.calculatedSize.height)));this.initializeSizes(t)}initializeSizes(t,e,n){const i=new Ys.a(this.htmlImage.naturalWidth,this.htmlImage.naturalHeight),o=new Ys.a(this.container.width(),this.container.height()),r=b.getObjectFitSize(o,i),a=new Ys.a(r.width,r.height),s=null!=t?t:this.state.polygon,l=rl.convertToViewportPointsFromParentSize(a,s),c=null!=e?e:this.state.magneticLines.horizontal.original,u=null!=n?n:this.state.magneticLines.vertical.original,d=rl.convertLinesToViewportLines(a,c),h=rl.convertLinesToViewportLines(a,u);this.setState({calculatedSize:a,points:l,magneticLines:{horizontal:{original:c,scaled:d},vertical:{original:u,scaled:h}},animation:{duration:0,rotations:this.rotations,scale:this.calculateScale(0,this.rotations,a)},imageMargin:this.calculateMargin(a)})}render(){var t,e,n,i,o,r;const a=Sc.CLASSNAME,s=zs()({[a]:!0,[`${a}-visible`]:!0}),l=this.configuration.style.polygon.width,c=(null===(t=this.state.animation)||void 0===t?void 0:t.scale)?l/this.state.animation.scale:l,u=this.configuration.style.padding||0,d=`calc(100% - 2*${u}px)`;return W.default.createElement("div",{style:{position:"relative",width:d,height:d,padding:u}},W.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.configuration.disableScroll&&W.default.createElement(tu,null),W.default.createElement(ou,{ref:t=>this.magnifier=t,style:this.configuration.style.magnifier}),W.default.createElement(Jc,{ref:t=>this.container=t,size:this.state.calculatedSize,rotations:null===(e=this.state.animation)||void 0===e?void 0:e.rotations,scale:null===(n=this.state.animation)||void 0===n?void 0:n.scale,duration:null===(i=this.state.animation)||void 0===i?void 0:i.duration,imageMargin:this.state.imageMargin},W.default.createElement(Kc,{src:this.state.image,onImageLoaded:t=>this.onImageLoaded(t)}),W.default.createElement($c,{style:{width:"100%",height:"100%",zIndex:500},size:this.state.calculatedSize,polygonStyle:{cursor:"pointer",stroke:this.configuration.style.polygon.color,strokeWidth:`${c}px`},handleStyle:this.configuration.style.polygon.handles,magneticLineStyle:this.configuration.style.magneticLines,polygonClasses:s,points:this.state.points,rotations:null===(o=this.state.animation)||void 0===o?void 0:o.rotations,scale:null===(r=this.state.animation)||void 0===r?void 0:r.scale,magneticLines:this.state.magneticLines,cornerMoveStart:this.showMagnifier.bind(this),cornerMoved:this.updateMagnifier.bind(this),cornerMoveEnd:this.hideMagnifier.bind(this)}))))}showMagnifier(t){var e;null===(e=this.magnifier)||void 0===e||e.setIsVisible(!0,(()=>{var e;null===(e=this.magnifier)||void 0===e||e.update(this.magnifierOptions(t))}))}updateMagnifier(t){var e;null===(e=this.magnifier)||void 0===e||e.update(this.magnifierOptions(t))}magnifierOptions(t){const e=new nu;return e.source=new eu(this.htmlImage,this.state.calculatedSize),e.container=new Ys.a(this.container.width(),this.container.height()),e.origin=t.point,e.rotations=this.state.animation.rotations,e.scale=this.state.animation.scale,e}hideMagnifier(){var t;null===(t=this.magnifier)||void 0===t||t.setIsVisible(!1)}apply(){var t;return ru(this,void 0,void 0,(function*(){const e=ws.a.toPolygon(this.state.points,this.state.calculatedSize),n=this.toCoreRotations(this.rotations),i=yield fu.instance.imageCrop(null===(t=this.configuration)||void 0===t?void 0:t.image,e);return{image:yield fu.instance.imageRotate(i,n,"CONSUME_IMAGE"),polygon:e,rotations:this.rotations}}))}toCoreRotations(t){switch(t%this.MAX_ROTATIONS){case 0:return"ROTATION_NONE";case 1:return"ROTATION_90_CLOCKWISE";case 2:return"ROTATION_180";case 3:return"ROTATION_90_COUNTERCLOCKWISE"}}rotate(t){return ru(this,void 0,void 0,(function*(){if(this.container.isAnimating())return void console.warn("Unable to rotate: previous rotation animation in progress");const e=this.calculateScale(this.rotations,t,this.state.calculatedSize);this.setState({animation:{rotations:this.rotations+t,scale:e,duration:1}})}))}detect(){return ru(this,void 0,void 0,(function*(){const t=this.state.documentDetectionResult;this.initializeSizes(t.pointsNormalized,t.horizontalLinesNormalized,t.verticalLinesNormalized)}))}dispose(){const{container:t}=this.props;if(!t)throw Error("Component wasn't created with openCroppingView. Remove component from render tree to dispose.");Object(W.render)(null,t)}get rotations(){var t,e;const n=null===(t=this.state.animation)||void 0===t?void 0:t.rotations;return n&&0!==n?n:null!==(e=this.configuration.rotations)&&void 0!==e?e:0}get configuration(){return this._configuration||(this._configuration=Gc.fromJson(this.props.configuration)),this._configuration}calculateScale(t,e,n){return e?(t+e)%2==0?this.BASE_SCALE:this.calculateRatio(n):this.BASE_SCALE}calculateRatio(t){return Math.min(this.container.width()/t.height,this.container.height()/t.width)}calculateMargin(t){return t.width>t.height?{x:0,y:this.container.height()/2-t.height/2}:{x:this.container.width()/2-t.width/2,y:0}}}var su=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};ht.a;ht.b;class lu extends ht.c{constructor(t){super(t),this.shouldComputeSize=!0,this.paused=!1,this.updateDimensionsCallback=this.updateDimensions.bind(this),Object.assign(this.state,{isFinderVisible:!0})}get configuration(){return this.props.configuration}get enabled(){return!this.disposed}static create(t,e,n){return su(this,void 0,void 0,(function*(){const i=document.getElementById(t.containerId);if(!i)throw Error("Unable to initialize ScanbotSDK: Cannot find container element with the id provided.");return new Promise(((o,r)=>{Object(W.render)(W.default.createElement(lu,{container:i,configuration:t,onTextDetected:e,onSuccess:o,onFailure:r,textDataScanner:n}),i)}))}))}isDetectionPaused(){return this.paused}resumeDetection(){return su(this,void 0,void 0,(function*(){ol.warn("TextData detection resumed"),yield this.resume()}))}pauseDetection(){ol.warn("TextData detection paused"),this.pause()}componentDidMount(){const t=Object.create(null,{componentDidMount:{get:()=>super.componentDidMount}});return su(this,void 0,void 0,(function*(){t.componentDidMount.call(this),window.addEventListener("resize",this.updateDimensionsCallback),yield this.resume()}))}componentWillUnmount(){super.componentWillUnmount(),this.pause(),this.props.textDataScanner.release(),window.removeEventListener("resize",this.updateDimensionsCallback)}updateDimensions(){return su(this,void 0,void 0,(function*(){this.shouldComputeSize=!0,this.forceUpdate()}))}resume(){return su(this,void 0,void 0,(function*(){this.paused=!1,yield this.detect()}))}pause(){this.props.textDataScanner.cleanRecognitionQueue(),this.paused=!0}detect(){var t,e,n,i;return su(this,void 0,void 0,(function*(){const o=this.shouldComputeSize;if(!this.enabled)return;if(this.paused)return;let r=!1;try{this.camera.finderFrame=null===(t=this.finder)||void 0===t?void 0:t.holeRect;const n=yield null===(e=this.camera)||void 0===e?void 0:e.createImageData(lu.FRAME_RESOLUTION);if(!n)return;o&&this.forceUpdate();const i=yield this.props.textDataScanner.recognize(n);if(!this.enabled)return;if(null===i)return;i&&(r=!0,this.props.onTextDetected(i),this.camera.reusableImageBuffer=i.originalImage.data)}catch(t){null===(i=(n=this.configuration).onError)||void 0===i||i.call(n,t)}finally{r?setTimeout((()=>{requestAnimationFrame(this.detect.bind(this))}),200):requestAnimationFrame(this.detect.bind(this))}}))}saveExtractedImageData(){this.camera.saveExtractedData()}render(){var t;return W.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(t=this.configuration)||void 0===t?void 0:t.spinnerColor),W.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},W.default.createElement(pt.a,{configuration:this.configuration,videoConstraints:this.configuration.videoConstraints,mirrored:this.configuration.mirrored,preferredCamera:this.configuration.preferredCamera,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}})),this.state.isFinderVisible&&W.default.createElement(ft.a,{ref:t=>{this.finder=t},guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder}))}}lu.FRAME_RESOLUTION=1200;var cu=lu,uu=n(35),du=n(25),hu=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};class pu{static get UI(){if(!o.BUILD_WITH_UI)throw new Error("UI components are not included in Scanbot.min.js. Please use ScanbotSDK.ui2.min.js instead.");return pu._ui2}static initialize(t){var e;return hu(this,void 0,void 0,(function*(){const n=new pu,i=t.engine||pu.defaultEnginePath,a=!!t.allowThreads,s=null!==(e=t.requestSuffix)&&void 0!==e?e:`?${n.version}`,l=[t.licenseKey,i,window.location.hostname,o.CDN_PATH+o.DEFAULT_WASM_FOLDER,{captureConsole:!1,allowThreads:a,requestSuffix:s}];return n.bridge=new u(i,{allowSimd:!0,allowThreads:a,requestSuffix:s},l),pu.instance=n,window.scanbotSdk=n,F.a.initialize(t.verboseLogging),t.allowThreads&&!Object(r.a)()&&(F.a.debugWarn("Threads are not available in this environment. The SDK will run in single-threaded mode."),window.hasOwnProperty("crossOriginIsolated")&&!window.crossOriginIsolated&&F.a.debugWarn("The site is not cross-origin isolated. This prevents multithreading in the ScanbotSDK. To enable multithreading, you need to set the 'Cross-Origin-Opener-Policy' and 'Cross-Origin-Embedder-Policy' http headers. See our documentation for details.")),this.cameras.initialize(null==t?void 0:t.bestCameraDetectionStrategy),n}))}createDocumentScanner(t){return hu(this,void 0,void 0,(function*(){let e;try{return e=yield Pc.create(t),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}createMrzScanner(t){return hu(this,void 0,void 0,(function*(){let e;try{const n=new S(this,this.bridge.copyArgs.createMRZRecognizer(t.recognizerConfiguration));return e=yield Fc.create(t,n),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}createBarcodeScanner(t){return hu(this,void 0,void 0,(function*(){let e;try{return e=yield sl.create(t),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}openCroppingView(t){return hu(this,void 0,void 0,(function*(){return yield this.licenseCheck(),yield au.create(t)}))}createTextDataScanner(t){return hu(this,void 0,void 0,(function*(){try{t=k.fromJson(t);const e=yield this.createGenericTextLineScanner(t,t.onTextDetected,t.ocrConfiguration);return yield this.licenseCheck(),e}catch(t){throw t}}))}createVINScanner(t){return hu(this,void 0,void 0,(function*(){let e;try{t=D.fromJson(t);const n=e=>{""!==e.rawText&&t.onTextDetected(e)},i=new T.GenericTextLineScannerTypes.ScannerConfiguration(Object.assign(Object.assign({},t.ocrConfiguration),{validator:new T.GenericTextLineScannerTypes.PresetContentValidator({preset:"VEHICLE_IDENTIFICATION_NUMBER"})}));return e=yield this.createGenericTextLineScanner(t,n,i),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}createGenericDocumentRecognizerScanner(t){return hu(this,void 0,void 0,(function*(){let e;try{const i=n(48).default;return e=yield i.create(this,t),yield this.licenseCheck(),e}catch(t){throw e&&e.dispose(),t}}))}toDataUrl(t){return hu(this,void 0,void 0,(function*(){return B.throwIfMissingBuffer(t),yield b.toDataUrl(t)}))}detectDocument(t,e={},n="COPY_IMAGE"){return hu(this,void 0,void 0,(function*(){yield this.licenseCheck(),B.throwIfMissingBuffer(t);const i=yield this.bridge.copyArgs.createDocumentDetector(e),o=this.getBridge(n),r=yield o.documentDetectorDetect(i,t);return yield this.release(i,"documentDetector"),r}))}detectAndCropDocument(t,e="COPY_IMAGE"){return hu(this,void 0,void 0,(function*(){yield this.licenseCheck(),B.throwIfMissingBuffer(t);const n=this.getBridge(e);return yield n.detectAndCropDocument(t)}))}detectBarcodes(t,e={},n="COPY_IMAGE"){return hu(this,void 0,void 0,(function*(){yield this.licenseCheck(),B.throwIfMissingBuffer(t),"string"==typeof t&&(t=yield b.loadFromUrl(t));const i=Object.assign({},e);i.live=!1;const o=yield this.bridge.copyArgs.createBarcodeRecognizer(i),r=yield this.getBridge(n).recognizeBarcodes(o,t);return yield this.release(o,"barcodeRecognizer"),r}))}parseBarcodeDocument(t,e){return hu(this,void 0,void 0,(function*(){return yield this.licenseCheck(),yield this.bridge.copyArgs.parseBarcodeDocument(t,e)}))}createSimpleMRZRecognizer(){return hu(this,void 0,void 0,(function*(){const t=new T.MRZTypes.RecognizerConfiguration({accumulatedResultsVerifierConfig:{maximumNumberOfAccumulatedFrames:0}});return new S(this,this.bridge.copyArgs.createMRZRecognizer(t))}))}createOcrEngine(){return hu(this,void 0,void 0,(function*(){return new x(this,yield this.bridge.copyArgs.createOcrEngine())}))}createDocumentQualityAnalyzer(t={}){return hu(this,void 0,void 0,(function*(){const e=yield this.bridge.copyArgs.createDocumentQualityAnalyzer(t);return new I(this,e)}))}imageRotate(t,e,n="COPY_IMAGE"){return hu(this,void 0,void 0,(function*(){B.throwIfMissingBuffer(t);const i=this.getBridge(n);return yield i.imageRotate(t,e)}))}imageFilter(t,e,n="COPY_IMAGE"){return hu(this,void 0,void 0,(function*(){B.throwIfMissingBuffer(t);const i=this.getBridge(n);return yield i.imageApplyFilter(t,e)}))}imageCrop(t,e,n="COPY_IMAGE"){return hu(this,void 0,void 0,(function*(){B.throwIfMissingBuffer(t);const i=this.getBridge(n);return yield i.imageCrop(t,e)}))}imageResize(t,e,n="COPY_IMAGE"){return hu(this,void 0,void 0,(function*(){B.throwIfMissingBuffer(t);const i=this.getBridge(n);return yield i.imageResize(t,e)}))}getLicenseInfo(){return hu(this,void 0,void 0,(function*(){const t=yield this.bridge.copyArgs.getLicenseInfo();return d.fromJson(t)}))}beginPdf(t){return hu(this,void 0,void 0,(function*(){return yield this.licenseCheck(),new p(this,yield this.bridge.copyArgs.beginPdf(t))}))}beginTiff(t={}){return hu(this,void 0,void 0,(function*(){return yield this.licenseCheck(),new m(this,yield this.bridge.copyArgs.beginTiff(t))}))}createGenericDocumentRecognizer(t){return hu(this,void 0,void 0,(function*(){return yield this.licenseCheck(),new uc(this,yield this.bridge.copyArgs.genericDocumentRecognizerCreate(t))}))}imageToJpeg(t,e="COPY_IMAGE"){return hu(this,void 0,void 0,(function*(){yield this.licenseCheck();return this.getBridge(e).encodeJpeg(t)}))}get version(){return o.VERSION}get utils(){return this._utils||(this._utils=new y),this._utils}release(t,e){return hu(this,void 0,void 0,(function*(){t&&(F.a.debug(`Releasing object ${null!=e?e:"unknown"}`),yield this.bridge.copyArgs.releaseObject(t))}))}getBridge(t){return"CONSUME_IMAGE"===t?this.bridge.transferArgs:this.bridge.copyArgs}licenseCheck(){return hu(this,void 0,void 0,(function*(){const t=yield this.getLicenseInfo();if(!t.isValid())throw console.error(`LicenseError: ${t.status}`),new P(t)}))}createGenericTextLineScanner(t,e,n){return hu(this,void 0,void 0,(function*(){const i=this.bridge.copyArgs.createGenericTextLineScanner(n),o=new L(this,i);return yield cu.create(t,e,o)}))}destroy(){this.bridge.destroy(),pu.instance=void 0}}pu.defaultEnginePath="",pu._ui2=o.BUILD_WITH_UI?lc:void 0,pu.cameras=du.a.INSTANCE,pu.Config=T,pu._stats=uu.a.INSTANCE;var fu=e.a=pu},function(t,e,n){"use strict";var i=n(38),o=n.n(i)()((function(t){return t[1]}));o.push([t.i,"\n.scanbot-shutter-fade-in {\n opacity: 1;\n}\n\n.scanbot-shutter-fade-out {\n opacity: 0;\n}\n\n.scanbot-shutter-rotate {\n animation: scanbot-shutter-rotating linear infinite;\n}\n\n.scanbot-shutter-pulse-fast {\n animation: scanbot-shutter-pulsing 1s ease-in-out infinite;\n}\n\n.scanbot-shutter-button {\n position: relative;\n width: 64px;\n height: 64px;\n left: 50%;\n bottom: 12px;\n transform: translate(-50%, -100%);\n}\n\n.scanbot-shutter-button-part {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n transition: opacity 0.5s ease-in-out;\n}\n\n@keyframes scanbot-shutter-rotating {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes scanbot-shutter-pulsing {\n 0% {\n opacity: 0.25;\n }\n 50% {\n opacity: 0.8;\n }\n 100% {\n opacity: 0.25;\n }\n}\n",""]),e.a=o},function(t,e,n){"use strict";var i=n(38),o=n.n(i)()((function(t){return t[1]}));o.push([t.i,".scanbot-document-hint-text {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n text-align: center;\n background-color: rgba(0, 0, 0, 0.4);\n color: white;\n border-radius: 0.25em;\n padding: 0.05em 0.3em 0.05em 0.3em;\n font-family: sans-serif;\n font-size: 0.9em;\n font-weight: 300;\n}\n",""]),e.a=o},function(t,e){var n,i,o=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===r||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:r}catch(t){n=r}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var l,c=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!u){var t=s(h);u=!0;for(var e=c.length;e;){for(l=c,c=[];++d<e;)l&&l[d].run();d=-1,e=c.length}l=null,u=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new f(t,e)),1!==c.length||u||s(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){const{render:i,hydrate:o,unmountComponentAtNode:r}=n(0);function a(t){return{render(e){i(e,t)},unmount(){r(t)}}}e.createRoot=a,e.hydrateRoot=function(t,e){return o(e,t),a(t)}},function(t,e){t.exports=function(t,e,n,i){var o=n?n.call(i,t,e):void 0;if(void 0!==o)return!!o;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;var r=Object.keys(t),a=Object.keys(e);if(r.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(e),l=0;l<r.length;l++){var c=r[l];if(!s(c))return!1;var u=t[c],d=e[c];if(!1===(o=n?n.call(i,u,d,c):void 0)||void 0===o&&u!==d)return!1}return!0}},function(t,e,n){"use strict";e.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(t,e,n){"use strict";function i(t){var e=Object.create(null);return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}n.d(e,"a",(function(){return r}));var o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,r=i((function(t){return o.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91}))},function(t,e,n){"use strict";n.r(e),n.d(e,"ScanbotSDK",(function(){return i}));const i=n(39).a},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return h}));var i=n(0),o=n(12),r=n(14),a=n(22);class s extends a.a{constructor(){super(r.a.DEFAULT_VIDEO_RESOLUTION_HD),this.finder.aspectRatio={width:2,height:1},this.userGuidance.title.visible=!1}static fromJson(t){const e=new s;return this.mapValues(t,e,["videoConstraints","finder","userGuidance"]),this.mapFinderConfiguration(e,t),this.mapVideoConstraints(t,e),e}}var l=n(9),c=n(23),u=n(26),d=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{l(i.next(t))}catch(t){r(t)}}function s(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))};o.a;class h extends o.c{constructor(t){super(t),this.enabled=!0,this.configuration=t.configuration}static create(t,e){var n;return d(this,void 0,void 0,(function*(){const o=null!==(n=e.container)&&void 0!==n?n:document.getElementById(e.containerId);if(e=s.fromJson(e),!o)throw Error("Unable to initialize ScanbotSDK: Cannot find container element with the id provided.");return new Promise(((n,r)=>{Object(i.render)(i.default.createElement(h,{container:o,configuration:e,onSuccess:n,onFailure:r,sdk:t}),o)}))}))}componentDidMount(){var t,e;super.componentDidMount();try{this.genericDocumentRecognizer=this.props.sdk.createGenericDocumentRecognizer(this.configuration.detectorParameters)}catch(n){null===(e=(t=this.configuration).onError)||void 0===e||e.call(t,n)}this.detect()}componentWillUnmount(){const t=Object.create(null,{componentWillUnmount:{get:()=>super.componentWillUnmount}});return d(this,void 0,void 0,(function*(){t.componentWillUnmount.call(this),this.enabled=!1,yield(yield this.genericDocumentRecognizer).release()}))}detect(){var t,e,n,i,r,a;return d(this,void 0,void 0,(function*(){try{if(!this.enabled)return;this.camera.finderFrame=null===(t=this.finder)||void 0===t?void 0:t.holeRect;const r=yield null===(e=this.camera)||void 0===e?void 0:e.createImageData(o.c.DEFAULT_DETECTION_RESOLUTION);if(!r)return;const a=yield(yield this.genericDocumentRecognizer).recognize(r,new l.GenericDocumentRecognizerTypes.RecognitionParameters({mode:"LIVE"}),"CONSUME_IMAGE");if(!this.enabled)return;this.camera.reusableImageBuffer=a.originalImage.data,null===(i=(n=this.configuration).onDocumentDetected)||void 0===i||i.call(n,a)}catch(t){null===(a=(r=this.configuration).onError)||void 0===a||a.call(r,t)}finally{requestAnimationFrame((()=>this.detect()))}}))}render(){var t;const e=this.configuration;return i.default.createElement(i.default.Fragment,null,i.default.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},this.renderSpinner(null===(t=this.configuration)||void 0===t?void 0:t.spinnerColor),i.default.createElement("div",{style:{position:"absolute",width:"100%",height:"100%"}},i.default.createElement(c.a,{key:"camera",configuration:this.configuration,videoConstraints:e.videoConstraints,mirrored:e.mirrored,preferredCamera:this.configuration.preferredCamera,onReady:this.onVideoReady,onError:this.onVideoError,ref:t=>{this.camera=t}})),this.configuration.finder.visible&&i.default.createElement(u.a,{ref:t=>{this.finder=t},guidanceConfiguration:this.configuration.userGuidance,configuration:this.configuration.finder})))}}},function(t,e,n){"use strict";n.r(e);var i=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,o=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}((function(t){return i.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91}));e.default=o}])}));
|