"use strict";function getGlobalSelf(){return"undefined"!=typeof window?window:"undefined"!=typeof dd?dd:self}var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var a,t=1,r=arguments.length;t<r;t++){a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},__assign.apply(this,arguments)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getGlobalSelf=exports.getNetWorkTypeResultDeal=exports.scanParamsDeal=exports.removeStorageParamsDeal=exports.getStorageParamsDeal=exports.setStorageParamsDeal=exports.genBizStoreParamsDealFn=exports.genBoolResultDealFn=exports.forceChangeParamsDealFn=exports.genDefaultParamsDealFn=exports.addDefaultCorpIdParamsDeal=exports.addWatchParamsDeal=void 0,exports.addWatchParamsDeal=function(e){var a=Object.assign({},e);return a.watch=!0,a},exports.addDefaultCorpIdParamsDeal=function(e){var a=Object.assign({},e);return a.corpId="corpId",a},exports.genDefaultParamsDealFn=function(e){var a=Object.assign({},e);return function(e){return Object.assign({},a,e)}},exports.forceChangeParamsDealFn=function(e){var a=Object.assign({},e);return function(e){return Object.assign(e,a)}},exports.genBoolResultDealFn=function(e){return function(a){var t=Object.assign({},a);return e.forEach(function(e){void 0!==t[e]&&(t[e]=!!t[e])}),t}},exports.genBizStoreParamsDealFn=function(e){var a=Object.assign({},e);return"string"!=typeof a.params?(a.params=JSON.stringify(a),a):a},exports.setStorageParamsDeal=function(e){return{name:e.key,value:e.data}},exports.getStorageParamsDeal=function(e){return{name:e.key}},exports.removeStorageParamsDeal=function(e){return{name:e.key}},exports.scanParamsDeal=function(e){return"qr"===e.type?__assign(__assign({},e),{type:"qrCode"}):"bar"===e.type?__assign(__assign({},e),{type:"barCode"}):__assign(__assign({},e),{type:"all"})},exports.getNetWorkTypeResultDeal=function(e){return"none"!==e.result&&"unknown"!==e.result?{netWorkAvailable:!0,netWorkType:e.result}:{newWorkAvailable:!1}},exports.getGlobalSelf=getGlobalSelf;