{"version":3,"sources":["jsdelivr-header.js","/npm/@playerony/try-catch-wrapper@1.0.1/dist/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAIA,OAAO,eAAe,QAAS,aAAc,CAAE,OAAO,IACtD,QAAQ,qBAAuB,QAAQ,qBAAkB,EASzD,MAAM,gBAAkB,CAAC,EAAW,KAChC,IACI,OAAO,GACX,CACA,MAAO,GACC,GAEA,EAAQ,EAEhB,GAEJ,QAAQ,gBAAkB,gBAS1B,MAAM,qBAAuB,MAAO,EAAW,KAC3C,IACI,aAAa,GACjB,CACA,MAAO,GACC,GAEA,EAAQ,EAEhB,GAEJ,QAAQ,qBAAuB","file":"/npm/@playerony/try-catch-wrapper@1.0.1/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@playerony/try-catch-wrapper@1.0.1/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\n/**\n * @packageDocumentation Functional try-catch wrapper.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.asyncTryCatchWrapper = exports.tryCatchWrapper = void 0;\n/**\n * try-catch wrapper for synchronous functions\n *\n * @param toExecute - synchronous function to execute inside of try-catch\n * @param onError - synchronous function to execute when an error occurs\n *\n * @public\n */\nconst tryCatchWrapper = (toExecute, onError) => {\n    try {\n        return toExecute();\n    }\n    catch (error) {\n        if (onError) {\n            // @ts-expect-error\n            onError(error);\n        }\n    }\n};\nexports.tryCatchWrapper = tryCatchWrapper;\n/**\n * try-catch wrapper for asynchronous functions\n *\n * @param toExecute - asynchronous function to execute inside of try-catch\n * @param onError - asynchronous function to execute when an error occurs\n *\n * @public\n */\nconst asyncTryCatchWrapper = async (toExecute, onError) => {\n    try {\n        return await toExecute();\n    }\n    catch (error) {\n        if (onError) {\n            // @ts-expect-error\n            onError(error);\n        }\n    }\n};\nexports.asyncTryCatchWrapper = asyncTryCatchWrapper;\n"]}