d4acdcee by simon

基础项目

0 parents
{
"ignoreHttpDomainCheck": false
}
\ No newline at end of file
page {
/* background: #f7f7f7; */
}
const fetchApi = require('./http/fetch-api.js');
const api = require('./http/api');
const config = require('./config');
const router = require('./router/index');
const storage = require('./utils/stroage');
const util = require('./utils/util');
const func = require('./utils/func');
// console.log('api.login:', api.login)
// console.log('fetchApi:',fetchApi)
// console.log('fetchApi.get:',fetchApi.fetch)
App({
get: fetchApi.fetchMethod,
post: (params) => {
params.method = 'post';
return fetchApi.fetchMethod(params);
},
delete: (params) => {
params.method = 'DELETE';
return fetchApi.fetchMethod(params);
},
uploadFile: fetchApi.uploadFile, // 单文件上传
uploadFileMultiple: fetchApi.uploadFileMultiple, // 多文件上传,
api: api,
config: config,
router: router,
storage: storage,
util: util,
func: func,
tapData: util.getBindtapData,
globalData: {
userInfo: null,
profile: null,
wxcode: storage.getItem("wxcode"),
ui: {
colorUI: "#409EFF",
colorDanger: "#EE0A24"
},
invitationCode: "",
statusBarHeight: 0,
},
onLaunch(options) {
// 第一次打开
// options.query == {number:1}
console.info('App onLaunch');
},
onShow(options) {
// 从后台被 scheme 重新打开
// options.query == {number:1}
},
/**
* 封装toast
* @returns
*/
toast(title, opt = {
icon: 'none'
}) {
let data = opt;
data.title = title
my.showToast({
content: title
})
return;
},
});
\ No newline at end of file
{
"pages": [
"pages/index/index"
],
"window": {
"defaultTitle": "联通流量王"
},
"behavior": {
"requestReferrerStrategy": "page",
"requestReferrerStyle": "full",
"requestDefaultEnableCookie": true,
"connectSocketDefaultMultiple": true
}
}
<view>
New Component
</view>
\ No newline at end of file
Component({
mixins: [],
data: {},
props: {},
didMount() {},
didUpdate() {},
didUnmount() {},
methods: {},
});
{
"component": true,
"styleIsolation": "apply-shared"
}
.form-comp {
background: url('/images/form/form-bg-1.png') center no-repeat;
background-size: 100% 100%;
width: 723rpx;
height: 691rpx;
padding-top: 60rpx;
box-sizing: border-box;
text-align: center;
}
.form-comp-2 {
background: url('/images/form/form-bg-2.png') center no-repeat;
background-size: 100% 100%;
width: 723rpx;
height: 1021rpx;
}
.form-comp .number {
font-size: 52rpx;
font-weight: bold;
letter-spacing: 1.29rpx;
color: #131313;
}
.form-comp .tit {
font-size: 40rpx;
font-weight: bold;
text-align: center;
color: #ff027c;
margin: 14rpx auto 0;
}
.form-comp .tips {
font-size: 23rpx;
font-weight: 600;
color: #727272;
margin: 14rpx auto 0;
}
.form {
margin: 32rpx auto 0;
}
.form-item {
width: 647rpx;
height: 86rpx;
border-radius: 16rpx;
border: solid 1rpx #787878;
background-color: #fcf8ff;
margin: 0 auto 24rpx;
padding: 0 32rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
text-align: left;
}
.form-item .label {
display: flex;
width: 150rpx;
font-weight: bold;
font-size: 32rpx;
}
.form-item .label .requrie {
color: #f00;
font-weight: 500;
}
.form-item .ipt {
background-color: transparent;
flex: 1;
font-size: 28rpx;
}
.form-comp .submit-btn {
background: url('/images/form/submit-btn.png') center no-repeat;
background-size: 100% 100%;
width: 630rpx;
height: 102rpx;
margin: 40rpx auto 0;
}
.form-comp .submit-tips {
margin: 20rpx auto 0;
font-size: 23rpx;
font-weight: 600;
text-align: center;
color: #727272;
}
.form-comp .func {}
.form-comp .func .icon {
background: url('/images/form/icon-question.png') center no-repeat;
background-size: 100% 100%;
width: 30rpx;
height: 30rpx;
}
.untouch {
pointer-events: none;
}
.ani-heart {
animation: ani-heart-key 1.2s linear infinite;
}
@keyframes ani-heart-key {
0% {
transform: scale(1);
}
50% {
transform: scale(1.04);
}
100% {
transform: scale(1);
}
}
\ No newline at end of file
<view class="form-comp {{!fold ? 'form-comp-2' : ''}}">
<view class="number">
{{item.mobile}}
</view>
<view class="tit">
{{item && item.featureName || '发财旺运'}}
</view>
<view class="tips">
请如实填写以下信息,以便我们及时为您送达
</view>
<view class="form">
<view class="form-item">
<view class="label">
姓 名
<view class="requrie">
*
</view>
</view>
<input
onBlur="onBlur"
onInput="inputEdit"
data-name="queryForm.name"
value="{{queryForm.name}}"
class="ipt"
placeholder="请输入姓名 (已加密)"
/>
</view>
<view class="form-item">
<view class="label">
联系电话
<view class="requrie">
*
</view>
</view>
<input
onBlur="onBlur"
onInput="inputEdit"
data-name="queryForm.mobilePhone"
value="{{queryForm.mobilePhone}}"
class="ipt"
placeholder="请输入联系电话,并保持畅通"
type="number"
/>
</view>
<block a:if="{{ !fold}}">
<view class="form-item">
<view class="label">
身份证
<view class="requrie">
*
</view>
</view>
<input
onInput="inputEdit"
data-name="queryForm.identNo"
value="{{queryForm.identNo}}"
class="ipt"
placeholder="请输入身份证号 (已加密)"
type="idcard"
/>
</view>
<view class="form-item" onTap="onPickerArea">
<view class="label">
所在地区
<view class="requrie">
*
</view>
</view>
<input value="{{areaStr}}" class="ipt untouch" placeholder="请选择省/市/区" />
</view>
<view class="form-item">
<input
onInput="inputEdit"
data-name="queryForm.address"
value="{{queryForm.address}}"
class="ipt"
placeholder="请输入详细地址 (*街道*小区*门牌号)"
/>
<view class="func">
<view onTap="onAddressTips" class="icon icon-question">
</view>
</view>
</view>
</block>
</view>
<view onTap="onSubmit" class="submit-btn ani-heart"></view>
<view class="submit-tips">
请保持联系号码畅通,我们可能随时与您联系
</view>
</view>
\ No newline at end of file
let app = getApp();
// 联通专属
import area from '/const/area-lt';
Component({
mixins: [],
data: {
queryForm: {
selectMobilePhone: "", // 从父组件中传入
name: "", // 姓名
mobilePhone: "", // 用户手机号
identNo: "", // 证件号
province: "", // 省
provinceCode: "", // 省编号
city: "", // 市
cityCode: "", // 市编号
district: "", // 区
districtCode: "", // 区编号
address: "", // 收货地址
},
areaStr: "",
fold: true
},
props: {
item: {
type: Object,
value: null,
},
// 发送自定义事件 onChange 貌似为固定值
onChange(data) {},
},
didMount() {
// console.log("area:", area);
// let res = app.func.addressToTree(area);
// console.log("res:", res);
},
didUpdate() {},
didUnmount() {},
methods: {
onBlur() {
if (this.data.queryForm.name && this.data.queryForm.mobilePhone) {
this.setData({
fold: false,
})
}
},
// 封装 my.multiLevelSelect
// - 对于传入的数据,只向底层接口传递 name 和 subList
// - 对于选中的结果,替换成对应的完整数据条目再回调
multiLevelSelect({
title,
list,
success,
fail,
complete
}) {
const clean = ({
name,
subList
}) => {
return {
name,
subList: subList && subList.map(clean)
};
};
const lookup = (array, index, pool) => {
if (array && index < array.length) {
array[index] = pool.filter(x => x.name === array[index].name)[0];
lookup(array, index + 1, array[index].subList);
delete array[index].subList; // 方便回调中的 my.alert 演示。真实代码请删除此行,避免副作用
}
};
const wrap = func =>
func &&
(res => {
res.success && lookup(res.result, 0, list);
func(res);
});
return my.multiLevelSelect({
title,
list: list.map(clean),
success: wrap(success),
fail,
complete: wrap(complete),
});
},
// 选择地址
onPickerArea() {
let areas = app.func.addressToTree(area);
console.log("areas:", areas);
let updateList = []
areas.forEach(element => {
if (element.id == "440000") {
updateList.push(element);
}
});
this.multiLevelSelect({
title: '请选择所在地区',
list: updateList,
success: res => {
let region = res.result;
console.log(region)
this.setData({
'queryForm.province': region[0].name,
'queryForm.city': region[1].name,
'queryForm.district': region[2].name,
'queryForm.provinceCode': region[0].id,
'queryForm.cityCode': region[1].id,
'queryForm.districtCode': region[2].id,
'areaStr': region[0].name + region[1].name + region[2].name
})
},
fail: error => {
// console.error('multiLevelSelect fail: ', JSON.stringify(error));
},
});
},
// 显示地址tips
onAddressTips() {
my.showToast({
content: "请输入详细准确的地址,字数不少于4字(例如:**街身份证* 道…),且不能包含特殊符号(例如:? !/0等,可以输入小写-号)"
})
},
/**
* input绑定
* 多输入文本绑定
* 在input/texarea中设置 data-name="属性值即可"
*/
inputEdit(e) {
let dataset = e.currentTarget.dataset;
let value = e.detail.value;
let name = dataset.name;
this.setData({
[name]: value
});
},
/**
* 检查表单
*/
checkSubmit() {
return new Promise((resolve, reject) => {
let {
name,
mobilePhone,
identNo,
district,
address
} = this.data.queryForm;
console.log("this.data.queryForm:", this.data.queryForm);
if (!name) {
app.toast("请输入姓名")
return;
}
if (!app.util.checkMobile(mobilePhone)) {
app.toast("请输入正确的手机号码")
return;
}
if (!app.util.checkIdentNo(identNo)) {
app.toast("请输入正确的身份证号码")
return;
}
if (!district) {
app.toast("请选择所在地区")
return;
}
if (!address) {
app.toast("请输入详细地址")
return;
}
resolve(this.data.queryForm)
});
},
/**
* 提交表单
*/
onSubmit() {
this.checkSubmit().then((params) => {
params.selectMobilePhone = this.props.item.mobile;
console.log("params:", params)
my.showLoading({
content: '稍等片刻,订单提交中',
mask: true
});
app.post({
url: app.api.createOrder,
data: params,
}).then((result) => {
// 发送自定义事件 onChange 貌似为固定值
this.props.onChange({
name: "_evt_submit_complete"
})
my.hideLoading();
}).catch((err) => {
my.hideLoading();
});
});
},
},
});
\ No newline at end of file
{
"component": true,
"styleIsolation": "apply-shared"
}
.succ-comp {
background: url('/images/form/form-bg-succ.png') center no-repeat;
background-size: 100% 100%;
width: 723rpx;
height: 620rpx;
padding-top: 104rpx;
box-sizing: border-box;
text-align: center;
}
.succ-comp .icon-succ {
background: url('/images/form/icon-succ.png') center no-repeat;
background-size: 100% 100%;
width: 231rpx;
height: 231rpx;
margin: 0 auto 0;
}
.succ-comp .tit {
font-size: 53rpx;
font-weight: 800;
text-align: center;
color: #ff027c;
margin: 36rpx auto 0;
}
.succ-comp .tips {
font-size: 23rpx;
font-weight: 600;
text-align: center;
color: #727272;
margin: 16rpx auto 0;
}
\ No newline at end of file
<view class="succ-comp">
<view class="icon-succ">
</view>
<view class="tit">
提交成功
</view>
<view class="tips">
您的订单正在审核发货
</view>
</view>
\ No newline at end of file
Component({
mixins: [],
data: {},
props: {},
didMount() {},
didUpdate() {},
didUnmount() {},
methods: {},
});
{
"component": true,
"styleIsolation": "apply-shared"
}
let ENV_CONFIG = require('./env/index');
const APPID = 'wx3e9333eb830173fc'
/** ====每次发布版本记得修改此环境配置==== */
const ENV = 'dev'; // dev prod
const NET_CONFIG = ENV_CONFIG[ENV];
module.exports = {
APPID,
ENV,
NET_CONFIG,
}
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
module.exports = {
mobile_list: [{
"mobile": "13119547324",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13073040282",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13128274236",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13242759852",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17665189597",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17675655724",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13054406916",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18664614305",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18578616846",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17620889471",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "15521461525",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18565342175",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18680455719",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13016041484",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18565294572",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18565540294",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13104899683",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17512957634",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17688475935",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13247526160",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17675796215",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17675704363",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "16624627325",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17520426507",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17512901165",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "16626428409",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "16624796186",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18565040337",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18520656402",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13247525587",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18594078544",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18675840537",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13242710694",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18529435709",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13054498145",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13249146495",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13060850657",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "16620437214",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17612086458",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13119576845",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17512955903",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17520439204",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17512957141",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13058434817",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18565437442",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13172030570",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13246887624",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13244810785",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17620146260",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13246883454",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18565318409",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18664704760",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18565107102",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13060814412",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "16620498273",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17665051443",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13076804579",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13242757826",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "16624748414",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17665029813",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "16620449170",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13265385430",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "15626014075",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13202543574",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17620157286",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18602050294",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "16620178309",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17620018303",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "16624650163",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17620745149",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18664605549",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13126489375",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18664612895",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18578637645",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13247511364",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17665700263",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13143699350",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "15521453596",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13246864546",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "16624612763",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "16620094489",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18520480944",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13242736592",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17512823954",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13242753956",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18594076414",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "15622729204",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18565143142",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17512964719",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18664847096",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17620836402",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "16620490338",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18520659724",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18520781483",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17512872961",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "13249154270",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "16626414401",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "18520238894",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "17675604259",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "1",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}, {
"mobile": "16626409289",
"advanceLimit": "0",
"niceFlag": "0",
"monthFeeLimit": "0",
"groupFlag": "1",
"niceRule": "0",
"monthLimit": "0",
"tailNumTag": "0",
"featureType": "0",
"featureNameIndex": "0",
"highLightNums": "0",
"topHighLightNums": "0"
}]
};
\ No newline at end of file
/**
* BASE_API:api统一请求域名。(当前项目业务)
* API_PREFIX:请求业务词头前缀,项目划分
* COMMON_API:平台通用请求域名。(单/多文件上传,省市区联查,场景二维码/小程序码等)
* IMG:oss图片地址前缀,用于访问
* OSS_PATH:上传文件路径,用于上传 例如:'/weapp/xxx/'
* MODULE_CODE:后端给出
* RSA_PUBLIC_KEY:公钥
* AES_IV:偏移量
* IS_POST_ENC:post方法是否开启自动开启加密
*/
module.exports = {
dev: {
BASE_API: 'https://prettyapi.kdao.xin',
// BASE_API: 'https://prettyapi.letterbelieve.com',
// BASE_API: 'https://bizapi.kdao.xin',
API_PREFIX: '/zwPrettyNumApi',
COMMON_API: 'https://bizapi.kdao.xin',
IMG: 'https://cdn.kdao.xin/cdn/images',
OSS_PATH: '',
MODULE_CODE: 'd00b70ed26ed4f1291eb870662270e77',
RSA_PUBLIC_KEY: 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq4U9ZijHk0bsHh5YvsQu7E9l/S9sqRLlbLhxmcgoTCcH5nO3S4//VZ/Ns2sxRwSWrsCxGr+tIPXBofJErGf3teqxAspca/1pjaWGB3fQ44Q0+OPwv1l7vWgn81tdMIMizjHu31vrUTlcL9UDHfoLB9vht3mtrYsc7xTi8MnHlkWx+VZv8uS06sLRJqCBiIzZcdB30szCjNtcSm1A2sV4EnBzqCQnR4/0Bd33UVRVdJLFcez5OfKqTi3HS65adf6U8LjOdw5rE+NNPNJmggVGlWVRyw9MSkjbYS9W4lpGul22rIKODkLFnqEtW8VcG/1dFCka1ykMADOII+YXr6GDHQIDAQAB',
AES_IV: 'ce102d54b198462c',
IS_POST_ENC: true,
},
prod: {
BASE_API: 'https://prettyapi.kdao.xin',
// BASE_API: 'https://prettyapi.letterbelieve.com',
// BASE_API: 'https://bizapi.kdao.xin',
API_PREFIX: '/zwPrettyNumApi',
COMMON_API: 'https://bizapi.kdao.xin',
IMG: 'https://cdn.kdao.xin/cdn/images',
OSS_PATH: '',
MODULE_CODE: 'd00b70ed26ed4f1291eb870662270e77',
RSA_PUBLIC_KEY: 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq4U9ZijHk0bsHh5YvsQu7E9l/S9sqRLlbLhxmcgoTCcH5nO3S4//VZ/Ns2sxRwSWrsCxGr+tIPXBofJErGf3teqxAspca/1pjaWGB3fQ44Q0+OPwv1l7vWgn81tdMIMizjHu31vrUTlcL9UDHfoLB9vht3mtrYsc7xTi8MnHlkWx+VZv8uS06sLRJqCBiIzZcdB30szCjNtcSm1A2sV4EnBzqCQnR4/0Bd33UVRVdJLFcez5OfKqTi3HS65adf6U8LjOdw5rE+NNPNJmggVGlWVRyw9MSkjbYS9W4lpGul22rIKODkLFnqEtW8VcG/1dFCka1ykMADOII+YXr6GDHQIDAQAB',
AES_IV: 'ce102d54b198462c',
IS_POST_ENC: true,
}
}
\ No newline at end of file
module.exports = {
config: "/front/mallApi/configs", //会员配置
login: '/front/userApi/login', // 登录
wxLogin: "/front/userApi/code2session", // wx小程序登录
profile: "/front/userApi/profile", // profile
profile: "/front/userApi/profile", // profile
// 1、这个接口一次查询会返回100个号码。
// 2、后台限制了这个接口从联通获取号码的次数(5)次。多次调用后,如果超过次数,会默认以query = '' 返回结果。相同查询条件的结果会缓存起来,二次查询的结果是相同的。
// 3、建议前台缓存返回的结果,翻页、AABB+组合需要前端自行做正则匹配。匹配结果不足时,可以从缓存中随机抽取号码补齐。
// 4、缓存返回结果的时候做好去重操作
selectNum: "/front/selectNum", // 选号
createOrder: "/front/createOrder", // 下单
/**
* 通用接口
* 请求时 "mode"传"custom"
*/
areaQuery: 'https://api.k.wxpai.cn/bizproxy/kdapi/area', // post 区域查询
// 文件上传
uploadFile: '/common/upload', // 上传图片通用接口(需要后端协同开通用接口,目前没有通用接口)
// uploadFile: "/admin/upload", // 上传图片
wxQrcodeCreate: '/open/wx/qrcode/create', //生成小程序码(需要后端协同开通用接口,目前没有通用接口)
}
\ No newline at end of file
let config = require('./../config');
let Storage = require('./../utils/stroage');
let util = require('./../utils/util');
let Router = require('./../router/index');
let Encrypt = require('./../utils/enc/enc');
let api = require('./api');
const errMsg = '服务异常,请稍后重试';
/**
* 重新获取 sessionId
* 1.重新获取wxcode,
* 2.调用login方法,传wxcode,给后端重新换取js_session
* @returns
*/
function login() {
return new Promise((resolve, reject) => {
// my.login({
// success: (res) => {
let res = {
code: util.uuid()
}
let baseUrl = config.NET_CONFIG.BASE_API + config.NET_CONFIG.API_PREFIX;
let header = {
'-kd-platform-env': config.ENV,
'-kd-platform-module': config.NET_CONFIG.MODULE_CODE
}
let app = getApp();
let globalData = app && app.globalData || null
let data = {
code: res.code,
miniproChannel: globalData.channelCode || "",
channelCode: globalData.channelCode || "",
parentMemberCode: globalData.parentMemberCode || "",
platform: "minipro",
};
data = Encrypt.makeEncrypt(data);
my.request({
// url: baseUrl + api.wxLogin,
url: baseUrl + api.login,
sid: false,
data: data,
method: 'POST',
header: header,
success: (res) => {
let {
code,
content
} = res.data;
if (code == 200 && content.sessionId) {
Storage.setItem('sessionId', content.sessionId); // 保存新的sessionId
resolve();
} else {
reject();
}
}
})
// }
// });
});
}
/**
* 检查并埋下sessionId
* @param {*} sid 接口是否需要sessionId
* @returns
*/
function checkSessionId(sid) {
return new Promise((resolve, reject) => {
let sessionId = Storage.getItem('sessionId');
if (sid) {
// 拥有sessionId
if (sessionId) {
resolve();
} else {
// 重新获取 sessionId
login().then((result) => {
resolve();
}).catch((err) => {
reject();
});
}
} else {
// 不需要 sessionId 忽略
resolve();
}
});
}
function fetchMethod(val) {
let params = Object.assign({
loading: false,
toast: true,
sid: true,
mode: "",
url: "",
data: null,
method: "GET",
enc: false
}, val);
let promise = new Promise((resolve, reject) => {
checkSessionId(params.sid).then(() => {
doRequest(params).then((result) => {
resolve(result);
}).catch((err) => {
// 404 或 403 错误码的时候需要重新拉一次
if (err.code == 404 || err.code == 403) {
login().then((loginRes) => {
doRequest(params).then((result2) => {
resolve(result2);
});
}).catch((err) => {});
} else {
reject(err)
}
});
});
});
return promise;
}
/**
* 做实际请求
* @param {*} params
* @returns
*/
function doRequest(params) {
return new Promise((resolve, reject) => {
let {
loading,
toast,
mode,
url,
data,
method,
responseType,
enc
} = params;
let baseUrl = config.NET_CONFIG.BASE_API + config.NET_CONFIG.API_PREFIX;
// 使用通用接口前缀
if (mode == "common") baseUrl = config.NET_CONFIG.COMMON_API;
// 自定义前缀,即不使用前缀
if (mode == "custom") baseUrl = "";
if (loading && mode != 'log') my.showLoading({
content: '加载中',
mask: true
});
// 判断是否开启post方法默认加密
if (config.NET_CONFIG.IS_POST_ENC && (method == "post" || method == "POST")) {
enc = true;
}
if (enc) data = Encrypt.makeEncrypt(data);
// 设置请求头
let header = {
'-kd-platform-env': config.ENV,
'-kd-platform-module': config.NET_CONFIG.MODULE_CODE,
'sessionId': Storage.getItem("sessionId")
}
my.request({
url: baseUrl + url, //请求地址
data: data, //自定义参数
method: method || 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
header: header,
responseType: responseType,
success: (result) => {
// 日志上传不需要处理结果
if (mode == 'log') return;
let res = result.data;
if (responseType == "arraybuffer") {
if (loading) my.hideLoading();
resolve(res)
} else if (res.code === 200) {
if (loading) my.hideLoading();
resolve(res.content);
} else {
my.hideLoading();
// 404 不需要toast
if (toast && res.code != 404) {
my.showToast({
content: res.errMsg || errMsg,
icon: 'none'
})
}
reject(res);
}
},
fail: (err) => {
my.hideLoading();
}
});
});
}
// -------- 业务接口 Start --------
/**
* 上传文件到恪道
* @param {*} filePath 图片地址
* @param {*} subPath 上传目录 (此参数为空则使用 oss目录)
*/
function uploadFile(filePath, subPath) {
return new Promise((resolve, reject) => {
if (!subPath && !config.NET_CONFIG.OSS_PATH) {
throw new Error('请配置上传目录 !');
reject();
return;
}
my.uploadFile({
url: config.NET_CONFIG.BASE_API + config.NET_CONFIG.API_PREFIX + api.uploadFile,
filePath: filePath,
name: 'file',
header: {
'content-type': 'multipart/form-data',
'-kd-platform-env': config.ENV,
'-kd-platform-module': config.NET_CONFIG.MODULE_CODE,
},
formData: {
subPath: subPath || config.NET_CONFIG.OSS_PATH
},
success(res) {
let result = JSON.parse(res.data).content;
resolve(result);
},
fail() {
reject()
},
complete() {}
})
});
}
/**
* 上传多个文件到服务器
* urlList 需要上传的图片地址 (my.chooseImage 的 paths列表)
*
*/
function uploadFileMultiple(filePathList, subPath) {
return new Promise((resolve, reject) => {
if (!subPath && !config.NET_CONFIG.OSS_PATH) {
throw new Error('请配置上传目录 !');
reject();
return;
}
console.log("config.NET_CONFIG.COMMON_API + api.uploadFile:", config.NET_CONFIG.COMMON_API + api.uploadFile);
my.showLoading({
content: `加载中`
})
console.log("filePathList:", filePathList);
if (filePathList && filePathList.length > 0) {
let promiseList = [];
filePathList.forEach(element => {
let promiseItem = new Promise((resolve2, reject2) => {
uploadFile(element, subPath).then((result2) => {
resolve2(result2)
}).catch((err) => {
reject2();
});
});
promiseList.push(promiseItem);
});
console.log("promiseList:", promiseList);
Promise.all(promiseList).then(uploadFiles => {
my.hideLoading()
resolve(uploadFiles)
}, reason => {
my.hideLoading()
reject();
});
} else {
my.hideLoading()
resolve([]);
}
});
}
module.exports = {
fetchMethod,
uploadFile,
uploadFileMultiple
}
\ No newline at end of file
{
"format": 2,
"developOptions": {
"hotReload": true
}
}
\ No newline at end of file
File mode changed
<view>
this is a blank page
</view>
Page({
onLoad(query) {
// 页面加载
console.info(`Page onLoad with query: ${JSON.stringify(query)}`);
},
onReady() {
// 页面加载完成
},
onShow() {
// 页面显示
},
onHide() {
// 页面隐藏
},
onUnload() {
// 页面被关闭
},
onTitleClick() {
// 标题被点击
},
onPullDownRefresh() {
// 页面被下拉
},
onReachBottom() {
// 页面被拉到底部
},
onShareAppMessage() {
// 返回自定义分享信息
return {
title: 'My App',
desc: 'My App description',
path: 'pages/index/index',
};
},
});
{}
\ No newline at end of file
.top-space {
height: 0;
}
.page {
font-size: 0;
padding-bottom: 124rpx;
}
.main {
/* font-size: 28rpx; */
}
.ebg {
font-size: 0;
width: 750rpx;
position: relative;
z-index: 11;
}
.table {
width: 750rpx;
height: 1120rpx;
background-image: linear-gradient(to top, #ede9ff, #d6c0ff);
box-sizing: border-box;
margin: 0px auto 0;
}
.func-wrap {
background: url('/images/index/search-wrap-bg.png') center no-repeat;
background-size: 100% 100%;
width: 701rpx;
height: 311rpx;
margin: 0 auto;
box-sizing: border-box;
padding-top: 60rpx;
}
.search-wrap {
width: 608rpx;
height: 58rpx;
border-radius: 16rpx;
border: solid 1rpx #905cff;
background-color: #fcf8ff;
margin: 0 auto 0;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0rpx 0rpx 0rpx 19rpx;
}
.search-icon {
background: url('/images/index/search-icon.png') center no-repeat;
background-size: 100% 100%;
width: 32rpx;
height: 32rpx;
/* margin: 0rpx 19rpx 0rpx 12rpx; */
}
.search-input {
flex: 1;
background-color: transparent;
padding: 0 12rpx;
box-sizing: border-box;
}
.search-btn {
width: 153rpx;
height: 58rpx;
line-height: 58rpx;
border-radius: 16rpx;
background-image: linear-gradient(to top, #be8bff, #7934ff);
text-align: center;
color: #fff;
font-weight: bold;
font-size: 30rpx;
}
.tag-list {
width: 614rpx;
margin: 21rpx auto 0;
display: flex;
flex-wrap: wrap;
}
.tag-list :nth-child(4n) {
margin-right: 0rpx;
}
.tag-item {
width: 140rpx;
height: 49rpx;
line-height: 50rpx;
border-radius: 21rpx;
text-align: center;
color: #fff;
font-weight: bold;
background-image: linear-gradient(to top, #be8bff, #7934ff);
margin-right: 18rpx;
margin-bottom: 11rpx;
font-size: 28rpx;
}
.tag-item-act {
background-image: linear-gradient(to top, #ff0072, #ff00a2);
}
/* 号码 */
.number-wrap {
margin: 24rpx auto 0;
padding: 0 16rpx;
box-sizing: border-box;
position: relative;
z-index: 21;
height: 660rpx;
}
.number-list {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
/* max-height: 660rpx; */
/* height: 660rpx; */
overflow-y: hidden;
}
.number-item {
width: 341rpx;
height: 114rpx;
background: url('/images/index/number-item-bg.png') center no-repeat;
background-size: 100% 100%;
margin: 0 9rpx 18rpx;
font-size: 48rpx;
color: #fff;
font-weight: bold;
box-sizing: border-box;
text-align: center;
padding-top: 8rpx;
}
.number-item .text {
font-size: 48rpx;
color: #fff;
}
.number-item .highlight {
color: #fcff04;
}
.page-btn-wrap {
margin: 26rpx auto 0;
display: flex;
align-items: center;
justify-content: center;
}
.page-btn {
width: 184rpx;
height: 69rpx;
margin: 0 8px;
}
.btn-prev {
background: url('/images/index/page-btn-prev.png') center no-repeat;
background-size: 100% 100%;
}
.btn-next {
background: url('/images/index/page-btn-next.png') center no-repeat;
background-size: 100% 100%;
}
/* 弹窗框 */
.popup {
position: fixed;
z-index: 1001;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.popup .popup-mask {
position: fixed;
width: 100vw;
height: 100vh;
background-color: #000000;
opacity: .7;
}
.popup .dialog {
position: relative;
}
text {
color: #333;
font-size: 30rpx;
}
.highlight {
color: red;
}
.bot-btn {
background: url('/images/form/submit-btn.png') center no-repeat;
background-size: 100% 100%;
width: 630rpx;
height: 102rpx;
position: fixed;
left: 0;
right: 0;
bottom: 40rpx;
margin: auto;
z-index: 111;
}
.ani-heart {
animation: ani-heart-key 1.2s linear infinite;
}
@keyframes ani-heart-key {
0% {
transform: scale(1);
}
50% {
transform: scale(1.04);
}
100% {
transform: scale(1);
}
}
\ No newline at end of file
<view class="page">
<view class="app__bgc bgc"></view>
<view class="app__bg bg"></view>
<view class="app__content main">
<view class="top-space"></view>
<image class="ebg" mode="widthFix" src="/images/index/index-bg-1.png" />
<view class="content">
<view class="table">
<view class="func-wrap">
<view class="search-wrap">
<view class="search-icon"></view>
<input
onInput="inputEdit"
onConfirm="onSearchConfirm"
data-name="queryForm.query"
value="{{queryForm.query}}"
class="search-input"
placeholder="请输入您喜欢的数字"
type="number"
/>
<view onTap="onSearch" class="search-btn">
搜 索
</view>
</view>
<view class="tag-list">
<view
a:for="{{ tagList }}"
onTap="onTagItem"
data-data="{{item}}"
data-index="{{index}}"
class="tag-item {{ tagIndex == index ? 'tag-item-act' : '' }}"
style="font-size: {{ item.fontSize || 28 }}rpx;"
>
{{item.name}}
</view>
</view>
</view>
<view class="number-wrap">
<view class="number-list">
<view
a:for="{{ numberList }}"
onTap="onNumberItem"
data-data="{{item}}"
data-index="{{index}}"
class="number-item"
>
<text a:for="{{ item.numberDisplayList }}" class="text {{item.highlight ? 'highlight' : ''}}">
{{item.number}}
</text>
</view>
</view>
</view>
<view class="page-btn-wrap">
<view onTap="onPagePrev" class="page-btn btn-prev">
</view>
<view onTap="onPageNext" class="page-btn btn-next">
</view>
</view>
</view>
</view>
<image class="ebg" mode="widthFix" src="/images/index/index-bg-2.png" />
<view a:if="{{ shortCutVisible }}" onTap="toTop" class="bot-btn ani-heart"></view>
</view>
</view>
<view hidden="{{ !formVisible }}" class="popup">
<view catchTap="onHideMask" class="popup-mask"></view>
<view class="dialog">
<form-comp item="{{curNumberItem}}" onChange="evtcomp"></form-comp>
</view>
</view>
<view a:if="{{ succVisible }}" class="popup">
<view catchTap="onHideMask" class="popup-mask"></view>
<view class="dialog">
<succ-comp></succ-comp>
</view>
</view>
\ No newline at end of file
let app = getApp();
// import {
// mobile_list
// } from '/const/index';
// import {
// areas
// } from '/const/area-new';
Page({
data: {
queryForm: {
query: "",
},
formVisible: false,
succVisible: false,
shortCutVisible: false,
tagIndex: 0,
tagList: [{
name: "推荐",
val: "",
},
{
name: "AAA+",
val: "AAA+",
},
{
name: "AABB+",
val: "AABB+",
},
{
name: "ABAB+",
val: "ABAB+",
},
{
name: "ABBA",
val: "ABBA",
},
{
name: "ABCAB",
val: "ABCAB",
},
{
name: "ABCD",
val: "ABCD",
},
{
name: "尾号6/8/9",
val: "LAST689",
fontSize: 26
},
],
page: 1,
size: 10,
totalPages: 0,
// 总号码池
numberPool: [],
// 命中池
targetNumberList: [],
// 号码列表,当前展示号码
numberList: [],
// 当前选择号码
curNumberItem: null,
},
onLoad(query) {
this.initData();
// let area = {};
// let province_list = {};
// let city_list = {};
// let county_list = {};
// areas.forEach(element => {
// province_list[element[0]] = element[1]
// city_list[element[2]] = element[3]
// county_list[element[4]] = element[5]
// });
// area.province_list = province_list;
// area.city_list = city_list;
// area.county_list = county_list;
// console.log(area);
},
async initData() {
let numberPool = await this.getSelectNumberList();
app.func.sortByLength(numberPool)
this.data.targetNumberList = numberPool;
this.data.page = 1;
this.refreshPage();
// let beautyResAAA = app.func.checkBeautyNumberAAA('15014443959');
// console.log("beautyResAAA:", beautyResAAA);
// let beautyResAABB = app.func.checkBeautyNumberAABB('15011337986');
// console.log("beautyResAABB:", beautyResAABB);
// let beautyResABAB = app.func.checkBeautyNumberABAB('15056563959');
// console.log("beautyResABAB:", beautyResABAB);
// let beautyResABBA = app.func.checkBeautyNumberABBA('15056653959');
// console.log("beautyResABBA:", beautyResABBA);
// let beautyResABCAB = app.func.checkBeautyNumberABCAB('15056756959');
// console.log("beautyResABCAB:", beautyResABCAB);
// let beautyResABCD = app.func.checkBeautyNumberABCD('15054323959');
// console.log("beautyResABCD:", beautyResABCD);
// let beautyResLast = app.func.checkBeautyNumberLast('15054323959');
// console.log("beautyResLast:", beautyResLast);
},
// 页面滚动
onPageScroll(e) {
let shortCutVisible = e.scrollTop > 700;
this.setData({
shortCutVisible
});
},
toTop() {
console.log("toTop");
my.pageScrollTo({
scrollTop: 0,
duration: 300
})
},
async onSearch() {
let numberPool = await this.getSelectNumberList();
this.setData({
tagIndex: 0
})
// numberPool = app.util.shuffleArray(numberPool);
this.data.targetNumberList = numberPool;
this.data.page = 1;
this.refreshPage();
},
onSearchConfirm() {
this.onSearch();
},
/**
* 获取
*/
async getSelectNumberList() {
let res = await app.get({
url: app.api.selectNum,
data: this.data.queryForm,
loading: true,
});
// console.log(res);
let funcList = [
app.func.checkBeautyNumberAAA,
app.func.checkBeautyNumberAABB,
app.func.checkBeautyNumberABAB,
app.func.checkBeautyNumberABBA,
app.func.checkBeautyNumberABCAB,
app.func.checkBeautyNumberABCD,
app.func.checkBeautyNumberLast,
]
res.forEach(element => {
element.beautyList = []
element.beautyObj = {}
funcList.forEach(funElement => {
let beautyRes = funElement(element.mobile);
if (beautyRes.beautyNum) {
element.beautyList.push(beautyRes);
element.beautyObj[beautyRes.type] = beautyRes;
}
});
});
let numberPool = res.concat(this.data.numberPool);
numberPool = app.util.uniqueArray(numberPool);
this.data.numberPool = numberPool;
return numberPool;
},
// 点击标签
onTagItem(evt) {
let item = app.tapData(evt);
let index = app.tapData(evt, "index");
this.setData({
queryForm: {
query: "",
},
tagIndex: index,
})
let numberPool = this.data.numberPool;
numberPool = app.util.shuffleArray(numberPool);
if (item.val) {
let targetNumberList = []
numberPool.forEach(element => {
if (element.beautyObj[item.val]) {
targetNumberList.push(element);
}
});
targetNumberList = targetNumberList.concat(numberPool);
targetNumberList = app.util.uniqueArray(targetNumberList);
this.data.targetNumberList = targetNumberList;
} else {
// app.func.sortByLength(numberPool)
this.data.targetNumberList = numberPool;
}
this.data.page = 1;
this.refreshPage();
},
/**
* 点击号码
*/
onNumberItem(evt) {
let item = app.tapData(evt);
item.featureName = app.func.getFeatureName(item.mobile)
this.setData({
curNumberItem: item,
formVisible: true,
})
},
// 上一页
onPagePrev() {
this.data.page--;
if (this.data.page < 1) {
this.data.page = this.data.totalPages;
// return;
};
this.refreshPage();
},
// 下一页
onPageNext() {
this.data.page++;
if (this.data.page > this.data.totalPages) {
this.data.page = 1;
// return;
}
this.refreshPage();
},
refreshPage() {
let listObj = app.util.paginateArray(this.data.targetNumberList, this.data.page, this.data.pageSize);
let curTag = this.data.tagList[this.data.tagIndex];
let curTagVal = curTag.val;
let list = listObj.list;
let query = this.data.queryForm.query;
/**
* 高亮数字
*
* 1、如果query中有值,按query的值
* 2、如果标签有值,按标签
* 3、如果都没有,随机显示靓号
*/
list.forEach(element => {
let beautyObj = null;
if (query) {
beautyObj = {
beautyNum: query,
index: element.mobile.indexOf(query),
len: query.length,
type: "query",
}
} else if (element.beautyObj[curTagVal]) {
beautyObj = element.beautyObj[curTagVal];
} else {
// 默认靓号提示
let len = element.beautyList.length;
if (len) {
beautyObj = element.beautyList[Math.floor(Math.random() * len)] || null
}
}
let numberDisplayList = []
element.mobile.split("").forEach((ele, index) => {
let numberObj = {
number: ele,
highlight: beautyObj && index >= beautyObj.index && index <= beautyObj.index + beautyObj.len - 1,
}
numberDisplayList.push(numberObj);
});
element.numberDisplayList = numberDisplayList;
});
this.setData({
numberList: list,
totalPages: listObj.totalPages,
})
},
/**
* input绑定
* 多输入文本绑定
* 在input/texarea中设置 data-name="属性值即可"
*/
inputEdit(e) {
let dataset = e.currentTarget.dataset;
let value = e.detail.value;
let name = dataset.name;
this.setData({
[name]: value
});
},
evtcomp(evt) {
console.log("evtcomp evt:", evt)
let {
name,
data
} = evt;
// console.log("name:", name)
switch (name) {
case "_evt_hide":
this.hideMask();
break;
case "_evt_submit_complete":
this.setData({
formVisible: false,
succVisible: true,
})
break;
}
},
// 关闭蒙层
onHideMask() {
this.setData({
formVisible: false,
succVisible: false,
})
},
onShareAppMessage() {
// 返回自定义分享信息
return {
title: '',
desc: '',
path: '',
};
},
});
\ No newline at end of file
{
"usingComponents": {
"form-comp":"/components/form/form",
"succ-comp":"/components/succ/succ"
}
}
\ No newline at end of file
const routerPath = {
index: '/pages/index/index',
expCommon: '/pages/exp-common/exp-common',
expBus: '/pages/exp-bus/exp-bus',
expForm: '/pages/exp-form/exp-form',
article: '/pages/artcle/article',
example: '/pages/example/example',
more: '/pages/more/more',
}
function parse(data) {
let tempArr = [];
for (let key in data) {
tempArr.push(key + '=' + encodeURIComponent(data[key]));
}
return tempArr.join('&');
}
function push(path, option = {}) {
if (typeof path == 'string') {
option.path = path; //兼容无参数路径
} else {
if (path.name) {
path.path = path.name;
}
option = path;
}
// console.log("option:", option);
// 配置key值找到对应path
let url = routerPath[option.path] || routerPath['index'];
// console.log("url:", url);
// 读取传入的配置参数
let {
query = {}, openType = 'navigate', duration = 0
} = option;
// json 转换为 字符串拼接参数
let params = parse(query)
// console.log("params:", params);
if (params) {
url = url + '?' + params;
}
// 是否需要延时跳转
duration ? setTimeout(() => {
to(openType, url);
}, duration) : to(openType, url);
}
function to(openType, url) {
let obj = {
url
};
if (openType == 'redirect') {
my.redirectTo(obj);
} else if (openType == 'reLaunch') {
my.reLaunch(obj);
} else if (openType == 'switchTab') {
my.switchTab(obj);
} else if (openType == 'back') {
my.navigateBack({
delta: 1
});
} else {
my.navigateTo(obj);
}
}
module.exports = {
parse,
push,
to
}
!function(t,r){"object"==typeof exports?module.exports=exports=r():"function"==typeof define&&define.amd?define([],r):t.CryptoJS=r()}(this,function(){var t=t||function(t,r){var e=Object.create||function(){function t(){}return function(r){var e;return t.prototype=r,e=new t,t.prototype=null,e}}(),i={},n=i.lib={},o=n.Base=function(){return{extend:function(t){var r=e(this);return t&&r.mixIn(t),r.hasOwnProperty("init")&&this.init!==r.init||(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var r in t)t.hasOwnProperty(r)&&(this[r]=t[r]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),s=n.WordArray=o.extend({init:function(t,e){t=this.words=t||[],e!=r?this.sigBytes=e:this.sigBytes=4*t.length},toString:function(t){return(t||c).stringify(this)},concat:function(t){var r=this.words,e=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o<n;o++){var s=e[o>>>2]>>>24-o%4*8&255;r[i+o>>>2]|=s<<24-(i+o)%4*8}else for(var o=0;o<n;o+=4)r[i+o>>>2]=e[o>>>2];return this.sigBytes+=n,this},clamp:function(){var r=this.words,e=this.sigBytes;r[e>>>2]&=4294967295<<32-e%4*8,r.length=t.ceil(e/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(r){for(var e,i=[],n=function(r){var r=r,e=987654321,i=4294967295;return function(){e=36969*(65535&e)+(e>>16)&i,r=18e3*(65535&r)+(r>>16)&i;var n=(e<<16)+r&i;return n/=4294967296,n+=.5,n*(t.random()>.5?1:-1)}},o=0;o<r;o+=4){var a=n(4294967296*(e||t.random()));e=987654071*a(),i.push(4294967296*a()|0)}return new s.init(i,r)}}),a=i.enc={},c=a.Hex={stringify:function(t){for(var r=t.words,e=t.sigBytes,i=[],n=0;n<e;n++){var o=r[n>>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var r=t.length,e=[],i=0;i<r;i+=2)e[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new s.init(e,r/2)}},h=a.Latin1={stringify:function(t){for(var r=t.words,e=t.sigBytes,i=[],n=0;n<e;n++){var o=r[n>>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var r=t.length,e=[],i=0;i<r;i++)e[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new s.init(e,r)}},l=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},f=n.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=l.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(r){var e=this._data,i=e.words,n=e.sigBytes,o=this.blockSize,a=4*o,c=n/a;c=r?t.ceil(c):t.max((0|c)-this._minBufferSize,0);var h=c*o,l=t.min(4*h,n);if(h){for(var f=0;f<h;f+=o)this._doProcessBlock(i,f);var u=i.splice(0,h);e.sigBytes-=l}return new s.init(u,l)},clone:function(){var t=o.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),u=(n.Hasher=f.extend({cfg:o.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var r=this._doFinalize();return r},blockSize:16,_createHelper:function(t){return function(r,e){return new t.init(e).finalize(r)}},_createHmacHelper:function(t){return function(r,e){return new u.HMAC.init(t,e).finalize(r)}}}),i.algo={});return i}(Math);return function(){function r(t,r,e){for(var i=[],o=0,s=0;s<r;s++)if(s%4){var a=e[t.charCodeAt(s-1)]<<s%4*2,c=e[t.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=(a|c)<<24-o%4*8,o++}return n.create(i,o)}var e=t,i=e.lib,n=i.WordArray,o=e.enc;o.Base64={stringify:function(t){var r=t.words,e=t.sigBytes,i=this._map;t.clamp();for(var n=[],o=0;o<e;o+=3)for(var s=r[o>>>2]>>>24-o%4*8&255,a=r[o+1>>>2]>>>24-(o+1)%4*8&255,c=r[o+2>>>2]>>>24-(o+2)%4*8&255,h=s<<16|a<<8|c,l=0;l<4&&o+.75*l<e;l++)n.push(i.charAt(h>>>6*(3-l)&63));var f=i.charAt(64);if(f)for(;n.length%4;)n.push(f);return n.join("")},parse:function(t){var e=t.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o<i.length;o++)n[i.charCodeAt(o)]=o}var s=i.charAt(64);if(s){var a=t.indexOf(s);a!==-1&&(e=a)}return r(t,e,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(r){function e(t,r,e,i,n,o,s){var a=t+(r&e|~r&i)+n+s;return(a<<o|a>>>32-o)+r}function i(t,r,e,i,n,o,s){var a=t+(r&i|e&~i)+n+s;return(a<<o|a>>>32-o)+r}function n(t,r,e,i,n,o,s){var a=t+(r^e^i)+n+s;return(a<<o|a>>>32-o)+r}function o(t,r,e,i,n,o,s){var a=t+(e^(r|~i))+n+s;return(a<<o|a>>>32-o)+r}var s=t,a=s.lib,c=a.WordArray,h=a.Hasher,l=s.algo,f=[];!function(){for(var t=0;t<64;t++)f[t]=4294967296*r.abs(r.sin(t+1))|0}();var u=l.MD5=h.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,r){for(var s=0;s<16;s++){var a=r+s,c=t[a];t[a]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}var h=this._hash.words,l=t[r+0],u=t[r+1],d=t[r+2],v=t[r+3],p=t[r+4],_=t[r+5],y=t[r+6],g=t[r+7],B=t[r+8],w=t[r+9],k=t[r+10],S=t[r+11],m=t[r+12],x=t[r+13],b=t[r+14],H=t[r+15],z=h[0],A=h[1],C=h[2],D=h[3];z=e(z,A,C,D,l,7,f[0]),D=e(D,z,A,C,u,12,f[1]),C=e(C,D,z,A,d,17,f[2]),A=e(A,C,D,z,v,22,f[3]),z=e(z,A,C,D,p,7,f[4]),D=e(D,z,A,C,_,12,f[5]),C=e(C,D,z,A,y,17,f[6]),A=e(A,C,D,z,g,22,f[7]),z=e(z,A,C,D,B,7,f[8]),D=e(D,z,A,C,w,12,f[9]),C=e(C,D,z,A,k,17,f[10]),A=e(A,C,D,z,S,22,f[11]),z=e(z,A,C,D,m,7,f[12]),D=e(D,z,A,C,x,12,f[13]),C=e(C,D,z,A,b,17,f[14]),A=e(A,C,D,z,H,22,f[15]),z=i(z,A,C,D,u,5,f[16]),D=i(D,z,A,C,y,9,f[17]),C=i(C,D,z,A,S,14,f[18]),A=i(A,C,D,z,l,20,f[19]),z=i(z,A,C,D,_,5,f[20]),D=i(D,z,A,C,k,9,f[21]),C=i(C,D,z,A,H,14,f[22]),A=i(A,C,D,z,p,20,f[23]),z=i(z,A,C,D,w,5,f[24]),D=i(D,z,A,C,b,9,f[25]),C=i(C,D,z,A,v,14,f[26]),A=i(A,C,D,z,B,20,f[27]),z=i(z,A,C,D,x,5,f[28]),D=i(D,z,A,C,d,9,f[29]),C=i(C,D,z,A,g,14,f[30]),A=i(A,C,D,z,m,20,f[31]),z=n(z,A,C,D,_,4,f[32]),D=n(D,z,A,C,B,11,f[33]),C=n(C,D,z,A,S,16,f[34]),A=n(A,C,D,z,b,23,f[35]),z=n(z,A,C,D,u,4,f[36]),D=n(D,z,A,C,p,11,f[37]),C=n(C,D,z,A,g,16,f[38]),A=n(A,C,D,z,k,23,f[39]),z=n(z,A,C,D,x,4,f[40]),D=n(D,z,A,C,l,11,f[41]),C=n(C,D,z,A,v,16,f[42]),A=n(A,C,D,z,y,23,f[43]),z=n(z,A,C,D,w,4,f[44]),D=n(D,z,A,C,m,11,f[45]),C=n(C,D,z,A,H,16,f[46]),A=n(A,C,D,z,d,23,f[47]),z=o(z,A,C,D,l,6,f[48]),D=o(D,z,A,C,g,10,f[49]),C=o(C,D,z,A,b,15,f[50]),A=o(A,C,D,z,_,21,f[51]),z=o(z,A,C,D,m,6,f[52]),D=o(D,z,A,C,v,10,f[53]),C=o(C,D,z,A,k,15,f[54]),A=o(A,C,D,z,u,21,f[55]),z=o(z,A,C,D,B,6,f[56]),D=o(D,z,A,C,H,10,f[57]),C=o(C,D,z,A,y,15,f[58]),A=o(A,C,D,z,x,21,f[59]),z=o(z,A,C,D,p,6,f[60]),D=o(D,z,A,C,S,10,f[61]),C=o(C,D,z,A,d,15,f[62]),A=o(A,C,D,z,w,21,f[63]),h[0]=h[0]+z|0,h[1]=h[1]+A|0,h[2]=h[2]+C|0,h[3]=h[3]+D|0},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;e[n>>>5]|=128<<24-n%32;var o=r.floor(i/4294967296),s=i;e[(n+64>>>9<<4)+15]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),e[(n+64>>>9<<4)+14]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(e.length+1),this._process();for(var a=this._hash,c=a.words,h=0;h<4;h++){var l=c[h];c[h]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var t=h.clone.call(this);return t._hash=this._hash.clone(),t}});s.MD5=h._createHelper(u),s.HmacMD5=h._createHmacHelper(u)}(Math),function(){var r=t,e=r.lib,i=e.WordArray,n=e.Hasher,o=r.algo,s=[],a=o.SHA1=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,r){for(var e=this._hash.words,i=e[0],n=e[1],o=e[2],a=e[3],c=e[4],h=0;h<80;h++){if(h<16)s[h]=0|t[r+h];else{var l=s[h-3]^s[h-8]^s[h-14]^s[h-16];s[h]=l<<1|l>>>31}var f=(i<<5|i>>>27)+c+s[h];f+=h<20?(n&o|~n&a)+1518500249:h<40?(n^o^a)+1859775393:h<60?(n&o|n&a|o&a)-1894007588:(n^o^a)-899497514,c=a,a=o,o=n<<30|n>>>2,n=i,i=f}e[0]=e[0]+i|0,e[1]=e[1]+n|0,e[2]=e[2]+o|0,e[3]=e[3]+a|0,e[4]=e[4]+c|0},_doFinalize:function(){var t=this._data,r=t.words,e=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[(i+64>>>9<<4)+14]=Math.floor(e/4294967296),r[(i+64>>>9<<4)+15]=e,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});r.SHA1=n._createHelper(a),r.HmacSHA1=n._createHmacHelper(a)}(),function(r){var e=t,i=e.lib,n=i.WordArray,o=i.Hasher,s=e.algo,a=[],c=[];!function(){function t(t){for(var e=r.sqrt(t),i=2;i<=e;i++)if(!(t%i))return!1;return!0}function e(t){return 4294967296*(t-(0|t))|0}for(var i=2,n=0;n<64;)t(i)&&(n<8&&(a[n]=e(r.pow(i,.5))),c[n]=e(r.pow(i,1/3)),n++),i++}();var h=[],l=s.SHA256=o.extend({_doReset:function(){this._hash=new n.init(a.slice(0))},_doProcessBlock:function(t,r){for(var e=this._hash.words,i=e[0],n=e[1],o=e[2],s=e[3],a=e[4],l=e[5],f=e[6],u=e[7],d=0;d<64;d++){if(d<16)h[d]=0|t[r+d];else{var v=h[d-15],p=(v<<25|v>>>7)^(v<<14|v>>>18)^v>>>3,_=h[d-2],y=(_<<15|_>>>17)^(_<<13|_>>>19)^_>>>10;h[d]=p+h[d-7]+y+h[d-16]}var g=a&l^~a&f,B=i&n^i&o^n&o,w=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),k=(a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25),S=u+k+g+c[d]+h[d],m=w+B;u=f,f=l,l=a,a=s+S|0,s=o,o=n,n=i,i=S+m|0}e[0]=e[0]+i|0,e[1]=e[1]+n|0,e[2]=e[2]+o|0,e[3]=e[3]+s|0,e[4]=e[4]+a|0,e[5]=e[5]+l|0,e[6]=e[6]+f|0,e[7]=e[7]+u|0},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[(n+64>>>9<<4)+14]=r.floor(i/4294967296),e[(n+64>>>9<<4)+15]=i,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(l),e.HmacSHA256=o._createHmacHelper(l)}(Math),function(){function r(t){return t<<8&4278255360|t>>>8&16711935}var e=t,i=e.lib,n=i.WordArray,o=e.enc;o.Utf16=o.Utf16BE={stringify:function(t){for(var r=t.words,e=t.sigBytes,i=[],n=0;n<e;n+=2){var o=r[n>>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var r=t.length,e=[],i=0;i<r;i++)e[i>>>1]|=t.charCodeAt(i)<<16-i%2*16;return n.create(e,2*r)}};o.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],o=0;o<i;o+=2){var s=r(e[o>>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(s))}return n.join("")},parse:function(t){for(var e=t.length,i=[],o=0;o<e;o++)i[o>>>1]|=r(t.charCodeAt(o)<<16-o%2*16);return n.create(i,2*e)}}}(),function(){if("function"==typeof ArrayBuffer){var r=t,e=r.lib,i=e.WordArray,n=i.init,o=i.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var r=t.byteLength,e=[],i=0;i<r;i++)e[i>>>2]|=t[i]<<24-i%4*8;n.call(this,e,r)}else n.apply(this,arguments)};o.prototype=i}}(),function(r){function e(t,r,e){return t^r^e}function i(t,r,e){return t&r|~t&e}function n(t,r,e){return(t|~r)^e}function o(t,r,e){return t&e|r&~e}function s(t,r,e){return t^(r|~e)}function a(t,r){return t<<r|t>>>32-r}var c=t,h=c.lib,l=h.WordArray,f=h.Hasher,u=c.algo,d=l.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),v=l.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),p=l.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),_=l.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),y=l.create([0,1518500249,1859775393,2400959708,2840853838]),g=l.create([1352829926,1548603684,1836072691,2053994217,0]),B=u.RIPEMD160=f.extend({_doReset:function(){this._hash=l.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,r){for(var c=0;c<16;c++){var h=r+c,l=t[h];t[h]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}var f,u,B,w,k,S,m,x,b,H,z=this._hash.words,A=y.words,C=g.words,D=d.words,R=v.words,E=p.words,M=_.words;S=f=z[0],m=u=z[1],x=B=z[2],b=w=z[3],H=k=z[4];for(var F,c=0;c<80;c+=1)F=f+t[r+D[c]]|0,F+=c<16?e(u,B,w)+A[0]:c<32?i(u,B,w)+A[1]:c<48?n(u,B,w)+A[2]:c<64?o(u,B,w)+A[3]:s(u,B,w)+A[4],F|=0,F=a(F,E[c]),F=F+k|0,f=k,k=w,w=a(B,10),B=u,u=F,F=S+t[r+R[c]]|0,F+=c<16?s(m,x,b)+C[0]:c<32?o(m,x,b)+C[1]:c<48?n(m,x,b)+C[2]:c<64?i(m,x,b)+C[3]:e(m,x,b)+C[4],F|=0,F=a(F,M[c]),F=F+H|0,S=H,H=b,b=a(x,10),x=m,m=F;F=z[1]+B+b|0,z[1]=z[2]+w+H|0,z[2]=z[3]+k+S|0,z[3]=z[4]+f+m|0,z[4]=z[0]+u+x|0,z[0]=F},_doFinalize:function(){var t=this._data,r=t.words,e=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32,r[(i+64>>>9<<4)+14]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),t.sigBytes=4*(r.length+1),this._process();for(var n=this._hash,o=n.words,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return n},clone:function(){var t=f.clone.call(this);return t._hash=this._hash.clone(),t}});c.RIPEMD160=f._createHelper(B),c.HmacRIPEMD160=f._createHmacHelper(B)}(Math),function(){var r=t,e=r.lib,i=e.Base,n=r.enc,o=n.Utf8,s=r.algo;s.HMAC=i.extend({init:function(t,r){t=this._hasher=new t.init,"string"==typeof r&&(r=o.parse(r));var e=t.blockSize,i=4*e;r.sigBytes>i&&(r=t.finalize(r)),r.clamp();for(var n=this._oKey=r.clone(),s=this._iKey=r.clone(),a=n.words,c=s.words,h=0;h<e;h++)a[h]^=1549556828,c[h]^=909522486;n.sigBytes=s.sigBytes=i,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var r=this._hasher,e=r.finalize(t);r.reset();var i=r.finalize(this._oKey.clone().concat(e));return i}})}(),function(){var r=t,e=r.lib,i=e.Base,n=e.WordArray,o=r.algo,s=o.SHA1,a=o.HMAC,c=o.PBKDF2=i.extend({cfg:i.extend({keySize:4,hasher:s,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,r){for(var e=this.cfg,i=a.create(e.hasher,t),o=n.create(),s=n.create([1]),c=o.words,h=s.words,l=e.keySize,f=e.iterations;c.length<l;){var u=i.update(r).finalize(s);i.reset();for(var d=u.words,v=d.length,p=u,_=1;_<f;_++){p=i.finalize(p),i.reset();for(var y=p.words,g=0;g<v;g++)d[g]^=y[g]}o.concat(u),h[0]++}return o.sigBytes=4*l,o}});r.PBKDF2=function(t,r,e){return c.create(e).compute(t,r)}}(),function(){var r=t,e=r.lib,i=e.Base,n=e.WordArray,o=r.algo,s=o.MD5,a=o.EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:s,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,r){for(var e=this.cfg,i=e.hasher.create(),o=n.create(),s=o.words,a=e.keySize,c=e.iterations;s.length<a;){h&&i.update(h);var h=i.update(t).finalize(r);i.reset();for(var l=1;l<c;l++)h=i.finalize(h),i.reset();o.concat(h)}return o.sigBytes=4*a,o}});r.EvpKDF=function(t,r,e){return a.create(e).compute(t,r)}}(),function(){var r=t,e=r.lib,i=e.WordArray,n=r.algo,o=n.SHA256,s=n.SHA224=o.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=o._doFinalize.call(this);return t.sigBytes-=4,t}});r.SHA224=o._createHelper(s),r.HmacSHA224=o._createHmacHelper(s)}(),function(r){var e=t,i=e.lib,n=i.Base,o=i.WordArray,s=e.x64={};s.Word=n.extend({init:function(t,r){this.high=t,this.low=r}}),s.WordArray=n.extend({init:function(t,e){t=this.words=t||[],e!=r?this.sigBytes=e:this.sigBytes=8*t.length},toX32:function(){for(var t=this.words,r=t.length,e=[],i=0;i<r;i++){var n=t[i];e.push(n.high),e.push(n.low)}return o.create(e,this.sigBytes)},clone:function(){for(var t=n.clone.call(this),r=t.words=this.words.slice(0),e=r.length,i=0;i<e;i++)r[i]=r[i].clone();return t}})}(),function(r){var e=t,i=e.lib,n=i.WordArray,o=i.Hasher,s=e.x64,a=s.Word,c=e.algo,h=[],l=[],f=[];!function(){for(var t=1,r=0,e=0;e<24;e++){h[t+5*r]=(e+1)*(e+2)/2%64;var i=r%5,n=(2*t+3*r)%5;t=i,r=n}for(var t=0;t<5;t++)for(var r=0;r<5;r++)l[t+5*r]=r+(2*t+3*r)%5*5;for(var o=1,s=0;s<24;s++){for(var c=0,u=0,d=0;d<7;d++){if(1&o){var v=(1<<d)-1;v<32?u^=1<<v:c^=1<<v-32}128&o?o=o<<1^113:o<<=1}f[s]=a.create(c,u)}}();var u=[];!function(){for(var t=0;t<25;t++)u[t]=a.create()}();var d=c.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],r=0;r<25;r++)t[r]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,r){for(var e=this._state,i=this.blockSize/2,n=0;n<i;n++){var o=t[r+2*n],s=t[r+2*n+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8);var a=e[n];a.high^=s,a.low^=o}for(var c=0;c<24;c++){for(var d=0;d<5;d++){for(var v=0,p=0,_=0;_<5;_++){var a=e[d+5*_];v^=a.high,p^=a.low}var y=u[d];y.high=v,y.low=p}for(var d=0;d<5;d++)for(var g=u[(d+4)%5],B=u[(d+1)%5],w=B.high,k=B.low,v=g.high^(w<<1|k>>>31),p=g.low^(k<<1|w>>>31),_=0;_<5;_++){var a=e[d+5*_];a.high^=v,a.low^=p}for(var S=1;S<25;S++){var a=e[S],m=a.high,x=a.low,b=h[S];if(b<32)var v=m<<b|x>>>32-b,p=x<<b|m>>>32-b;else var v=x<<b-32|m>>>64-b,p=m<<b-32|x>>>64-b;var H=u[l[S]];H.high=v,H.low=p}var z=u[0],A=e[0];z.high=A.high,z.low=A.low;for(var d=0;d<5;d++)for(var _=0;_<5;_++){var S=d+5*_,a=e[S],C=u[S],D=u[(d+1)%5+5*_],R=u[(d+2)%5+5*_];a.high=C.high^~D.high&R.high,a.low=C.low^~D.low&R.low}var a=e[0],E=f[c];a.high^=E.high,a.low^=E.low}},_doFinalize:function(){var t=this._data,e=t.words,i=(8*this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;e[i>>>5]|=1<<24-i%32,e[(r.ceil((i+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*e.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,c=a/8,h=[],l=0;l<c;l++){var f=s[l],u=f.high,d=f.low;u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),h.push(d),h.push(u)}return new n.init(h,a)},clone:function(){for(var t=o.clone.call(this),r=t._state=this._state.slice(0),e=0;e<25;e++)r[e]=r[e].clone();return t}});e.SHA3=o._createHelper(d),e.HmacSHA3=o._createHmacHelper(d)}(Math),function(){function r(){return s.create.apply(s,arguments)}var e=t,i=e.lib,n=i.Hasher,o=e.x64,s=o.Word,a=o.WordArray,c=e.algo,h=[r(1116352408,3609767458),r(1899447441,602891725),r(3049323471,3964484399),r(3921009573,2173295548),r(961987163,4081628472),r(1508970993,3053834265),r(2453635748,2937671579),r(2870763221,3664609560),r(3624381080,2734883394),r(310598401,1164996542),r(607225278,1323610764),r(1426881987,3590304994),r(1925078388,4068182383),r(2162078206,991336113),r(2614888103,633803317),r(3248222580,3479774868),r(3835390401,2666613458),r(4022224774,944711139),r(264347078,2341262773),r(604807628,2007800933),r(770255983,1495990901),r(1249150122,1856431235),r(1555081692,3175218132),r(1996064986,2198950837),r(2554220882,3999719339),r(2821834349,766784016),r(2952996808,2566594879),r(3210313671,3203337956),r(3336571891,1034457026),r(3584528711,2466948901),r(113926993,3758326383),r(338241895,168717936),r(666307205,1188179964),r(773529912,1546045734),r(1294757372,1522805485),r(1396182291,2643833823),r(1695183700,2343527390),r(1986661051,1014477480),r(2177026350,1206759142),r(2456956037,344077627),r(2730485921,1290863460),r(2820302411,3158454273),r(3259730800,3505952657),r(3345764771,106217008),r(3516065817,3606008344),r(3600352804,1432725776),r(4094571909,1467031594),r(275423344,851169720),r(430227734,3100823752),r(506948616,1363258195),r(659060556,3750685593),r(883997877,3785050280),r(958139571,3318307427),r(1322822218,3812723403),r(1537002063,2003034995),r(1747873779,3602036899),r(1955562222,1575990012),r(2024104815,1125592928),r(2227730452,2716904306),r(2361852424,442776044),r(2428436474,593698344),r(2756734187,3733110249),r(3204031479,2999351573),r(3329325298,3815920427),r(3391569614,3928383900),r(3515267271,566280711),r(3940187606,3454069534),r(4118630271,4000239992),r(116418474,1914138554),r(174292421,2731055270),r(289380356,3203993006),r(460393269,320620315),r(685471733,587496836),r(852142971,1086792851),r(1017036298,365543100),r(1126000580,2618297676),r(1288033470,3409855158),r(1501505948,4234509866),r(1607167915,987167468),r(1816402316,1246189591)],l=[];!function(){for(var t=0;t<80;t++)l[t]=r()}();var f=c.SHA512=n.extend({_doReset:function(){this._hash=new a.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(t,r){for(var e=this._hash.words,i=e[0],n=e[1],o=e[2],s=e[3],a=e[4],c=e[5],f=e[6],u=e[7],d=i.high,v=i.low,p=n.high,_=n.low,y=o.high,g=o.low,B=s.high,w=s.low,k=a.high,S=a.low,m=c.high,x=c.low,b=f.high,H=f.low,z=u.high,A=u.low,C=d,D=v,R=p,E=_,M=y,F=g,P=B,W=w,O=k,U=S,I=m,K=x,X=b,L=H,j=z,N=A,T=0;T<80;T++){var Z=l[T];if(T<16)var q=Z.high=0|t[r+2*T],G=Z.low=0|t[r+2*T+1];else{var J=l[T-15],$=J.high,Q=J.low,V=($>>>1|Q<<31)^($>>>8|Q<<24)^$>>>7,Y=(Q>>>1|$<<31)^(Q>>>8|$<<24)^(Q>>>7|$<<25),tt=l[T-2],rt=tt.high,et=tt.low,it=(rt>>>19|et<<13)^(rt<<3|et>>>29)^rt>>>6,nt=(et>>>19|rt<<13)^(et<<3|rt>>>29)^(et>>>6|rt<<26),ot=l[T-7],st=ot.high,at=ot.low,ct=l[T-16],ht=ct.high,lt=ct.low,G=Y+at,q=V+st+(G>>>0<Y>>>0?1:0),G=G+nt,q=q+it+(G>>>0<nt>>>0?1:0),G=G+lt,q=q+ht+(G>>>0<lt>>>0?1:0);Z.high=q,Z.low=G}var ft=O&I^~O&X,ut=U&K^~U&L,dt=C&R^C&M^R&M,vt=D&E^D&F^E&F,pt=(C>>>28|D<<4)^(C<<30|D>>>2)^(C<<25|D>>>7),_t=(D>>>28|C<<4)^(D<<30|C>>>2)^(D<<25|C>>>7),yt=(O>>>14|U<<18)^(O>>>18|U<<14)^(O<<23|U>>>9),gt=(U>>>14|O<<18)^(U>>>18|O<<14)^(U<<23|O>>>9),Bt=h[T],wt=Bt.high,kt=Bt.low,St=N+gt,mt=j+yt+(St>>>0<N>>>0?1:0),St=St+ut,mt=mt+ft+(St>>>0<ut>>>0?1:0),St=St+kt,mt=mt+wt+(St>>>0<kt>>>0?1:0),St=St+G,mt=mt+q+(St>>>0<G>>>0?1:0),xt=_t+vt,bt=pt+dt+(xt>>>0<_t>>>0?1:0);j=X,N=L,X=I,L=K,I=O,K=U,U=W+St|0,O=P+mt+(U>>>0<W>>>0?1:0)|0,P=M,W=F,M=R,F=E,R=C,E=D,D=St+xt|0,C=mt+bt+(D>>>0<St>>>0?1:0)|0}v=i.low=v+D,i.high=d+C+(v>>>0<D>>>0?1:0),_=n.low=_+E,n.high=p+R+(_>>>0<E>>>0?1:0),g=o.low=g+F,o.high=y+M+(g>>>0<F>>>0?1:0),w=s.low=w+W,s.high=B+P+(w>>>0<W>>>0?1:0),S=a.low=S+U,a.high=k+O+(S>>>0<U>>>0?1:0),x=c.low=x+K,c.high=m+I+(x>>>0<K>>>0?1:0),H=f.low=H+L,f.high=b+X+(H>>>0<L>>>0?1:0),A=u.low=A+N,u.high=z+j+(A>>>0<N>>>0?1:0)},_doFinalize:function(){var t=this._data,r=t.words,e=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32,r[(i+128>>>10<<5)+30]=Math.floor(e/4294967296),r[(i+128>>>10<<5)+31]=e,t.sigBytes=4*r.length,this._process();var n=this._hash.toX32();return n},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});e.SHA512=n._createHelper(f),e.HmacSHA512=n._createHmacHelper(f)}(),function(){var r=t,e=r.x64,i=e.Word,n=e.WordArray,o=r.algo,s=o.SHA512,a=o.SHA384=s.extend({_doReset:function(){this._hash=new n.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var t=s._doFinalize.call(this);return t.sigBytes-=16,t}});r.SHA384=s._createHelper(a),r.HmacSHA384=s._createHmacHelper(a)}(),t.lib.Cipher||function(r){var e=t,i=e.lib,n=i.Base,o=i.WordArray,s=i.BufferedBlockAlgorithm,a=e.enc,c=(a.Utf8,a.Base64),h=e.algo,l=h.EvpKDF,f=i.Cipher=s.extend({cfg:n.extend(),createEncryptor:function(t,r){return this.create(this._ENC_XFORM_MODE,t,r)},createDecryptor:function(t,r){return this.create(this._DEC_XFORM_MODE,t,r)},init:function(t,r,e){this.cfg=this.cfg.extend(e),this._xformMode=t,this._key=r,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){t&&this._append(t);var r=this._doFinalize();return r},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?m:w}return function(r){return{encrypt:function(e,i,n){return t(i).encrypt(r,e,i,n)},decrypt:function(e,i,n){return t(i).decrypt(r,e,i,n)}}}}()}),u=(i.StreamCipher=f.extend({_doFinalize:function(){var t=this._process(!0);return t},blockSize:1}),e.mode={}),d=i.BlockCipherMode=n.extend({createEncryptor:function(t,r){return this.Encryptor.create(t,r)},createDecryptor:function(t,r){return this.Decryptor.create(t,r)},init:function(t,r){this._cipher=t,this._iv=r}}),v=u.CBC=function(){function t(t,e,i){var n=this._iv;if(n){var o=n;this._iv=r}else var o=this._prevBlock;for(var s=0;s<i;s++)t[e+s]^=o[s]}var e=d.extend();return e.Encryptor=e.extend({processBlock:function(r,e){var i=this._cipher,n=i.blockSize;t.call(this,r,e,n),i.encryptBlock(r,e),this._prevBlock=r.slice(e,e+n)}}),e.Decryptor=e.extend({processBlock:function(r,e){var i=this._cipher,n=i.blockSize,o=r.slice(e,e+n);i.decryptBlock(r,e),t.call(this,r,e,n),this._prevBlock=o}}),e}(),p=e.pad={},_=p.Pkcs7={pad:function(t,r){for(var e=4*r,i=e-t.sigBytes%e,n=i<<24|i<<16|i<<8|i,s=[],a=0;a<i;a+=4)s.push(n);var c=o.create(s,i);t.concat(c)},unpad:function(t){var r=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=r}},y=(i.BlockCipher=f.extend({cfg:f.cfg.extend({mode:v,padding:_}),reset:function(){f.reset.call(this);var t=this.cfg,r=t.iv,e=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var i=e.createEncryptor;else{var i=e.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==i?this._mode.init(this,r&&r.words):(this._mode=i.call(e,this,r&&r.words),this._mode.__creator=i)},_doProcessBlock:function(t,r){this._mode.processBlock(t,r)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var r=this._process(!0)}else{var r=this._process(!0);t.unpad(r)}return r},blockSize:4}),i.CipherParams=n.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),g=e.format={},B=g.OpenSSL={stringify:function(t){var r=t.ciphertext,e=t.salt;if(e)var i=o.create([1398893684,1701076831]).concat(e).concat(r);else var i=r;return i.toString(c)},parse:function(t){var r=c.parse(t),e=r.words;if(1398893684==e[0]&&1701076831==e[1]){var i=o.create(e.slice(2,4));e.splice(0,4),r.sigBytes-=16}return y.create({ciphertext:r,salt:i})}},w=i.SerializableCipher=n.extend({cfg:n.extend({format:B}),encrypt:function(t,r,e,i){i=this.cfg.extend(i);var n=t.createEncryptor(e,i),o=n.finalize(r),s=n.cfg;return y.create({ciphertext:o,key:e,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,r,e,i){i=this.cfg.extend(i),r=this._parse(r,i.format);var n=t.createDecryptor(e,i).finalize(r.ciphertext);return n},_parse:function(t,r){return"string"==typeof t?r.parse(t,this):t}}),k=e.kdf={},S=k.OpenSSL={execute:function(t,r,e,i){i||(i=o.random(8));var n=l.create({keySize:r+e}).compute(t,i),s=o.create(n.words.slice(r),4*e);return n.sigBytes=4*r,y.create({key:n,iv:s,salt:i})}},m=i.PasswordBasedCipher=w.extend({cfg:w.cfg.extend({kdf:S}),encrypt:function(t,r,e,i){i=this.cfg.extend(i);var n=i.kdf.execute(e,t.keySize,t.ivSize);i.iv=n.iv;var o=w.encrypt.call(this,t,r,n.key,i);return o.mixIn(n),o},decrypt:function(t,r,e,i){i=this.cfg.extend(i),r=this._parse(r,i.format);var n=i.kdf.execute(e,t.keySize,t.ivSize,r.salt);i.iv=n.iv;var o=w.decrypt.call(this,t,r,n.key,i);return o}})}(),t.mode.CFB=function(){function r(t,r,e,i){var n=this._iv;if(n){var o=n.slice(0);this._iv=void 0}else var o=this._prevBlock;i.encryptBlock(o,0);for(var s=0;s<e;s++)t[r+s]^=o[s]}var e=t.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize;r.call(this,t,e,n,i),this._prevBlock=t.slice(e,e+n)}}),e.Decryptor=e.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize,o=t.slice(e,e+n);r.call(this,t,e,n,i),this._prevBlock=o}}),e}(),t.mode.ECB=function(){var r=t.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(t,r){this._cipher.encryptBlock(t,r)}}),r.Decryptor=r.extend({processBlock:function(t,r){this._cipher.decryptBlock(t,r)}}),r}(),t.pad.AnsiX923={pad:function(t,r){var e=t.sigBytes,i=4*r,n=i-e%i,o=e+n-1;t.clamp(),t.words[o>>>2]|=n<<24-o%4*8,t.sigBytes+=n},unpad:function(t){var r=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=r}},t.pad.Iso10126={pad:function(r,e){var i=4*e,n=i-r.sigBytes%i;r.concat(t.lib.WordArray.random(n-1)).concat(t.lib.WordArray.create([n<<24],1))},unpad:function(t){var r=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=r}},t.pad.Iso97971={pad:function(r,e){r.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(r,e)},unpad:function(r){t.pad.ZeroPadding.unpad(r),r.sigBytes--}},t.mode.OFB=function(){var r=t.lib.BlockCipherMode.extend(),e=r.Encryptor=r.extend({processBlock:function(t,r){var e=this._cipher,i=e.blockSize,n=this._iv,o=this._keystream;n&&(o=this._keystream=n.slice(0),this._iv=void 0),e.encryptBlock(o,0);for(var s=0;s<i;s++)t[r+s]^=o[s]}});return r.Decryptor=e,r}(),t.pad.NoPadding={pad:function(){},unpad:function(){}},function(r){var e=t,i=e.lib,n=i.CipherParams,o=e.enc,s=o.Hex,a=e.format;a.Hex={stringify:function(t){return t.ciphertext.toString(s)},parse:function(t){var r=s.parse(t);return n.create({ciphertext:r})}}}(),function(){var r=t,e=r.lib,i=e.BlockCipher,n=r.algo,o=[],s=[],a=[],c=[],h=[],l=[],f=[],u=[],d=[],v=[];!function(){for(var t=[],r=0;r<256;r++)r<128?t[r]=r<<1:t[r]=r<<1^283;for(var e=0,i=0,r=0;r<256;r++){var n=i^i<<1^i<<2^i<<3^i<<4;n=n>>>8^255&n^99,o[e]=n,s[n]=e;var p=t[e],_=t[p],y=t[_],g=257*t[n]^16843008*n;a[e]=g<<24|g>>>8,c[e]=g<<16|g>>>16,h[e]=g<<8|g>>>24,l[e]=g;var g=16843009*y^65537*_^257*p^16843008*e;f[n]=g<<24|g>>>8,u[n]=g<<16|g>>>16,d[n]=g<<8|g>>>24,v[n]=g,e?(e=p^t[t[t[y^p]]],i^=t[t[i]]):e=i=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],_=n.AES=i.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,r=t.words,e=t.sigBytes/4,i=this._nRounds=e+6,n=4*(i+1),s=this._keySchedule=[],a=0;a<n;a++)if(a<e)s[a]=r[a];else{var c=s[a-1];a%e?e>6&&a%e==4&&(c=o[c>>>24]<<24|o[c>>>16&255]<<16|o[c>>>8&255]<<8|o[255&c]):(c=c<<8|c>>>24,c=o[c>>>24]<<24|o[c>>>16&255]<<16|o[c>>>8&255]<<8|o[255&c],c^=p[a/e|0]<<24),s[a]=s[a-e]^c}for(var h=this._invKeySchedule=[],l=0;l<n;l++){var a=n-l;if(l%4)var c=s[a];else var c=s[a-4];l<4||a<=4?h[l]=c:h[l]=f[o[c>>>24]]^u[o[c>>>16&255]]^d[o[c>>>8&255]]^v[o[255&c]]}}},encryptBlock:function(t,r){this._doCryptBlock(t,r,this._keySchedule,a,c,h,l,o)},decryptBlock:function(t,r){var e=t[r+1];t[r+1]=t[r+3],t[r+3]=e,this._doCryptBlock(t,r,this._invKeySchedule,f,u,d,v,s);var e=t[r+1];t[r+1]=t[r+3],t[r+3]=e},_doCryptBlock:function(t,r,e,i,n,o,s,a){for(var c=this._nRounds,h=t[r]^e[0],l=t[r+1]^e[1],f=t[r+2]^e[2],u=t[r+3]^e[3],d=4,v=1;v<c;v++){var p=i[h>>>24]^n[l>>>16&255]^o[f>>>8&255]^s[255&u]^e[d++],_=i[l>>>24]^n[f>>>16&255]^o[u>>>8&255]^s[255&h]^e[d++],y=i[f>>>24]^n[u>>>16&255]^o[h>>>8&255]^s[255&l]^e[d++],g=i[u>>>24]^n[h>>>16&255]^o[l>>>8&255]^s[255&f]^e[d++];h=p,l=_,f=y,u=g}var p=(a[h>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&u])^e[d++],_=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[u>>>8&255]<<8|a[255&h])^e[d++],y=(a[f>>>24]<<24|a[u>>>16&255]<<16|a[h>>>8&255]<<8|a[255&l])^e[d++],g=(a[u>>>24]<<24|a[h>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^e[d++];t[r]=p,t[r+1]=_,t[r+2]=y,t[r+3]=g},keySize:8});r.AES=i._createHelper(_)}(),function(){function r(t,r){var e=(this._lBlock>>>t^this._rBlock)&r;this._rBlock^=e,this._lBlock^=e<<t}function e(t,r){var e=(this._rBlock>>>t^this._lBlock)&r;this._lBlock^=e,this._rBlock^=e<<t;
}var i=t,n=i.lib,o=n.WordArray,s=n.BlockCipher,a=i.algo,c=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],h=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],f=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=a.DES=s.extend({_doReset:function(){for(var t=this._key,r=t.words,e=[],i=0;i<56;i++){var n=c[i]-1;e[i]=r[n>>>5]>>>31-n%32&1}for(var o=this._subKeys=[],s=0;s<16;s++){for(var a=o[s]=[],f=l[s],i=0;i<24;i++)a[i/6|0]|=e[(h[i]-1+f)%28]<<31-i%6,a[4+(i/6|0)]|=e[28+(h[i+24]-1+f)%28]<<31-i%6;a[0]=a[0]<<1|a[0]>>>31;for(var i=1;i<7;i++)a[i]=a[i]>>>4*(i-1)+3;a[7]=a[7]<<5|a[7]>>>27}for(var u=this._invSubKeys=[],i=0;i<16;i++)u[i]=o[15-i]},encryptBlock:function(t,r){this._doCryptBlock(t,r,this._subKeys)},decryptBlock:function(t,r){this._doCryptBlock(t,r,this._invSubKeys)},_doCryptBlock:function(t,i,n){this._lBlock=t[i],this._rBlock=t[i+1],r.call(this,4,252645135),r.call(this,16,65535),e.call(this,2,858993459),e.call(this,8,16711935),r.call(this,1,1431655765);for(var o=0;o<16;o++){for(var s=n[o],a=this._lBlock,c=this._rBlock,h=0,l=0;l<8;l++)h|=f[l][((c^s[l])&u[l])>>>0];this._lBlock=c,this._rBlock=a^h}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,r.call(this,1,1431655765),e.call(this,8,16711935),e.call(this,2,858993459),r.call(this,16,65535),r.call(this,4,252645135),t[i]=this._lBlock,t[i+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});i.DES=s._createHelper(d);var v=a.TripleDES=s.extend({_doReset:function(){var t=this._key,r=t.words;this._des1=d.createEncryptor(o.create(r.slice(0,2))),this._des2=d.createEncryptor(o.create(r.slice(2,4))),this._des3=d.createEncryptor(o.create(r.slice(4,6)))},encryptBlock:function(t,r){this._des1.encryptBlock(t,r),this._des2.decryptBlock(t,r),this._des3.encryptBlock(t,r)},decryptBlock:function(t,r){this._des3.decryptBlock(t,r),this._des2.encryptBlock(t,r),this._des1.decryptBlock(t,r)},keySize:6,ivSize:2,blockSize:2});i.TripleDES=s._createHelper(v)}(),function(){function r(){for(var t=this._S,r=this._i,e=this._j,i=0,n=0;n<4;n++){r=(r+1)%256,e=(e+t[r])%256;var o=t[r];t[r]=t[e],t[e]=o,i|=t[(t[r]+t[e])%256]<<24-8*n}return this._i=r,this._j=e,i}var e=t,i=e.lib,n=i.StreamCipher,o=e.algo,s=o.RC4=n.extend({_doReset:function(){for(var t=this._key,r=t.words,e=t.sigBytes,i=this._S=[],n=0;n<256;n++)i[n]=n;for(var n=0,o=0;n<256;n++){var s=n%e,a=r[s>>>2]>>>24-s%4*8&255;o=(o+i[n]+a)%256;var c=i[n];i[n]=i[o],i[o]=c}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=r.call(this)},keySize:8,ivSize:0});e.RC4=n._createHelper(s);var a=o.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)r.call(this)}});e.RC4Drop=n._createHelper(a)}(),t.mode.CTRGladman=function(){function r(t){if(255===(t>>24&255)){var r=t>>16&255,e=t>>8&255,i=255&t;255===r?(r=0,255===e?(e=0,255===i?i=0:++i):++e):++r,t=0,t+=r<<16,t+=e<<8,t+=i}else t+=1<<24;return t}function e(t){return 0===(t[0]=r(t[0]))&&(t[1]=r(t[1])),t}var i=t.lib.BlockCipherMode.extend(),n=i.Encryptor=i.extend({processBlock:function(t,r){var i=this._cipher,n=i.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),e(s);var a=s.slice(0);i.encryptBlock(a,0);for(var c=0;c<n;c++)t[r+c]^=a[c]}});return i.Decryptor=n,i}(),function(){function r(){for(var t=this._X,r=this._C,e=0;e<8;e++)a[e]=r[e];r[0]=r[0]+1295307597+this._b|0,r[1]=r[1]+3545052371+(r[0]>>>0<a[0]>>>0?1:0)|0,r[2]=r[2]+886263092+(r[1]>>>0<a[1]>>>0?1:0)|0,r[3]=r[3]+1295307597+(r[2]>>>0<a[2]>>>0?1:0)|0,r[4]=r[4]+3545052371+(r[3]>>>0<a[3]>>>0?1:0)|0,r[5]=r[5]+886263092+(r[4]>>>0<a[4]>>>0?1:0)|0,r[6]=r[6]+1295307597+(r[5]>>>0<a[5]>>>0?1:0)|0,r[7]=r[7]+3545052371+(r[6]>>>0<a[6]>>>0?1:0)|0,this._b=r[7]>>>0<a[7]>>>0?1:0;for(var e=0;e<8;e++){var i=t[e]+r[e],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,h=((4294901760&i)*i|0)+((65535&i)*i|0);c[e]=s^h}t[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,t[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,t[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,t[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,t[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,t[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,t[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,t[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var e=t,i=e.lib,n=i.StreamCipher,o=e.algo,s=[],a=[],c=[],h=o.Rabbit=n.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,i=0;i<4;i++)t[i]=16711935&(t[i]<<8|t[i]>>>24)|4278255360&(t[i]<<24|t[i]>>>8);var n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],o=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)r.call(this);for(var i=0;i<8;i++)o[i]^=n[i+4&7];if(e){var s=e.words,a=s[0],c=s[1],h=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),f=h>>>16|4294901760&l,u=l<<16|65535&h;o[0]^=h,o[1]^=f,o[2]^=l,o[3]^=u,o[4]^=h,o[5]^=f,o[6]^=l,o[7]^=u;for(var i=0;i<4;i++)r.call(this)}},_doProcessBlock:function(t,e){var i=this._X;r.call(this),s[0]=i[0]^i[5]>>>16^i[3]<<16,s[1]=i[2]^i[7]>>>16^i[5]<<16,s[2]=i[4]^i[1]>>>16^i[7]<<16,s[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)s[n]=16711935&(s[n]<<8|s[n]>>>24)|4278255360&(s[n]<<24|s[n]>>>8),t[e+n]^=s[n]},blockSize:4,ivSize:2});e.Rabbit=n._createHelper(h)}(),t.mode.CTR=function(){var r=t.lib.BlockCipherMode.extend(),e=r.Encryptor=r.extend({processBlock:function(t,r){var e=this._cipher,i=e.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=void 0);var s=o.slice(0);e.encryptBlock(s,0),o[i-1]=o[i-1]+1|0;for(var a=0;a<i;a++)t[r+a]^=s[a]}});return r.Decryptor=e,r}(),function(){function r(){for(var t=this._X,r=this._C,e=0;e<8;e++)a[e]=r[e];r[0]=r[0]+1295307597+this._b|0,r[1]=r[1]+3545052371+(r[0]>>>0<a[0]>>>0?1:0)|0,r[2]=r[2]+886263092+(r[1]>>>0<a[1]>>>0?1:0)|0,r[3]=r[3]+1295307597+(r[2]>>>0<a[2]>>>0?1:0)|0,r[4]=r[4]+3545052371+(r[3]>>>0<a[3]>>>0?1:0)|0,r[5]=r[5]+886263092+(r[4]>>>0<a[4]>>>0?1:0)|0,r[6]=r[6]+1295307597+(r[5]>>>0<a[5]>>>0?1:0)|0,r[7]=r[7]+3545052371+(r[6]>>>0<a[6]>>>0?1:0)|0,this._b=r[7]>>>0<a[7]>>>0?1:0;for(var e=0;e<8;e++){var i=t[e]+r[e],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,h=((4294901760&i)*i|0)+((65535&i)*i|0);c[e]=s^h}t[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,t[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,t[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,t[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,t[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,t[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,t[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,t[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var e=t,i=e.lib,n=i.StreamCipher,o=e.algo,s=[],a=[],c=[],h=o.RabbitLegacy=n.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var o=0;o<4;o++)r.call(this);for(var o=0;o<8;o++)n[o]^=i[o+4&7];if(e){var s=e.words,a=s[0],c=s[1],h=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),f=h>>>16|4294901760&l,u=l<<16|65535&h;n[0]^=h,n[1]^=f,n[2]^=l,n[3]^=u,n[4]^=h,n[5]^=f,n[6]^=l,n[7]^=u;for(var o=0;o<4;o++)r.call(this)}},_doProcessBlock:function(t,e){var i=this._X;r.call(this),s[0]=i[0]^i[5]>>>16^i[3]<<16,s[1]=i[2]^i[7]>>>16^i[5]<<16,s[2]=i[4]^i[1]>>>16^i[7]<<16,s[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)s[n]=16711935&(s[n]<<8|s[n]>>>24)|4278255360&(s[n]<<24|s[n]>>>8),t[e+n]^=s[n]},blockSize:4,ivSize:2});e.RabbitLegacy=n._createHelper(h)}(),t.pad.ZeroPadding={pad:function(t,r){var e=4*r;t.clamp(),t.sigBytes+=e-(t.sigBytes%e||e)},unpad:function(t){for(var r=t.words,e=t.sigBytes-1;!(r[e>>>2]>>>24-e%4*8&255);)e--;t.sigBytes=e+1}},t});
//# sourceMappingURL=crypto-js.min.js.map
\ No newline at end of file
const config = require('./../../config');
const CryptoJS = require('./crypto-js.min');
const Encrypt = require('./jsencrypt.min');
var rsa = new Encrypt.JSEncrypt();
function makeEncrypt(param) {
let key = config.NET_CONFIG.RSA_PUBLIC_KEY; // 公钥
let iv = config.NET_CONFIG.AES_IV; // 偏移量
rsa.setPublicKey(key);
let chars = "0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z".split(",");
function randomAesKey() {
let res = "";
for (let i = 0; i < 16; i++) {
let id = Math.ceil(Math.random() * (chars.length - 1));
res += chars[id];
}
1
return res;
};
function encryptContent(obj) {
let aesKey = randomAesKey();
let key = CryptoJS.enc.Utf8.parse(aesKey);
let ivR = CryptoJS.enc.Utf8.parse(iv);
var encrypted = CryptoJS.AES.encrypt(JSON.stringify(obj), key, {
iv: ivR,
mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.Pkcs7
});
let content = encrypted.toString(); //返回的是base64格式的密文
let securityKey = rsa.encrypt(aesKey);
let result = {
k: securityKey,
v: content
};
return result;
};
let data = encryptContent(param)
return data;
}
module.exports = {
makeEncrypt
}
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.JSEncrypt={})}(this,function(t){"use strict";var e="0123456789abcdefghijklmnopqrstuvwxyz";function a(t){return e.charAt(t)}function i(t,e){return t&e}function u(t,e){return t|e}function r(t,e){return t^e}function n(t,e){return t&~e}function s(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function o(t){for(var e=0;0!=t;)t&=t-1,++e;return e}var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function c(t){var e,i,r="";for(e=0;e+3<=t.length;e+=3)i=parseInt(t.substring(e,e+3),16),r+=h.charAt(i>>6)+h.charAt(63&i);for(e+1==t.length?(i=parseInt(t.substring(e,e+1),16),r+=h.charAt(i<<2)):e+2==t.length&&(i=parseInt(t.substring(e,e+2),16),r+=h.charAt(i>>2)+h.charAt((3&i)<<4));0<(3&r.length);)r+="=";return r}function f(t){var e,i="",r=0,n=0;for(e=0;e<t.length&&"="!=t.charAt(e);++e){var s=h.indexOf(t.charAt(e));s<0||(0==r?(i+=a(s>>2),n=3&s,r=1):1==r?(i+=a(n<<2|s>>4),n=15&s,r=2):2==r?(i+=a(n),i+=a(s>>2),n=3&s,r=3):(i+=a(n<<2|s>>4),i+=a(15&s),r=0))}return 1==r&&(i+=a(n<<2)),i}var l,p=function(t,e){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};var g,d=function(t){var e;if(void 0===l){var i="0123456789ABCDEF",r=" \f\n\r\t \u2028\u2029";for(l={},e=0;e<16;++e)l[i.charAt(e)]=e;for(i=i.toLowerCase(),e=10;e<16;++e)l[i.charAt(e)]=e;for(e=0;e<r.length;++e)l[r.charAt(e)]=-1}var n=[],s=0,o=0;for(e=0;e<t.length;++e){var h=t.charAt(e);if("="==h)break;if(-1!=(h=l[h])){if(void 0===h)throw new Error("Illegal character at offset "+e);s|=h,2<=++o?(n[n.length]=s,o=s=0):s<<=4}}if(o)throw new Error("Hex encoding incomplete: 4 bits missing");return n},v={decode:function(t){var e;if(void 0===g){var i="= \f\n\r\t \u2028\u2029";for(g=Object.create(null),e=0;e<64;++e)g["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(e=0;e<i.length;++e)g[i.charAt(e)]=-1}var r=[],n=0,s=0;for(e=0;e<t.length;++e){var o=t.charAt(e);if("="==o)break;if(-1!=(o=g[o])){if(void 0===o)throw new Error("Illegal character at offset "+e);n|=o,4<=++s?(r[r.length]=n>>16,r[r.length]=n>>8&255,r[r.length]=255&n,s=n=0):n<<=6}}switch(s){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:r[r.length]=n>>10;break;case 3:r[r.length]=n>>16,r[r.length]=n>>8&255}return r},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=v.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return v.decode(t)}},m=1e13,y=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var i,r,n=this.buf,s=n.length;for(i=0;i<s;++i)(r=n[i]*t+e)<m?e=0:r-=(e=0|r/m)*m,n[i]=r;0<e&&(n[i]=e)},t.prototype.sub=function(t){var e,i,r=this.buf,n=r.length;for(e=0;e<n;++e)(i=r[e]-t)<0?(i+=m,t=1):t=0,r[e]=i;for(;0===r[r.length-1];)r.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,i=e[e.length-1].toString(),r=e.length-2;0<=r;--r)i+=(m+e[r]).toString().substring(1);return i},t.prototype.valueOf=function(){for(var t=this.buf,e=0,i=t.length-1;0<=i;--i)e=e*m+t[i];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),b="…",T=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,S=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function E(t,e){return t.length>e&&(t=t.substring(0,e)+b),t}var w,D=function(){function i(t,e){this.hexDigits="0123456789ABCDEF",t instanceof i?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=e)}return i.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},i.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},i.prototype.hexDump=function(t,e,i){for(var r="",n=t;n<e;++n)if(r+=this.hexByte(this.get(n)),!0!==i)switch(15&n){case 7:r+=" ";break;case 15:r+="\n";break;default:r+=" "}return r},i.prototype.isASCII=function(t,e){for(var i=t;i<e;++i){var r=this.get(i);if(r<32||176<r)return!1}return!0},i.prototype.parseStringISO=function(t,e){for(var i="",r=t;r<e;++r)i+=String.fromCharCode(this.get(r));return i},i.prototype.parseStringUTF=function(t,e){for(var i="",r=t;r<e;){var n=this.get(r++);i+=n<128?String.fromCharCode(n):191<n&&n<224?String.fromCharCode((31&n)<<6|63&this.get(r++)):String.fromCharCode((15&n)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return i},i.prototype.parseStringBMP=function(t,e){for(var i,r,n="",s=t;s<e;)i=this.get(s++),r=this.get(s++),n+=String.fromCharCode(i<<8|r);return n},i.prototype.parseTime=function(t,e,i){var r=this.parseStringISO(t,e),n=(i?T:S).exec(r);return n?(i&&(n[1]=+n[1],n[1]+=+n[1]<70?2e3:1900),r=n[1]+"-"+n[2]+"-"+n[3]+" "+n[4],n[5]&&(r+=":"+n[5],n[6]&&(r+=":"+n[6],n[7]&&(r+="."+n[7]))),n[8]&&(r+=" UTC","Z"!=n[8]&&(r+=n[8],n[9]&&(r+=":"+n[9]))),r):"Unrecognized time: "+r},i.prototype.parseInteger=function(t,e){for(var i,r=this.get(t),n=127<r,s=n?255:0,o="";r==s&&++t<e;)r=this.get(t);if(0===(i=e-t))return n?-1:0;if(4<i){for(o=r,i<<=3;0==(128&(+o^s));)o=+o<<1,--i;o="("+i+" bit)\n"}n&&(r-=256);for(var h=new y(r),a=t+1;a<e;++a)h.mulAdd(256,this.get(a));return o+h.toString()},i.prototype.parseBitString=function(t,e,i){for(var r=this.get(t),n="("+((e-t-1<<3)-r)+" bit)\n",s="",o=t+1;o<e;++o){for(var h=this.get(o),a=o==e-1?r:0,u=7;a<=u;--u)s+=h>>u&1?"1":"0";if(s.length>i)return n+E(s,i)}return n+s},i.prototype.parseOctetString=function(t,e,i){if(this.isASCII(t,e))return E(this.parseStringISO(t,e),i);var r=e-t,n="("+r+" byte)\n";(i/=2)<r&&(e=t+i);for(var s=t;s<e;++s)n+=this.hexByte(this.get(s));return i<r&&(n+=b),n},i.prototype.parseOID=function(t,e,i){for(var r="",n=new y,s=0,o=t;o<e;++o){var h=this.get(o);if(n.mulAdd(128,127&h),s+=7,!(128&h)){if(""===r)if((n=n.simplify())instanceof y)n.sub(80),r="2."+n.toString();else{var a=n<80?n<40?0:1:2;r=a+"."+(n-40*a)}else r+="."+n.toString();if(r.length>i)return E(r,i);n=new y,s=0}}return 0<s&&(r+=".incomplete"),r},i}(),x=function(){function c(t,e,i,r,n){if(!(r instanceof R))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=i,this.tag=r,this.sub=n}return c.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},c.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),i=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+i,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+i);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+i,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+i,t);case 6:return this.stream.parseOID(e,e+i,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return E(this.stream.parseStringUTF(e,e+i),t);case 18:case 19:case 20:case 21:case 22:case 26:return E(this.stream.parseStringISO(e,e+i),t);case 30:return E(this.stream.parseStringBMP(e,e+i),t);case 23:case 24:return this.stream.parseTime(e,e+i,23==this.tag.tagNumber)}return null},c.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},c.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(0<=this.length&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var i=0,r=this.sub.length;i<r;++i)e+=this.sub[i].toPrettyString(t)}return e},c.prototype.posStart=function(){return this.stream.pos},c.prototype.posContent=function(){return this.stream.pos+this.header},c.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},c.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},c.decodeLength=function(t){var e=t.get(),i=127&e;if(i==e)return i;if(6<i)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===i)return null;for(var r=e=0;r<i;++r)e=256*e+t.get();return e},c.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,i=2*this.length;return t.substr(e,i)},c.decode=function(t){var r;r=t instanceof D?t:new D(t,0);var e=new D(r),i=new R(r),n=c.decodeLength(r),s=r.pos,o=s-e.pos,h=null,a=function(){var t=[];if(null!==n){for(var e=s+n;r.pos<e;)t[t.length]=c.decode(r);if(r.pos!=e)throw new Error("Content size is not correct for container starting at offset "+s)}else try{for(;;){var i=c.decode(r);if(i.tag.isEOC())break;t[t.length]=i}n=s-r.pos}catch(t){throw new Error("Exception while decoding undefined length content: "+t)}return t};if(i.tagConstructed)h=a();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=r.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");h=a();for(var u=0;u<h.length;++u)if(h[u].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(t){h=null}if(null===h){if(null===n)throw new Error("We can't skip over an invalid tag with undefined length at offset "+s);r.pos=s+Math.abs(n)}return new c(e,o,n,i,h)},c}(),R=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=0!=(32&e),this.tagNumber=31&e,31==this.tagNumber){for(var i=new y;e=t.get(),i.mulAdd(128,127&e),128&e;);this.tagNumber=i.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),B=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],A=(1<<26)/B[B.length-1],O=function(){function b(t,e,i){null!=t&&("number"==typeof t?this.fromNumber(t,e,i):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return b.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var i,r=(1<<e)-1,n=!1,s="",o=this.t,h=this.DB-o*this.DB%e;if(0<o--)for(h<this.DB&&0<(i=this[o]>>h)&&(n=!0,s=a(i));0<=o;)h<e?(i=(this[o]&(1<<h)-1)<<e-h,i|=this[--o]>>(h+=this.DB-e)):(i=this[o]>>(h-=e)&r,h<=0&&(h+=this.DB,--o)),0<i&&(n=!0),n&&(s+=a(i));return n?s:"0"},b.prototype.negate=function(){var t=M();return b.ZERO.subTo(this,t),t},b.prototype.abs=function(){return this.s<0?this.negate():this},b.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var i=this.t;if(0!=(e=i-t.t))return this.s<0?-e:e;for(;0<=--i;)if(0!=(e=this[i]-t[i]))return e;return 0},b.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+U(this[this.t-1]^this.s&this.DM)},b.prototype.mod=function(t){var e=M();return this.abs().divRemTo(t,null,e),this.s<0&&0<e.compareTo(b.ZERO)&&t.subTo(e,e),e},b.prototype.modPowInt=function(t,e){var i;return i=t<256||e.isEven()?new I(e):new N(e),this.exp(t,i)},b.prototype.clone=function(){var t=M();return this.copyTo(t),t},b.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},b.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},b.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},b.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},b.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var i,r=this.DB-t*this.DB%8,n=0;if(0<t--)for(r<this.DB&&(i=this[t]>>r)!=(this.s&this.DM)>>r&&(e[n++]=i|this.s<<this.DB-r);0<=t;)r<8?(i=(this[t]&(1<<r)-1)<<8-r,i|=this[--t]>>(r+=this.DB-8)):(i=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&i)&&(i|=-256),0==n&&(128&this.s)!=(128&i)&&++n,(0<n||i!=this.s)&&(e[n++]=i);return e},b.prototype.equals=function(t){return 0==this.compareTo(t)},b.prototype.min=function(t){return this.compareTo(t)<0?this:t},b.prototype.max=function(t){return 0<this.compareTo(t)?this:t},b.prototype.and=function(t){var e=M();return this.bitwiseTo(t,i,e),e},b.prototype.or=function(t){var e=M();return this.bitwiseTo(t,u,e),e},b.prototype.xor=function(t){var e=M();return this.bitwiseTo(t,r,e),e},b.prototype.andNot=function(t){var e=M();return this.bitwiseTo(t,n,e),e},b.prototype.not=function(){for(var t=M(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},b.prototype.shiftLeft=function(t){var e=M();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},b.prototype.shiftRight=function(t){var e=M();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},b.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+s(this[t]);return this.s<0?this.t*this.DB:-1},b.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,i=0;i<this.t;++i)t+=o(this[i]^e);return t},b.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},b.prototype.setBit=function(t){return this.changeBit(t,u)},b.prototype.clearBit=function(t){return this.changeBit(t,n)},b.prototype.flipBit=function(t){return this.changeBit(t,r)},b.prototype.add=function(t){var e=M();return this.addTo(t,e),e},b.prototype.subtract=function(t){var e=M();return this.subTo(t,e),e},b.prototype.multiply=function(t){var e=M();return this.multiplyTo(t,e),e},b.prototype.divide=function(t){var e=M();return this.divRemTo(t,e,null),e},b.prototype.remainder=function(t){var e=M();return this.divRemTo(t,null,e),e},b.prototype.divideAndRemainder=function(t){var e=M(),i=M();return this.divRemTo(t,e,i),[e,i]},b.prototype.modPow=function(t,e){var i,r,n=t.bitLength(),s=F(1);if(n<=0)return s;i=n<18?1:n<48?3:n<144?4:n<768?5:6,r=n<8?new I(e):e.isEven()?new P(e):new N(e);var o=[],h=3,a=i-1,u=(1<<i)-1;if(o[1]=r.convert(this),1<i){var c=M();for(r.sqrTo(o[1],c);h<=u;)o[h]=M(),r.mulTo(c,o[h-2],o[h]),h+=2}var f,l,p=t.t-1,g=!0,d=M();for(n=U(t[p])-1;0<=p;){for(a<=n?f=t[p]>>n-a&u:(f=(t[p]&(1<<n+1)-1)<<a-n,0<p&&(f|=t[p-1]>>this.DB+n-a)),h=i;0==(1&f);)f>>=1,--h;if((n-=h)<0&&(n+=this.DB,--p),g)o[f].copyTo(s),g=!1;else{for(;1<h;)r.sqrTo(s,d),r.sqrTo(d,s),h-=2;0<h?r.sqrTo(s,d):(l=s,s=d,d=l),r.mulTo(d,o[f],s)}for(;0<=p&&0==(t[p]&1<<n);)r.sqrTo(s,d),l=s,s=d,d=l,--n<0&&(n=this.DB-1,--p)}return r.revert(s)},b.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return b.ZERO;for(var i=t.clone(),r=this.clone(),n=F(1),s=F(0),o=F(0),h=F(1);0!=i.signum();){for(;i.isEven();)i.rShiftTo(1,i),e?(n.isEven()&&s.isEven()||(n.addTo(this,n),s.subTo(t,s)),n.rShiftTo(1,n)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;r.isEven();)r.rShiftTo(1,r),e?(o.isEven()&&h.isEven()||(o.addTo(this,o),h.subTo(t,h)),o.rShiftTo(1,o)):h.isEven()||h.subTo(t,h),h.rShiftTo(1,h);0<=i.compareTo(r)?(i.subTo(r,i),e&&n.subTo(o,n),s.subTo(h,s)):(r.subTo(i,r),e&&o.subTo(n,o),h.subTo(s,h))}return 0!=r.compareTo(b.ONE)?b.ZERO:0<=h.compareTo(t)?h.subtract(t):h.signum()<0?(h.addTo(t,h),h.signum()<0?h.add(t):h):h},b.prototype.pow=function(t){return this.exp(t,new V)},b.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(e.compareTo(i)<0){var r=e;e=i,i=r}var n=e.getLowestSetBit(),s=i.getLowestSetBit();if(s<0)return e;for(n<s&&(s=n),0<s&&(e.rShiftTo(s,e),i.rShiftTo(s,i));0<e.signum();)0<(n=e.getLowestSetBit())&&e.rShiftTo(n,e),0<(n=i.getLowestSetBit())&&i.rShiftTo(n,i),0<=e.compareTo(i)?(e.subTo(i,e),e.rShiftTo(1,e)):(i.subTo(e,i),i.rShiftTo(1,i));return 0<s&&i.lShiftTo(s,i),i},b.prototype.isProbablePrime=function(t){var e,i=this.abs();if(1==i.t&&i[0]<=B[B.length-1]){for(e=0;e<B.length;++e)if(i[0]==B[e])return!0;return!1}if(i.isEven())return!1;for(e=1;e<B.length;){for(var r=B[e],n=e+1;n<B.length&&r<A;)r*=B[n++];for(r=i.modInt(r);e<n;)if(r%B[e++]==0)return!1}return i.millerRabin(t)},b.prototype.copyTo=function(t){for(var e=this.t-1;0<=e;--e)t[e]=this[e];t.t=this.t,t.s=this.s},b.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,0<t?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},b.prototype.fromString=function(t,e){var i;if(16==e)i=4;else if(8==e)i=3;else if(256==e)i=8;else if(2==e)i=1;else if(32==e)i=5;else{if(4!=e)return void this.fromRadix(t,e);i=2}this.t=0,this.s=0;for(var r=t.length,n=!1,s=0;0<=--r;){var o=8==i?255&+t[r]:C(t,r);o<0?"-"==t.charAt(r)&&(n=!0):(n=!1,0==s?this[this.t++]=o:s+i>this.DB?(this[this.t-1]|=(o&(1<<this.DB-s)-1)<<s,this[this.t++]=o>>this.DB-s):this[this.t-1]|=o<<s,(s+=i)>=this.DB&&(s-=this.DB))}8==i&&0!=(128&+t[0])&&(this.s=-1,0<s&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),n&&b.ZERO.subTo(this,this)},b.prototype.clamp=function(){for(var t=this.s&this.DM;0<this.t&&this[this.t-1]==t;)--this.t},b.prototype.dlShiftTo=function(t,e){var i;for(i=this.t-1;0<=i;--i)e[i+t]=this[i];for(i=t-1;0<=i;--i)e[i]=0;e.t=this.t+t,e.s=this.s},b.prototype.drShiftTo=function(t,e){for(var i=t;i<this.t;++i)e[i-t]=this[i];e.t=Math.max(this.t-t,0),e.s=this.s},b.prototype.lShiftTo=function(t,e){for(var i=t%this.DB,r=this.DB-i,n=(1<<r)-1,s=Math.floor(t/this.DB),o=this.s<<i&this.DM,h=this.t-1;0<=h;--h)e[h+s+1]=this[h]>>r|o,o=(this[h]&n)<<i;for(h=s-1;0<=h;--h)e[h]=0;e[s]=o,e.t=this.t+s+1,e.s=this.s,e.clamp()},b.prototype.rShiftTo=function(t,e){e.s=this.s;var i=Math.floor(t/this.DB);if(i>=this.t)e.t=0;else{var r=t%this.DB,n=this.DB-r,s=(1<<r)-1;e[0]=this[i]>>r;for(var o=i+1;o<this.t;++o)e[o-i-1]|=(this[o]&s)<<n,e[o-i]=this[o]>>r;0<r&&(e[this.t-i-1]|=(this.s&s)<<n),e.t=this.t-i,e.clamp()}},b.prototype.subTo=function(t,e){for(var i=0,r=0,n=Math.min(t.t,this.t);i<n;)r+=this[i]-t[i],e[i++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;i<this.t;)r+=this[i],e[i++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;i<t.t;)r-=t[i],e[i++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[i++]=this.DV+r:0<r&&(e[i++]=r),e.t=i,e.clamp()},b.prototype.multiplyTo=function(t,e){var i=this.abs(),r=t.abs(),n=i.t;for(e.t=n+r.t;0<=--n;)e[n]=0;for(n=0;n<r.t;++n)e[n+i.t]=i.am(0,r[n],e,n,0,i.t);e.s=0,e.clamp(),this.s!=t.s&&b.ZERO.subTo(e,e)},b.prototype.squareTo=function(t){for(var e=this.abs(),i=t.t=2*e.t;0<=--i;)t[i]=0;for(i=0;i<e.t-1;++i){var r=e.am(i,e[i],t,2*i,0,1);(t[i+e.t]+=e.am(i+1,2*e[i],t,2*i+1,r,e.t-i-1))>=e.DV&&(t[i+e.t]-=e.DV,t[i+e.t+1]=1)}0<t.t&&(t[t.t-1]+=e.am(i,e[i],t,2*i,0,1)),t.s=0,t.clamp()},b.prototype.divRemTo=function(t,e,i){var r=t.abs();if(!(r.t<=0)){var n=this.abs();if(n.t<r.t)return null!=e&&e.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=M());var s=M(),o=this.s,h=t.s,a=this.DB-U(r[r.t-1]);0<a?(r.lShiftTo(a,s),n.lShiftTo(a,i)):(r.copyTo(s),n.copyTo(i));var u=s.t,c=s[u-1];if(0!=c){var f=c*(1<<this.F1)+(1<u?s[u-2]>>this.F2:0),l=this.FV/f,p=(1<<this.F1)/f,g=1<<this.F2,d=i.t,v=d-u,m=null==e?M():e;for(s.dlShiftTo(v,m),0<=i.compareTo(m)&&(i[i.t++]=1,i.subTo(m,i)),b.ONE.dlShiftTo(u,m),m.subTo(s,s);s.t<u;)s[s.t++]=0;for(;0<=--v;){var y=i[--d]==c?this.DM:Math.floor(i[d]*l+(i[d-1]+g)*p);if((i[d]+=s.am(0,y,i,v,0,u))<y)for(s.dlShiftTo(v,m),i.subTo(m,i);i[d]<--y;)i.subTo(m,i)}null!=e&&(i.drShiftTo(u,e),o!=h&&b.ZERO.subTo(e,e)),i.t=u,i.clamp(),0<a&&i.rShiftTo(a,i),o<0&&b.ZERO.subTo(i,i)}}},b.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return 0<(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)?this.DV-e:-e},b.prototype.isEven=function(){return 0==(0<this.t?1&this[0]:this.s)},b.prototype.exp=function(t,e){if(4294967295<t||t<1)return b.ONE;var i=M(),r=M(),n=e.convert(this),s=U(t)-1;for(n.copyTo(i);0<=--s;)if(e.sqrTo(i,r),0<(t&1<<s))e.mulTo(r,n,i);else{var o=i;i=r,r=o}return e.revert(i)},b.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},b.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||36<t)return"0";var e=this.chunkSize(t),i=Math.pow(t,e),r=F(i),n=M(),s=M(),o="";for(this.divRemTo(r,n,s);0<n.signum();)o=(i+s.intValue()).toString(t).substr(1)+o,n.divRemTo(r,n,s);return s.intValue().toString(t)+o},b.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var i=this.chunkSize(e),r=Math.pow(e,i),n=!1,s=0,o=0,h=0;h<t.length;++h){var a=C(t,h);a<0?"-"==t.charAt(h)&&0==this.signum()&&(n=!0):(o=e*o+a,++s>=i&&(this.dMultiply(r),this.dAddOffset(o,0),o=s=0))}0<s&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(o,0)),n&&b.ZERO.subTo(this,this)},b.prototype.fromNumber=function(t,e,i){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(b.ONE.shiftLeft(t-1),u,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(b.ONE.shiftLeft(t-1),this);else{var r=[],n=7&t;r.length=1+(t>>3),e.nextBytes(r),0<n?r[0]&=(1<<n)-1:r[0]=0,this.fromString(r,256)}},b.prototype.bitwiseTo=function(t,e,i){var r,n,s=Math.min(t.t,this.t);for(r=0;r<s;++r)i[r]=e(this[r],t[r]);if(t.t<this.t){for(n=t.s&this.DM,r=s;r<this.t;++r)i[r]=e(this[r],n);i.t=this.t}else{for(n=this.s&this.DM,r=s;r<t.t;++r)i[r]=e(n,t[r]);i.t=t.t}i.s=e(this.s,t.s),i.clamp()},b.prototype.changeBit=function(t,e){var i=b.ONE.shiftLeft(t);return this.bitwiseTo(i,e,i),i},b.prototype.addTo=function(t,e){for(var i=0,r=0,n=Math.min(t.t,this.t);i<n;)r+=this[i]+t[i],e[i++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;i<this.t;)r+=this[i],e[i++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;i<t.t;)r+=t[i],e[i++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,0<r?e[i++]=r:r<-1&&(e[i++]=this.DV+r),e.t=i,e.clamp()},b.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},b.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},b.prototype.multiplyLowerTo=function(t,e,i){var r=Math.min(this.t+t.t,e);for(i.s=0,i.t=r;0<r;)i[--r]=0;for(var n=i.t-this.t;r<n;++r)i[r+this.t]=this.am(0,t[r],i,r,0,this.t);for(n=Math.min(t.t,e);r<n;++r)this.am(0,t[r],i,r,0,e-r);i.clamp()},b.prototype.multiplyUpperTo=function(t,e,i){--e;var r=i.t=this.t+t.t-e;for(i.s=0;0<=--r;)i[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)i[this.t+r-e]=this.am(e-r,t[r],i,0,0,this.t+r-e);i.clamp(),i.drShiftTo(1,i)},b.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,i=this.s<0?t-1:0;if(0<this.t)if(0==e)i=this[0]%t;else for(var r=this.t-1;0<=r;--r)i=(e*i+this[r])%t;return i},b.prototype.millerRabin=function(t){var e=this.subtract(b.ONE),i=e.getLowestSetBit();if(i<=0)return!1;var r=e.shiftRight(i);B.length<(t=t+1>>1)&&(t=B.length);for(var n=M(),s=0;s<t;++s){n.fromInt(B[Math.floor(Math.random()*B.length)]);var o=n.modPow(r,this);if(0!=o.compareTo(b.ONE)&&0!=o.compareTo(e)){for(var h=1;h++<i&&0!=o.compareTo(e);)if(0==(o=o.modPowInt(2,this)).compareTo(b.ONE))return!1;if(0!=o.compareTo(e))return!1}}return!0},b.prototype.square=function(){var t=M();return this.squareTo(t),t},b.prototype.gcda=function(t,e){var i=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(i.compareTo(r)<0){var n=i;i=r,r=n}var s=i.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)e(i);else{s<o&&(o=s),0<o&&(i.rShiftTo(o,i),r.rShiftTo(o,r));var h=function(){0<(s=i.getLowestSetBit())&&i.rShiftTo(s,i),0<(s=r.getLowestSetBit())&&r.rShiftTo(s,r),0<=i.compareTo(r)?(i.subTo(r,i),i.rShiftTo(1,i)):(r.subTo(i,r),r.rShiftTo(1,r)),0<i.signum()?setTimeout(h,0):(0<o&&r.lShiftTo(o,r),setTimeout(function(){e(r)},0))};setTimeout(h,10)}},b.prototype.fromNumberAsync=function(t,e,i,r){if("number"==typeof e)if(t<2)this.fromInt(1);else{this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(b.ONE.shiftLeft(t-1),u,this),this.isEven()&&this.dAddOffset(1,0);var n=this,s=function(){n.dAddOffset(2,0),n.bitLength()>t&&n.subTo(b.ONE.shiftLeft(t-1),n),n.isProbablePrime(e)?setTimeout(function(){r()},0):setTimeout(s,0)};setTimeout(s,0)}else{var o=[],h=7&t;o.length=1+(t>>3),e.nextBytes(o),0<h?o[0]&=(1<<h)-1:o[0]=0,this.fromString(o,256)}},b}(),V=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),I=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||0<=t.compareTo(this.m)?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),N=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=M();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&0<e.compareTo(O.ZERO)&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=M();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var i=32767&t[e],r=i*this.mpl+((i*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[i=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[i]>=t.DV;)t[i]-=t.DV,t[++i]++}t.clamp(),t.drShiftTo(this.m.t,t),0<=t.compareTo(this.m)&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),P=function(){function t(t){this.m=t,this.r2=M(),this.q3=M(),O.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=M();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);0<=t.compareTo(this.m);)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function M(){return new O(null)}function q(t,e){return new O(t,e)}(O.prototype.am=function(t,e,i,r,n,s){for(var o=16383&e,h=e>>14;0<=--s;){var a=16383&this[t],u=this[t++]>>14,c=h*a+u*o;n=((a=o*a+((16383&c)<<14)+i[r]+n)>>28)+(c>>14)+h*u,i[r++]=268435455&a}return n},w=28),O.prototype.DB=w,O.prototype.DM=(1<<w)-1,O.prototype.DV=1<<w;O.prototype.FV=Math.pow(2,52),O.prototype.F1=52-w,O.prototype.F2=2*w-52;var j,L,H=[];for(j="0".charCodeAt(0),L=0;L<=9;++L)H[j++]=L;for(j="a".charCodeAt(0),L=10;L<36;++L)H[j++]=L;for(j="A".charCodeAt(0),L=10;L<36;++L)H[j++]=L;function C(t,e){var i=H[t.charCodeAt(e)];return null==i?-1:i}function F(t){var e=M();return e.fromInt(t),e}function U(t){var e,i=1;return 0!=(e=t>>>16)&&(t=e,i+=16),0!=(e=t>>8)&&(t=e,i+=8),0!=(e=t>>4)&&(t=e,i+=4),0!=(e=t>>2)&&(t=e,i+=2),0!=(e=t>>1)&&(t=e,i+=1),i}O.ZERO=F(0),O.ONE=F(1);var K=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,i,r;for(e=0;e<256;++e)this.S[e]=e;for(e=i=0;e<256;++e)i=i+this.S[e]+t[e%t.length]&255,r=this.S[e],this.S[e]=this.S[i],this.S[i]=r;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}();var k,_,z=256,Z=null;if(null==Z){Z=[];var G=void(_=0);var grm = function (array) { for (var i = 0, l = array.length; i < l; i++) { array[i] = Math.floor(Math.random() * 256); } return array; }; var z = new Uint32Array(256);grm(z);var Y=function(t){if(this.count=this.count||0,256<=this.count||z<=_)return;try{var e=t.x+t.y;Z[_++]=255&e,this.count+=1}catch(t){}};}function J(){if(null==k){for(k=new K;_<z;){var t=Math.floor(65536*Math.random());Z[_++]=255&t}for(k.init(Z),_=0;_<Z.length;++_)Z[_]=0;_=0}return k.next()}var X=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=J()},t}();var Q=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),i=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(i)<0;)e=e.add(this.p);return e.subtract(i).multiply(this.coeff).mod(this.p).multiply(this.q).add(i)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&0<t.length&&0<e.length?(this.n=q(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=function(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var i=[],r=t.length-1;0<=r&&0<e;){var n=t.charCodeAt(r--);n<128?i[--e]=n:127<n&&n<2048?(i[--e]=63&n|128,i[--e]=n>>6|192):(i[--e]=63&n|128,i[--e]=n>>6&63|128,i[--e]=n>>12|224)}i[--e]=0;for(var s=new X,o=[];2<e;){for(o[0]=0;0==o[0];)s.nextBytes(o);i[--e]=o[0]}return i[--e]=2,i[--e]=0,new O(i)}(t,this.n.bitLength()+7>>3);if(null==e)return null;var i=this.doPublic(e);if(null==i)return null;var r=i.toString(16);return 0==(1&r.length)?r:"0"+r},t.prototype.setPrivate=function(t,e,i){null!=t&&null!=e&&0<t.length&&0<e.length?(this.n=q(t,16),this.e=parseInt(e,16),this.d=q(i,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,i,r,n,s,o,h){null!=t&&null!=e&&0<t.length&&0<e.length?(this.n=q(t,16),this.e=parseInt(e,16),this.d=q(i,16),this.p=q(r,16),this.q=q(n,16),this.dmp1=q(s,16),this.dmq1=q(o,16),this.coeff=q(h,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var i=new X,r=t>>1;this.e=parseInt(e,16);for(var n=new O(e,16);;){for(;this.p=new O(t-r,1,i),0!=this.p.subtract(O.ONE).gcd(n).compareTo(O.ONE)||!this.p.isProbablePrime(10););for(;this.q=new O(r,1,i),0!=this.q.subtract(O.ONE).gcd(n).compareTo(O.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q,this.q=s}var o=this.p.subtract(O.ONE),h=this.q.subtract(O.ONE),a=o.multiply(h);if(0==a.gcd(n).compareTo(O.ONE)){this.n=this.p.multiply(this.q),this.d=n.modInverse(a),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(h),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=q(t,16),i=this.doPrivate(e);return null==i?null:function(t,e){var i=t.toByteArray(),r=0;for(;r<i.length&&0==i[r];)++r;if(i.length-r!=e-1||2!=i[r])return null;++r;for(;0!=i[r];)if(++r>=i.length)return null;var n="";for(;++r<i.length;){var s=255&i[r];s<128?n+=String.fromCharCode(s):191<s&&s<224?(n+=String.fromCharCode((31&s)<<6|63&i[r+1]),++r):(n+=String.fromCharCode((15&s)<<12|(63&i[r+1])<<6|63&i[r+2]),r+=2)}return n}(i,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,n){var s=new X,o=t>>1;this.e=parseInt(e,16);var h=new O(e,16),a=this,u=function(){var e=function(){if(a.p.compareTo(a.q)<=0){var t=a.p;a.p=a.q,a.q=t}var e=a.p.subtract(O.ONE),i=a.q.subtract(O.ONE),r=e.multiply(i);0==r.gcd(h).compareTo(O.ONE)?(a.n=a.p.multiply(a.q),a.d=h.modInverse(r),a.dmp1=a.d.mod(e),a.dmq1=a.d.mod(i),a.coeff=a.q.modInverse(a.p),setTimeout(function(){n()},0)):setTimeout(u,0)},i=function(){a.q=M(),a.q.fromNumberAsync(o,1,s,function(){a.q.subtract(O.ONE).gcda(h,function(t){0==t.compareTo(O.ONE)&&a.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(i,0)})})},r=function(){a.p=M(),a.p.fromNumberAsync(t-o,1,s,function(){a.p.subtract(O.ONE).gcda(h,function(t){0==t.compareTo(O.ONE)&&a.p.isProbablePrime(10)?setTimeout(i,0):setTimeout(r,0)})})};setTimeout(r,0)};setTimeout(u,0)},t.prototype.sign=function(t,e,i){var r=function(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var i=e-t.length-6,r="",n=0;n<i;n+=2)r+="ff";return q("0001"+r+"00"+t,16)}((W[i]||"")+e(t).toString(),this.n.bitLength()/4);if(null==r)return null;var n=this.doPrivate(r);if(null==n)return null;var s=n.toString(16);return 0==(1&s.length)?s:"0"+s},t.prototype.verify=function(t,e,i){var r=q(e,16),n=this.doPublic(r);return null==n?null:function(t){for(var e in W)if(W.hasOwnProperty(e)){var i=W[e],r=i.length;if(t.substr(0,r)==i)return t.substr(r)}return t}(n.toString(16).replace(/^1f+00/,""))==i(t).toString()},t}();var W={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};var tt={};tt.lang={extend:function(t,e,i){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var r=function(){};if(r.prototype=e.prototype,t.prototype=new r,(t.prototype.constructor=t).superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),i){var n;for(n in i)t.prototype[n]=i[n];var s=function(){},o=["toString","valueOf"];s(t.prototype,i)}}};var et={};void 0!==et.asn1&&et.asn1||(et.asn1={}),et.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var i=e.substr(1).length;i%2==1?i+=1:e.match(/^[0-7]/)||(i+=2);for(var r="",n=0;n<i;n++)r+="f";e=new O(r,16).xor(t).add(O.ONE).toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=et.asn1,i=e.DERBoolean,r=e.DERInteger,n=e.DERBitString,s=e.DEROctetString,o=e.DERNull,h=e.DERObjectIdentifier,a=e.DEREnumerated,u=e.DERUTF8String,c=e.DERNumericString,f=e.DERPrintableString,l=e.DERTeletexString,p=e.DERIA5String,g=e.DERUTCTime,d=e.DERGeneralizedTime,v=e.DERSequence,m=e.DERSet,y=e.DERTaggedObject,b=e.ASN1Util.newObject,T=Object.keys(t);if(1!=T.length)throw"key of param shall be only one.";var S=T[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+S+":"))throw"undefined key: "+S;if("bool"==S)return new i(t[S]);if("int"==S)return new r(t[S]);if("bitstr"==S)return new n(t[S]);if("octstr"==S)return new s(t[S]);if("null"==S)return new o(t[S]);if("oid"==S)return new h(t[S]);if("enum"==S)return new a(t[S]);if("utf8str"==S)return new u(t[S]);if("numstr"==S)return new c(t[S]);if("prnstr"==S)return new f(t[S]);if("telstr"==S)return new l(t[S]);if("ia5str"==S)return new p(t[S]);if("utctime"==S)return new g(t[S]);if("gentime"==S)return new d(t[S]);if("seq"==S){for(var E=t[S],w=[],D=0;D<E.length;D++){var x=b(E[D]);w.push(x)}return new v({array:w})}if("set"==S){for(E=t[S],w=[],D=0;D<E.length;D++){x=b(E[D]);w.push(x)}return new m({array:w})}if("tag"==S){var R=t[S];if("[object Array]"===Object.prototype.toString.call(R)&&3==R.length){var B=b(R[2]);return new y({tag:R[0],explicit:R[1],obj:B})}var A={};if(void 0!==R.explicit&&(A.explicit=R.explicit),void 0!==R.tag&&(A.tag=R.tag),void 0===R.obj)throw"obj shall be specified for 'tag'.";return A.obj=b(R.obj),new y(A)}},this.jsonToASN1HEX=function(t){return this.newObject(t).getEncodedHex()}},et.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",i=parseInt(t.substr(0,2),16),r=(e=Math.floor(i/40)+"."+i%40,""),n=2;n<t.length;n+=2){var s=("00000000"+parseInt(t.substr(n,2),16).toString(2)).slice(-8);if(r+=s.substr(1,7),"0"==s.substr(0,1))e=e+"."+new O(r,2).toString(10),r=""}return e},et.asn1.ASN1Util.oidIntToHex=function(t){var h=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},e=function(t){var e="",i=new O(t,10).toString(2),r=7-i.length%7;7==r&&(r=0);for(var n="",s=0;s<r;s++)n+="0";i=n+i;for(s=0;s<i.length-1;s+=7){var o=i.substr(s,7);s!=i.length-7&&(o="1"+o),e+=h(parseInt(o,2))}return e};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var i="",r=t.split("."),n=40*parseInt(r[0])+parseInt(r[1]);i+=h(n),r.splice(0,2);for(var s=0;s<r.length;s++)i+=e(r[s]);return i},et.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+"".length+",v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var i=e.length/2;if(15<i)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+i).toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},et.asn1.DERAbstractString=function(t){et.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},tt.lang.extend(et.asn1.DERAbstractString,et.asn1.ASN1Object),et.asn1.DERAbstractTime=function(t){et.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,i){var r=this.zeroPadding,n=this.localDateToUTC(t),s=String(n.getFullYear());"utc"==e&&(s=s.substr(2,2));var o=s+r(String(n.getMonth()+1),2)+r(String(n.getDate()),2)+r(String(n.getHours()),2)+r(String(n.getMinutes()),2)+r(String(n.getSeconds()),2);if(!0===i){var h=n.getMilliseconds();if(0!=h){var a=r(String(h),3);o=o+"."+(a=a.replace(/[0]+$/,""))}}return o+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,i,r,n,s){var o=new Date(Date.UTC(t,e-1,i,r,n,s,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},tt.lang.extend(et.asn1.DERAbstractTime,et.asn1.ASN1Object),et.asn1.DERAbstractStructured=function(t){et.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},tt.lang.extend(et.asn1.DERAbstractStructured,et.asn1.ASN1Object),et.asn1.DERBoolean=function(){et.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},tt.lang.extend(et.asn1.DERBoolean,et.asn1.ASN1Object),et.asn1.DERInteger=function(t){et.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=et.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new O(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},tt.lang.extend(et.asn1.DERInteger,et.asn1.ASN1Object),et.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=et.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}et.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var i="0"+t;this.hTLV=null,this.isModified=!0,this.hV=i+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var i=0;i<=e;i++)t+="0";var r="";for(i=0;i<t.length-1;i+=8){var n=t.substr(i,8),s=parseInt(n,2).toString(16);1==s.length&&(s="0"+s),r+=s}this.hTLV=null,this.isModified=!0,this.hV="0"+e+r},this.setByBooleanArray=function(t){for(var e="",i=0;i<t.length;i++)1==t[i]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},tt.lang.extend(et.asn1.DERBitString,et.asn1.ASN1Object),et.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=et.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}et.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},tt.lang.extend(et.asn1.DEROctetString,et.asn1.DERAbstractString),et.asn1.DERNull=function(){et.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},tt.lang.extend(et.asn1.DERNull,et.asn1.ASN1Object),et.asn1.DERObjectIdentifier=function(t){var h=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},s=function(t){var e="",i=new O(t,10).toString(2),r=7-i.length%7;7==r&&(r=0);for(var n="",s=0;s<r;s++)n+="0";i=n+i;for(s=0;s<i.length-1;s+=7){var o=i.substr(s,7);s!=i.length-7&&(o="1"+o),e+=h(parseInt(o,2))}return e};et.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var e="",i=t.split("."),r=40*parseInt(i[0])+parseInt(i[1]);e+=h(r),i.splice(0,2);for(var n=0;n<i.length;n++)e+=s(i[n]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueName=function(t){var e=et.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},tt.lang.extend(et.asn1.DERObjectIdentifier,et.asn1.ASN1Object),et.asn1.DEREnumerated=function(t){et.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=et.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new O(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},tt.lang.extend(et.asn1.DEREnumerated,et.asn1.ASN1Object),et.asn1.DERUTF8String=function(t){et.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},tt.lang.extend(et.asn1.DERUTF8String,et.asn1.DERAbstractString),et.asn1.DERNumericString=function(t){et.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},tt.lang.extend(et.asn1.DERNumericString,et.asn1.DERAbstractString),et.asn1.DERPrintableString=function(t){et.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},tt.lang.extend(et.asn1.DERPrintableString,et.asn1.DERAbstractString),et.asn1.DERTeletexString=function(t){et.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},tt.lang.extend(et.asn1.DERTeletexString,et.asn1.DERAbstractString),et.asn1.DERIA5String=function(t){et.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},tt.lang.extend(et.asn1.DERIA5String,et.asn1.DERAbstractString),et.asn1.DERUTCTime=function(t){et.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},tt.lang.extend(et.asn1.DERUTCTime,et.asn1.DERAbstractTime),et.asn1.DERGeneralizedTime=function(t){et.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},tt.lang.extend(et.asn1.DERGeneralizedTime,et.asn1.DERAbstractTime),et.asn1.DERSequence=function(t){et.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){t+=this.asn1Array[e].getEncodedHex()}return this.hV=t,this.hV}},tt.lang.extend(et.asn1.DERSequence,et.asn1.DERAbstractStructured),et.asn1.DERSet=function(t){et.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var i=this.asn1Array[e];t.push(i.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},tt.lang.extend(et.asn1.DERSet,et.asn1.DERAbstractStructured),et.asn1.DERTaggedObject=function(t){et.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,i){this.hT=e,this.isExplicit=t,this.asn1Object=i,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=i.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},tt.lang.extend(et.asn1.DERTaggedObject,et.asn1.ASN1Object);var it=function(i){function r(t){var e=i.call(this)||this;return t&&("string"==typeof t?e.parseKey(t):(r.hasPrivateKeyProperty(t)||r.hasPublicKeyProperty(t))&&e.parsePropertiesFrom(t)),e}return function(t,e){function i(){this.constructor=t}p(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}(r,i),r.prototype.parseKey=function(t){try{var e=0,i=0,r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?d(t):v.unarmor(t),n=x.decode(r);if(3===n.sub.length&&(n=n.sub[2].sub[0]),9===n.sub.length){e=n.sub[1].getHexStringValue(),this.n=q(e,16),i=n.sub[2].getHexStringValue(),this.e=parseInt(i,16);var s=n.sub[3].getHexStringValue();this.d=q(s,16);var o=n.sub[4].getHexStringValue();this.p=q(o,16);var h=n.sub[5].getHexStringValue();this.q=q(h,16);var a=n.sub[6].getHexStringValue();this.dmp1=q(a,16);var u=n.sub[7].getHexStringValue();this.dmq1=q(u,16);var c=n.sub[8].getHexStringValue();this.coeff=q(c,16)}else{if(2!==n.sub.length)return!1;var f=n.sub[1].sub[0];e=f.sub[0].getHexStringValue(),this.n=q(e,16),i=f.sub[1].getHexStringValue(),this.e=parseInt(i,16)}return!0}catch(t){return!1}},r.prototype.getPrivateBaseKey=function(){var t={array:[new et.asn1.DERInteger({int:0}),new et.asn1.DERInteger({bigint:this.n}),new et.asn1.DERInteger({int:this.e}),new et.asn1.DERInteger({bigint:this.d}),new et.asn1.DERInteger({bigint:this.p}),new et.asn1.DERInteger({bigint:this.q}),new et.asn1.DERInteger({bigint:this.dmp1}),new et.asn1.DERInteger({bigint:this.dmq1}),new et.asn1.DERInteger({bigint:this.coeff})]};return new et.asn1.DERSequence(t).getEncodedHex()},r.prototype.getPrivateBaseKeyB64=function(){return c(this.getPrivateBaseKey())},r.prototype.getPublicBaseKey=function(){var t=new et.asn1.DERSequence({array:[new et.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new et.asn1.DERNull]}),e=new et.asn1.DERSequence({array:[new et.asn1.DERInteger({bigint:this.n}),new et.asn1.DERInteger({int:this.e})]}),i=new et.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new et.asn1.DERSequence({array:[t,i]}).getEncodedHex()},r.prototype.getPublicBaseKeyB64=function(){return c(this.getPublicBaseKey())},r.wordwrap=function(t,e){if(!t)return t;var i="(.{1,"+(e=e||64)+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(i,"g")).join("\n")},r.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=r.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----"},r.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=r.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----"},r.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},r.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},r.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},r}(Q),rt=function(){function t(t){t=t||{},this.default_key_size=parseInt(t.default_key_size,10)||1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new it(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(f(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return c(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.sign=function(t,e,i){try{return c(this.getKey().sign(t,e,i))}catch(t){return!1}},t.prototype.verify=function(t,e,i){try{return this.getKey().verify(t,f(e),i)}catch(t){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new it,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version="3.0.0-rc.1",t}();t.JSEncrypt=rt,t.default=rt,Object.defineProperty(t,"__esModule",{value:!0})});
\ No newline at end of file
// 不命中统一返回
const NOT_MATCH_OBJ = {
beautyNum: "",
index: -1,
len: 0
}
// 验证AABB
export function checkBeautyNumberAAA(phone) {
var reg = new RegExp('(.)\\1{2}', "g");
if (phone.match(reg) != null) {
var result = phone.match(reg)[0].toString();
return {
beautyNum: result,
index: phone.indexOf(result),
len: result.length,
type: "AAA+",
}
}
return NOT_MATCH_OBJ
}
// 验证AABB
export function checkBeautyNumberAABB(phone) {
var reg = new RegExp("(\\d)\\1((?!\\1)\\d)\\2", "g");
if (phone.match(reg) != null) {
var result = phone.match(reg)[0].toString();
return {
beautyNum: result,
index: phone.indexOf(result),
len: result.length,
type: "AABB+",
}
}
return NOT_MATCH_OBJ
}
// 验证ABAB
export function checkBeautyNumberABAB(phone) {
var reg = new RegExp("(\\d)((?!\\1)\\d)\\1\\2", "g");
if (phone.match(reg) != null) {
var result = phone.match(reg)[0].toString();
return {
beautyNum: result,
index: phone.indexOf(result),
len: result.length,
type: "ABAB+"
}
}
return NOT_MATCH_OBJ
}
// 验证AABB
export function checkBeautyNumberABBA(phone) {
var reg = new RegExp("(\\d)((?!\\1)\\d)\\2[\\d]", "g");
if (phone.match(reg) != null) {
var result = phone.match(reg)[0].toString();
if (result.substring(0, 1) == result.substring(3, 4)) {
return {
beautyNum: result,
index: phone.indexOf(result),
len: result.length,
type: "ABBA"
}
}
}
return NOT_MATCH_OBJ
}
// 验证ABCAB
export function checkBeautyNumberABCAB(phone) {
var reg = new RegExp("(?:0(?=1)|1(?=2)|2(?=3)|3(?=4)|4(?=5)|5(?=6)|6(?=7)|7(?=8)|8(?=9)){2}\\d{3}", "g");
if (phone.match(reg) != null) {
var result = phone.match(reg)[0].toString();
if (result.substring(0, 2) == result.substring(3, 5)) {
return {
beautyNum: result,
index: phone.indexOf(result),
len: result.length,
type: "ABCAB"
}
}
}
return NOT_MATCH_OBJ
}
// 验证ABCD
export function checkBeautyNumberABCD(phone) {
var reg = new RegExp("(?:0123|1234|2345|3456|4567|5678|6789|7890|0987|9876|8765|7654|6543|5432|4321|3210)\\d", "g");
if (phone.match(reg) != null) {
var result = phone.match(reg)[0].toString()
result = result.substring(0, 4);
return {
beautyNum: result,
index: phone.indexOf(result),
len: result.length,
type: "ABCD"
}
}
return NOT_MATCH_OBJ
}
// // 最后一位是6/8/9
export function checkBeautyNumberLast(phone) {
const reg = new RegExp("\\d+[689]$");
if (phone.match(reg) != null) {
return {
beautyNum: phone.slice(-1),
index: phone.length - 1,
len: 1,
type: "LAST689"
}
}
return NOT_MATCH_OBJ
}
// 获取吉祥口号
export function getFeatureName(mobile) {
let featureName = {
0: "寓意圆满",
1: "大吉大利",
2: "成双成对",
3: "三生万物",
4: "四季来财",
5: "五福临门",
6: "六六大顺",
7: "升职加薪",
8: "发财旺运",
9: "富贵长久"
}
let num = mobile.slice(-1);
let result = featureName[num + ''];
return result;
}
export function sortByLength(array) {
array.sort((a, b) => a.beautyList.length > 0 ? -1 : 1);
}
// 支付宝省市区结构
export function addressToTree(address) {
let districtssheng = address.province_list;
let districtsShi = address.city_list;
let districtsQu = address.county_list;
let newArrSheng = [];
for (var i in districtssheng) {
// 第一层循环遍历出省份
let districtsShengObj = {}
districtsShengObj.id = i
districtsShengObj.name = districtssheng[i]
let newArrShi = []
for (var s in districtsShi) {
//第二层循环出市
if (i.substring(0, 2) === s.substring(0, 2)) {
// 以城市编码的前两位作为匹配项
let shiobj = {};
shiobj.id = s
shiobj.name = districtsShi[s]
let newArrQU = []
for (var q in districtsQu) {
//第三层循环遍历出区
if (s.substring(0, 4) == q.substring(0, 4)) {
//市与区以编码的前四位作为匹配
let quobj = {};
quobj.id = q
quobj.name = districtsQu[q]
newArrQU.push(quobj);
shiobj.subList = newArrQU;
}
}
newArrShi.push(shiobj);
districtsShengObj.subList = newArrShi;
//添加到所需的对象里
}
}
newArrSheng.push(districtsShengObj) // 最后添加到数组里
}
return newArrSheng;
}
function setItem(key, value, module_name) {
// console.log(key,value)
my.setStorageSync({
key: key,
data: value
});
// if (module_name) {
// let module_name_info = getItem(module_name) || {};
// module_name_info[key] = value;
// try {
// my.setStorageSync(module_name, module_name_info);
// } catch (e) {
// my.setStorage({
// key: module_name,
// data: module_name_info
// })
// }
// } else {
// try {
// my.setStorageSync(key, value);
// } catch (e) {
// my.setStorage({
// key: key,
// data: value
// })
// }
// }
}
function getItem(key, module_name) {
// if (module_name) {
// let val = getItem(module_name);
// if (val) return val[key];
// return '';
// }
// return my.getStorageSync(key).data
return my.getStorageSync({
key: key
}).data;
}
function clear(name) {
name ? my.removeStorageSync(name) : my.clearStorageSync()
}
module.exports = {
setItem,
getItem,
clear
}
\ No newline at end of file
// 正则
const REGEXPS = {
"mobile": /^1\d{10}$/,
//身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X。
"identNo": /(^\d{15}$)|(^\d{17}([0-9]|X)$)/,
}
// 验证手机
function checkMobile(str) {
return REGEXPS.mobile.test(str);
}
// 验证身份证
function checkIdentNo(num) {
num = num.toUpperCase();
return REGEXPS.identNo.test(num);
}
// 数组打乱顺序
function randomSort(a, b) {
return Math.random() > 0.5 ? -1 : 1;
}
function shuffleArray(array) {
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
return array;
}
//普通生成uuid
function uuid() {
var s = [];
var hexDigits = "0123456789abcdef";
for (var i = 0; i < 36; i++) {
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
}
s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
s[8] = s[13] = s[18] = s[23] = "-";
var uuid = s.join("");
return uuid;
}
// 数组去重
function uniqueArray(arr) {
return arr.reduce((result, item) => {
const duplicate = result.find(obj => JSON.stringify(obj) === JSON.stringify(item));
if (!duplicate) {
result.push(item);
}
return result;
}, []);
}
// 模拟分页
function paginateArray(arr, page, size = 10) {
const startIndex = (page - 1) * size;
const endIndex = startIndex + size;
const currentPageList = arr.slice(startIndex, endIndex);
const totalPages = Math.ceil(arr.length / size);
return {
list: currentPageList,
totalPages
};
}
/**
* 链接参数转换为obj
* 入参 完整链接
* @param {*} url
*/
function param2Obj(url) {
const search = url.split('?')[1]
if (!search) {
return {}
}
return JSON.parse(
'{"' +
decodeURIComponent(search)
.replace(/"/g, '\\"')
.replace(/&/g, '","')
.replace(/=/g, '":"') +
'"}'
)
}
/**
* 分转元
* @param {*} fen
* @returns
*/
export const regFenToYuan = (fen) => {
var num = fen;
num = fen * 0.01;
num += '';
var reg = num.indexOf('.') > -1 ? /(\d{1,3})(?=(?:\d{3})+\.)/g : /(\d{1,3})(?=(?:\d{3})+$)/g;
num = num.replace(reg, '$1');
num = toDecimal2(num)
return num
};
/**
* 元转分
* @param {*} yuan
* @param {*} digit
* @returns
*/
export const regYuanToFen = (yuan, digit = 100) => {
var m = 0,
s1 = yuan.toString(),
s2 = digit.toString();
try {
m += s1.split(".")[1].length
} catch (e) {}
try {
m += s2.split(".")[1].length
} catch (e) {}
return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
}
/**
* 强制保留2位小数,如:2,会在2后面补上00.即2.00
* @param {*} x
* @returns
*/
export const toDecimal2 = (x) => {
var f = parseFloat(x);
if (isNaN(f)) {
return false;
}
var f = Math.round(x * 100) / 100;
var s = f.toString();
var rs = s.indexOf('.');
if (rs < 0) {
rs = s.length;
s += '.';
}
while (s.length <= rs + 2) {
s += '0';
}
return s;
}
/**
* 格式化数字,不足一位补充0
* @param {*} n
*/
function formatNumber(n) {
n = n.toString()
return n[1] ? n : '0' + n
}
/**
* 获取屏幕剩余高度
* useHeight 单位是rpx
* 默认返回单位是rpx 可通过unit参数改为 px
*/
function getLastScreenHeight(useHeight = 0, unit = 'rpx') {
let sysInfo = my.getSystemInfoSync();
let clientHeight = sysInfo.windowHeight;
// 获取可使用窗口高度
let clientWidth = sysInfo.windowWidth;
// 算出比例
let ratio = 750 / clientWidth;
// 算出屏幕高度(单位rpx)
let height = clientHeight * ratio;
// 计算剩余高度
let lastHeight = height - useHeight;
// 可转换成px
if (unit == 'px') {
lastHeight = lastHeight / 750 * clientWidth
}
return lastHeight;
}
/**
* px转rpx
* @param {*} value
*/
function pxToRpx(value) {
let sysInfo = my.getSystemInfoSync();
let clientWidth = sysInfo.windowWidth;
let result = value / 750 * clientWidth
return result;
}
// 格式化星期几
function formatWeek(week) {
let result = "";
switch (week) {
case 1:
result = "一";
break;
case 2:
result = "二";
break;
case 3:
result = "三";
break;
case 4:
result = "四";
break;
case 5:
result = "五";
break;
case 6:
result = "六";
break;
case 0:
result = "日";
break;
default:
break;
}
return result;
}
/**
* 格式化日期时间 支持Date和时间戳
* @param {date} date 日期时间
* @param {string} fmt 格式,如:'yyyy-MM-dd hh:mm:ss'
*/
function formatDate(date, fmt) {
if (!date) return '-'
// 把-换成/ 避免iOS和安卓真机问题
if (isNaN(date)) {
var reg = /-/g;
date = date && date.replace(reg, '/');
}
date = new Date(date)
const o = {
'M+': date.getMonth() + 1, // 月份
'd+': date.getDate(), // 日
'h+': date.getHours(), // 小时
'm+': date.getMinutes(), // 分
's+': date.getSeconds(), // 秒
'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
S: date.getMilliseconds() // 毫秒
}
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
for (const k in o) {
if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
}
return fmt
}
/**
* 获取点击传值
* @param {*} evt
* @param {*} key
*/
function getBindtapData(evt, key = "data") {
let keyStr = key || "data";
return evt.currentTarget.dataset[keyStr];
}
/**
* 从数组中获取 key未value的对象
* @param {*} value
* @param {*} key
* @param {*} list
*/
function getObjByListKeyValue(value, key, list) {
let result = null;
list.forEach(element => {
if (element[key + ""] == value) {
result = element;
}
});
return result;
}
/**
* 获取小程序码
* path = "/pages/index/index?pa=1"
* @param {*} path
*/
function wxacodeGet(path) {
return " https://api.k.wxpai.cn/bizproxy/mzcfsapi/qrcode/create?path=" + encodeURIComponent(path);
}
/**
* 根据url获取参数
* @param {*} name
*/
function getQueryByUrl(name, url) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(url) || [, ""])[1].replace(/\+/g, '%20')) || null;
}
/**
* 添加base前缀(my.arrayBufferToBase64方法不提供前缀)
*/
function addBase64Prefix(base64) {
return "data:image/PNG;base64," + base64;
}
/**
* @desc 函数防抖
* @param func 函数
* @param wait 延迟执行毫秒数
* @param immediate true 表立即执行,false 表非立即执行
*/
let debounceTimeout;
function debounce(func, wait, immediate) {
return function () {
let context = this;
let args = arguments;
if (debounceTimeout) clearTimeout(debounceTimeout);
if (immediate) {
var callNow = !debounceTimeout;
debounceTimeout = setTimeout(() => {
debounceTimeout = null;
}, wait)
if (callNow) func.apply(context, args)
} else {
debounceTimeout = setTimeout(function () {
func.apply(context, args)
}, wait);
}
}();
}
/**
* @desc 函数节流
* @param func 函数
* @param wait 延迟执行毫秒数
* @param type 1 表时间戳版,2 表定时器版
* 时间戳版的函数触发是在时间段内开始的时候,而定时器版的函数触发是在时间段内结束的时候。
*/
let throttleTimeout;
let throttlePrevious;
function throttle(func, wait, type) {
if (type === 1) {
throttlePrevious = 0;
} else if (type === 2) {
throttleTimeout = 0;
}
return function () {
let context = this;
let args = arguments;
if (type === 1) {
let now = Date.now();
if (now - throttlePrevious > wait) {
func.apply(context, args);
throttlePrevious = now;
}
} else if (type === 2) {
if (!throttleTimeout) {
throttleTimeout = setTimeout(() => {
throttleTimeout = null;
func.apply(context, args)
}, wait)
}
}
}();
}
module.exports = {
shuffleArray: shuffleArray,
randomSort: randomSort,
uuid: uuid,
uniqueArray: uniqueArray,
paginateArray: paginateArray,
formatDate: formatDate,
formatNumber: formatNumber,
checkMobile: checkMobile,
checkIdentNo: checkIdentNo,
getLastScreenHeight: getLastScreenHeight,
debounce: debounce,
throttle: throttle,
param2Obj: param2Obj,
pxToRpx: pxToRpx,
formatWeek: formatWeek,
getBindtapData: getBindtapData,
wxacodeGet: wxacodeGet,
getObjByListKeyValue: getObjByListKeyValue,
getQueryByUrl: getQueryByUrl,
regFenToYuan: regFenToYuan,
regYuanToFen: regYuanToFen,
toDecimal2: toDecimal2,
addBase64Prefix: addBase64Prefix,
}
\ No newline at end of file