import _extends from"@babel/runtime/helpers/extends";export function p2c(n){return function(t){var e=t.success,c=t.fail,i=t.complete;n(t).then((function(n){e&&e(n)})).catch((function(n){c&&c(n)})).finally((function(){i&&i()}))}}export function c2p(n,t){if(n)return function(e){return"function"==typeof e||t.includes("Sync")||t.startsWith("create")?n(e):new Promise((function(t,c){n(_extends({},e,{success:function(n){t(n)},fail:function(n){c(n)}}))}))}}