UNPKG

@scandit/web-datacapture-core

Version:

Scandit Data Capture SDK for the Web

2 lines 1.32 kB
import {b}from'./chunk-VBUDN72N.js';import {a as a$1}from'./chunk-XR65N6EG.js';async function a(l){if(!b.isAnimationApiSupported()||l)try{l?a$1.debug("Force loading animation polyfill as requested."):a$1.debug("Web Animation API not fully supported, you might need to add https://www.npmjs.com/package/web-animations-js polyfill to see some animations.");let{polyfill:o}=await import('../private/utils/AnimationSimplePolyfill.js');o();}catch(o){a$1.warn("Error importing AnimationSimplePolyfill.js, the Animation API will not be polyfilled. This is not a problem for most browsers, but it might be a problem for older browsers like Chrome 75<",o);}}async function f(l){if(typeof globalThis.structuredClone!="function"||l)try{l?a$1.debug("Force loading structuredClone polyfill as requested."):a$1.debug("structuredClone API not supported, loading polyfill for older browsers.");let{structuredClonePolyfill:o}=await import('../private/utils/structuredClonePolyfill.js');o();}catch(o){a$1.warn("Error importing structuredClonePolyfill.js, the structuredClone API will not be polyfilled. This might cause issues in older browsers.",o);}}async function d(l={}){let{forceAnimationPolyfill:o=false,forceStructuredClonePolyfill:t=false,forceAllPolyfills:i=false}=l,n=i||o,s=i||t;await Promise.all([a(n),f(s)]);} export{d as a};