"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var ddSdk_1=require("../lib/ddSdk"),env_1=require("../lib/env"),h5Pc_1=require("../lib/bridge/h5Pc"),eapp_1=require("../lib/bridge/eapp"),sdk_1=require("../lib/sdk"),h5PcEvent_1=require("../lib/bridge/h5PcEvent"),apiMapping_1=require("../constant/apiMapping");ddSdk_1.ddSdk.setPlatform({platform:env_1.ENV_ENUM.pc,bridgeInit:function(){switch(env_1.getENV().appType){case sdk_1.APP_TYPE.MINI_APP:return Promise.resolve(eapp_1.default);default:return h5Pc_1.h5PcBridgeInit().then(function(){return h5Pc_1.default})}},authMethod:"config",authParamsDeal:function(e){var i=Object.assign({},e);return e.jsApiList&&(i.jsApiList=e.jsApiList.map(function(e){return apiMapping_1.default[e]?apiMapping_1.default[e]:e})),i.url=window.location.href.split("#")[0],i},event:{on:function(e,i){if(env_1.getENV().appType===sdk_1.APP_TYPE.WEB)return h5PcEvent_1.on(e,i)},off:function(e,i){if(env_1.getENV().appType===sdk_1.APP_TYPE.WEB)return h5PcEvent_1.off(e,i)}}});