正在显示
53 个修改的文件
包含
4777 行增加
和
0 行删除
.hbuilderx/launch.json
0 → 100644
1 | +{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ | ||
2 | + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 | ||
3 | + "version": "0.0", | ||
4 | + "configurations": [{ | ||
5 | + "default" : | ||
6 | + { | ||
7 | + "launchtype" : "local" | ||
8 | + }, | ||
9 | + "mp-weixin" : | ||
10 | + { | ||
11 | + "launchtype" : "local" | ||
12 | + }, | ||
13 | + "type" : "uniCloud" | ||
14 | + } | ||
15 | + ] | ||
16 | +} |
App.vue
0 → 100644
1 | +<script> | ||
2 | + export default { | ||
3 | + onLaunch: function() { | ||
4 | + console.log('App Launch') | ||
5 | + }, | ||
6 | + onShow: function() { | ||
7 | + console.log('App Show') | ||
8 | + }, | ||
9 | + onHide: function() { | ||
10 | + console.log('App Hide') | ||
11 | + } | ||
12 | + } | ||
13 | +</script> | ||
14 | + | ||
15 | +<style lang="scss"> | ||
16 | + /* 注意要写在第一行,同时给style标签加入lang="scss"属性 */ | ||
17 | + @import "uview-plus/index.scss"; | ||
18 | + .flexJ { | ||
19 | + display: flex; | ||
20 | + justify-content: space-between; | ||
21 | + align-items: center; | ||
22 | + } | ||
23 | + | ||
24 | + .flexC { | ||
25 | + display: flex; | ||
26 | + justify-content: center; | ||
27 | + align-items: center; | ||
28 | + } | ||
29 | + | ||
30 | + .flexA { | ||
31 | + display: flex; | ||
32 | + align-items: center; | ||
33 | + } | ||
34 | + | ||
35 | + .flexV { | ||
36 | + display: flex; | ||
37 | + flex-direction: column; | ||
38 | + justify-content: center; | ||
39 | + align-items: center; | ||
40 | + } | ||
41 | + | ||
42 | + .flexW { | ||
43 | + display: flex; | ||
44 | + flex-wrap: wrap; | ||
45 | + justify-content: space-between; | ||
46 | + } | ||
47 | + .ples { | ||
48 | + color: #000000e6; | ||
49 | + font-size: 30rpx; | ||
50 | + font-weight: 700; | ||
51 | + } | ||
52 | + .lineFeed { | ||
53 | + word-wrap: break-word; | ||
54 | + word-break: break-all; | ||
55 | + white-space: pre-line; | ||
56 | + } | ||
57 | + | ||
58 | + .ellipsis { | ||
59 | + display: -webkit-box; | ||
60 | + -webkit-box-orient: vertical; | ||
61 | + text-overflow: ellipsis; | ||
62 | + overflow: hidden; | ||
63 | + -webkit-line-clamp: 1; | ||
64 | + } | ||
65 | + | ||
66 | + .ellipsisT { | ||
67 | + display: -webkit-box; | ||
68 | + -webkit-box-orient: vertical; | ||
69 | + text-overflow: ellipsis; | ||
70 | + overflow: hidden; | ||
71 | + -webkit-line-clamp: 2; | ||
72 | + color: rgba(0, 0, 0, 0.9); | ||
73 | + font-size: 24rpx; | ||
74 | + } | ||
75 | + | ||
76 | + .iosAuto { | ||
77 | + padding-bottom:constant(safe-area-inset-bottom); | ||
78 | + padding-bottom: env(safe-area-inset-bottom); | ||
79 | + } | ||
80 | +</style> |
api/index.js
0 → 100644
1 | +import { request } from '@/utils/request.js' | ||
2 | + | ||
3 | +// 手机号登录 /api/login/getPhones | ||
4 | +export const getLogin = params => request({ url: '/api/login/getPhones', method: 'post', data: params }) | ||
5 | + | ||
6 | +// 首页数据 /api/index/index | ||
7 | +export const getIndex = () => request({ url: '/api/index/index', method: 'post', data: {} }) | ||
8 | + | ||
9 | +// 活动详情 /api/index/active | ||
10 | +// export const getDetaile = (id) => request({url: '/api/index/active',method: 'post',data: {id}}) | ||
11 | + | ||
12 | +// 搜索 /api/index/Searchfor | ||
13 | +export const getSearch = key => request({ url: '/api/index/Searchfor', method: 'post', data: { key } }) | ||
14 | + | ||
15 | +// 搜索历史 /api/index/getSearchKeyword | ||
16 | +export const getRecord = () => request({ url: '/api/index/getSearchKeyword', method: 'post', data: {} }) | ||
17 | + | ||
18 | +// 清空搜索 /api/index/delSearchKeyword | ||
19 | +export const getDelRecord = () => request({ url: '/api/index/delSearchKeyword', method: 'post', data: {} }) | ||
20 | + | ||
21 | +// 商品接口 | ||
22 | +// 积分商城 /api/goods/codegoods | ||
23 | +export const getCodegood = () => request({ url: '/api/goods/codegoods', method: 'get', data: {} }) | ||
24 | + | ||
25 | +// 商品详情 /api/goods/detail | ||
26 | +export const getShopDetaile = id => request({ url: '/api/goods/detail', method: 'get', data: { id } }) | ||
27 | + | ||
28 | +// 直接购买数据 /api/goods/buyData | ||
29 | +export const getbBuyData = params => request({ url: '/api/goods/buyData', method: 'get', data: params }) | ||
30 | + | ||
31 | +// 直接购买支付 /api/goods/pay | ||
32 | +export const getPay = params => request({ url: '/api/goods/pay', method: 'get', data: params }) | ||
33 | + | ||
34 | +//分类接口 | ||
35 | +// 分类数据 /api/category/fenlei | ||
36 | +export const getClassification = () => request({ url: '/api/category/fenlei', method: 'get', data: {} }) | ||
37 | + | ||
38 | +// 分类列表 /api/category/fenleilie | ||
39 | +export const getTwoClassification = () => request({ url: '/api/category/fenleilie', method: 'post' }) | ||
40 | + | ||
41 | +// 分类商品 /api/category/getCategoryGoods | ||
42 | +export const getCategoryGoods = data => request({ url: '/api/category/getCategoryGoods', method: 'post', data }) | ||
43 | + | ||
44 | +// 购物车 | ||
45 | +// 添加购物车 /api/cart/add | ||
46 | +export const getAddCar = params => request({ url: '/api/cart/add', method: 'get', data: params }) | ||
47 | + | ||
48 | +// 购物车列表 /api/cart/index | ||
49 | +export const getCarList = () => request({ url: '/api/cart/index', method: 'get', data: {} }) | ||
50 | + | ||
51 | +// 增加购物车数量 /api/cart/inc | ||
52 | +export const getCarAdd = (cart_id, num) => request({ url: '/api/cart/inc', method: 'get', data: { cart_id, num } }) | ||
53 | + | ||
54 | +// 减少购物车数量 /api/cart/sub | ||
55 | +export const getCarReduce = (cart_id, num) => request({ url: '/api/cart/sub', method: 'get', data: { cart_id, num } }) | ||
56 | + | ||
57 | +// 删除购物车 /api/cart/del | ||
58 | +export const getDelCar = cart_ids => request({ url: '/api/cart/del', method: 'get', data: { cart_ids } }) | ||
59 | + | ||
60 | +// 购物车结算 /api/cart/settlement | ||
61 | +export const getCarsettlement = cart_ids => request({ url: '/api/cart/settlement', method: 'get', data: { cart_ids } }) | ||
62 | + | ||
63 | +// 购物车支付 /api/cart/pay | ||
64 | +export const getCarPay = params => request({ url: '/api/cart/pay', method: 'get', data: params }) | ||
65 | + | ||
66 | +// 我的接口 | ||
67 | +// 我的首页 /api/user/index | ||
68 | +export const getMine = () => request({ url: '/api/user/index', method: 'get', data: {} }) | ||
69 | + | ||
70 | +// 订单列表 /api/order/index | ||
71 | +export const getOrderList = status => request({ url: '/api/order/index', method: 'get', data: { status } }) | ||
72 | + | ||
73 | +// 订单详情 /api/order/detail | ||
74 | +export const getOrderdetail = id => request({ url: '/api/order/detail', method: 'get', data: { id } }) | ||
75 | + | ||
76 | +// 取消订单 /api/order/cancel | ||
77 | +export const getCancleOrder = id => request({ url: '/api/order/cancel', method: 'get', data: { id } }) | ||
78 | + | ||
79 | +// 确认收货 /api/order/receipt | ||
80 | +export const getReceipt = id => request({ url: '/api/order/receipt', method: 'get', data: { id } }) | ||
81 | + | ||
82 | +// 申请售后 /api/order/refund | ||
83 | +export const getRefund = id => request({ url: '/api/order/refund', method: 'get', data: { id } }) | ||
84 | + | ||
85 | +// 订单支付 /api/order/pay | ||
86 | +export const getOrderPay = (id, fangs) => request({ url: '/api/order/pay', method: 'get', data: { id, fangs } }) | ||
87 | + | ||
88 | +// 我的余额 /api/user/yue | ||
89 | +export const getyue = () => request({ url: '/api/user/yue', method: 'get', data: {} }) | ||
90 | + | ||
91 | +// 余额明细 /api/user/getMoneyDetail | ||
92 | +export const getMoneyDetail = () => request({ url: '/api/user/getMoneyDetail', method: 'get', data: {} }) | ||
93 | + | ||
94 | +// 我的积分 /api/user/myScore | ||
95 | +export const getMyScore = () => request({ url: '/api/user/myScore', method: 'get', data: {} }) | ||
96 | + | ||
97 | +// 积分明细 /api/user/getScoreDetail | ||
98 | +export const getScoreDetail = () => request({ url: '/api/user/getScoreDetail', method: 'get', data: {} }) | ||
99 | + | ||
100 | +// 充值折扣列表 /api/user/czlb | ||
101 | +export const getPackage = () => request({ url: '/api/user/czlb', method: 'get', data: {} }) | ||
102 | + | ||
103 | +// 充值 /api/user/czxt | ||
104 | +export const getRecharge = m => request({ url: '/api/user/czxt', method: 'get', data: { m } }) | ||
105 | + | ||
106 | +// 写评论 /api/goods/pinglun | ||
107 | +export const getComment = params => request({ url: '/api/goods/pinglun', method: 'get', data: params }) | ||
108 | + | ||
109 | +// 地址接口 | ||
110 | +// 地址列表 /api/address/index | ||
111 | +export const getAdressList = () => request({ url: '/api/address/index', method: 'post', data: {} }) | ||
112 | + | ||
113 | +// 设置地址 /api/address/add | ||
114 | +export const getEdit = params => request({ url: '/api/address/add', method: 'post', data: params }) | ||
115 | + | ||
116 | +// 地址详情 /api/address/detail | ||
117 | +export const getadresDetail = id => request({ url: '/api/address/detail', method: 'post', data: { id } }) | ||
118 | + | ||
119 | +// 删除地址 /api/address/del | ||
120 | +export const getDelAdres = ids => request({ url: '/api/address/del', method: 'post', data: { ids } }) |
api/methods.js
0 → 100644
1 | +export default { | ||
2 | + // 上传图片 | ||
3 | + upload (url, callBack) { | ||
4 | + let arr = {} | ||
5 | + uni.chooseImage({ | ||
6 | + success: chooseImageRes => { | ||
7 | + const tempFilePaths = chooseImageRes.tempFilePaths | ||
8 | + arr['avatar'] = tempFilePaths[0] | ||
9 | + uni.uploadFile({ | ||
10 | + url: url, //仅为示例,非真实的接口地址 | ||
11 | + filePath: tempFilePaths[0], | ||
12 | + name: 'file', | ||
13 | + formData: { | ||
14 | + user: 'test', | ||
15 | + token: uni.getStorageSync('token') | ||
16 | + }, | ||
17 | + success: uploadFileRes => { | ||
18 | + console.log(JSON.parse(uploadFileRes.data), '图片路径') | ||
19 | + arr['upImg'] = JSON.parse(uploadFileRes.data).data.url | ||
20 | + // console.log(arr, '没问题') | ||
21 | + callBack(arr) | ||
22 | + } | ||
23 | + }) | ||
24 | + } | ||
25 | + }) | ||
26 | + }, | ||
27 | + //支付 | ||
28 | + pay(res) { | ||
29 | + if(res.appId) { | ||
30 | + uni.requestPayment({ | ||
31 | + "provider": "wxpay", | ||
32 | + timeStamp: res.timeStamp, // 时间戳(单位:秒) | ||
33 | + nonceStr: res.nonceStr, // 随机字符串1 | ||
34 | + package: res.package, // 固定值 | ||
35 | + signType: res.signType, // 签名,这里用的 MD5/RSA 签名 | ||
36 | + appid: res.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致1 | ||
37 | + paySign:res.paySign, | ||
38 | + success(res) { | ||
39 | + console.log('支付成功') | ||
40 | + uni.showToast({ title: '支付成功~'}) | ||
41 | + setTimeout(()=>{ | ||
42 | + uni.navigateBack() | ||
43 | + },1500) | ||
44 | + }, | ||
45 | + fail(e) { | ||
46 | + console.log('支付失败',e) | ||
47 | + uni.showToast({ title: '支付取消~', icon: "none", }) | ||
48 | + } | ||
49 | + }) | ||
50 | + } | ||
51 | + }, | ||
52 | + // 提示,一秒后返回上一页 | ||
53 | + showTN(title) { | ||
54 | + uni.showToast({title: title,icon:"none"}) | ||
55 | + setTimeout(()=>{ | ||
56 | + uni.navigateBack() | ||
57 | + },1000) | ||
58 | + } | ||
59 | +} |
componets/address.vue
0 → 100644
1 | +<template> | ||
2 | + <!-- 收获地址 --> | ||
3 | + <view class="addressBox flexJ"> | ||
4 | + <view class="right"> | ||
5 | + <image src="/static/shopCarIc/redAddress.png" mode=""></image> | ||
6 | + <view class="area"> | ||
7 | + <text>{{!isOrder ? adress.diqu + adress.address : adress.sh_diqu + adress.sh_address}}</text> | ||
8 | + <view class="name">{{!isOrder ? adress.name : adress.sh_name}} | ||
9 | + {{!isOrder ? adress.mobile.slice(0,3) + '****' +adress.mobile.slice(-4) | ||
10 | + : adress.sh_mobile.slice(0,3) + '****' + adress.sh_mobile.slice(-4) | ||
11 | + }} | ||
12 | + </view> | ||
13 | + </view> | ||
14 | + </view> | ||
15 | + <image src="/static/mineIc/gayRight.png" mode=""></image> | ||
16 | + </view> | ||
17 | +</template> | ||
18 | + | ||
19 | +<script setup> | ||
20 | + import { ref,reactive } from 'vue' | ||
21 | + import {onShow,onLoad} from '@dcloudio/uni-app' | ||
22 | + const props = defineProps({ | ||
23 | + adress:{ | ||
24 | + type:Object, | ||
25 | + default:{} | ||
26 | + }, | ||
27 | + isOrder:{ | ||
28 | + type:Boolean, | ||
29 | + default:false | ||
30 | + } | ||
31 | + }) | ||
32 | +</script> | ||
33 | + | ||
34 | +<style lang="scss"> | ||
35 | + .addressBox { | ||
36 | + margin-bottom: 20rpx; | ||
37 | + padding: 32rpx 20rpx 31rpx 32rpx; | ||
38 | + border-radius: 24rpx; | ||
39 | + background: #fff; | ||
40 | + | ||
41 | + .right { | ||
42 | + display: flex; | ||
43 | + | ||
44 | + image { | ||
45 | + width: 32rpx; | ||
46 | + height: 32rpx; | ||
47 | + margin-right: 8rpx; | ||
48 | + margin-top: 9rpx; | ||
49 | + } | ||
50 | + | ||
51 | + .area { | ||
52 | + text { | ||
53 | + color: #323233ff; | ||
54 | + font-size: 28rpx; | ||
55 | + font-weight: 700; | ||
56 | + line-height: 36rpx; | ||
57 | + } | ||
58 | + | ||
59 | + .name { | ||
60 | + color: #646566ff; | ||
61 | + font-size: 24rpx; | ||
62 | + margin-top: 9rpx; | ||
63 | + } | ||
64 | + } | ||
65 | + } | ||
66 | + | ||
67 | + image { | ||
68 | + width: 16rpx; | ||
69 | + height: 32rpx; | ||
70 | + } | ||
71 | + } | ||
72 | +</style> |
componets/areaCheck.vue
0 → 100644
1 | +<template> | ||
2 | + <view class=""> | ||
3 | + <u-picker @close="close" :immediateChange ="true" :show="shows" ref="uPicker" :columns="columns" @confirm="confirm" @change="changeHandler"></u-picker> | ||
4 | + </view> | ||
5 | +</template> | ||
6 | + | ||
7 | +<script> | ||
8 | + import localData from '../utils/address-data.js' | ||
9 | + export default { | ||
10 | + props: { | ||
11 | + shows: { | ||
12 | + type:Boolean, | ||
13 | + default:false | ||
14 | + } | ||
15 | + }, | ||
16 | + data() { | ||
17 | + return { | ||
18 | + columns: [], | ||
19 | + columnData: [], | ||
20 | + } | ||
21 | + }, | ||
22 | + mounted() { | ||
23 | + this.columns[0] = localData.map(item=>item.name) | ||
24 | + this.columns[1] = localData[0].cities.map(item=>item.name) | ||
25 | + this.columns[2] = localData[0].cities[0].districts.map(item=>item.name) | ||
26 | + }, | ||
27 | + methods: { | ||
28 | + close() { | ||
29 | + this.$emit('close', false) | ||
30 | + }, | ||
31 | + changeHandler(e) { | ||
32 | + const { | ||
33 | + columnIndex, | ||
34 | + value, | ||
35 | + values, // values为当前变化列的数组内容 | ||
36 | + index, | ||
37 | + // 微信小程序无法将picker实例传出来,只能通过ref操作 | ||
38 | + picker = this.$refs.uPicker | ||
39 | + } = e | ||
40 | + // 当第一列值发生变化时,变化第二列(后一列)对应的选项 | ||
41 | + console.log('变化',index) | ||
42 | + if (columnIndex === 0) { | ||
43 | + // picker为选择器this实例,变化第二列对应的选项 | ||
44 | + let arr = localData.find(item=>item.name == value[0]) | ||
45 | + let arr1 = arr.cities.map(item=>item.name) | ||
46 | + this.columnData = arr1 | ||
47 | + console.log('市',arr1[0],arr) | ||
48 | + let distinguish = arr.cities[0].districts.map(item=>item.name) | ||
49 | + picker.setColumnValues(1, arr1) //第二列 | ||
50 | + picker.setColumnValues(2, distinguish) //第三列 | ||
51 | + } | ||
52 | + if (columnIndex === 1) { | ||
53 | + // picker为选择器this实例,变化第三列对应的选项 | ||
54 | + let economize = localData.find(item=>item.name == value[0]) | ||
55 | + let city = economize.cities.find(item=>item.name == value[1]) | ||
56 | + let distinguish = city.districts.map(item=>item.name) | ||
57 | + picker.setColumnValues(2, distinguish) | ||
58 | + } | ||
59 | + }, | ||
60 | + // 回调参数为包含columnIndex、value、values | ||
61 | + confirm(e) { | ||
62 | + this.$emit('popShow',e.value) | ||
63 | + } | ||
64 | + } | ||
65 | + } | ||
66 | +</script> | ||
67 | + | ||
68 | +<style> | ||
69 | +</style> |
componets/buyPop.vue
0 → 100644
1 | +<template> | ||
2 | + <!-- 购买弹窗 --> | ||
3 | + <view class=""> | ||
4 | + <!-- 底部按钮弹出成 --> | ||
5 | + <u-popup :show="show" mode="bottom" :closeable="true" round="18" @close="close" @open="open"> | ||
6 | + <view class="popBox" :class="isIos?'':'btom'"> | ||
7 | + <!-- 价格 --> | ||
8 | + <view class="topBox flexA"> | ||
9 | + <image :src="formList.spec_image ? formList.spec_image : shopDetailes.image" mode=""></image> | ||
10 | + <view class="price"> | ||
11 | + <text>¥</text>{{formList.goods_price ? formList.goods_price : shopDetailes.spec[0].goods_price}} | ||
12 | + </view> | ||
13 | + </view> | ||
14 | + <!-- 选择收货 --> | ||
15 | + <view class="adressBox flexJ" v-if="shopAddress==null" @click="checkAderess"> | ||
16 | + <view class="left flexA"> | ||
17 | + <image src="/static/adressIc.png" mode=""></image> | ||
18 | + 请选择收货地址 | ||
19 | + </view> | ||
20 | + <image src="/static/carIc/rights.png" mode=""></image> | ||
21 | + </view> | ||
22 | + <!-- 收货位置 --> | ||
23 | + <view class="adressInfo flexJ" v-else @click="checkAderess"> | ||
24 | + <view class="infoBox"> | ||
25 | + <view class="adresInfo flexA"> | ||
26 | + <image src="/static/carIc/postion.png" mode=""></image> | ||
27 | + {{shopAddress.zone}}{{shopAddress.address}} | ||
28 | + </view> | ||
29 | + <view class="phone"> | ||
30 | + {{shopAddress.name}}<text>{{shopAddress.mobile.slice(0,3) + '****' + shopAddress.mobile.slice(-4) }}</text> | ||
31 | + </view> | ||
32 | + </view> | ||
33 | + <image src="/static/carIc/rights.png" mode=""></image> | ||
34 | + </view> | ||
35 | + <!-- 商品规格 --> | ||
36 | + <view v-for="(item,index) in speList" :key="item.group_id" style="margin-bottom: 44rpx;"> | ||
37 | + <view class="specificationsTile"> | ||
38 | + {{item.group_name}} | ||
39 | + </view> | ||
40 | + <view class="colorBox"> | ||
41 | + <view class="item" v-for="(it,idx) in item.spec_items" :key="it.item_id" | ||
42 | + :class="idx == indexList[index].curIndex?'checked':''" @click="checkSpec(index,it,idx)"> | ||
43 | + {{it.spec_value}} | ||
44 | + </view> | ||
45 | + </view> | ||
46 | + </view> | ||
47 | + <!-- 分割线 --> | ||
48 | + <view class="line"></view> | ||
49 | + <!-- 数量加减 --> | ||
50 | + <view class="numBox flexJ"> | ||
51 | + <view class="rightTitle flexA"> | ||
52 | + 购买数量 <view v-if="formList.stock_num" class="surplus">剩余:{{formList.stock_num}}件</view> | ||
53 | + </view> | ||
54 | + <view class="and flexA"> | ||
55 | + <image src="/static/reduce.png" mode="" @click="numBtn(0)"></image> | ||
56 | + <view class="num flexC">{{num}}</view> | ||
57 | + <image src="/static/add.png" mode="" @click="numBtn(1)"></image> | ||
58 | + </view> | ||
59 | + </view> | ||
60 | + <!-- 加入购物车按钮 --> | ||
61 | + <view v-if="btnType==1" class="popBtn flexC" @click="addBuy" :class="checkAll?'checkA':''"> | ||
62 | + 加入购物车 | ||
63 | + </view> | ||
64 | + <!-- 立即购买按钮 --> | ||
65 | + <view v-else class="popBtn1 flexC" @click="payBtn" :class="formList.stock_num==0?'notHave':''"> | ||
66 | + {{formList.stock_num==0?'缺货':'立即支付'}} | ||
67 | + <view v-if="payMoney>0" class="payMoney flexA"><text>¥</text>{{payMoney}}</view> | ||
68 | + </view> | ||
69 | + </view> | ||
70 | + </u-popup> | ||
71 | + </view> | ||
72 | +</template> | ||
73 | + | ||
74 | +<script> | ||
75 | + | ||
76 | +</script> | ||
77 | + | ||
78 | +<style lang="scss"> | ||
79 | + .popBox { | ||
80 | + padding: 30rpx 24rpx 0; | ||
81 | + | ||
82 | + .topBox { | ||
83 | + margin-left: 8rpx; | ||
84 | + | ||
85 | + image { | ||
86 | + border-radius: 12rpx; | ||
87 | + margin-right: 24rpx; | ||
88 | + width: 134rpx; | ||
89 | + height: 138rpx; | ||
90 | + } | ||
91 | + | ||
92 | + .price { | ||
93 | + font-size: 36rpx; | ||
94 | + font-weight: 700; | ||
95 | + color: #E9422C; | ||
96 | + | ||
97 | + text { | ||
98 | + font-size: 28rpx; | ||
99 | + color: #E9422C; | ||
100 | + } | ||
101 | + } | ||
102 | + } | ||
103 | + | ||
104 | + .adressBox { | ||
105 | + padding: 42rpx 24rpx; | ||
106 | + box-sizing: border-box; | ||
107 | + width: 702rpx; | ||
108 | + height: 120rpx; | ||
109 | + border-radius: 16rpx; | ||
110 | + background: #f5f5f5ff; | ||
111 | + margin: 24rpx 0; | ||
112 | + | ||
113 | + .left { | ||
114 | + color: #000000e6; | ||
115 | + font-size: 28rpx; | ||
116 | + font-weight: 700; | ||
117 | + | ||
118 | + image { | ||
119 | + margin-right: 8rpx; | ||
120 | + width: 32rpx; | ||
121 | + height: 32rpx; | ||
122 | + } | ||
123 | + } | ||
124 | + | ||
125 | + image { | ||
126 | + width: 16rpx; | ||
127 | + height: 32rpx; | ||
128 | + } | ||
129 | + } | ||
130 | + | ||
131 | + .adressInfo { | ||
132 | + border-radius: 16rpx; | ||
133 | + background: #f5f5f5ff; | ||
134 | + padding: 20rpx 24rpx 22rpx; | ||
135 | + box-sizing: border-box; | ||
136 | + margin: 24rpx 0; | ||
137 | + | ||
138 | + .infoBox { | ||
139 | + .adresInfo { | ||
140 | + margin-bottom: 9rpx; | ||
141 | + color: #323233ff; | ||
142 | + font-size: 28rpx; | ||
143 | + font-weight: 700; | ||
144 | + | ||
145 | + image { | ||
146 | + margin-right: 8rpx; | ||
147 | + width: 32rpx; | ||
148 | + height: 32rpx; | ||
149 | + } | ||
150 | + } | ||
151 | + | ||
152 | + .phone { | ||
153 | + color: #646566ff; | ||
154 | + font-size: 24rpx; | ||
155 | + margin-left: 40rpx; | ||
156 | + | ||
157 | + text { | ||
158 | + margin-left: 16rpx; | ||
159 | + } | ||
160 | + } | ||
161 | + } | ||
162 | + | ||
163 | + image { | ||
164 | + width: 16rpx; | ||
165 | + height: 32rpx; | ||
166 | + } | ||
167 | + } | ||
168 | + | ||
169 | + .specificationsTile { | ||
170 | + color: #00000099; | ||
171 | + font-size: 28rpx; | ||
172 | + margin-bottom: 16rpx; | ||
173 | + border: 1rpx solid transparent; | ||
174 | + } | ||
175 | + | ||
176 | + .colorBox { | ||
177 | + display: flex; | ||
178 | + flex-wrap: wrap; | ||
179 | + | ||
180 | + .item { | ||
181 | + margin-right: 16rpx; | ||
182 | + padding: 8rpx 32rpx; | ||
183 | + border-radius: 46rpx; | ||
184 | + color: #000; | ||
185 | + font-size: 24rpx; | ||
186 | + background: #1918330f; | ||
187 | + border: 1rpx solid transparent; | ||
188 | + } | ||
189 | + | ||
190 | + .checked { | ||
191 | + color: #f43736ff; | ||
192 | + font-size: 24rpx; | ||
193 | + border-radius: 46rpx; | ||
194 | + border: 1rpx solid #f43736ff; | ||
195 | + background: #fff1efff; | ||
196 | + } | ||
197 | + } | ||
198 | + | ||
199 | + .line { | ||
200 | + margin: 44rpx auto 34rpx; | ||
201 | + width: 702rpx; | ||
202 | + height: 2rpx; | ||
203 | + background: #F5F5F5; | ||
204 | + } | ||
205 | + | ||
206 | + .numBox { | ||
207 | + margin-bottom: 54rpx; | ||
208 | + | ||
209 | + .rightTitle { | ||
210 | + color: #00000099; | ||
211 | + font-size: 28rpx; | ||
212 | + | ||
213 | + .surplus { | ||
214 | + margin-left: 12rpx; | ||
215 | + color: #ec3323ff; | ||
216 | + font-size: 24rpx; | ||
217 | + } | ||
218 | + } | ||
219 | + | ||
220 | + .and { | ||
221 | + image { | ||
222 | + width: 56rpx; | ||
223 | + height: 56rpx; | ||
224 | + } | ||
225 | + | ||
226 | + .num { | ||
227 | + width: 64rpx; | ||
228 | + height: 56rpx; | ||
229 | + color: #333333ff; | ||
230 | + font-size: 28rpx; | ||
231 | + background: #f2f3f5ff; | ||
232 | + margin: 0 4rpx; | ||
233 | + } | ||
234 | + } | ||
235 | + } | ||
236 | + | ||
237 | + .textarea { | ||
238 | + position: relative; | ||
239 | + | ||
240 | + textarea { | ||
241 | + padding: 24rpx 16rpx 16rpx 24rpx; | ||
242 | + box-sizing: border-box; | ||
243 | + width: 702rpx; | ||
244 | + height: 148rpx; | ||
245 | + border-radius: 16rpx; | ||
246 | + background: #f5f5f5ff; | ||
247 | + color: #000; | ||
248 | + font-size: 28rpx; | ||
249 | + } | ||
250 | + | ||
251 | + .count { | ||
252 | + position: absolute; | ||
253 | + color: #00000066; | ||
254 | + font-size: 24rpx; | ||
255 | + right: 16rpx; | ||
256 | + bottom: 16rpx; | ||
257 | + } | ||
258 | + } | ||
259 | + | ||
260 | + .payBox { | ||
261 | + margin-top: 48rpx; | ||
262 | + | ||
263 | + .payMode { | ||
264 | + color: #000000e6; | ||
265 | + font-size: 28rpx; | ||
266 | + | ||
267 | + image { | ||
268 | + margin-right: 12rpx; | ||
269 | + width: 32rpx; | ||
270 | + height: 32rpx; | ||
271 | + } | ||
272 | + } | ||
273 | + | ||
274 | + .yue { | ||
275 | + color: #F33F2E; | ||
276 | + font-size: 30rpx; | ||
277 | + font-weight: 700; | ||
278 | + | ||
279 | + text { | ||
280 | + margin-top: 5rpx; | ||
281 | + color: #F33F2E; | ||
282 | + font-size: 24rpx; | ||
283 | + } | ||
284 | + } | ||
285 | + } | ||
286 | + | ||
287 | + .popBtn { | ||
288 | + margin: 50rpx auto 0; | ||
289 | + width: 686rpx; | ||
290 | + height: 88rpx; | ||
291 | + border-radius: 80rpx; | ||
292 | + color: #ffffffff; | ||
293 | + font-size: 32rpx; | ||
294 | + font-weight: 700; | ||
295 | + background: #00000029; | ||
296 | + } | ||
297 | + | ||
298 | + .checkA { | ||
299 | + background: linear-gradient(-89.3deg, #ffc24aff 0%, #ffab07ff 100%); | ||
300 | + } | ||
301 | + | ||
302 | + .popBtn1 { | ||
303 | + margin: 50rpx auto 0; | ||
304 | + width: 686rpx; | ||
305 | + height: 88rpx; | ||
306 | + border-radius: 96rpx; | ||
307 | + opacity: 1; | ||
308 | + color: #ffffffff; | ||
309 | + font-size: 32rpx; | ||
310 | + font-weight: 700; | ||
311 | + background: linear-gradient(-88deg, #ff5e2bff 0%, #ec3323ff 100%); | ||
312 | + | ||
313 | + .payMoney { | ||
314 | + color: #ffffffff; | ||
315 | + font-size: 36rpx; | ||
316 | + font-weight: 700; | ||
317 | + | ||
318 | + text { | ||
319 | + font-size: 24rpx; | ||
320 | + margin: 8rpx 3rpx 0; | ||
321 | + } | ||
322 | + } | ||
323 | + } | ||
324 | + | ||
325 | + .notHave { | ||
326 | + background: #ffd5d1ff; | ||
327 | + } | ||
328 | + } | ||
329 | +</style> |
componets/checkPayMode.vue
0 → 100644
1 | +<template> | ||
2 | + <view class=""> | ||
3 | + <!-- 方式支付弹窗 --> | ||
4 | + <u-popup :show="modeShow" bgColor="#F6F8FA" :closeable="true" round="12" @close="canclePop"> | ||
5 | + <view class="popBox iosAuto"> | ||
6 | + <view class="title">选择支付方式</view> | ||
7 | + <view class="popModeBox flexJ" v-for="(item,index) in payMode" :key="item.id" @click="checkPay(index)"> | ||
8 | + <view class="mode flexA"> | ||
9 | + <image :src="item.modeUrl" mode=""></image> | ||
10 | + {{item.name}} | ||
11 | + </view> | ||
12 | + <image v-if="item.shows" :src=" defaultMode == index ? '/static/shopCarIc/modeCheck.png': '/static/shopCarIc/checks.png'" mode=""></image> | ||
13 | + <view class="insufficient flexA" v-else @click="goRecharge"> | ||
14 | + 余额不足 | ||
15 | + <view class="go flexA"> | ||
16 | + 去充值 | ||
17 | + <image src="/static/indexIc/orangeRight.png" mode=""></image> | ||
18 | + </view> | ||
19 | + </view> | ||
20 | + </view> | ||
21 | + <view class="subOrder flexC" @click="subOrder">提交订单</view> | ||
22 | + </view> | ||
23 | + </u-popup> | ||
24 | + </view> | ||
25 | +</template> | ||
26 | + | ||
27 | +<script setup> | ||
28 | + import { ref,reactive,onMounted,getCurrentInstance,defineEmits,watchEffect } from 'vue' | ||
29 | + import {onShow,onLoad} from '@dcloudio/uni-app' | ||
30 | + import { getPay,getOrderPay,getCarPay } from '@/api/' | ||
31 | + const props = defineProps({ | ||
32 | + payParams:{ | ||
33 | + type:Object, | ||
34 | + default:{} | ||
35 | + }, | ||
36 | + modeShow:{ | ||
37 | + type:Boolean, | ||
38 | + default:false | ||
39 | + }, | ||
40 | + adressId:{ | ||
41 | + type:String, | ||
42 | + default:'' | ||
43 | + }, | ||
44 | + // 商品总价 | ||
45 | + totalPrice:{ | ||
46 | + type:String, | ||
47 | + default:0 | ||
48 | + }, | ||
49 | + // 余额 | ||
50 | + balance:{ | ||
51 | + type:String, | ||
52 | + default:0 | ||
53 | + }, | ||
54 | + // 是否订单支付 | ||
55 | + isOrderPay:{ | ||
56 | + type:Boolean, | ||
57 | + default:false | ||
58 | + }, | ||
59 | + orderId:{ | ||
60 | + type:String, | ||
61 | + default:'' | ||
62 | + }, | ||
63 | + // 购物车id | ||
64 | + carId:{ | ||
65 | + type:String, | ||
66 | + default:'' | ||
67 | + } | ||
68 | + }) | ||
69 | + onMounted(()=> { | ||
70 | + setTimeout(()=>{ | ||
71 | + if(props.totalPrice >props.balance) { | ||
72 | + payMode[1].shows = false | ||
73 | + } | ||
74 | + },100) | ||
75 | + }) | ||
76 | + watchEffect(()=>{ | ||
77 | + // console.log('余额',props.balance) 余额不足点击充值,返回页面刷新余额 | ||
78 | + if(props.totalPrice < props.balance) { | ||
79 | + payMode[1].shows = true | ||
80 | + } | ||
81 | + }) | ||
82 | + // 支付方式数组 | ||
83 | + const payMode = reactive([{id:1,name:'微信支付',check:true,modeUrl:'/static/shopCarIc/weCaat.png',shows:true}, | ||
84 | + {id:2,name:'余额支付',check:false,modeUrl:'/static/shopCarIc/yue.png',shows:true}]) | ||
85 | + // 余额是否为0 | ||
86 | + let balance = ref(0) | ||
87 | + // 默认支付方式 | ||
88 | + let defaultMode = ref(0) | ||
89 | + // 选择支付方式 | ||
90 | + let checkPay = (index)=> { | ||
91 | + defaultMode.value = index | ||
92 | + } | ||
93 | + // 支付方式弹窗提交订单按钮 | ||
94 | + const subOrder = ()=> { | ||
95 | + if(props.car_Id) { | ||
96 | + console.log('购物车支付',props.car_Id) | ||
97 | + getCarPays() | ||
98 | + } else { | ||
99 | + console.log('dindan支付',props.car_Id) | ||
100 | + | ||
101 | + //订单支付 普通支付 | ||
102 | + props.isOrderPay ? getOrderPays() : getPays() | ||
103 | + } | ||
104 | + } | ||
105 | + // 去充值 | ||
106 | + const goRecharge = ()=> { | ||
107 | + uni.navigateTo({ url:'/pages/mine/recharge' }) | ||
108 | + } | ||
109 | + const emit = defineEmits(['canclePop']) | ||
110 | + const canclePop = ()=> { | ||
111 | + emit('canclePop') | ||
112 | + } | ||
113 | + const { proxy } = getCurrentInstance() //获取当前实例 | ||
114 | + // 支付 | ||
115 | + const getPays = async ()=>{ | ||
116 | + try { | ||
117 | + let { id,num,specId } = props.payParams | ||
118 | + let params = { | ||
119 | + goods_id:id, //integer 是 商品ID | ||
120 | + num:num, //integer 是 数量 | ||
121 | + goods_spec_id:specId, //integer 是 规格ID | ||
122 | + address_id:props.adressId, //integer 是 地址ID | ||
123 | + fangs:defaultMode.value == 0 ? 1 : 2, //integer 否 支付方式:1是微信支付,2是余额支付 | ||
124 | + remark:'' //string 否 备注 | ||
125 | + } | ||
126 | + const res = await getPay(params) | ||
127 | + proxy.$methods.pay(res) | ||
128 | + canclePop() | ||
129 | + console.log('getPay', res) | ||
130 | + uni.showToast({ title: '支付成功', icon: 'none' }) | ||
131 | + setTimeout(() => { | ||
132 | + uni.navigateBack() | ||
133 | + | ||
134 | + }, 1500); | ||
135 | + // 保存数据 | ||
136 | + } catch (err) { | ||
137 | + uni.showToast({ title:err,icon:'none' }) | ||
138 | + console.log('getPay', err) | ||
139 | + } | ||
140 | + } | ||
141 | + // 购物车支付 | ||
142 | + const getCarPays = async ()=> { | ||
143 | + try { | ||
144 | + let params = { | ||
145 | + cart_ids:props.car_Id, //string 是 购物车ID,多个英文逗号隔开 | ||
146 | + address_id:props.adressId, //integer 是 地址ID | ||
147 | + remark:'', //string 否 备注 | ||
148 | + fangs:defaultMode.value == 0 ? 1 : 2, //integer 否 支付方式:2是余额支付 | ||
149 | + } | ||
150 | + const res = await getCarPay(params) | ||
151 | + proxy.$methods.showTN('余额支付成功~') | ||
152 | + canclePop() | ||
153 | + console.log('getCarPay', res) | ||
154 | + // 保存数据 | ||
155 | + } catch (err) { | ||
156 | + uni.showToast({ title:err,icon:'none' }) | ||
157 | + console.log('getCarPay', err) | ||
158 | + } | ||
159 | + } | ||
160 | + // 订单支付 | ||
161 | + const getOrderPays = async ()=> { | ||
162 | + try { | ||
163 | + const res = await getOrderPay(props.orderId,defaultMode.value == 0 ? 1 : 2) | ||
164 | + proxy.$methods.pay(res) | ||
165 | + canclePop() | ||
166 | + console.log('getOrderPay', res) | ||
167 | + // 保存数据 | ||
168 | + } catch (err) { | ||
169 | + uni.showToast({ title:err,icon:'none' }) | ||
170 | + console.log('getOrderPay', err) | ||
171 | + } | ||
172 | + } | ||
173 | +</script> | ||
174 | + | ||
175 | +<style lang="scss"> | ||
176 | + .popBox { | ||
177 | + padding: 32rpx 24rpx 0; | ||
178 | + | ||
179 | + .title { | ||
180 | + text-align: center; | ||
181 | + margin-bottom: 60rpx; | ||
182 | + color: #000000e6; | ||
183 | + font-size: 32rpx; | ||
184 | + font-weight: 700; | ||
185 | + } | ||
186 | + | ||
187 | + .popModeBox { | ||
188 | + width: 100%; | ||
189 | + padding: 32rpx 20rpx; | ||
190 | + box-sizing: border-box; | ||
191 | + border-radius: 16rpx; | ||
192 | + background: #ffffffff; | ||
193 | + | ||
194 | + .mode { | ||
195 | + color: #000000e6; | ||
196 | + font-size: 28rpx; | ||
197 | + font-weight: 700; | ||
198 | + image { | ||
199 | + width: 52rpx; | ||
200 | + height: 52rpx; | ||
201 | + margin-right: 20rpx; | ||
202 | + } | ||
203 | + } | ||
204 | + | ||
205 | + image { | ||
206 | + width: 36rpx; | ||
207 | + height: 36rpx; | ||
208 | + } | ||
209 | + | ||
210 | + .insufficient { | ||
211 | + color: #00000066; | ||
212 | + font-size: 24rpx; | ||
213 | + | ||
214 | + .go { | ||
215 | + margin-left: 8rpx; | ||
216 | + font-size: 24rpx; | ||
217 | + color: #FB3E3C; | ||
218 | + line-height: 32rpx; | ||
219 | + | ||
220 | + image { | ||
221 | + width: 24rpx; | ||
222 | + height: 24rpx; | ||
223 | + } | ||
224 | + } | ||
225 | + } | ||
226 | + } | ||
227 | + .subOrder { | ||
228 | + margin-top: 138rpx; | ||
229 | + width: 100%; | ||
230 | + height: 88rpx; | ||
231 | + border-radius: 280rpx; | ||
232 | + color: #ffffffff; | ||
233 | + font-size: 32rpx; | ||
234 | + font-weight: 700; | ||
235 | + background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%); | ||
236 | + } | ||
237 | + } | ||
238 | +</style> |
componets/comment.vue
0 → 100644
1 | +<template> | ||
2 | + <!-- 评论 --> | ||
3 | + <view class="commentBox" v-for="item in commentList" :key="item.id"> | ||
4 | + <view class="info flexA"> | ||
5 | + <image :src="item.avatar" mode=""></image> | ||
6 | + <view class="name"> | ||
7 | + <view>{{item.nickname}}</view> | ||
8 | + <text>{{item.createtime}}</text> | ||
9 | + </view> | ||
10 | + </view> | ||
11 | + <view class="openM"> | ||
12 | + <open :text="item.content"></open> | ||
13 | + </view> | ||
14 | + <view class="imageBox"> | ||
15 | + <image v-for="it in item.image" :src="it" mode=""></image> | ||
16 | + </view> | ||
17 | + </view> | ||
18 | +</template> | ||
19 | + | ||
20 | +<script setup> | ||
21 | + import {ref,reactive,onMounted} from 'vue' | ||
22 | + import open from './openComment.vue' | ||
23 | + let props = defineProps({ | ||
24 | + commentList:{ | ||
25 | + type:Array, | ||
26 | + default:[] | ||
27 | + } | ||
28 | + }) | ||
29 | + onMounted(()=> { | ||
30 | + props.commentList.forEach(item=>{ | ||
31 | + item.image = item.image.split(',') | ||
32 | + }) | ||
33 | + // console.log('评论',props.commentList) | ||
34 | + }) | ||
35 | + const shadowStyle = reactive({ | ||
36 | + backgroundImage: "none", | ||
37 | + paddingTop: "0", | ||
38 | + marginTop: "0" | ||
39 | + }) | ||
40 | + const content = ref('哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈') | ||
41 | +</script> | ||
42 | + | ||
43 | +<style lang="scss"> | ||
44 | + .commentBox { | ||
45 | + .info { | ||
46 | + margin-bottom: 24rpx; | ||
47 | + | ||
48 | + image { | ||
49 | + width: 88rpx; | ||
50 | + height: 88rpx; | ||
51 | + border-radius: 50%; | ||
52 | + margin-right: 24rpx; | ||
53 | + } | ||
54 | + | ||
55 | + .name { | ||
56 | + :nth-child(1) { | ||
57 | + color: #131a14d9; | ||
58 | + font-size: 28rpx; | ||
59 | + font-weight: 700; | ||
60 | + line-height: 40rpx; | ||
61 | + } | ||
62 | + | ||
63 | + text { | ||
64 | + color: #131a1466; | ||
65 | + font-size: 24rpx; | ||
66 | + margin-top: 4rpx; | ||
67 | + } | ||
68 | + } | ||
69 | + } | ||
70 | + | ||
71 | + .imageBox { | ||
72 | + margin-top: 32rpx; | ||
73 | + display: flex; | ||
74 | + flex-wrap: wrap; | ||
75 | + | ||
76 | + image { | ||
77 | + width: 226rpx; | ||
78 | + height: 226rpx; | ||
79 | + border-radius: 32rpx; | ||
80 | + margin: 0 12rpx 12rpx 0; | ||
81 | + } | ||
82 | + | ||
83 | + :nth-child(3n) { | ||
84 | + margin-right: 0 !important; | ||
85 | + } | ||
86 | + } | ||
87 | + } | ||
88 | +</style> |
componets/openComment.vue
0 → 100644
1 | +<template> | ||
2 | + <view> | ||
3 | + <view class="Express"> | ||
4 | + <view class="info"> | ||
5 | + <view :class="{hide:!iSinfo}" class="flexA"> | ||
6 | + {{text}} | ||
7 | + </view> | ||
8 | + <view class="open" @tap="showinfo" v-if="!iSinfo & text.length>100"> | ||
9 | + <view class="dot">...</view> | ||
10 | + 全文 | ||
11 | + </view> | ||
12 | + </view> | ||
13 | + <text @tap="showinfo" v-if="iSinfo" class="hidebtn">收起</text> | ||
14 | + </view> | ||
15 | + </view> | ||
16 | +</template> | ||
17 | + | ||
18 | +<script> | ||
19 | + export default { | ||
20 | + props:{ | ||
21 | + text:{ | ||
22 | + type:String, | ||
23 | + default:'' | ||
24 | + } | ||
25 | + }, | ||
26 | + data() { | ||
27 | + return { | ||
28 | + iSinfo: false | ||
29 | + } | ||
30 | + }, | ||
31 | + methods: { | ||
32 | + showinfo() { | ||
33 | + this.iSinfo = !this.iSinfo | ||
34 | + } | ||
35 | + } | ||
36 | + } | ||
37 | +</script> | ||
38 | + | ||
39 | +<style lang="scss"> | ||
40 | + page { | ||
41 | + background-color: #fff; | ||
42 | + } | ||
43 | + | ||
44 | + .Express { | ||
45 | + display: flex; | ||
46 | + flex-direction: column; | ||
47 | + background-color: #fff; | ||
48 | + position: relative; | ||
49 | + | ||
50 | + .info { | ||
51 | + display: flex; | ||
52 | + flex-direction: column; | ||
53 | + | ||
54 | + view { | ||
55 | + text-align: justify; | ||
56 | + font-size: 14px; | ||
57 | + font-weight: 400; | ||
58 | + color: rgba(102, 102, 102, 1); | ||
59 | + word-break: break-word; //换行模式 | ||
60 | + background-color: #fff; | ||
61 | + } | ||
62 | + | ||
63 | + .open { | ||
64 | + width: 112rpx; | ||
65 | + font-size: 14px; | ||
66 | + display: flex; | ||
67 | + justify-content: flex-end; | ||
68 | + align-items: center; | ||
69 | + | ||
70 | + // background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 50%); | ||
71 | + color: #75CA42; | ||
72 | + position: absolute; | ||
73 | + bottom: 0upx; | ||
74 | + right: 0upx; | ||
75 | + | ||
76 | + .dot { | ||
77 | + margin-right: 30rpx; | ||
78 | + } | ||
79 | + } | ||
80 | + } | ||
81 | + | ||
82 | + } | ||
83 | + | ||
84 | + .hidebtn { | ||
85 | + display: flex; | ||
86 | + flex: 1; | ||
87 | + justify-content: flex-end; | ||
88 | + color: #75CA42; | ||
89 | + font-size: 14px; | ||
90 | + } | ||
91 | + | ||
92 | + .hide { | ||
93 | + word-break: break-word; //换行模式 | ||
94 | + overflow: hidden; | ||
95 | + text-overflow: ellipsis; //修剪文字 | ||
96 | + display: -webkit-box; | ||
97 | + -webkit-line-clamp: 3; //此处为上限行数 | ||
98 | + -webkit-box-orient: vertical; | ||
99 | + } | ||
100 | +</style> |
componets/orderShop.vue
0 → 100644
1 | +<template> | ||
2 | + <!-- 订单商品 --> | ||
3 | + <view class="shop" v-for="(it, idx) in shop.goods_detail" :key="it.id"> | ||
4 | + <view class="shopPhoto"> | ||
5 | + <image :src="it.image" mode=""></image> | ||
6 | + </view> | ||
7 | + <view class="info"> | ||
8 | + <view class="shopTitle ellipsis">{{ it.goods_name }}</view> | ||
9 | + <view class="desc ellipsis">{{ it.describe }}</view> | ||
10 | + <view class="num ellipsis">x{{ it.total_num }}</view> | ||
11 | + <!-- 非积分商品 --> | ||
12 | + <view class="priceBox flexJ" v-if="it.goodstatus != 3"> | ||
13 | + <text>¥{{ it.total_price }}</text> | ||
14 | + <view class="reality flexA"> | ||
15 | + <view class="shi">实付款:</view> | ||
16 | + <text>¥</text> | ||
17 | + <view class="price">{{ it.total_price }}</view> | ||
18 | + </view> | ||
19 | + </view> | ||
20 | + <!-- 积分商品 --> | ||
21 | + <view class="pointsShop" v-else> | ||
22 | + <text>需付款:</text> | ||
23 | + <image src="/static/shopCarIc/pointsIc.png" mode=""></image> | ||
24 | + <view class="points">{{ it.coscore }}</view> | ||
25 | + <view class="pointsPrice">¥{{ it.diff_price }}</view> | ||
26 | + </view> | ||
27 | + </view> | ||
28 | + </view> | ||
29 | +</template> | ||
30 | + | ||
31 | +<script setup> | ||
32 | +import { ref, reactive, onMounted } from 'vue' | ||
33 | +import { onShow, onLoad } from '@dcloudio/uni-app' | ||
34 | +const props = defineProps({ | ||
35 | + shop: { | ||
36 | + type: Array, | ||
37 | + default: [] | ||
38 | + } | ||
39 | +}) | ||
40 | +onMounted(() => {}) | ||
41 | +</script> | ||
42 | + | ||
43 | +<style lang="scss"> | ||
44 | +.shop { | ||
45 | + display: flex; | ||
46 | + justify-content: space-between; | ||
47 | + margin-bottom: 32rpx; | ||
48 | + | ||
49 | + .shopPhoto { | ||
50 | + width: 180rpx; | ||
51 | + height: 180rpx; | ||
52 | + margin-right: 16rpx; | ||
53 | + | ||
54 | + image { | ||
55 | + width: 180rpx; | ||
56 | + height: 180rpx; | ||
57 | + border-radius: 8rpx; | ||
58 | + } | ||
59 | + } | ||
60 | + | ||
61 | + .info { | ||
62 | + width: 100%; | ||
63 | + | ||
64 | + .shopTitle { | ||
65 | + color: #323233ff; | ||
66 | + font-size: 26rpx; | ||
67 | + font-weight: 700; | ||
68 | + } | ||
69 | + | ||
70 | + .desc { | ||
71 | + margin: 16rpx 0; | ||
72 | + color: #00000066; | ||
73 | + font-size: 20rpx; | ||
74 | + } | ||
75 | + | ||
76 | + .num { | ||
77 | + color: #757d8cff; | ||
78 | + font-size: 26rpx; | ||
79 | + text-align: right; | ||
80 | + } | ||
81 | + | ||
82 | + .priceBox { | ||
83 | + margin-top: 14rpx; | ||
84 | + | ||
85 | + text { | ||
86 | + color: #ff3d3dff; | ||
87 | + font-size: 28rpx; | ||
88 | + } | ||
89 | + | ||
90 | + .shi { | ||
91 | + color: #ff3d3dff; | ||
92 | + font-size: 28rpx; | ||
93 | + margin-top: 4rpx; | ||
94 | + margin-right: 2rpx; | ||
95 | + } | ||
96 | + | ||
97 | + .reality { | ||
98 | + color: #fc4338ff; | ||
99 | + font-size: 24rpx; | ||
100 | + | ||
101 | + text { | ||
102 | + color: #fc4338ff; | ||
103 | + font-size: 22rpx; | ||
104 | + font-weight: 700; | ||
105 | + margin-top: 10rpx; | ||
106 | + } | ||
107 | + | ||
108 | + .price { | ||
109 | + color: #fc4338ff; | ||
110 | + font-size: 40rpx; | ||
111 | + font-weight: 700; | ||
112 | + } | ||
113 | + } | ||
114 | + } | ||
115 | + | ||
116 | + .pointsShop { | ||
117 | + display: flex; | ||
118 | + justify-content: flex-end; | ||
119 | + margin-top: 14rpx; | ||
120 | + | ||
121 | + text { | ||
122 | + color: #fc4338ff; | ||
123 | + font-size: 24rpx; | ||
124 | + } | ||
125 | + | ||
126 | + image { | ||
127 | + width: 30rpx; | ||
128 | + height: 30rpx; | ||
129 | + } | ||
130 | + | ||
131 | + .points { | ||
132 | + margin: 0 28rpx 0 14rpx; | ||
133 | + color: #ee0a24ff; | ||
134 | + font-size: 28rpx; | ||
135 | + font-weight: 700; | ||
136 | + } | ||
137 | + | ||
138 | + .pointsPrice { | ||
139 | + color: #ff3d3dff; | ||
140 | + font-size: 26rpx; | ||
141 | + } | ||
142 | + } | ||
143 | + } | ||
144 | +} | ||
145 | +</style> |
componets/popPay.vue
0 → 100644
1 | +<template> | ||
2 | + <!-- 底部按钮弹出成 --> | ||
3 | + <u-popup :show="payPopShow" mode="bottom" :closeable="true" round="18" @close="close" @open="open"> | ||
4 | + <view class="popBox"> | ||
5 | + <view class="title flexC">{{btnType == 0? '加入购物车' : '立即购买'}}</view> | ||
6 | + <!-- 价格 --> | ||
7 | + <view class="topBox flexA"> | ||
8 | + <view class="shopPhoto"> | ||
9 | + <image :src="shopDetail.spec[0].spec_image" mode=""></image> | ||
10 | + </view> | ||
11 | + <view class="price"> | ||
12 | + <view class="shopName ellipsis">{{shopDetail.name}}</view> | ||
13 | + <view class="money"> | ||
14 | + ¥{{shopDetail.spec[0].goods_price}} | ||
15 | + </view> | ||
16 | + </view> | ||
17 | + </view> | ||
18 | + <!-- 商品规格 --> | ||
19 | + <view v-for="(item,index) in data.speList" :key="item.group_id" style="margin-bottom: 44rpx;"> | ||
20 | + <view class="specificationsTile"> | ||
21 | + {{item.group_name}} | ||
22 | + </view> | ||
23 | + <view class="colorBox"> | ||
24 | + <view class="item" v-for="(it,idx) in item.spec_items" :key="it.item_id" | ||
25 | + :class="idx == data.indexList[index].curIndex?'checked':''" @click="checkSpec(index,it,idx)"> | ||
26 | + {{it.spec_value}} | ||
27 | + </view> | ||
28 | + </view> | ||
29 | + </view> | ||
30 | + <!-- 数量加减 --> | ||
31 | + <view class="numBox flexJ"> | ||
32 | + <view class="rightTitle flexA"> | ||
33 | + 数量 | ||
34 | + </view> | ||
35 | + <view class="and flexA"> | ||
36 | + <u-number-box v-model="value" @change="valChange"></u-number-box> | ||
37 | + </view> | ||
38 | + </view> | ||
39 | + <!-- 加入购物车按钮 --> | ||
40 | + <view v-if="btnType==0" class="popBtn flexC" @click="popBtn"> | ||
41 | + 加入购物车 | ||
42 | + </view> | ||
43 | + <!-- 立即购买按钮 --> | ||
44 | + <view v-else class="popBtn1 flexC" @click="popBtn"> | ||
45 | + {{ shopDetail.goodstatus == 3 ?'立即兑换' : '立即购买'}} | ||
46 | + </view> | ||
47 | + </view> | ||
48 | + </u-popup> | ||
49 | +</template> | ||
50 | + | ||
51 | +<script setup> | ||
52 | + import { ref, reactive,onMounted } from 'vue' | ||
53 | + import { getAddCar } from '@/api/' | ||
54 | + let props = defineProps({ | ||
55 | + btnType: { | ||
56 | + type: Number, | ||
57 | + default: 0 | ||
58 | + }, | ||
59 | + payPopShow: { | ||
60 | + type: Boolean, | ||
61 | + default: false | ||
62 | + }, | ||
63 | + shopDetail:{ | ||
64 | + type: Object, | ||
65 | + default: {} | ||
66 | + }, | ||
67 | + moreSpec:{ | ||
68 | + type: Object, | ||
69 | + default: {} | ||
70 | + } | ||
71 | + }) | ||
72 | + let data = reactive({ | ||
73 | + value: 1,//商品数量 | ||
74 | + speList:[],//规格数组 | ||
75 | + indexList:[],//规格索引 | ||
76 | + specID:[],//选中的规格id | ||
77 | + specIdList:[],//规格组合id数组 | ||
78 | + formList:{},//选择玩规格后的商品详情 | ||
79 | + goods_spec_id:'',//参数规格id | ||
80 | + }) | ||
81 | + onMounted(()=> { | ||
82 | + setTimeout(()=> { | ||
83 | + console.log('多规格',props.moreSpec) | ||
84 | + if(props.moreSpec != null) { | ||
85 | + let spec = props.moreSpec.spec_attr //规格 | ||
86 | + let mateSpecId = props.moreSpec.spec_list //规格匹配id | ||
87 | + data.speList = spec //渲染规格 | ||
88 | + data.specIdList = mateSpecId //组合id数组 | ||
89 | + spec.forEach((item,index)=>{ | ||
90 | + data.indexList.push({curIndex : 0}) | ||
91 | + data.specID.push(item.spec_items[0].item_id) //默认规格id | ||
92 | + }) | ||
93 | + data.goods_spec_id = data.specID.join('_') //默认组合规格id | ||
94 | + makeUpId() | ||
95 | + } else { | ||
96 | + data.goods_spec_id = props.shopDetail.spec[0].goods_spec_id | ||
97 | + } | ||
98 | + },200) | ||
99 | + }) | ||
100 | + // 关闭弹窗 | ||
101 | + let emit = defineEmits(['close']) | ||
102 | + const close = () => { | ||
103 | + emit('close') | ||
104 | + } | ||
105 | + const valChange = (e) => { | ||
106 | + console.log('数量' + e.value) | ||
107 | + data.value = e.value | ||
108 | + } | ||
109 | + // 弹窗按钮props.btnType ==0加入购物车 1立即购买 | ||
110 | + const popBtn = ()=> { | ||
111 | + let shopType = props.shopDetail.goodstatus //商品类型 1=普通商品,2=特价商品,3=积分商品 | ||
112 | + let buyData = {id:props.shopDetail.id,num:data.value,specId:data.goods_spec_id} //购买数据参数 | ||
113 | + console.log('当前值为: ' , buyData) | ||
114 | + props.btnType ==0 ? getAddCars() : uni.navigateTo({ url:`/pages/shopCar/confirmOrder?params=${JSON.stringify(buyData)}&shopType=${shopType}` }) | ||
115 | + } | ||
116 | + //选择规格 | ||
117 | + const checkSpec = (index,it,idx)=> { | ||
118 | + console.log(index,it,idx) | ||
119 | + data.indexList[index].curIndex = idx //选中高亮 | ||
120 | + if(data.speList.length==1) { | ||
121 | + data.specID.splice(index,1,it.item_id) | ||
122 | + } else { | ||
123 | + data.specID.splice(index,data.specID.length>1?1:0,it.item_id)//规格组合的id | ||
124 | + } | ||
125 | + makeUpId() | ||
126 | + } | ||
127 | + // 组合id | ||
128 | + const makeUpId = ()=> { | ||
129 | + if(data.specID.length == data.speList.length) { | ||
130 | + let str = data.specIdList.find(item=> item.spec_sku_id == data.specID.join('_')) | ||
131 | + data.formList = str.form //所选规格对应详情 | ||
132 | + data.goods_spec_id = str.goods_spec_id //商品规格详情id | ||
133 | + console.log('查找到的规格',str,data.specID.join('_')) | ||
134 | + } | ||
135 | + } | ||
136 | + // 加入购物车 | ||
137 | + const getAddCars = async ()=>{ | ||
138 | + try { | ||
139 | + let params = { | ||
140 | + goods_id:props.shopDetail.id, //integer 是 商品ID | ||
141 | + num:data.value, //integer //是 数量 | ||
142 | + goods_spec_id:data.goods_spec_id //integer 是 规格ID | ||
143 | + } | ||
144 | + const res = await getAddCar(params) | ||
145 | + close() | ||
146 | + uni.showToast({ title:'成功加入购物车~',icon:'none' }) | ||
147 | + console.log('getAddCar', res) | ||
148 | + // 保存数据 | ||
149 | + } catch (err) { | ||
150 | + uni.showToast({ title:err,icon:'none' }) | ||
151 | + console.log('getAddCar', err) | ||
152 | + } | ||
153 | + } | ||
154 | +</script> | ||
155 | + | ||
156 | +<style lang="scss"> | ||
157 | + .popBox { | ||
158 | + padding: 32rpx 24rpx 0; | ||
159 | + | ||
160 | + .title { | ||
161 | + color: #000000e6; | ||
162 | + font-size: 32rpx; | ||
163 | + font-weight: 700; | ||
164 | + } | ||
165 | + | ||
166 | + .topBox { | ||
167 | + margin-top: 32rpx; | ||
168 | + | ||
169 | + .shopPhoto { | ||
170 | + width: 134rpx; | ||
171 | + height: 138rpx; | ||
172 | + margin-right: 24rpx; | ||
173 | + | ||
174 | + image { | ||
175 | + border-radius: 12rpx; | ||
176 | + width: 134rpx; | ||
177 | + height: 138rpx; | ||
178 | + } | ||
179 | + } | ||
180 | + | ||
181 | + .price { | ||
182 | + display: flex; | ||
183 | + flex-direction: column; | ||
184 | + justify-content: space-between; | ||
185 | + height: 110rpx; | ||
186 | + | ||
187 | + .money { | ||
188 | + color: #fc4338ff; | ||
189 | + font-size: 32rpx; | ||
190 | + font-weight: 600; | ||
191 | + } | ||
192 | + | ||
193 | + .shopName { | ||
194 | + color: #000000e6; | ||
195 | + font-size: 30rpx; | ||
196 | + font-weight: 700; | ||
197 | + line-height: 40rpx; | ||
198 | + } | ||
199 | + } | ||
200 | + } | ||
201 | + | ||
202 | + .specificationsTile { | ||
203 | + color: #00000099; | ||
204 | + font-size: 28rpx; | ||
205 | + margin-bottom: 16rpx; | ||
206 | + border: 1rpx solid transparent; | ||
207 | + } | ||
208 | + | ||
209 | + .colorBox { | ||
210 | + display: flex; | ||
211 | + flex-wrap: wrap; | ||
212 | + | ||
213 | + .item { | ||
214 | + margin-right: 16rpx; | ||
215 | + padding: 8rpx 32rpx; | ||
216 | + border-radius: 46rpx; | ||
217 | + color: #000; | ||
218 | + font-size: 24rpx; | ||
219 | + background: #1918330f; | ||
220 | + border: 1rpx solid transparent; | ||
221 | + } | ||
222 | + | ||
223 | + .checked { | ||
224 | + color: #f43736ff; | ||
225 | + font-size: 24rpx; | ||
226 | + border-radius: 46rpx; | ||
227 | + border: 1rpx solid #f43736ff; | ||
228 | + background: #fff1efff; | ||
229 | + } | ||
230 | + } | ||
231 | + | ||
232 | + .numBox { | ||
233 | + margin-top: 92rpx; | ||
234 | + | ||
235 | + .rightTitle { | ||
236 | + color: #00000099; | ||
237 | + font-size: 28rpx; | ||
238 | + | ||
239 | + .surplus { | ||
240 | + margin-left: 12rpx; | ||
241 | + color: #ec3323ff; | ||
242 | + font-size: 24rpx; | ||
243 | + } | ||
244 | + } | ||
245 | + } | ||
246 | + | ||
247 | + .payBox { | ||
248 | + margin-top: 48rpx; | ||
249 | + | ||
250 | + .payMode { | ||
251 | + color: #000000e6; | ||
252 | + font-size: 28rpx; | ||
253 | + | ||
254 | + image { | ||
255 | + margin-right: 12rpx; | ||
256 | + width: 32rpx; | ||
257 | + height: 32rpx; | ||
258 | + } | ||
259 | + } | ||
260 | + | ||
261 | + .yue { | ||
262 | + color: #F33F2E; | ||
263 | + font-size: 30rpx; | ||
264 | + font-weight: 700; | ||
265 | + | ||
266 | + text { | ||
267 | + margin-top: 5rpx; | ||
268 | + color: #F33F2E; | ||
269 | + font-size: 24rpx; | ||
270 | + } | ||
271 | + } | ||
272 | + } | ||
273 | + | ||
274 | + .popBtn { | ||
275 | + border-radius: 280rpx; | ||
276 | + margin: 50rpx auto 0; | ||
277 | + width: 686rpx; | ||
278 | + height: 88rpx; | ||
279 | + color: #ffffffff; | ||
280 | + font-size: 32rpx; | ||
281 | + font-weight: 700; | ||
282 | + background: linear-gradient(139deg, #ffac0bff 0%, #ffc24aff 100%); | ||
283 | + } | ||
284 | + | ||
285 | + .popBtn1 { | ||
286 | + margin: 50rpx auto 0; | ||
287 | + width: 686rpx; | ||
288 | + height: 88rpx; | ||
289 | + border-radius: 96rpx; | ||
290 | + opacity: 1; | ||
291 | + color: #ffffffff; | ||
292 | + font-size: 32rpx; | ||
293 | + font-weight: 700; | ||
294 | + background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%); | ||
295 | + } | ||
296 | + | ||
297 | + .notHave { | ||
298 | + background: #ffd5d1ff; | ||
299 | + } | ||
300 | + } | ||
301 | +</style> |
componets/searchBox.vue
0 → 100644
1 | +<template> | ||
2 | + <!-- 搜索框 --> | ||
3 | + <view class="boxs"> | ||
4 | + <view class="searchInput flexJ" @click="jump"> | ||
5 | + <view class="left flexA"> | ||
6 | + <image src="/static/indexIc/indexSearchIc.png" mode=""></image> | ||
7 | + <input :disabled="disabled" confirm-type="search" v-model="inputText" @confirm="doSearchs" @input="input" type="text" placeholder="请输入" placeholder-class="ples"> | ||
8 | + </view> | ||
9 | + <view class="right flexA" @click="doSearchs(0)"> | ||
10 | + <view class="line"></view> | ||
11 | + <text>搜索</text> | ||
12 | + </view> | ||
13 | + </view> | ||
14 | + </view> | ||
15 | +</template> | ||
16 | + | ||
17 | +<script setup> | ||
18 | + import { ref,onMounted,defineEmits } from 'vue' | ||
19 | + const props = defineProps({ | ||
20 | + disabled:{ | ||
21 | + type:Boolean, | ||
22 | + default:true | ||
23 | + }, | ||
24 | + keyWord:{ | ||
25 | + type:String, | ||
26 | + default:'' | ||
27 | + } | ||
28 | + }) | ||
29 | + let inputText = ref('') //输入框文字 | ||
30 | + onMounted(()=> { | ||
31 | + inputText.value = props.keyWord | ||
32 | + // console.log('首艘',props.disabled) | ||
33 | + }) | ||
34 | + const emit = defineEmits(['doSearchs','input']) | ||
35 | + // 回车事件 | ||
36 | + const doSearchs = (e)=> { | ||
37 | + if(e==0) { | ||
38 | + if(inputText.value.trim() == '') return | ||
39 | + emit('doSearchs',inputText.value) | ||
40 | + } else { | ||
41 | + emit('doSearchs',e.detail.value) | ||
42 | + } | ||
43 | + } | ||
44 | + // 输入框为空 | ||
45 | + const input = (e)=> { | ||
46 | + if(e.detail.value == '') { | ||
47 | + emit('input',e.detail.value) | ||
48 | + } | ||
49 | + } | ||
50 | + // // 点击搜索按钮 | ||
51 | + // const search = ()=> { | ||
52 | + // console.log('搜索为你做') | ||
53 | + // } | ||
54 | + const jump = ()=> { | ||
55 | + props.disabled ? uni.navigateTo({url:'/pages/index/search'}) : '' | ||
56 | + } | ||
57 | +</script> | ||
58 | + | ||
59 | +<style lang="scss"> | ||
60 | + .boxs { | ||
61 | + width: 100%; | ||
62 | + height: 96rpx; | ||
63 | + padding: 18rpx 32rpx; | ||
64 | + box-sizing: border-box; | ||
65 | + | ||
66 | + .searchInput { | ||
67 | + width: 100%; | ||
68 | + height: 100%; | ||
69 | + background-color: #FFFFFF; | ||
70 | + border-radius: 38rpx; | ||
71 | + padding: 14rpx 24rpx; | ||
72 | + box-sizing: border-box; | ||
73 | + | ||
74 | + .left { | ||
75 | + image { | ||
76 | + margin-right: 8rpx; | ||
77 | + width: 32rpx; | ||
78 | + height: 32rpx; | ||
79 | + } | ||
80 | + | ||
81 | + input { | ||
82 | + width: 500rpx !important; | ||
83 | + } | ||
84 | + | ||
85 | + .ples { | ||
86 | + color: #00000042; | ||
87 | + font-size: 26rpx; | ||
88 | + } | ||
89 | + } | ||
90 | + | ||
91 | + .right { | ||
92 | + .line { | ||
93 | + height: 30rpx; | ||
94 | + width: 1rpx; | ||
95 | + background-color: #FC6A3D; | ||
96 | + margin-right: 14rpx; | ||
97 | + } | ||
98 | + | ||
99 | + text { | ||
100 | + font-size: 28rpx; | ||
101 | + font-weight: 700; | ||
102 | + color: #FB753C; | ||
103 | + } | ||
104 | + } | ||
105 | + } | ||
106 | + } | ||
107 | +</style> |
componets/shopInfo.vue
0 → 100644
1 | +<template> | ||
2 | + <view class="infoBox"> | ||
3 | + <view class="name ellipsisT"> | ||
4 | + {{info.name}} | ||
5 | + </view> | ||
6 | + <view class="priceBox flexJ"> | ||
7 | + <view class="price flexA" v-if="info.goodstatus==3"> | ||
8 | + <view class="new">{{info.spec[0].coscore}}</view> | ||
9 | + <view class="points">积分</view> | ||
10 | + </view> | ||
11 | + <view class="price flexA" v-else> | ||
12 | + <view class="new">¥{{info.spec[0].goods_price}}</view> | ||
13 | + <text v-if="info.goodstatus==2">¥{{info.spec[0].line_price}}</text> | ||
14 | + </view> | ||
15 | + <!-- 1=普通商品,2=特价商品,3=积分商品 --> | ||
16 | + <view class="inventory"> | ||
17 | + {{ info.goodstatus==1 ? '已售:' | ||
18 | + : info.goodstatus==2 ? '库存:' :'已兑:' | ||
19 | + }}{{info.goodstatus!=2 ?info.sales_actual :info.spec[0].stock_num}}份</view> | ||
20 | + </view> | ||
21 | + | ||
22 | + </view> | ||
23 | +</template> | ||
24 | + | ||
25 | +<script setup> | ||
26 | + import { defineProps,onMounted } from 'vue' | ||
27 | + const props = defineProps({ | ||
28 | + isPoints:{ | ||
29 | + type:Boolean, | ||
30 | + default:false | ||
31 | + }, | ||
32 | + info:{ | ||
33 | + type:Object, | ||
34 | + default:{} | ||
35 | + } | ||
36 | + }) | ||
37 | + onMounted(()=> { | ||
38 | + // console.log('商品信息',props.info) | ||
39 | + }) | ||
40 | +</script> | ||
41 | + | ||
42 | +<style lang="scss"> | ||
43 | + .infoBox { | ||
44 | + | ||
45 | + .name { | ||
46 | + height: 80rpx; | ||
47 | + color: #000000e6; | ||
48 | + font-size: 30rpx; | ||
49 | + font-weight: 700; | ||
50 | + line-height: 40rpx; | ||
51 | + margin-bottom: 32rpx | ||
52 | + } | ||
53 | + | ||
54 | + .priceBox { | ||
55 | + .price { | ||
56 | + text { | ||
57 | + color: #00000042; | ||
58 | + font-size: 24rpx; | ||
59 | + text-decoration: line-through; | ||
60 | + margin-left: 8rpx; | ||
61 | + margin-top: 16rpx | ||
62 | + } | ||
63 | + | ||
64 | + .new { | ||
65 | + color: #fc4338ff; | ||
66 | + font-size: 40rpx; | ||
67 | + font-weight: 700; | ||
68 | + } | ||
69 | + .points { | ||
70 | + color: #fc4338ff; | ||
71 | + font-size: 22rpx; | ||
72 | + margin: 10rpx 0 0 8rpx; | ||
73 | + } | ||
74 | + } | ||
75 | + | ||
76 | + .inventory { | ||
77 | + color: #00000066; | ||
78 | + font-size: 22rpx; | ||
79 | + } | ||
80 | + } | ||
81 | + } | ||
82 | +</style> |
componets/shops.vue
0 → 100644
1 | +<template> | ||
2 | + <!-- 商品 --> | ||
3 | + <view class="flexW"> | ||
4 | + <view class="shopBox" v-for="item in list" :key="item.id" @click="toDetaile(item.id)"> | ||
5 | + <view class="shopPhoto"> | ||
6 | + <image :src="item.image" mode=""></image> | ||
7 | + </view> | ||
8 | + <view class="btomBox"> | ||
9 | + <view class="shopName ellipsis">{{ item.name }}</view> | ||
10 | + <view class="desc ellipsis">{{ item.describe }}</view> | ||
11 | + <view class="shopPrice flexA" v-if="!pointShop"> | ||
12 | + <view class="new">¥{{ item.goods_price || item.spprice }}</view> | ||
13 | + <view class="original" v-if="shopHeight == 322">¥{{ item.line_price }}</view> | ||
14 | + </view> | ||
15 | + <view class="points" v-else> | ||
16 | + <image src="/static/shopCarIc/pointsIc.png" mode=""></image> | ||
17 | + {{ item.coscore }} | ||
18 | + </view> | ||
19 | + <view v-if="shopWidth == 344" class="sold">{{ pointShop ? '已兑换:' : '已售:' }}{{ item.sales_actual }}份</view> | ||
20 | + <view v-if="shopHeight == 322" class="sold">库存:{{ item.stock_num }}件</view> | ||
21 | + </view> | ||
22 | + </view> | ||
23 | + </view> | ||
24 | +</template> | ||
25 | + | ||
26 | +<script setup> | ||
27 | +import { ref, defineProps, onMounted } from 'vue' | ||
28 | +const props = defineProps({ | ||
29 | + shopWidth: { | ||
30 | + type: Number, | ||
31 | + default: 322 | ||
32 | + }, | ||
33 | + shopHeight: { | ||
34 | + type: Number, | ||
35 | + default: 344 | ||
36 | + }, | ||
37 | + pointShop: { | ||
38 | + type: Boolean, | ||
39 | + default: false | ||
40 | + }, | ||
41 | + list: { | ||
42 | + type: Array, | ||
43 | + default: [] | ||
44 | + } | ||
45 | +}) | ||
46 | +const wide = ref(props.shopWidth + 'rpx') | ||
47 | +const heig = ref(props.shopHeight + 'rpx') | ||
48 | + | ||
49 | +onMounted(() => { | ||
50 | + // console.log(props.shopWidth,typeof(props.shopHeight),props.pointShop,'宽高') | ||
51 | +}) | ||
52 | +const toDetaile = id => { | ||
53 | + uni.navigateTo({ | ||
54 | + url: `/pages/index/shopDetaile?id=${id}` | ||
55 | + }) | ||
56 | +} | ||
57 | +</script> | ||
58 | + | ||
59 | +<style lang="scss"> | ||
60 | +.shopBox { | ||
61 | + width: v-bind(wide); | ||
62 | + border-radius: 12rpx; | ||
63 | + background: #ffffffff; | ||
64 | + margin-bottom: 14rpx; | ||
65 | + | ||
66 | + .shopPhoto { | ||
67 | + width: v-bind(wide); | ||
68 | + height: v-bind(heig); | ||
69 | + | ||
70 | + image { | ||
71 | + width: 100%; | ||
72 | + height: 100%; | ||
73 | + border-radius: 12rpx 12rpx 0 0; | ||
74 | + } | ||
75 | + } | ||
76 | + | ||
77 | + .btomBox { | ||
78 | + padding: 0 16rpx 16rpx; | ||
79 | + | ||
80 | + .shopName { | ||
81 | + color: #000000e6; | ||
82 | + font-size: 26rpx; | ||
83 | + line-height: 32rpx; | ||
84 | + margin: 16rpx 0 8rpx; | ||
85 | + } | ||
86 | + | ||
87 | + .desc { | ||
88 | + color: #00000066; | ||
89 | + font-size: 20rpx; | ||
90 | + margin-bottom: 12rpx; | ||
91 | + } | ||
92 | + | ||
93 | + .shopPrice { | ||
94 | + margin-bottom: 8rpx; | ||
95 | + | ||
96 | + .new { | ||
97 | + color: #fc4338ff; | ||
98 | + font-size: 28rpx; | ||
99 | + font-weight: 700; | ||
100 | + } | ||
101 | + | ||
102 | + .original { | ||
103 | + margin-left: 4rpx; | ||
104 | + color: #00000042; | ||
105 | + font-size: 20rpx; | ||
106 | + text-decoration: line-through; | ||
107 | + } | ||
108 | + } | ||
109 | + | ||
110 | + .points { | ||
111 | + color: #fc4338ff; | ||
112 | + font-size: 28rpx; | ||
113 | + font-weight: 700; | ||
114 | + | ||
115 | + image { | ||
116 | + margin-left: 4rpx; | ||
117 | + width: 24rpx; | ||
118 | + height: 24rpx; | ||
119 | + } | ||
120 | + } | ||
121 | + | ||
122 | + .sold { | ||
123 | + color: #00000066; | ||
124 | + font-size: 22rpx; | ||
125 | + line-height: 28rpx; | ||
126 | + } | ||
127 | + } | ||
128 | +} | ||
129 | +</style> |
componets/tipPop.vue
0 → 100644
1 | +<template> | ||
2 | + <view class=""> | ||
3 | + <u-popup :show="tipShow" :round="16" :safeAreaInsetBottom="false" mode="center" @close="pointsBtns(0)"> | ||
4 | + <view class="pointsPop flexV"> | ||
5 | + <view class="popTitle flexA" v-if="tipType==0"> | ||
6 | + {{integral}}<text>积分</text> | ||
7 | + </view> | ||
8 | + <view class="popTips">{{ | ||
9 | + tipType==0? '是否确认使用积分兑换' | ||
10 | + : tipType==1?'是否确定取消支付' | ||
11 | + : '是否确定取消订单'}}</view> | ||
12 | + <view class="pointsBtn flexJ"> | ||
13 | + <view class="clean flexC" @click="pointsBtns(0)">取消</view> | ||
14 | + <view class="yes flexC" @click="pointsBtns(1)">确认</view> | ||
15 | + </view> | ||
16 | + </view> | ||
17 | + </u-popup> | ||
18 | + </view> | ||
19 | +</template> | ||
20 | + | ||
21 | +<script setup> | ||
22 | + import { ref,reactive,onMounted,defineEmits } from 'vue' | ||
23 | + import {onShow,onLoad} from '@dcloudio/uni-app' | ||
24 | + const props = defineProps({ | ||
25 | + tipShow:{ | ||
26 | + type:Boolean, | ||
27 | + default:false | ||
28 | + }, | ||
29 | + // 积分 | ||
30 | + integral:{ | ||
31 | + type:String, | ||
32 | + default:0 | ||
33 | + }, | ||
34 | + //0是否积分兑换 1取消支付 2取消订单 | ||
35 | + tipType:{ | ||
36 | + type:Number, | ||
37 | + default:0 | ||
38 | + } | ||
39 | + }) | ||
40 | + // 是否使用积分弹窗 | ||
41 | + const pointsShow = ref(false) | ||
42 | + const emit = defineEmits(['pointsBtns']) | ||
43 | + // 积分弹窗 确认/取消按钮 | ||
44 | + const pointsBtns = (type)=> { | ||
45 | + emit('pointsBtns',type) | ||
46 | + } | ||
47 | +</script> | ||
48 | + | ||
49 | +<style lang="scss"> | ||
50 | + .pointsPop { | ||
51 | + width: 622rpx; | ||
52 | + padding: 26rpx 32rpx 28rpx; | ||
53 | + box-sizing: border-box; | ||
54 | + | ||
55 | + .popTitle { | ||
56 | + color: #fc4338ff; | ||
57 | + font-size: 48rpx; | ||
58 | + font-weight: 700; | ||
59 | + | ||
60 | + text{ | ||
61 | + margin: 12rpx 0 0 12rpx; | ||
62 | + color: #fc4338ff; | ||
63 | + font-size: 22rpx; | ||
64 | + } | ||
65 | + } | ||
66 | + | ||
67 | + .popTips { | ||
68 | + margin: 37rpx 0 52rpx; | ||
69 | + color: #000000e6; | ||
70 | + font-size: 32rpx; | ||
71 | + font-weight: 700; | ||
72 | + } | ||
73 | + | ||
74 | + .pointsBtn { | ||
75 | + width: 100%; | ||
76 | + | ||
77 | + .clean { | ||
78 | + width: 264rpx; | ||
79 | + height: 76rpx; | ||
80 | + border-radius: 46rpx; | ||
81 | + color: #000000e6; | ||
82 | + font-size: 28rpx; | ||
83 | + font-weight: 700; | ||
84 | + background: #f7f8faff; | ||
85 | + } | ||
86 | + | ||
87 | + .yes { | ||
88 | + width: 264rpx; | ||
89 | + height: 84rpx; | ||
90 | + border-radius: 280rpx; | ||
91 | + color: #ffffffff; | ||
92 | + font-size: 28rpx; | ||
93 | + font-weight: 700; | ||
94 | + background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%); | ||
95 | + } | ||
96 | + } | ||
97 | + } | ||
98 | +</style> |
index.html
0 → 100644
1 | +<!DOCTYPE html> | ||
2 | +<html lang="en"> | ||
3 | + <head> | ||
4 | + <meta charset="UTF-8" /> | ||
5 | + <script> | ||
6 | + var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || | ||
7 | + CSS.supports('top: constant(a)')) | ||
8 | + document.write( | ||
9 | + '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + | ||
10 | + (coverSupport ? ', viewport-fit=cover' : '') + '" />') | ||
11 | + </script> | ||
12 | + <title></title> | ||
13 | + <!--preload-links--> | ||
14 | + <!--app-context--> | ||
15 | + </head> | ||
16 | + <body> | ||
17 | + <div id="app"><!--app-html--></div> | ||
18 | + <script type="module" src="/main.js"></script> | ||
19 | + </body> | ||
20 | +</html> |
main.js
0 → 100644
1 | +import App from './App' | ||
2 | +// main.js | ||
3 | +import uviewPlus from 'uview-plus' | ||
4 | +// #ifndef VUE3 | ||
5 | +import Vue from 'vue' | ||
6 | +Vue.config.productionTip = false | ||
7 | +App.mpType = 'app' | ||
8 | + | ||
9 | +try { | ||
10 | + function isPromise(obj) { | ||
11 | + return ( | ||
12 | + !!obj && | ||
13 | + (typeof obj === "object" || typeof obj === "function") && | ||
14 | + typeof obj.then === "function" | ||
15 | + ); | ||
16 | + } | ||
17 | + | ||
18 | + // 统一 vue2 API Promise 化返回格式与 vue3 保持一致 | ||
19 | + uni.addInterceptor({ | ||
20 | + returnValue(res) { | ||
21 | + if (!isPromise(res)) { | ||
22 | + return res; | ||
23 | + } | ||
24 | + return new Promise((resolve, reject) => { | ||
25 | + res.then((res) => { | ||
26 | + if (res[0]) { | ||
27 | + reject(res[0]); | ||
28 | + } else { | ||
29 | + resolve(res[1]); | ||
30 | + } | ||
31 | + }); | ||
32 | + }); | ||
33 | + }, | ||
34 | + }); | ||
35 | +} catch (error) { } | ||
36 | + | ||
37 | +const app = new Vue({ | ||
38 | + ...App | ||
39 | +}) | ||
40 | +app.$mount() | ||
41 | +// #endif | ||
42 | + | ||
43 | +// #ifdef VUE3 | ||
44 | +import { createSSRApp } from 'vue' | ||
45 | +import methods from './api/methods.js' | ||
46 | +export function createApp() { | ||
47 | + const app = createSSRApp(App) | ||
48 | + app.config.globalProperties.$methods = methods | ||
49 | + app.use(uviewPlus) | ||
50 | + return { | ||
51 | + app | ||
52 | + } | ||
53 | +} | ||
54 | +// #endif |
manifest.json
0 → 100644
1 | +{ | ||
2 | + "name" : "healthMall", | ||
3 | + "appid" : "__UNI__C004291", | ||
4 | + "description" : "", | ||
5 | + "versionName" : "1.0.0", | ||
6 | + "versionCode" : "100", | ||
7 | + "transformPx" : false, | ||
8 | + /* 5+App特有相关 */ | ||
9 | + "app-plus" : { | ||
10 | + "usingComponents" : true, | ||
11 | + "nvueStyleCompiler" : "uni-app", | ||
12 | + "compilerVersion" : 3, | ||
13 | + "splashscreen" : { | ||
14 | + "alwaysShowBeforeRender" : true, | ||
15 | + "waiting" : true, | ||
16 | + "autoclose" : true, | ||
17 | + "delay" : 0 | ||
18 | + }, | ||
19 | + /* 模块配置 */ | ||
20 | + "modules" : {}, | ||
21 | + /* 应用发布信息 */ | ||
22 | + "distribute" : { | ||
23 | + /* android打包配置 */ | ||
24 | + "android" : { | ||
25 | + "permissions" : [ | ||
26 | + "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", | ||
27 | + "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", | ||
28 | + "<uses-permission android:name=\"android.permission.VIBRATE\"/>", | ||
29 | + "<uses-permission android:name=\"android.permission.READ_LOGS\"/>", | ||
30 | + "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", | ||
31 | + "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", | ||
32 | + "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", | ||
33 | + "<uses-permission android:name=\"android.permission.CAMERA\"/>", | ||
34 | + "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", | ||
35 | + "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", | ||
36 | + "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", | ||
37 | + "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", | ||
38 | + "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", | ||
39 | + "<uses-feature android:name=\"android.hardware.camera\"/>", | ||
40 | + "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" | ||
41 | + ] | ||
42 | + }, | ||
43 | + /* ios打包配置 */ | ||
44 | + "ios" : {}, | ||
45 | + /* SDK配置 */ | ||
46 | + "sdkConfigs" : {} | ||
47 | + } | ||
48 | + }, | ||
49 | + /* 快应用特有相关 */ | ||
50 | + "quickapp" : {}, | ||
51 | + /* 小程序特有相关 */ | ||
52 | + "mp-weixin" : { | ||
53 | + "appid" : "wxd6feb65ac83ce679", | ||
54 | + "setting" : { | ||
55 | + "urlCheck" : false | ||
56 | + }, | ||
57 | + "usingComponents" : true | ||
58 | + }, | ||
59 | + "mp-alipay" : { | ||
60 | + "usingComponents" : true | ||
61 | + }, | ||
62 | + "mp-baidu" : { | ||
63 | + "usingComponents" : true | ||
64 | + }, | ||
65 | + "mp-toutiao" : { | ||
66 | + "usingComponents" : true | ||
67 | + }, | ||
68 | + "uniStatistics" : { | ||
69 | + "enable" : false | ||
70 | + }, | ||
71 | + "vueVersion" : "3" | ||
72 | +} |
node_modules/.bin/acorn
0 → 100644
1 | +#!/bin/sh | ||
2 | +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | + | ||
4 | +case `uname` in | ||
5 | + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | +esac | ||
7 | + | ||
8 | +if [ -x "$basedir/node" ]; then | ||
9 | + exec "$basedir/node" "$basedir/../acorn/bin/acorn" "$@" | ||
10 | +else | ||
11 | + exec node "$basedir/../acorn/bin/acorn" "$@" | ||
12 | +fi |
node_modules/.bin/acorn.cmd
0 → 100644
1 | +@ECHO off | ||
2 | +GOTO start | ||
3 | +:find_dp0 | ||
4 | +SET dp0=%~dp0 | ||
5 | +EXIT /b | ||
6 | +:start | ||
7 | +SETLOCAL | ||
8 | +CALL :find_dp0 | ||
9 | + | ||
10 | +IF EXIST "%dp0%\node.exe" ( | ||
11 | + SET "_prog=%dp0%\node.exe" | ||
12 | +) ELSE ( | ||
13 | + SET "_prog=node" | ||
14 | + SET PATHEXT=%PATHEXT:;.JS;=;% | ||
15 | +) | ||
16 | + | ||
17 | +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\acorn\bin\acorn" %* |
node_modules/.bin/acorn.ps1
0 → 100644
1 | +#!/usr/bin/env pwsh | ||
2 | +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
3 | + | ||
4 | +$exe="" | ||
5 | +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
6 | + # Fix case when both the Windows and Linux builds of Node | ||
7 | + # are installed in the same directory | ||
8 | + $exe=".exe" | ||
9 | +} | ||
10 | +$ret=0 | ||
11 | +if (Test-Path "$basedir/node$exe") { | ||
12 | + # Support pipeline input | ||
13 | + if ($MyInvocation.ExpectingInput) { | ||
14 | + $input | & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args | ||
15 | + } else { | ||
16 | + & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args | ||
17 | + } | ||
18 | + $ret=$LASTEXITCODE | ||
19 | +} else { | ||
20 | + # Support pipeline input | ||
21 | + if ($MyInvocation.ExpectingInput) { | ||
22 | + $input | & "node$exe" "$basedir/../acorn/bin/acorn" $args | ||
23 | + } else { | ||
24 | + & "node$exe" "$basedir/../acorn/bin/acorn" $args | ||
25 | + } | ||
26 | + $ret=$LASTEXITCODE | ||
27 | +} | ||
28 | +exit $ret |
node_modules/.bin/browserslist
0 → 100644
1 | +#!/bin/sh | ||
2 | +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | + | ||
4 | +case `uname` in | ||
5 | + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | +esac | ||
7 | + | ||
8 | +if [ -x "$basedir/node" ]; then | ||
9 | + exec "$basedir/node" "$basedir/../browserslist/cli.js" "$@" | ||
10 | +else | ||
11 | + exec node "$basedir/../browserslist/cli.js" "$@" | ||
12 | +fi |
node_modules/.bin/browserslist.cmd
0 → 100644
1 | +@ECHO off | ||
2 | +GOTO start | ||
3 | +:find_dp0 | ||
4 | +SET dp0=%~dp0 | ||
5 | +EXIT /b | ||
6 | +:start | ||
7 | +SETLOCAL | ||
8 | +CALL :find_dp0 | ||
9 | + | ||
10 | +IF EXIST "%dp0%\node.exe" ( | ||
11 | + SET "_prog=%dp0%\node.exe" | ||
12 | +) ELSE ( | ||
13 | + SET "_prog=node" | ||
14 | + SET PATHEXT=%PATHEXT:;.JS;=;% | ||
15 | +) | ||
16 | + | ||
17 | +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\browserslist\cli.js" %* |
node_modules/.bin/browserslist.ps1
0 → 100644
1 | +#!/usr/bin/env pwsh | ||
2 | +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
3 | + | ||
4 | +$exe="" | ||
5 | +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
6 | + # Fix case when both the Windows and Linux builds of Node | ||
7 | + # are installed in the same directory | ||
8 | + $exe=".exe" | ||
9 | +} | ||
10 | +$ret=0 | ||
11 | +if (Test-Path "$basedir/node$exe") { | ||
12 | + # Support pipeline input | ||
13 | + if ($MyInvocation.ExpectingInput) { | ||
14 | + $input | & "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args | ||
15 | + } else { | ||
16 | + & "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args | ||
17 | + } | ||
18 | + $ret=$LASTEXITCODE | ||
19 | +} else { | ||
20 | + # Support pipeline input | ||
21 | + if ($MyInvocation.ExpectingInput) { | ||
22 | + $input | & "node$exe" "$basedir/../browserslist/cli.js" $args | ||
23 | + } else { | ||
24 | + & "node$exe" "$basedir/../browserslist/cli.js" $args | ||
25 | + } | ||
26 | + $ret=$LASTEXITCODE | ||
27 | +} | ||
28 | +exit $ret |
node_modules/.bin/json5
0 → 100644
1 | +#!/bin/sh | ||
2 | +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | + | ||
4 | +case `uname` in | ||
5 | + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | +esac | ||
7 | + | ||
8 | +if [ -x "$basedir/node" ]; then | ||
9 | + exec "$basedir/node" "$basedir/../json5/lib/cli.js" "$@" | ||
10 | +else | ||
11 | + exec node "$basedir/../json5/lib/cli.js" "$@" | ||
12 | +fi |
node_modules/.bin/json5.cmd
0 → 100644
1 | +@ECHO off | ||
2 | +GOTO start | ||
3 | +:find_dp0 | ||
4 | +SET dp0=%~dp0 | ||
5 | +EXIT /b | ||
6 | +:start | ||
7 | +SETLOCAL | ||
8 | +CALL :find_dp0 | ||
9 | + | ||
10 | +IF EXIST "%dp0%\node.exe" ( | ||
11 | + SET "_prog=%dp0%\node.exe" | ||
12 | +) ELSE ( | ||
13 | + SET "_prog=node" | ||
14 | + SET PATHEXT=%PATHEXT:;.JS;=;% | ||
15 | +) | ||
16 | + | ||
17 | +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\json5\lib\cli.js" %* |
node_modules/.bin/json5.ps1
0 → 100644
1 | +#!/usr/bin/env pwsh | ||
2 | +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
3 | + | ||
4 | +$exe="" | ||
5 | +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
6 | + # Fix case when both the Windows and Linux builds of Node | ||
7 | + # are installed in the same directory | ||
8 | + $exe=".exe" | ||
9 | +} | ||
10 | +$ret=0 | ||
11 | +if (Test-Path "$basedir/node$exe") { | ||
12 | + # Support pipeline input | ||
13 | + if ($MyInvocation.ExpectingInput) { | ||
14 | + $input | & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args | ||
15 | + } else { | ||
16 | + & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args | ||
17 | + } | ||
18 | + $ret=$LASTEXITCODE | ||
19 | +} else { | ||
20 | + # Support pipeline input | ||
21 | + if ($MyInvocation.ExpectingInput) { | ||
22 | + $input | & "node$exe" "$basedir/../json5/lib/cli.js" $args | ||
23 | + } else { | ||
24 | + & "node$exe" "$basedir/../json5/lib/cli.js" $args | ||
25 | + } | ||
26 | + $ret=$LASTEXITCODE | ||
27 | +} | ||
28 | +exit $ret |
node_modules/.bin/sass
0 → 100644
1 | +#!/bin/sh | ||
2 | +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | + | ||
4 | +case `uname` in | ||
5 | + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | +esac | ||
7 | + | ||
8 | +if [ -x "$basedir/node" ]; then | ||
9 | + exec "$basedir/node" "$basedir/../sass/sass.js" "$@" | ||
10 | +else | ||
11 | + exec node "$basedir/../sass/sass.js" "$@" | ||
12 | +fi |
node_modules/.bin/sass.cmd
0 → 100644
1 | +@ECHO off | ||
2 | +GOTO start | ||
3 | +:find_dp0 | ||
4 | +SET dp0=%~dp0 | ||
5 | +EXIT /b | ||
6 | +:start | ||
7 | +SETLOCAL | ||
8 | +CALL :find_dp0 | ||
9 | + | ||
10 | +IF EXIST "%dp0%\node.exe" ( | ||
11 | + SET "_prog=%dp0%\node.exe" | ||
12 | +) ELSE ( | ||
13 | + SET "_prog=node" | ||
14 | + SET PATHEXT=%PATHEXT:;.JS;=;% | ||
15 | +) | ||
16 | + | ||
17 | +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\sass\sass.js" %* |
node_modules/.bin/sass.ps1
0 → 100644
1 | +#!/usr/bin/env pwsh | ||
2 | +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
3 | + | ||
4 | +$exe="" | ||
5 | +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
6 | + # Fix case when both the Windows and Linux builds of Node | ||
7 | + # are installed in the same directory | ||
8 | + $exe=".exe" | ||
9 | +} | ||
10 | +$ret=0 | ||
11 | +if (Test-Path "$basedir/node$exe") { | ||
12 | + # Support pipeline input | ||
13 | + if ($MyInvocation.ExpectingInput) { | ||
14 | + $input | & "$basedir/node$exe" "$basedir/../sass/sass.js" $args | ||
15 | + } else { | ||
16 | + & "$basedir/node$exe" "$basedir/../sass/sass.js" $args | ||
17 | + } | ||
18 | + $ret=$LASTEXITCODE | ||
19 | +} else { | ||
20 | + # Support pipeline input | ||
21 | + if ($MyInvocation.ExpectingInput) { | ||
22 | + $input | & "node$exe" "$basedir/../sass/sass.js" $args | ||
23 | + } else { | ||
24 | + & "node$exe" "$basedir/../sass/sass.js" $args | ||
25 | + } | ||
26 | + $ret=$LASTEXITCODE | ||
27 | +} | ||
28 | +exit $ret |
node_modules/.bin/semver
0 → 100644
1 | +#!/bin/sh | ||
2 | +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | + | ||
4 | +case `uname` in | ||
5 | + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | +esac | ||
7 | + | ||
8 | +if [ -x "$basedir/node" ]; then | ||
9 | + exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@" | ||
10 | +else | ||
11 | + exec node "$basedir/../semver/bin/semver.js" "$@" | ||
12 | +fi |
node_modules/.bin/semver.cmd
0 → 100644
1 | +@ECHO off | ||
2 | +GOTO start | ||
3 | +:find_dp0 | ||
4 | +SET dp0=%~dp0 | ||
5 | +EXIT /b | ||
6 | +:start | ||
7 | +SETLOCAL | ||
8 | +CALL :find_dp0 | ||
9 | + | ||
10 | +IF EXIST "%dp0%\node.exe" ( | ||
11 | + SET "_prog=%dp0%\node.exe" | ||
12 | +) ELSE ( | ||
13 | + SET "_prog=node" | ||
14 | + SET PATHEXT=%PATHEXT:;.JS;=;% | ||
15 | +) | ||
16 | + | ||
17 | +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %* |
node_modules/.bin/semver.ps1
0 → 100644
1 | +#!/usr/bin/env pwsh | ||
2 | +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
3 | + | ||
4 | +$exe="" | ||
5 | +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
6 | + # Fix case when both the Windows and Linux builds of Node | ||
7 | + # are installed in the same directory | ||
8 | + $exe=".exe" | ||
9 | +} | ||
10 | +$ret=0 | ||
11 | +if (Test-Path "$basedir/node$exe") { | ||
12 | + # Support pipeline input | ||
13 | + if ($MyInvocation.ExpectingInput) { | ||
14 | + $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args | ||
15 | + } else { | ||
16 | + & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args | ||
17 | + } | ||
18 | + $ret=$LASTEXITCODE | ||
19 | +} else { | ||
20 | + # Support pipeline input | ||
21 | + if ($MyInvocation.ExpectingInput) { | ||
22 | + $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args | ||
23 | + } else { | ||
24 | + & "node$exe" "$basedir/../semver/bin/semver.js" $args | ||
25 | + } | ||
26 | + $ret=$LASTEXITCODE | ||
27 | +} | ||
28 | +exit $ret |
node_modules/.bin/terser
0 → 100644
1 | +#!/bin/sh | ||
2 | +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | + | ||
4 | +case `uname` in | ||
5 | + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | +esac | ||
7 | + | ||
8 | +if [ -x "$basedir/node" ]; then | ||
9 | + exec "$basedir/node" "$basedir/../terser/bin/terser" "$@" | ||
10 | +else | ||
11 | + exec node "$basedir/../terser/bin/terser" "$@" | ||
12 | +fi |
node_modules/.bin/terser.cmd
0 → 100644
1 | +@ECHO off | ||
2 | +GOTO start | ||
3 | +:find_dp0 | ||
4 | +SET dp0=%~dp0 | ||
5 | +EXIT /b | ||
6 | +:start | ||
7 | +SETLOCAL | ||
8 | +CALL :find_dp0 | ||
9 | + | ||
10 | +IF EXIST "%dp0%\node.exe" ( | ||
11 | + SET "_prog=%dp0%\node.exe" | ||
12 | +) ELSE ( | ||
13 | + SET "_prog=node" | ||
14 | + SET PATHEXT=%PATHEXT:;.JS;=;% | ||
15 | +) | ||
16 | + | ||
17 | +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\terser\bin\terser" %* |
node_modules/.bin/terser.ps1
0 → 100644
1 | +#!/usr/bin/env pwsh | ||
2 | +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
3 | + | ||
4 | +$exe="" | ||
5 | +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
6 | + # Fix case when both the Windows and Linux builds of Node | ||
7 | + # are installed in the same directory | ||
8 | + $exe=".exe" | ||
9 | +} | ||
10 | +$ret=0 | ||
11 | +if (Test-Path "$basedir/node$exe") { | ||
12 | + # Support pipeline input | ||
13 | + if ($MyInvocation.ExpectingInput) { | ||
14 | + $input | & "$basedir/node$exe" "$basedir/../terser/bin/terser" $args | ||
15 | + } else { | ||
16 | + & "$basedir/node$exe" "$basedir/../terser/bin/terser" $args | ||
17 | + } | ||
18 | + $ret=$LASTEXITCODE | ||
19 | +} else { | ||
20 | + # Support pipeline input | ||
21 | + if ($MyInvocation.ExpectingInput) { | ||
22 | + $input | & "node$exe" "$basedir/../terser/bin/terser" $args | ||
23 | + } else { | ||
24 | + & "node$exe" "$basedir/../terser/bin/terser" $args | ||
25 | + } | ||
26 | + $ret=$LASTEXITCODE | ||
27 | +} | ||
28 | +exit $ret |
node_modules/.bin/update-browserslist-db
0 → 100644
1 | +#!/bin/sh | ||
2 | +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | + | ||
4 | +case `uname` in | ||
5 | + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | +esac | ||
7 | + | ||
8 | +if [ -x "$basedir/node" ]; then | ||
9 | + exec "$basedir/node" "$basedir/../update-browserslist-db/cli.js" "$@" | ||
10 | +else | ||
11 | + exec node "$basedir/../update-browserslist-db/cli.js" "$@" | ||
12 | +fi |
node_modules/.bin/update-browserslist-db.cmd
0 → 100644
1 | +@ECHO off | ||
2 | +GOTO start | ||
3 | +:find_dp0 | ||
4 | +SET dp0=%~dp0 | ||
5 | +EXIT /b | ||
6 | +:start | ||
7 | +SETLOCAL | ||
8 | +CALL :find_dp0 | ||
9 | + | ||
10 | +IF EXIST "%dp0%\node.exe" ( | ||
11 | + SET "_prog=%dp0%\node.exe" | ||
12 | +) ELSE ( | ||
13 | + SET "_prog=node" | ||
14 | + SET PATHEXT=%PATHEXT:;.JS;=;% | ||
15 | +) | ||
16 | + | ||
17 | +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\update-browserslist-db\cli.js" %* |
node_modules/.bin/update-browserslist-db.ps1
0 → 100644
1 | +#!/usr/bin/env pwsh | ||
2 | +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
3 | + | ||
4 | +$exe="" | ||
5 | +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
6 | + # Fix case when both the Windows and Linux builds of Node | ||
7 | + # are installed in the same directory | ||
8 | + $exe=".exe" | ||
9 | +} | ||
10 | +$ret=0 | ||
11 | +if (Test-Path "$basedir/node$exe") { | ||
12 | + # Support pipeline input | ||
13 | + if ($MyInvocation.ExpectingInput) { | ||
14 | + $input | & "$basedir/node$exe" "$basedir/../update-browserslist-db/cli.js" $args | ||
15 | + } else { | ||
16 | + & "$basedir/node$exe" "$basedir/../update-browserslist-db/cli.js" $args | ||
17 | + } | ||
18 | + $ret=$LASTEXITCODE | ||
19 | +} else { | ||
20 | + # Support pipeline input | ||
21 | + if ($MyInvocation.ExpectingInput) { | ||
22 | + $input | & "node$exe" "$basedir/../update-browserslist-db/cli.js" $args | ||
23 | + } else { | ||
24 | + & "node$exe" "$basedir/../update-browserslist-db/cli.js" $args | ||
25 | + } | ||
26 | + $ret=$LASTEXITCODE | ||
27 | +} | ||
28 | +exit $ret |
node_modules/.bin/webpack
0 → 100644
1 | +#!/bin/sh | ||
2 | +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | + | ||
4 | +case `uname` in | ||
5 | + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | +esac | ||
7 | + | ||
8 | +if [ -x "$basedir/node" ]; then | ||
9 | + exec "$basedir/node" "$basedir/../webpack/bin/webpack.js" "$@" | ||
10 | +else | ||
11 | + exec node "$basedir/../webpack/bin/webpack.js" "$@" | ||
12 | +fi |
node_modules/.bin/webpack.cmd
0 → 100644
1 | +@ECHO off | ||
2 | +GOTO start | ||
3 | +:find_dp0 | ||
4 | +SET dp0=%~dp0 | ||
5 | +EXIT /b | ||
6 | +:start | ||
7 | +SETLOCAL | ||
8 | +CALL :find_dp0 | ||
9 | + | ||
10 | +IF EXIST "%dp0%\node.exe" ( | ||
11 | + SET "_prog=%dp0%\node.exe" | ||
12 | +) ELSE ( | ||
13 | + SET "_prog=node" | ||
14 | + SET PATHEXT=%PATHEXT:;.JS;=;% | ||
15 | +) | ||
16 | + | ||
17 | +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\webpack\bin\webpack.js" %* |
node_modules/.bin/webpack.ps1
0 → 100644
1 | +#!/usr/bin/env pwsh | ||
2 | +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
3 | + | ||
4 | +$exe="" | ||
5 | +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
6 | + # Fix case when both the Windows and Linux builds of Node | ||
7 | + # are installed in the same directory | ||
8 | + $exe=".exe" | ||
9 | +} | ||
10 | +$ret=0 | ||
11 | +if (Test-Path "$basedir/node$exe") { | ||
12 | + # Support pipeline input | ||
13 | + if ($MyInvocation.ExpectingInput) { | ||
14 | + $input | & "$basedir/node$exe" "$basedir/../webpack/bin/webpack.js" $args | ||
15 | + } else { | ||
16 | + & "$basedir/node$exe" "$basedir/../webpack/bin/webpack.js" $args | ||
17 | + } | ||
18 | + $ret=$LASTEXITCODE | ||
19 | +} else { | ||
20 | + # Support pipeline input | ||
21 | + if ($MyInvocation.ExpectingInput) { | ||
22 | + $input | & "node$exe" "$basedir/../webpack/bin/webpack.js" $args | ||
23 | + } else { | ||
24 | + & "node$exe" "$basedir/../webpack/bin/webpack.js" $args | ||
25 | + } | ||
26 | + $ret=$LASTEXITCODE | ||
27 | +} | ||
28 | +exit $ret |
node_modules/.package-lock.json
0 → 100644
1 | +{ | ||
2 | + "name": "healthMall", | ||
3 | + "lockfileVersion": 3, | ||
4 | + "requires": true, | ||
5 | + "packages": { | ||
6 | + "node_modules/@jridgewell/gen-mapping": { | ||
7 | + "version": "0.3.3", | ||
8 | + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", | ||
9 | + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", | ||
10 | + "dev": true, | ||
11 | + "peer": true, | ||
12 | + "dependencies": { | ||
13 | + "@jridgewell/set-array": "^1.0.1", | ||
14 | + "@jridgewell/sourcemap-codec": "^1.4.10", | ||
15 | + "@jridgewell/trace-mapping": "^0.3.9" | ||
16 | + }, | ||
17 | + "engines": { | ||
18 | + "node": ">=6.0.0" | ||
19 | + } | ||
20 | + }, | ||
21 | + "node_modules/@jridgewell/resolve-uri": { | ||
22 | + "version": "3.1.0", | ||
23 | + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", | ||
24 | + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", | ||
25 | + "dev": true, | ||
26 | + "peer": true, | ||
27 | + "engines": { | ||
28 | + "node": ">=6.0.0" | ||
29 | + } | ||
30 | + }, | ||
31 | + "node_modules/@jridgewell/set-array": { | ||
32 | + "version": "1.1.2", | ||
33 | + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", | ||
34 | + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", | ||
35 | + "dev": true, | ||
36 | + "peer": true, | ||
37 | + "engines": { | ||
38 | + "node": ">=6.0.0" | ||
39 | + } | ||
40 | + }, | ||
41 | + "node_modules/@jridgewell/source-map": { | ||
42 | + "version": "0.3.3", | ||
43 | + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.3.tgz", | ||
44 | + "integrity": "sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==", | ||
45 | + "dev": true, | ||
46 | + "peer": true, | ||
47 | + "dependencies": { | ||
48 | + "@jridgewell/gen-mapping": "^0.3.0", | ||
49 | + "@jridgewell/trace-mapping": "^0.3.9" | ||
50 | + } | ||
51 | + }, | ||
52 | + "node_modules/@jridgewell/sourcemap-codec": { | ||
53 | + "version": "1.4.14", | ||
54 | + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", | ||
55 | + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", | ||
56 | + "dev": true, | ||
57 | + "peer": true | ||
58 | + }, | ||
59 | + "node_modules/@jridgewell/trace-mapping": { | ||
60 | + "version": "0.3.18", | ||
61 | + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", | ||
62 | + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", | ||
63 | + "dev": true, | ||
64 | + "peer": true, | ||
65 | + "dependencies": { | ||
66 | + "@jridgewell/resolve-uri": "3.1.0", | ||
67 | + "@jridgewell/sourcemap-codec": "1.4.14" | ||
68 | + } | ||
69 | + }, | ||
70 | + "node_modules/@types/eslint": { | ||
71 | + "version": "8.40.0", | ||
72 | + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.40.0.tgz", | ||
73 | + "integrity": "sha512-nbq2mvc/tBrK9zQQuItvjJl++GTN5j06DaPtp3hZCpngmG6Q3xoyEmd0TwZI0gAy/G1X0zhGBbr2imsGFdFV0g==", | ||
74 | + "dev": true, | ||
75 | + "peer": true, | ||
76 | + "dependencies": { | ||
77 | + "@types/estree": "*", | ||
78 | + "@types/json-schema": "*" | ||
79 | + } | ||
80 | + }, | ||
81 | + "node_modules/@types/eslint-scope": { | ||
82 | + "version": "3.7.4", | ||
83 | + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", | ||
84 | + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", | ||
85 | + "dev": true, | ||
86 | + "peer": true, | ||
87 | + "dependencies": { | ||
88 | + "@types/eslint": "*", | ||
89 | + "@types/estree": "*" | ||
90 | + } | ||
91 | + }, | ||
92 | + "node_modules/@types/estree": { | ||
93 | + "version": "1.0.1", | ||
94 | + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", | ||
95 | + "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", | ||
96 | + "dev": true, | ||
97 | + "peer": true | ||
98 | + }, | ||
99 | + "node_modules/@types/json-schema": { | ||
100 | + "version": "7.0.12", | ||
101 | + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", | ||
102 | + "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", | ||
103 | + "dev": true | ||
104 | + }, | ||
105 | + "node_modules/@types/node": { | ||
106 | + "version": "20.2.5", | ||
107 | + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.5.tgz", | ||
108 | + "integrity": "sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==", | ||
109 | + "dev": true, | ||
110 | + "peer": true | ||
111 | + }, | ||
112 | + "node_modules/@webassemblyjs/ast": { | ||
113 | + "version": "1.11.6", | ||
114 | + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", | ||
115 | + "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", | ||
116 | + "dev": true, | ||
117 | + "peer": true, | ||
118 | + "dependencies": { | ||
119 | + "@webassemblyjs/helper-numbers": "1.11.6", | ||
120 | + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" | ||
121 | + } | ||
122 | + }, | ||
123 | + "node_modules/@webassemblyjs/floating-point-hex-parser": { | ||
124 | + "version": "1.11.6", | ||
125 | + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", | ||
126 | + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", | ||
127 | + "dev": true, | ||
128 | + "peer": true | ||
129 | + }, | ||
130 | + "node_modules/@webassemblyjs/helper-api-error": { | ||
131 | + "version": "1.11.6", | ||
132 | + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", | ||
133 | + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", | ||
134 | + "dev": true, | ||
135 | + "peer": true | ||
136 | + }, | ||
137 | + "node_modules/@webassemblyjs/helper-buffer": { | ||
138 | + "version": "1.11.6", | ||
139 | + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", | ||
140 | + "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", | ||
141 | + "dev": true, | ||
142 | + "peer": true | ||
143 | + }, | ||
144 | + "node_modules/@webassemblyjs/helper-numbers": { | ||
145 | + "version": "1.11.6", | ||
146 | + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", | ||
147 | + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", | ||
148 | + "dev": true, | ||
149 | + "peer": true, | ||
150 | + "dependencies": { | ||
151 | + "@webassemblyjs/floating-point-hex-parser": "1.11.6", | ||
152 | + "@webassemblyjs/helper-api-error": "1.11.6", | ||
153 | + "@xtuc/long": "4.2.2" | ||
154 | + } | ||
155 | + }, | ||
156 | + "node_modules/@webassemblyjs/helper-wasm-bytecode": { | ||
157 | + "version": "1.11.6", | ||
158 | + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", | ||
159 | + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", | ||
160 | + "dev": true, | ||
161 | + "peer": true | ||
162 | + }, | ||
163 | + "node_modules/@webassemblyjs/helper-wasm-section": { | ||
164 | + "version": "1.11.6", | ||
165 | + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", | ||
166 | + "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", | ||
167 | + "dev": true, | ||
168 | + "peer": true, | ||
169 | + "dependencies": { | ||
170 | + "@webassemblyjs/ast": "1.11.6", | ||
171 | + "@webassemblyjs/helper-buffer": "1.11.6", | ||
172 | + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", | ||
173 | + "@webassemblyjs/wasm-gen": "1.11.6" | ||
174 | + } | ||
175 | + }, | ||
176 | + "node_modules/@webassemblyjs/ieee754": { | ||
177 | + "version": "1.11.6", | ||
178 | + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", | ||
179 | + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", | ||
180 | + "dev": true, | ||
181 | + "peer": true, | ||
182 | + "dependencies": { | ||
183 | + "@xtuc/ieee754": "^1.2.0" | ||
184 | + } | ||
185 | + }, | ||
186 | + "node_modules/@webassemblyjs/leb128": { | ||
187 | + "version": "1.11.6", | ||
188 | + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", | ||
189 | + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", | ||
190 | + "dev": true, | ||
191 | + "peer": true, | ||
192 | + "dependencies": { | ||
193 | + "@xtuc/long": "4.2.2" | ||
194 | + } | ||
195 | + }, | ||
196 | + "node_modules/@webassemblyjs/utf8": { | ||
197 | + "version": "1.11.6", | ||
198 | + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", | ||
199 | + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", | ||
200 | + "dev": true, | ||
201 | + "peer": true | ||
202 | + }, | ||
203 | + "node_modules/@webassemblyjs/wasm-edit": { | ||
204 | + "version": "1.11.6", | ||
205 | + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", | ||
206 | + "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", | ||
207 | + "dev": true, | ||
208 | + "peer": true, | ||
209 | + "dependencies": { | ||
210 | + "@webassemblyjs/ast": "1.11.6", | ||
211 | + "@webassemblyjs/helper-buffer": "1.11.6", | ||
212 | + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", | ||
213 | + "@webassemblyjs/helper-wasm-section": "1.11.6", | ||
214 | + "@webassemblyjs/wasm-gen": "1.11.6", | ||
215 | + "@webassemblyjs/wasm-opt": "1.11.6", | ||
216 | + "@webassemblyjs/wasm-parser": "1.11.6", | ||
217 | + "@webassemblyjs/wast-printer": "1.11.6" | ||
218 | + } | ||
219 | + }, | ||
220 | + "node_modules/@webassemblyjs/wasm-gen": { | ||
221 | + "version": "1.11.6", | ||
222 | + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", | ||
223 | + "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", | ||
224 | + "dev": true, | ||
225 | + "peer": true, | ||
226 | + "dependencies": { | ||
227 | + "@webassemblyjs/ast": "1.11.6", | ||
228 | + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", | ||
229 | + "@webassemblyjs/ieee754": "1.11.6", | ||
230 | + "@webassemblyjs/leb128": "1.11.6", | ||
231 | + "@webassemblyjs/utf8": "1.11.6" | ||
232 | + } | ||
233 | + }, | ||
234 | + "node_modules/@webassemblyjs/wasm-opt": { | ||
235 | + "version": "1.11.6", | ||
236 | + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", | ||
237 | + "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", | ||
238 | + "dev": true, | ||
239 | + "peer": true, | ||
240 | + "dependencies": { | ||
241 | + "@webassemblyjs/ast": "1.11.6", | ||
242 | + "@webassemblyjs/helper-buffer": "1.11.6", | ||
243 | + "@webassemblyjs/wasm-gen": "1.11.6", | ||
244 | + "@webassemblyjs/wasm-parser": "1.11.6" | ||
245 | + } | ||
246 | + }, | ||
247 | + "node_modules/@webassemblyjs/wasm-parser": { | ||
248 | + "version": "1.11.6", | ||
249 | + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", | ||
250 | + "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", | ||
251 | + "dev": true, | ||
252 | + "peer": true, | ||
253 | + "dependencies": { | ||
254 | + "@webassemblyjs/ast": "1.11.6", | ||
255 | + "@webassemblyjs/helper-api-error": "1.11.6", | ||
256 | + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", | ||
257 | + "@webassemblyjs/ieee754": "1.11.6", | ||
258 | + "@webassemblyjs/leb128": "1.11.6", | ||
259 | + "@webassemblyjs/utf8": "1.11.6" | ||
260 | + } | ||
261 | + }, | ||
262 | + "node_modules/@webassemblyjs/wast-printer": { | ||
263 | + "version": "1.11.6", | ||
264 | + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", | ||
265 | + "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", | ||
266 | + "dev": true, | ||
267 | + "peer": true, | ||
268 | + "dependencies": { | ||
269 | + "@webassemblyjs/ast": "1.11.6", | ||
270 | + "@xtuc/long": "4.2.2" | ||
271 | + } | ||
272 | + }, | ||
273 | + "node_modules/@xtuc/ieee754": { | ||
274 | + "version": "1.2.0", | ||
275 | + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", | ||
276 | + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", | ||
277 | + "dev": true, | ||
278 | + "peer": true | ||
279 | + }, | ||
280 | + "node_modules/@xtuc/long": { | ||
281 | + "version": "4.2.2", | ||
282 | + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", | ||
283 | + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", | ||
284 | + "dev": true, | ||
285 | + "peer": true | ||
286 | + }, | ||
287 | + "node_modules/acorn": { | ||
288 | + "version": "8.8.2", | ||
289 | + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", | ||
290 | + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", | ||
291 | + "dev": true, | ||
292 | + "peer": true, | ||
293 | + "bin": { | ||
294 | + "acorn": "bin/acorn" | ||
295 | + }, | ||
296 | + "engines": { | ||
297 | + "node": ">=0.4.0" | ||
298 | + } | ||
299 | + }, | ||
300 | + "node_modules/acorn-import-assertions": { | ||
301 | + "version": "1.9.0", | ||
302 | + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", | ||
303 | + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", | ||
304 | + "dev": true, | ||
305 | + "peer": true, | ||
306 | + "peerDependencies": { | ||
307 | + "acorn": "^8" | ||
308 | + } | ||
309 | + }, | ||
310 | + "node_modules/ajv": { | ||
311 | + "version": "6.12.6", | ||
312 | + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", | ||
313 | + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", | ||
314 | + "dev": true, | ||
315 | + "dependencies": { | ||
316 | + "fast-deep-equal": "^3.1.1", | ||
317 | + "fast-json-stable-stringify": "^2.0.0", | ||
318 | + "json-schema-traverse": "^0.4.1", | ||
319 | + "uri-js": "^4.2.2" | ||
320 | + }, | ||
321 | + "funding": { | ||
322 | + "type": "github", | ||
323 | + "url": "https://github.com/sponsors/epoberezkin" | ||
324 | + } | ||
325 | + }, | ||
326 | + "node_modules/ajv-keywords": { | ||
327 | + "version": "3.5.2", | ||
328 | + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", | ||
329 | + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", | ||
330 | + "dev": true, | ||
331 | + "peerDependencies": { | ||
332 | + "ajv": "^6.9.1" | ||
333 | + } | ||
334 | + }, | ||
335 | + "node_modules/anymatch": { | ||
336 | + "version": "3.1.3", | ||
337 | + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", | ||
338 | + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", | ||
339 | + "dev": true, | ||
340 | + "dependencies": { | ||
341 | + "normalize-path": "^3.0.0", | ||
342 | + "picomatch": "^2.0.4" | ||
343 | + }, | ||
344 | + "engines": { | ||
345 | + "node": ">= 8" | ||
346 | + } | ||
347 | + }, | ||
348 | + "node_modules/big.js": { | ||
349 | + "version": "5.2.2", | ||
350 | + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", | ||
351 | + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", | ||
352 | + "dev": true, | ||
353 | + "engines": { | ||
354 | + "node": "*" | ||
355 | + } | ||
356 | + }, | ||
357 | + "node_modules/binary-extensions": { | ||
358 | + "version": "2.2.0", | ||
359 | + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", | ||
360 | + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", | ||
361 | + "dev": true, | ||
362 | + "engines": { | ||
363 | + "node": ">=8" | ||
364 | + } | ||
365 | + }, | ||
366 | + "node_modules/braces": { | ||
367 | + "version": "3.0.2", | ||
368 | + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", | ||
369 | + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", | ||
370 | + "dev": true, | ||
371 | + "dependencies": { | ||
372 | + "fill-range": "^7.0.1" | ||
373 | + }, | ||
374 | + "engines": { | ||
375 | + "node": ">=8" | ||
376 | + } | ||
377 | + }, | ||
378 | + "node_modules/browserslist": { | ||
379 | + "version": "4.21.7", | ||
380 | + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.7.tgz", | ||
381 | + "integrity": "sha512-BauCXrQ7I2ftSqd2mvKHGo85XR0u7Ru3C/Hxsy/0TkfCtjrmAbPdzLGasmoiBxplpDXlPvdjX9u7srIMfgasNA==", | ||
382 | + "dev": true, | ||
383 | + "funding": [ | ||
384 | + { | ||
385 | + "type": "opencollective", | ||
386 | + "url": "https://opencollective.com/browserslist" | ||
387 | + }, | ||
388 | + { | ||
389 | + "type": "tidelift", | ||
390 | + "url": "https://tidelift.com/funding/github/npm/browserslist" | ||
391 | + }, | ||
392 | + { | ||
393 | + "type": "github", | ||
394 | + "url": "https://github.com/sponsors/ai" | ||
395 | + } | ||
396 | + ], | ||
397 | + "peer": true, | ||
398 | + "dependencies": { | ||
399 | + "caniuse-lite": "^1.0.30001489", | ||
400 | + "electron-to-chromium": "^1.4.411", | ||
401 | + "node-releases": "^2.0.12", | ||
402 | + "update-browserslist-db": "^1.0.11" | ||
403 | + }, | ||
404 | + "bin": { | ||
405 | + "browserslist": "cli.js" | ||
406 | + }, | ||
407 | + "engines": { | ||
408 | + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" | ||
409 | + } | ||
410 | + }, | ||
411 | + "node_modules/buffer-from": { | ||
412 | + "version": "1.1.2", | ||
413 | + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", | ||
414 | + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", | ||
415 | + "dev": true, | ||
416 | + "peer": true | ||
417 | + }, | ||
418 | + "node_modules/caniuse-lite": { | ||
419 | + "version": "1.0.30001495", | ||
420 | + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001495.tgz", | ||
421 | + "integrity": "sha512-F6x5IEuigtUfU5ZMQK2jsy5JqUUlEFRVZq8bO2a+ysq5K7jD6PPc9YXZj78xDNS3uNchesp1Jw47YXEqr+Viyg==", | ||
422 | + "dev": true, | ||
423 | + "funding": [ | ||
424 | + { | ||
425 | + "type": "opencollective", | ||
426 | + "url": "https://opencollective.com/browserslist" | ||
427 | + }, | ||
428 | + { | ||
429 | + "type": "tidelift", | ||
430 | + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" | ||
431 | + }, | ||
432 | + { | ||
433 | + "type": "github", | ||
434 | + "url": "https://github.com/sponsors/ai" | ||
435 | + } | ||
436 | + ], | ||
437 | + "peer": true | ||
438 | + }, | ||
439 | + "node_modules/chokidar": { | ||
440 | + "version": "3.5.3", | ||
441 | + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", | ||
442 | + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", | ||
443 | + "dev": true, | ||
444 | + "funding": [ | ||
445 | + { | ||
446 | + "type": "individual", | ||
447 | + "url": "https://paulmillr.com/funding/" | ||
448 | + } | ||
449 | + ], | ||
450 | + "dependencies": { | ||
451 | + "anymatch": "~3.1.2", | ||
452 | + "braces": "~3.0.2", | ||
453 | + "glob-parent": "~5.1.2", | ||
454 | + "is-binary-path": "~2.1.0", | ||
455 | + "is-glob": "~4.0.1", | ||
456 | + "normalize-path": "~3.0.0", | ||
457 | + "readdirp": "~3.6.0" | ||
458 | + }, | ||
459 | + "engines": { | ||
460 | + "node": ">= 8.10.0" | ||
461 | + }, | ||
462 | + "optionalDependencies": { | ||
463 | + "fsevents": "~2.3.2" | ||
464 | + } | ||
465 | + }, | ||
466 | + "node_modules/chrome-trace-event": { | ||
467 | + "version": "1.0.3", | ||
468 | + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", | ||
469 | + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", | ||
470 | + "dev": true, | ||
471 | + "peer": true, | ||
472 | + "engines": { | ||
473 | + "node": ">=6.0" | ||
474 | + } | ||
475 | + }, | ||
476 | + "node_modules/clipboard": { | ||
477 | + "version": "2.0.11", | ||
478 | + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz", | ||
479 | + "integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==", | ||
480 | + "dependencies": { | ||
481 | + "good-listener": "^1.2.2", | ||
482 | + "select": "^1.1.2", | ||
483 | + "tiny-emitter": "^2.0.0" | ||
484 | + } | ||
485 | + }, | ||
486 | + "node_modules/commander": { | ||
487 | + "version": "2.20.3", | ||
488 | + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", | ||
489 | + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", | ||
490 | + "dev": true, | ||
491 | + "peer": true | ||
492 | + }, | ||
493 | + "node_modules/dayjs": { | ||
494 | + "version": "1.11.8", | ||
495 | + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.8.tgz", | ||
496 | + "integrity": "sha512-LcgxzFoWMEPO7ggRv1Y2N31hUf2R0Vj7fuy/m+Bg1K8rr+KAs1AEy4y9jd5DXe8pbHgX+srkHNS7TH6Q6ZhYeQ==" | ||
497 | + }, | ||
498 | + "node_modules/delegate": { | ||
499 | + "version": "3.2.0", | ||
500 | + "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", | ||
501 | + "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" | ||
502 | + }, | ||
503 | + "node_modules/electron-to-chromium": { | ||
504 | + "version": "1.4.421", | ||
505 | + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.421.tgz", | ||
506 | + "integrity": "sha512-wZOyn3s/aQOtLGAwXMZfteQPN68kgls2wDAnYOA8kCjBvKVrW5RwmWVspxJYTqrcN7Y263XJVsC66VCIGzDO3g==", | ||
507 | + "dev": true, | ||
508 | + "peer": true | ||
509 | + }, | ||
510 | + "node_modules/emojis-list": { | ||
511 | + "version": "3.0.0", | ||
512 | + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", | ||
513 | + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", | ||
514 | + "dev": true, | ||
515 | + "engines": { | ||
516 | + "node": ">= 4" | ||
517 | + } | ||
518 | + }, | ||
519 | + "node_modules/enhanced-resolve": { | ||
520 | + "version": "5.14.1", | ||
521 | + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.14.1.tgz", | ||
522 | + "integrity": "sha512-Vklwq2vDKtl0y/vtwjSesgJ5MYS7Etuk5txS8VdKL4AOS1aUlD96zqIfsOSLQsdv3xgMRbtkWM8eG9XDfKUPow==", | ||
523 | + "dev": true, | ||
524 | + "peer": true, | ||
525 | + "dependencies": { | ||
526 | + "graceful-fs": "^4.2.4", | ||
527 | + "tapable": "^2.2.0" | ||
528 | + }, | ||
529 | + "engines": { | ||
530 | + "node": ">=10.13.0" | ||
531 | + } | ||
532 | + }, | ||
533 | + "node_modules/es-module-lexer": { | ||
534 | + "version": "1.2.1", | ||
535 | + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.2.1.tgz", | ||
536 | + "integrity": "sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg==", | ||
537 | + "dev": true, | ||
538 | + "peer": true | ||
539 | + }, | ||
540 | + "node_modules/escalade": { | ||
541 | + "version": "3.1.1", | ||
542 | + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", | ||
543 | + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", | ||
544 | + "dev": true, | ||
545 | + "peer": true, | ||
546 | + "engines": { | ||
547 | + "node": ">=6" | ||
548 | + } | ||
549 | + }, | ||
550 | + "node_modules/eslint-scope": { | ||
551 | + "version": "5.1.1", | ||
552 | + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", | ||
553 | + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", | ||
554 | + "dev": true, | ||
555 | + "peer": true, | ||
556 | + "dependencies": { | ||
557 | + "esrecurse": "^4.3.0", | ||
558 | + "estraverse": "^4.1.1" | ||
559 | + }, | ||
560 | + "engines": { | ||
561 | + "node": ">=8.0.0" | ||
562 | + } | ||
563 | + }, | ||
564 | + "node_modules/esrecurse": { | ||
565 | + "version": "4.3.0", | ||
566 | + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", | ||
567 | + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", | ||
568 | + "dev": true, | ||
569 | + "peer": true, | ||
570 | + "dependencies": { | ||
571 | + "estraverse": "^5.2.0" | ||
572 | + }, | ||
573 | + "engines": { | ||
574 | + "node": ">=4.0" | ||
575 | + } | ||
576 | + }, | ||
577 | + "node_modules/esrecurse/node_modules/estraverse": { | ||
578 | + "version": "5.3.0", | ||
579 | + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", | ||
580 | + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", | ||
581 | + "dev": true, | ||
582 | + "peer": true, | ||
583 | + "engines": { | ||
584 | + "node": ">=4.0" | ||
585 | + } | ||
586 | + }, | ||
587 | + "node_modules/estraverse": { | ||
588 | + "version": "4.3.0", | ||
589 | + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", | ||
590 | + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", | ||
591 | + "dev": true, | ||
592 | + "peer": true, | ||
593 | + "engines": { | ||
594 | + "node": ">=4.0" | ||
595 | + } | ||
596 | + }, | ||
597 | + "node_modules/events": { | ||
598 | + "version": "3.3.0", | ||
599 | + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", | ||
600 | + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", | ||
601 | + "dev": true, | ||
602 | + "peer": true, | ||
603 | + "engines": { | ||
604 | + "node": ">=0.8.x" | ||
605 | + } | ||
606 | + }, | ||
607 | + "node_modules/fast-deep-equal": { | ||
608 | + "version": "3.1.3", | ||
609 | + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", | ||
610 | + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", | ||
611 | + "dev": true | ||
612 | + }, | ||
613 | + "node_modules/fast-json-stable-stringify": { | ||
614 | + "version": "2.1.0", | ||
615 | + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", | ||
616 | + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", | ||
617 | + "dev": true | ||
618 | + }, | ||
619 | + "node_modules/fill-range": { | ||
620 | + "version": "7.0.1", | ||
621 | + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", | ||
622 | + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", | ||
623 | + "dev": true, | ||
624 | + "dependencies": { | ||
625 | + "to-regex-range": "^5.0.1" | ||
626 | + }, | ||
627 | + "engines": { | ||
628 | + "node": ">=8" | ||
629 | + } | ||
630 | + }, | ||
631 | + "node_modules/glob-parent": { | ||
632 | + "version": "5.1.2", | ||
633 | + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", | ||
634 | + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", | ||
635 | + "dev": true, | ||
636 | + "dependencies": { | ||
637 | + "is-glob": "^4.0.1" | ||
638 | + }, | ||
639 | + "engines": { | ||
640 | + "node": ">= 6" | ||
641 | + } | ||
642 | + }, | ||
643 | + "node_modules/glob-to-regexp": { | ||
644 | + "version": "0.4.1", | ||
645 | + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", | ||
646 | + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", | ||
647 | + "dev": true, | ||
648 | + "peer": true | ||
649 | + }, | ||
650 | + "node_modules/good-listener": { | ||
651 | + "version": "1.2.2", | ||
652 | + "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", | ||
653 | + "integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==", | ||
654 | + "dependencies": { | ||
655 | + "delegate": "^3.1.2" | ||
656 | + } | ||
657 | + }, | ||
658 | + "node_modules/graceful-fs": { | ||
659 | + "version": "4.2.11", | ||
660 | + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", | ||
661 | + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", | ||
662 | + "dev": true, | ||
663 | + "peer": true | ||
664 | + }, | ||
665 | + "node_modules/has-flag": { | ||
666 | + "version": "4.0.0", | ||
667 | + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", | ||
668 | + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", | ||
669 | + "dev": true, | ||
670 | + "peer": true, | ||
671 | + "engines": { | ||
672 | + "node": ">=8" | ||
673 | + } | ||
674 | + }, | ||
675 | + "node_modules/immutable": { | ||
676 | + "version": "4.3.0", | ||
677 | + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz", | ||
678 | + "integrity": "sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==", | ||
679 | + "dev": true | ||
680 | + }, | ||
681 | + "node_modules/is-binary-path": { | ||
682 | + "version": "2.1.0", | ||
683 | + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", | ||
684 | + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", | ||
685 | + "dev": true, | ||
686 | + "dependencies": { | ||
687 | + "binary-extensions": "^2.0.0" | ||
688 | + }, | ||
689 | + "engines": { | ||
690 | + "node": ">=8" | ||
691 | + } | ||
692 | + }, | ||
693 | + "node_modules/is-extglob": { | ||
694 | + "version": "2.1.1", | ||
695 | + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", | ||
696 | + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", | ||
697 | + "dev": true, | ||
698 | + "engines": { | ||
699 | + "node": ">=0.10.0" | ||
700 | + } | ||
701 | + }, | ||
702 | + "node_modules/is-glob": { | ||
703 | + "version": "4.0.3", | ||
704 | + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", | ||
705 | + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", | ||
706 | + "dev": true, | ||
707 | + "dependencies": { | ||
708 | + "is-extglob": "^2.1.1" | ||
709 | + }, | ||
710 | + "engines": { | ||
711 | + "node": ">=0.10.0" | ||
712 | + } | ||
713 | + }, | ||
714 | + "node_modules/is-number": { | ||
715 | + "version": "7.0.0", | ||
716 | + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", | ||
717 | + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", | ||
718 | + "dev": true, | ||
719 | + "engines": { | ||
720 | + "node": ">=0.12.0" | ||
721 | + } | ||
722 | + }, | ||
723 | + "node_modules/jest-worker": { | ||
724 | + "version": "27.5.1", | ||
725 | + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", | ||
726 | + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", | ||
727 | + "dev": true, | ||
728 | + "peer": true, | ||
729 | + "dependencies": { | ||
730 | + "@types/node": "*", | ||
731 | + "merge-stream": "^2.0.0", | ||
732 | + "supports-color": "^8.0.0" | ||
733 | + }, | ||
734 | + "engines": { | ||
735 | + "node": ">= 10.13.0" | ||
736 | + } | ||
737 | + }, | ||
738 | + "node_modules/json-parse-even-better-errors": { | ||
739 | + "version": "2.3.1", | ||
740 | + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", | ||
741 | + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", | ||
742 | + "dev": true, | ||
743 | + "peer": true | ||
744 | + }, | ||
745 | + "node_modules/json-schema-traverse": { | ||
746 | + "version": "0.4.1", | ||
747 | + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", | ||
748 | + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", | ||
749 | + "dev": true | ||
750 | + }, | ||
751 | + "node_modules/json5": { | ||
752 | + "version": "2.2.3", | ||
753 | + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", | ||
754 | + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", | ||
755 | + "dev": true, | ||
756 | + "bin": { | ||
757 | + "json5": "lib/cli.js" | ||
758 | + }, | ||
759 | + "engines": { | ||
760 | + "node": ">=6" | ||
761 | + } | ||
762 | + }, | ||
763 | + "node_modules/klona": { | ||
764 | + "version": "2.0.6", | ||
765 | + "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz", | ||
766 | + "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==", | ||
767 | + "dev": true, | ||
768 | + "engines": { | ||
769 | + "node": ">= 8" | ||
770 | + } | ||
771 | + }, | ||
772 | + "node_modules/loader-runner": { | ||
773 | + "version": "4.3.0", | ||
774 | + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", | ||
775 | + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", | ||
776 | + "dev": true, | ||
777 | + "peer": true, | ||
778 | + "engines": { | ||
779 | + "node": ">=6.11.5" | ||
780 | + } | ||
781 | + }, | ||
782 | + "node_modules/loader-utils": { | ||
783 | + "version": "2.0.4", | ||
784 | + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", | ||
785 | + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", | ||
786 | + "dev": true, | ||
787 | + "dependencies": { | ||
788 | + "big.js": "^5.2.2", | ||
789 | + "emojis-list": "^3.0.0", | ||
790 | + "json5": "^2.1.2" | ||
791 | + }, | ||
792 | + "engines": { | ||
793 | + "node": ">=8.9.0" | ||
794 | + } | ||
795 | + }, | ||
796 | + "node_modules/lru-cache": { | ||
797 | + "version": "6.0.0", | ||
798 | + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", | ||
799 | + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", | ||
800 | + "dev": true, | ||
801 | + "dependencies": { | ||
802 | + "yallist": "^4.0.0" | ||
803 | + }, | ||
804 | + "engines": { | ||
805 | + "node": ">=10" | ||
806 | + } | ||
807 | + }, | ||
808 | + "node_modules/merge-stream": { | ||
809 | + "version": "2.0.0", | ||
810 | + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", | ||
811 | + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", | ||
812 | + "dev": true, | ||
813 | + "peer": true | ||
814 | + }, | ||
815 | + "node_modules/mime-db": { | ||
816 | + "version": "1.52.0", | ||
817 | + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", | ||
818 | + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", | ||
819 | + "dev": true, | ||
820 | + "peer": true, | ||
821 | + "engines": { | ||
822 | + "node": ">= 0.6" | ||
823 | + } | ||
824 | + }, | ||
825 | + "node_modules/mime-types": { | ||
826 | + "version": "2.1.35", | ||
827 | + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", | ||
828 | + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", | ||
829 | + "dev": true, | ||
830 | + "peer": true, | ||
831 | + "dependencies": { | ||
832 | + "mime-db": "1.52.0" | ||
833 | + }, | ||
834 | + "engines": { | ||
835 | + "node": ">= 0.6" | ||
836 | + } | ||
837 | + }, | ||
838 | + "node_modules/neo-async": { | ||
839 | + "version": "2.6.2", | ||
840 | + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", | ||
841 | + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", | ||
842 | + "dev": true | ||
843 | + }, | ||
844 | + "node_modules/node-releases": { | ||
845 | + "version": "2.0.12", | ||
846 | + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", | ||
847 | + "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==", | ||
848 | + "dev": true, | ||
849 | + "peer": true | ||
850 | + }, | ||
851 | + "node_modules/normalize-path": { | ||
852 | + "version": "3.0.0", | ||
853 | + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", | ||
854 | + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", | ||
855 | + "dev": true, | ||
856 | + "engines": { | ||
857 | + "node": ">=0.10.0" | ||
858 | + } | ||
859 | + }, | ||
860 | + "node_modules/picocolors": { | ||
861 | + "version": "1.0.0", | ||
862 | + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", | ||
863 | + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", | ||
864 | + "dev": true, | ||
865 | + "peer": true | ||
866 | + }, | ||
867 | + "node_modules/picomatch": { | ||
868 | + "version": "2.3.1", | ||
869 | + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", | ||
870 | + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", | ||
871 | + "dev": true, | ||
872 | + "engines": { | ||
873 | + "node": ">=8.6" | ||
874 | + }, | ||
875 | + "funding": { | ||
876 | + "url": "https://github.com/sponsors/jonschlinkert" | ||
877 | + } | ||
878 | + }, | ||
879 | + "node_modules/punycode": { | ||
880 | + "version": "2.3.0", | ||
881 | + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", | ||
882 | + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", | ||
883 | + "dev": true, | ||
884 | + "engines": { | ||
885 | + "node": ">=6" | ||
886 | + } | ||
887 | + }, | ||
888 | + "node_modules/randombytes": { | ||
889 | + "version": "2.1.0", | ||
890 | + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", | ||
891 | + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", | ||
892 | + "dev": true, | ||
893 | + "peer": true, | ||
894 | + "dependencies": { | ||
895 | + "safe-buffer": "^5.1.0" | ||
896 | + } | ||
897 | + }, | ||
898 | + "node_modules/readdirp": { | ||
899 | + "version": "3.6.0", | ||
900 | + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", | ||
901 | + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", | ||
902 | + "dev": true, | ||
903 | + "dependencies": { | ||
904 | + "picomatch": "^2.2.1" | ||
905 | + }, | ||
906 | + "engines": { | ||
907 | + "node": ">=8.10.0" | ||
908 | + } | ||
909 | + }, | ||
910 | + "node_modules/safe-buffer": { | ||
911 | + "version": "5.2.1", | ||
912 | + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", | ||
913 | + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", | ||
914 | + "dev": true, | ||
915 | + "funding": [ | ||
916 | + { | ||
917 | + "type": "github", | ||
918 | + "url": "https://github.com/sponsors/feross" | ||
919 | + }, | ||
920 | + { | ||
921 | + "type": "patreon", | ||
922 | + "url": "https://www.patreon.com/feross" | ||
923 | + }, | ||
924 | + { | ||
925 | + "type": "consulting", | ||
926 | + "url": "https://feross.org/support" | ||
927 | + } | ||
928 | + ], | ||
929 | + "peer": true | ||
930 | + }, | ||
931 | + "node_modules/sass": { | ||
932 | + "version": "1.62.1", | ||
933 | + "resolved": "https://registry.npmjs.org/sass/-/sass-1.62.1.tgz", | ||
934 | + "integrity": "sha512-NHpxIzN29MXvWiuswfc1W3I0N8SXBd8UR26WntmDlRYf0bSADnwnOjsyMZ3lMezSlArD33Vs3YFhp7dWvL770A==", | ||
935 | + "dev": true, | ||
936 | + "dependencies": { | ||
937 | + "chokidar": ">=3.0.0 <4.0.0", | ||
938 | + "immutable": "^4.0.0", | ||
939 | + "source-map-js": ">=0.6.2 <2.0.0" | ||
940 | + }, | ||
941 | + "bin": { | ||
942 | + "sass": "sass.js" | ||
943 | + }, | ||
944 | + "engines": { | ||
945 | + "node": ">=14.0.0" | ||
946 | + } | ||
947 | + }, | ||
948 | + "node_modules/sass-loader": { | ||
949 | + "version": "10.4.1", | ||
950 | + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-10.4.1.tgz", | ||
951 | + "integrity": "sha512-aX/iJZTTpNUNx/OSYzo2KsjIUQHqvWsAhhUijFjAPdZTEhstjZI9zTNvkTTwsx+uNUJqUwOw5gacxQMx4hJxGQ==", | ||
952 | + "dev": true, | ||
953 | + "dependencies": { | ||
954 | + "klona": "^2.0.4", | ||
955 | + "loader-utils": "^2.0.0", | ||
956 | + "neo-async": "^2.6.2", | ||
957 | + "schema-utils": "^3.0.0", | ||
958 | + "semver": "^7.3.2" | ||
959 | + }, | ||
960 | + "engines": { | ||
961 | + "node": ">= 10.13.0" | ||
962 | + }, | ||
963 | + "funding": { | ||
964 | + "type": "opencollective", | ||
965 | + "url": "https://opencollective.com/webpack" | ||
966 | + }, | ||
967 | + "peerDependencies": { | ||
968 | + "fibers": ">= 3.1.0", | ||
969 | + "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", | ||
970 | + "sass": "^1.3.0", | ||
971 | + "webpack": "^4.36.0 || ^5.0.0" | ||
972 | + }, | ||
973 | + "peerDependenciesMeta": { | ||
974 | + "fibers": { | ||
975 | + "optional": true | ||
976 | + }, | ||
977 | + "node-sass": { | ||
978 | + "optional": true | ||
979 | + }, | ||
980 | + "sass": { | ||
981 | + "optional": true | ||
982 | + } | ||
983 | + } | ||
984 | + }, | ||
985 | + "node_modules/schema-utils": { | ||
986 | + "version": "3.1.2", | ||
987 | + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.2.tgz", | ||
988 | + "integrity": "sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg==", | ||
989 | + "dev": true, | ||
990 | + "dependencies": { | ||
991 | + "@types/json-schema": "^7.0.8", | ||
992 | + "ajv": "^6.12.5", | ||
993 | + "ajv-keywords": "^3.5.2" | ||
994 | + }, | ||
995 | + "engines": { | ||
996 | + "node": ">= 10.13.0" | ||
997 | + }, | ||
998 | + "funding": { | ||
999 | + "type": "opencollective", | ||
1000 | + "url": "https://opencollective.com/webpack" | ||
1001 | + } | ||
1002 | + }, | ||
1003 | + "node_modules/select": { | ||
1004 | + "version": "1.1.2", | ||
1005 | + "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", | ||
1006 | + "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==" | ||
1007 | + }, | ||
1008 | + "node_modules/semver": { | ||
1009 | + "version": "7.5.1", | ||
1010 | + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", | ||
1011 | + "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", | ||
1012 | + "dev": true, | ||
1013 | + "dependencies": { | ||
1014 | + "lru-cache": "^6.0.0" | ||
1015 | + }, | ||
1016 | + "bin": { | ||
1017 | + "semver": "bin/semver.js" | ||
1018 | + }, | ||
1019 | + "engines": { | ||
1020 | + "node": ">=10" | ||
1021 | + } | ||
1022 | + }, | ||
1023 | + "node_modules/serialize-javascript": { | ||
1024 | + "version": "6.0.1", | ||
1025 | + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", | ||
1026 | + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", | ||
1027 | + "dev": true, | ||
1028 | + "peer": true, | ||
1029 | + "dependencies": { | ||
1030 | + "randombytes": "^2.1.0" | ||
1031 | + } | ||
1032 | + }, | ||
1033 | + "node_modules/source-map": { | ||
1034 | + "version": "0.6.1", | ||
1035 | + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", | ||
1036 | + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", | ||
1037 | + "dev": true, | ||
1038 | + "peer": true, | ||
1039 | + "engines": { | ||
1040 | + "node": ">=0.10.0" | ||
1041 | + } | ||
1042 | + }, | ||
1043 | + "node_modules/source-map-js": { | ||
1044 | + "version": "1.0.2", | ||
1045 | + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", | ||
1046 | + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", | ||
1047 | + "dev": true, | ||
1048 | + "engines": { | ||
1049 | + "node": ">=0.10.0" | ||
1050 | + } | ||
1051 | + }, | ||
1052 | + "node_modules/source-map-support": { | ||
1053 | + "version": "0.5.21", | ||
1054 | + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", | ||
1055 | + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", | ||
1056 | + "dev": true, | ||
1057 | + "peer": true, | ||
1058 | + "dependencies": { | ||
1059 | + "buffer-from": "^1.0.0", | ||
1060 | + "source-map": "^0.6.0" | ||
1061 | + } | ||
1062 | + }, | ||
1063 | + "node_modules/supports-color": { | ||
1064 | + "version": "8.1.1", | ||
1065 | + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", | ||
1066 | + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", | ||
1067 | + "dev": true, | ||
1068 | + "peer": true, | ||
1069 | + "dependencies": { | ||
1070 | + "has-flag": "^4.0.0" | ||
1071 | + }, | ||
1072 | + "engines": { | ||
1073 | + "node": ">=10" | ||
1074 | + }, | ||
1075 | + "funding": { | ||
1076 | + "url": "https://github.com/chalk/supports-color?sponsor=1" | ||
1077 | + } | ||
1078 | + }, | ||
1079 | + "node_modules/tapable": { | ||
1080 | + "version": "2.2.1", | ||
1081 | + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", | ||
1082 | + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", | ||
1083 | + "dev": true, | ||
1084 | + "peer": true, | ||
1085 | + "engines": { | ||
1086 | + "node": ">=6" | ||
1087 | + } | ||
1088 | + }, | ||
1089 | + "node_modules/terser": { | ||
1090 | + "version": "5.17.7", | ||
1091 | + "resolved": "https://registry.npmjs.org/terser/-/terser-5.17.7.tgz", | ||
1092 | + "integrity": "sha512-/bi0Zm2C6VAexlGgLlVxA0P2lru/sdLyfCVaRMfKVo9nWxbmz7f/sD8VPybPeSUJaJcwmCJis9pBIhcVcG1QcQ==", | ||
1093 | + "dev": true, | ||
1094 | + "peer": true, | ||
1095 | + "dependencies": { | ||
1096 | + "@jridgewell/source-map": "^0.3.3", | ||
1097 | + "acorn": "^8.8.2", | ||
1098 | + "commander": "^2.20.0", | ||
1099 | + "source-map-support": "~0.5.20" | ||
1100 | + }, | ||
1101 | + "bin": { | ||
1102 | + "terser": "bin/terser" | ||
1103 | + }, | ||
1104 | + "engines": { | ||
1105 | + "node": ">=10" | ||
1106 | + } | ||
1107 | + }, | ||
1108 | + "node_modules/terser-webpack-plugin": { | ||
1109 | + "version": "5.3.9", | ||
1110 | + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", | ||
1111 | + "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", | ||
1112 | + "dev": true, | ||
1113 | + "peer": true, | ||
1114 | + "dependencies": { | ||
1115 | + "@jridgewell/trace-mapping": "^0.3.17", | ||
1116 | + "jest-worker": "^27.4.5", | ||
1117 | + "schema-utils": "^3.1.1", | ||
1118 | + "serialize-javascript": "^6.0.1", | ||
1119 | + "terser": "^5.16.8" | ||
1120 | + }, | ||
1121 | + "engines": { | ||
1122 | + "node": ">= 10.13.0" | ||
1123 | + }, | ||
1124 | + "funding": { | ||
1125 | + "type": "opencollective", | ||
1126 | + "url": "https://opencollective.com/webpack" | ||
1127 | + }, | ||
1128 | + "peerDependencies": { | ||
1129 | + "webpack": "^5.1.0" | ||
1130 | + }, | ||
1131 | + "peerDependenciesMeta": { | ||
1132 | + "@swc/core": { | ||
1133 | + "optional": true | ||
1134 | + }, | ||
1135 | + "esbuild": { | ||
1136 | + "optional": true | ||
1137 | + }, | ||
1138 | + "uglify-js": { | ||
1139 | + "optional": true | ||
1140 | + } | ||
1141 | + } | ||
1142 | + }, | ||
1143 | + "node_modules/tiny-emitter": { | ||
1144 | + "version": "2.1.0", | ||
1145 | + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", | ||
1146 | + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" | ||
1147 | + }, | ||
1148 | + "node_modules/to-regex-range": { | ||
1149 | + "version": "5.0.1", | ||
1150 | + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", | ||
1151 | + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", | ||
1152 | + "dev": true, | ||
1153 | + "dependencies": { | ||
1154 | + "is-number": "^7.0.0" | ||
1155 | + }, | ||
1156 | + "engines": { | ||
1157 | + "node": ">=8.0" | ||
1158 | + } | ||
1159 | + }, | ||
1160 | + "node_modules/update-browserslist-db": { | ||
1161 | + "version": "1.0.11", | ||
1162 | + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", | ||
1163 | + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", | ||
1164 | + "dev": true, | ||
1165 | + "funding": [ | ||
1166 | + { | ||
1167 | + "type": "opencollective", | ||
1168 | + "url": "https://opencollective.com/browserslist" | ||
1169 | + }, | ||
1170 | + { | ||
1171 | + "type": "tidelift", | ||
1172 | + "url": "https://tidelift.com/funding/github/npm/browserslist" | ||
1173 | + }, | ||
1174 | + { | ||
1175 | + "type": "github", | ||
1176 | + "url": "https://github.com/sponsors/ai" | ||
1177 | + } | ||
1178 | + ], | ||
1179 | + "peer": true, | ||
1180 | + "dependencies": { | ||
1181 | + "escalade": "^3.1.1", | ||
1182 | + "picocolors": "^1.0.0" | ||
1183 | + }, | ||
1184 | + "bin": { | ||
1185 | + "update-browserslist-db": "cli.js" | ||
1186 | + }, | ||
1187 | + "peerDependencies": { | ||
1188 | + "browserslist": ">= 4.21.0" | ||
1189 | + } | ||
1190 | + }, | ||
1191 | + "node_modules/uri-js": { | ||
1192 | + "version": "4.4.1", | ||
1193 | + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", | ||
1194 | + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", | ||
1195 | + "dev": true, | ||
1196 | + "dependencies": { | ||
1197 | + "punycode": "^2.1.0" | ||
1198 | + } | ||
1199 | + }, | ||
1200 | + "node_modules/uview-plus": { | ||
1201 | + "version": "3.1.31", | ||
1202 | + "resolved": "https://registry.npmjs.org/uview-plus/-/uview-plus-3.1.31.tgz", | ||
1203 | + "integrity": "sha512-fIeD+6lx9urUCQ95A4+LazahufFPaQ9dTx5+ntq1Gqtp+K37Fwv+MaZZUhtVT5R/O7QX/kwRd72kPHSuflPH+Q==", | ||
1204 | + "dependencies": { | ||
1205 | + "clipboard": "^2.0.11", | ||
1206 | + "dayjs": "^1.11.3" | ||
1207 | + }, | ||
1208 | + "engines": { | ||
1209 | + "HBuilderX": "^3.1.0" | ||
1210 | + } | ||
1211 | + }, | ||
1212 | + "node_modules/watchpack": { | ||
1213 | + "version": "2.4.0", | ||
1214 | + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", | ||
1215 | + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", | ||
1216 | + "dev": true, | ||
1217 | + "peer": true, | ||
1218 | + "dependencies": { | ||
1219 | + "glob-to-regexp": "^0.4.1", | ||
1220 | + "graceful-fs": "^4.1.2" | ||
1221 | + }, | ||
1222 | + "engines": { | ||
1223 | + "node": ">=10.13.0" | ||
1224 | + } | ||
1225 | + }, | ||
1226 | + "node_modules/webpack": { | ||
1227 | + "version": "5.85.1", | ||
1228 | + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.85.1.tgz", | ||
1229 | + "integrity": "sha512-xTb7MRf4LY8Z5rzn7aIx4TDrwYJrjcHnIfU1TqtyZOoObyuGSpAUwIvVuqq5wPnv7WEgQr8UvO1q/dgoGG4HjA==", | ||
1230 | + "dev": true, | ||
1231 | + "peer": true, | ||
1232 | + "dependencies": { | ||
1233 | + "@types/eslint-scope": "^3.7.3", | ||
1234 | + "@types/estree": "^1.0.0", | ||
1235 | + "@webassemblyjs/ast": "^1.11.5", | ||
1236 | + "@webassemblyjs/wasm-edit": "^1.11.5", | ||
1237 | + "@webassemblyjs/wasm-parser": "^1.11.5", | ||
1238 | + "acorn": "^8.7.1", | ||
1239 | + "acorn-import-assertions": "^1.9.0", | ||
1240 | + "browserslist": "^4.14.5", | ||
1241 | + "chrome-trace-event": "^1.0.2", | ||
1242 | + "enhanced-resolve": "^5.14.1", | ||
1243 | + "es-module-lexer": "^1.2.1", | ||
1244 | + "eslint-scope": "5.1.1", | ||
1245 | + "events": "^3.2.0", | ||
1246 | + "glob-to-regexp": "^0.4.1", | ||
1247 | + "graceful-fs": "^4.2.9", | ||
1248 | + "json-parse-even-better-errors": "^2.3.1", | ||
1249 | + "loader-runner": "^4.2.0", | ||
1250 | + "mime-types": "^2.1.27", | ||
1251 | + "neo-async": "^2.6.2", | ||
1252 | + "schema-utils": "^3.1.2", | ||
1253 | + "tapable": "^2.1.1", | ||
1254 | + "terser-webpack-plugin": "^5.3.7", | ||
1255 | + "watchpack": "^2.4.0", | ||
1256 | + "webpack-sources": "^3.2.3" | ||
1257 | + }, | ||
1258 | + "bin": { | ||
1259 | + "webpack": "bin/webpack.js" | ||
1260 | + }, | ||
1261 | + "engines": { | ||
1262 | + "node": ">=10.13.0" | ||
1263 | + }, | ||
1264 | + "funding": { | ||
1265 | + "type": "opencollective", | ||
1266 | + "url": "https://opencollective.com/webpack" | ||
1267 | + }, | ||
1268 | + "peerDependenciesMeta": { | ||
1269 | + "webpack-cli": { | ||
1270 | + "optional": true | ||
1271 | + } | ||
1272 | + } | ||
1273 | + }, | ||
1274 | + "node_modules/webpack-sources": { | ||
1275 | + "version": "3.2.3", | ||
1276 | + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", | ||
1277 | + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", | ||
1278 | + "dev": true, | ||
1279 | + "peer": true, | ||
1280 | + "engines": { | ||
1281 | + "node": ">=10.13.0" | ||
1282 | + } | ||
1283 | + }, | ||
1284 | + "node_modules/yallist": { | ||
1285 | + "version": "4.0.0", | ||
1286 | + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", | ||
1287 | + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", | ||
1288 | + "dev": true | ||
1289 | + } | ||
1290 | + } | ||
1291 | +} |
node_modules/@jridgewell/gen-mapping/LICENSE
0 → 100644
1 | +Copyright 2022 Justin Ridgewell <jridgewell@google.com> | ||
2 | + | ||
3 | +Permission is hereby granted, free of charge, to any person obtaining a copy | ||
4 | +of this software and associated documentation files (the "Software"), to deal | ||
5 | +in the Software without restriction, including without limitation the rights | ||
6 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
7 | +copies of the Software, and to permit persons to whom the Software is | ||
8 | +furnished to do so, subject to the following conditions: | ||
9 | + | ||
10 | +The above copyright notice and this permission notice shall be included in | ||
11 | +all copies or substantial portions of the Software. | ||
12 | + | ||
13 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
14 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
15 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
16 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
17 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
18 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
19 | +SOFTWARE. |
1 | +# @jridgewell/gen-mapping | ||
2 | + | ||
3 | +> Generate source maps | ||
4 | + | ||
5 | +`gen-mapping` allows you to generate a source map during transpilation or minification. | ||
6 | +With a source map, you're able to trace the original location in the source file, either in Chrome's | ||
7 | +DevTools or using a library like [`@jridgewell/trace-mapping`][trace-mapping]. | ||
8 | + | ||
9 | +You may already be familiar with the [`source-map`][source-map] package's `SourceMapGenerator`. This | ||
10 | +provides the same `addMapping` and `setSourceContent` API. | ||
11 | + | ||
12 | +## Installation | ||
13 | + | ||
14 | +```sh | ||
15 | +npm install @jridgewell/gen-mapping | ||
16 | +``` | ||
17 | + | ||
18 | +## Usage | ||
19 | + | ||
20 | +```typescript | ||
21 | +import { GenMapping, addMapping, setSourceContent, toEncodedMap, toDecodedMap } from '@jridgewell/gen-mapping'; | ||
22 | + | ||
23 | +const map = new GenMapping({ | ||
24 | + file: 'output.js', | ||
25 | + sourceRoot: 'https://example.com/', | ||
26 | +}); | ||
27 | + | ||
28 | +setSourceContent(map, 'input.js', `function foo() {}`); | ||
29 | + | ||
30 | +addMapping(map, { | ||
31 | + // Lines start at line 1, columns at column 0. | ||
32 | + generated: { line: 1, column: 0 }, | ||
33 | + source: 'input.js', | ||
34 | + original: { line: 1, column: 0 }, | ||
35 | +}); | ||
36 | + | ||
37 | +addMapping(map, { | ||
38 | + generated: { line: 1, column: 9 }, | ||
39 | + source: 'input.js', | ||
40 | + original: { line: 1, column: 9 }, | ||
41 | + name: 'foo', | ||
42 | +}); | ||
43 | + | ||
44 | +assert.deepEqual(toDecodedMap(map), { | ||
45 | + version: 3, | ||
46 | + file: 'output.js', | ||
47 | + names: ['foo'], | ||
48 | + sourceRoot: 'https://example.com/', | ||
49 | + sources: ['input.js'], | ||
50 | + sourcesContent: ['function foo() {}'], | ||
51 | + mappings: [ | ||
52 | + [ [0, 0, 0, 0], [9, 0, 0, 9, 0] ] | ||
53 | + ], | ||
54 | +}); | ||
55 | + | ||
56 | +assert.deepEqual(toEncodedMap(map), { | ||
57 | + version: 3, | ||
58 | + file: 'output.js', | ||
59 | + names: ['foo'], | ||
60 | + sourceRoot: 'https://example.com/', | ||
61 | + sources: ['input.js'], | ||
62 | + sourcesContent: ['function foo() {}'], | ||
63 | + mappings: 'AAAA,SAASA', | ||
64 | +}); | ||
65 | +``` | ||
66 | + | ||
67 | +### Smaller Sourcemaps | ||
68 | + | ||
69 | +Not everything needs to be added to a sourcemap, and needless markings can cause signficantly | ||
70 | +larger file sizes. `gen-mapping` exposes `maybeAddSegment`/`maybeAddMapping` APIs that will | ||
71 | +intelligently determine if this marking adds useful information. If not, the marking will be | ||
72 | +skipped. | ||
73 | + | ||
74 | +```typescript | ||
75 | +import { maybeAddMapping } from '@jridgewell/gen-mapping'; | ||
76 | + | ||
77 | +const map = new GenMapping(); | ||
78 | + | ||
79 | +// Adding a sourceless marking at the beginning of a line isn't useful. | ||
80 | +maybeAddMapping(map, { | ||
81 | + generated: { line: 1, column: 0 }, | ||
82 | +}); | ||
83 | + | ||
84 | +// Adding a new source marking is useful. | ||
85 | +maybeAddMapping(map, { | ||
86 | + generated: { line: 1, column: 0 }, | ||
87 | + source: 'input.js', | ||
88 | + original: { line: 1, column: 0 }, | ||
89 | +}); | ||
90 | + | ||
91 | +// But adding another marking pointing to the exact same original location isn't, even if the | ||
92 | +// generated column changed. | ||
93 | +maybeAddMapping(map, { | ||
94 | + generated: { line: 1, column: 9 }, | ||
95 | + source: 'input.js', | ||
96 | + original: { line: 1, column: 0 }, | ||
97 | +}); | ||
98 | + | ||
99 | +assert.deepEqual(toEncodedMap(map), { | ||
100 | + version: 3, | ||
101 | + names: [], | ||
102 | + sources: ['input.js'], | ||
103 | + sourcesContent: [null], | ||
104 | + mappings: 'AAAA', | ||
105 | +}); | ||
106 | +``` | ||
107 | + | ||
108 | +## Benchmarks | ||
109 | + | ||
110 | +``` | ||
111 | +node v18.0.0 | ||
112 | + | ||
113 | +amp.js.map | ||
114 | +Memory Usage: | ||
115 | +gen-mapping: addSegment 5852872 bytes | ||
116 | +gen-mapping: addMapping 7716042 bytes | ||
117 | +source-map-js 6143250 bytes | ||
118 | +source-map-0.6.1 6124102 bytes | ||
119 | +source-map-0.8.0 6121173 bytes | ||
120 | +Smallest memory usage is gen-mapping: addSegment | ||
121 | + | ||
122 | +Adding speed: | ||
123 | +gen-mapping: addSegment x 441 ops/sec ±2.07% (90 runs sampled) | ||
124 | +gen-mapping: addMapping x 350 ops/sec ±2.40% (86 runs sampled) | ||
125 | +source-map-js: addMapping x 169 ops/sec ±2.42% (80 runs sampled) | ||
126 | +source-map-0.6.1: addMapping x 167 ops/sec ±2.56% (80 runs sampled) | ||
127 | +source-map-0.8.0: addMapping x 168 ops/sec ±2.52% (80 runs sampled) | ||
128 | +Fastest is gen-mapping: addSegment | ||
129 | + | ||
130 | +Generate speed: | ||
131 | +gen-mapping: decoded output x 150,824,370 ops/sec ±0.07% (102 runs sampled) | ||
132 | +gen-mapping: encoded output x 663 ops/sec ±0.22% (98 runs sampled) | ||
133 | +source-map-js: encoded output x 197 ops/sec ±0.45% (84 runs sampled) | ||
134 | +source-map-0.6.1: encoded output x 198 ops/sec ±0.33% (85 runs sampled) | ||
135 | +source-map-0.8.0: encoded output x 197 ops/sec ±0.06% (93 runs sampled) | ||
136 | +Fastest is gen-mapping: decoded output | ||
137 | + | ||
138 | + | ||
139 | +*** | ||
140 | + | ||
141 | + | ||
142 | +babel.min.js.map | ||
143 | +Memory Usage: | ||
144 | +gen-mapping: addSegment 37578063 bytes | ||
145 | +gen-mapping: addMapping 37212897 bytes | ||
146 | +source-map-js 47638527 bytes | ||
147 | +source-map-0.6.1 47690503 bytes | ||
148 | +source-map-0.8.0 47470188 bytes | ||
149 | +Smallest memory usage is gen-mapping: addMapping | ||
150 | + | ||
151 | +Adding speed: | ||
152 | +gen-mapping: addSegment x 31.05 ops/sec ±8.31% (43 runs sampled) | ||
153 | +gen-mapping: addMapping x 29.83 ops/sec ±7.36% (51 runs sampled) | ||
154 | +source-map-js: addMapping x 20.73 ops/sec ±6.22% (38 runs sampled) | ||
155 | +source-map-0.6.1: addMapping x 20.03 ops/sec ±10.51% (38 runs sampled) | ||
156 | +source-map-0.8.0: addMapping x 19.30 ops/sec ±8.27% (37 runs sampled) | ||
157 | +Fastest is gen-mapping: addSegment | ||
158 | + | ||
159 | +Generate speed: | ||
160 | +gen-mapping: decoded output x 381,379,234 ops/sec ±0.29% (96 runs sampled) | ||
161 | +gen-mapping: encoded output x 95.15 ops/sec ±2.98% (72 runs sampled) | ||
162 | +source-map-js: encoded output x 15.20 ops/sec ±7.41% (33 runs sampled) | ||
163 | +source-map-0.6.1: encoded output x 16.36 ops/sec ±10.46% (31 runs sampled) | ||
164 | +source-map-0.8.0: encoded output x 16.06 ops/sec ±6.45% (31 runs sampled) | ||
165 | +Fastest is gen-mapping: decoded output | ||
166 | + | ||
167 | + | ||
168 | +*** | ||
169 | + | ||
170 | + | ||
171 | +preact.js.map | ||
172 | +Memory Usage: | ||
173 | +gen-mapping: addSegment 416247 bytes | ||
174 | +gen-mapping: addMapping 419824 bytes | ||
175 | +source-map-js 1024619 bytes | ||
176 | +source-map-0.6.1 1146004 bytes | ||
177 | +source-map-0.8.0 1113250 bytes | ||
178 | +Smallest memory usage is gen-mapping: addSegment | ||
179 | + | ||
180 | +Adding speed: | ||
181 | +gen-mapping: addSegment x 13,755 ops/sec ±0.15% (98 runs sampled) | ||
182 | +gen-mapping: addMapping x 13,013 ops/sec ±0.11% (101 runs sampled) | ||
183 | +source-map-js: addMapping x 4,564 ops/sec ±0.21% (98 runs sampled) | ||
184 | +source-map-0.6.1: addMapping x 4,562 ops/sec ±0.11% (99 runs sampled) | ||
185 | +source-map-0.8.0: addMapping x 4,593 ops/sec ±0.11% (100 runs sampled) | ||
186 | +Fastest is gen-mapping: addSegment | ||
187 | + | ||
188 | +Generate speed: | ||
189 | +gen-mapping: decoded output x 379,864,020 ops/sec ±0.23% (93 runs sampled) | ||
190 | +gen-mapping: encoded output x 14,368 ops/sec ±4.07% (82 runs sampled) | ||
191 | +source-map-js: encoded output x 5,261 ops/sec ±0.21% (99 runs sampled) | ||
192 | +source-map-0.6.1: encoded output x 5,124 ops/sec ±0.58% (99 runs sampled) | ||
193 | +source-map-0.8.0: encoded output x 5,434 ops/sec ±0.33% (96 runs sampled) | ||
194 | +Fastest is gen-mapping: decoded output | ||
195 | + | ||
196 | + | ||
197 | +*** | ||
198 | + | ||
199 | + | ||
200 | +react.js.map | ||
201 | +Memory Usage: | ||
202 | +gen-mapping: addSegment 975096 bytes | ||
203 | +gen-mapping: addMapping 1102981 bytes | ||
204 | +source-map-js 2918836 bytes | ||
205 | +source-map-0.6.1 2885435 bytes | ||
206 | +source-map-0.8.0 2874336 bytes | ||
207 | +Smallest memory usage is gen-mapping: addSegment | ||
208 | + | ||
209 | +Adding speed: | ||
210 | +gen-mapping: addSegment x 4,772 ops/sec ±0.15% (100 runs sampled) | ||
211 | +gen-mapping: addMapping x 4,456 ops/sec ±0.13% (97 runs sampled) | ||
212 | +source-map-js: addMapping x 1,618 ops/sec ±0.24% (97 runs sampled) | ||
213 | +source-map-0.6.1: addMapping x 1,622 ops/sec ±0.12% (99 runs sampled) | ||
214 | +source-map-0.8.0: addMapping x 1,631 ops/sec ±0.12% (100 runs sampled) | ||
215 | +Fastest is gen-mapping: addSegment | ||
216 | + | ||
217 | +Generate speed: | ||
218 | +gen-mapping: decoded output x 379,107,695 ops/sec ±0.07% (99 runs sampled) | ||
219 | +gen-mapping: encoded output x 5,421 ops/sec ±1.60% (89 runs sampled) | ||
220 | +source-map-js: encoded output x 2,113 ops/sec ±1.81% (98 runs sampled) | ||
221 | +source-map-0.6.1: encoded output x 2,126 ops/sec ±0.10% (100 runs sampled) | ||
222 | +source-map-0.8.0: encoded output x 2,176 ops/sec ±0.39% (98 runs sampled) | ||
223 | +Fastest is gen-mapping: decoded output | ||
224 | +``` | ||
225 | + | ||
226 | +[source-map]: https://www.npmjs.com/package/source-map | ||
227 | +[trace-mapping]: https://github.com/jridgewell/trace-mapping |
1 | +import { SetArray, put } from '@jridgewell/set-array'; | ||
2 | +import { encode } from '@jridgewell/sourcemap-codec'; | ||
3 | +import { TraceMap, decodedMappings } from '@jridgewell/trace-mapping'; | ||
4 | + | ||
5 | +const COLUMN = 0; | ||
6 | +const SOURCES_INDEX = 1; | ||
7 | +const SOURCE_LINE = 2; | ||
8 | +const SOURCE_COLUMN = 3; | ||
9 | +const NAMES_INDEX = 4; | ||
10 | + | ||
11 | +const NO_NAME = -1; | ||
12 | +/** | ||
13 | + * A low-level API to associate a generated position with an original source position. Line and | ||
14 | + * column here are 0-based, unlike `addMapping`. | ||
15 | + */ | ||
16 | +let addSegment; | ||
17 | +/** | ||
18 | + * A high-level API to associate a generated position with an original source position. Line is | ||
19 | + * 1-based, but column is 0-based, due to legacy behavior in `source-map` library. | ||
20 | + */ | ||
21 | +let addMapping; | ||
22 | +/** | ||
23 | + * Same as `addSegment`, but will only add the segment if it generates useful information in the | ||
24 | + * resulting map. This only works correctly if segments are added **in order**, meaning you should | ||
25 | + * not add a segment with a lower generated line/column than one that came before. | ||
26 | + */ | ||
27 | +let maybeAddSegment; | ||
28 | +/** | ||
29 | + * Same as `addMapping`, but will only add the mapping if it generates useful information in the | ||
30 | + * resulting map. This only works correctly if mappings are added **in order**, meaning you should | ||
31 | + * not add a mapping with a lower generated line/column than one that came before. | ||
32 | + */ | ||
33 | +let maybeAddMapping; | ||
34 | +/** | ||
35 | + * Adds/removes the content of the source file to the source map. | ||
36 | + */ | ||
37 | +let setSourceContent; | ||
38 | +/** | ||
39 | + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects | ||
40 | + * a sourcemap, or to JSON.stringify. | ||
41 | + */ | ||
42 | +let toDecodedMap; | ||
43 | +/** | ||
44 | + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects | ||
45 | + * a sourcemap, or to JSON.stringify. | ||
46 | + */ | ||
47 | +let toEncodedMap; | ||
48 | +/** | ||
49 | + * Constructs a new GenMapping, using the already present mappings of the input. | ||
50 | + */ | ||
51 | +let fromMap; | ||
52 | +/** | ||
53 | + * Returns an array of high-level mapping objects for every recorded segment, which could then be | ||
54 | + * passed to the `source-map` library. | ||
55 | + */ | ||
56 | +let allMappings; | ||
57 | +// This split declaration is only so that terser can elminiate the static initialization block. | ||
58 | +let addSegmentInternal; | ||
59 | +/** | ||
60 | + * Provides the state to generate a sourcemap. | ||
61 | + */ | ||
62 | +class GenMapping { | ||
63 | + constructor({ file, sourceRoot } = {}) { | ||
64 | + this._names = new SetArray(); | ||
65 | + this._sources = new SetArray(); | ||
66 | + this._sourcesContent = []; | ||
67 | + this._mappings = []; | ||
68 | + this.file = file; | ||
69 | + this.sourceRoot = sourceRoot; | ||
70 | + } | ||
71 | +} | ||
72 | +(() => { | ||
73 | + addSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { | ||
74 | + return addSegmentInternal(false, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content); | ||
75 | + }; | ||
76 | + maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { | ||
77 | + return addSegmentInternal(true, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content); | ||
78 | + }; | ||
79 | + addMapping = (map, mapping) => { | ||
80 | + return addMappingInternal(false, map, mapping); | ||
81 | + }; | ||
82 | + maybeAddMapping = (map, mapping) => { | ||
83 | + return addMappingInternal(true, map, mapping); | ||
84 | + }; | ||
85 | + setSourceContent = (map, source, content) => { | ||
86 | + const { _sources: sources, _sourcesContent: sourcesContent } = map; | ||
87 | + sourcesContent[put(sources, source)] = content; | ||
88 | + }; | ||
89 | + toDecodedMap = (map) => { | ||
90 | + const { file, sourceRoot, _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = map; | ||
91 | + removeEmptyFinalLines(mappings); | ||
92 | + return { | ||
93 | + version: 3, | ||
94 | + file: file || undefined, | ||
95 | + names: names.array, | ||
96 | + sourceRoot: sourceRoot || undefined, | ||
97 | + sources: sources.array, | ||
98 | + sourcesContent, | ||
99 | + mappings, | ||
100 | + }; | ||
101 | + }; | ||
102 | + toEncodedMap = (map) => { | ||
103 | + const decoded = toDecodedMap(map); | ||
104 | + return Object.assign(Object.assign({}, decoded), { mappings: encode(decoded.mappings) }); | ||
105 | + }; | ||
106 | + allMappings = (map) => { | ||
107 | + const out = []; | ||
108 | + const { _mappings: mappings, _sources: sources, _names: names } = map; | ||
109 | + for (let i = 0; i < mappings.length; i++) { | ||
110 | + const line = mappings[i]; | ||
111 | + for (let j = 0; j < line.length; j++) { | ||
112 | + const seg = line[j]; | ||
113 | + const generated = { line: i + 1, column: seg[COLUMN] }; | ||
114 | + let source = undefined; | ||
115 | + let original = undefined; | ||
116 | + let name = undefined; | ||
117 | + if (seg.length !== 1) { | ||
118 | + source = sources.array[seg[SOURCES_INDEX]]; | ||
119 | + original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }; | ||
120 | + if (seg.length === 5) | ||
121 | + name = names.array[seg[NAMES_INDEX]]; | ||
122 | + } | ||
123 | + out.push({ generated, source, original, name }); | ||
124 | + } | ||
125 | + } | ||
126 | + return out; | ||
127 | + }; | ||
128 | + fromMap = (input) => { | ||
129 | + const map = new TraceMap(input); | ||
130 | + const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); | ||
131 | + putAll(gen._names, map.names); | ||
132 | + putAll(gen._sources, map.sources); | ||
133 | + gen._sourcesContent = map.sourcesContent || map.sources.map(() => null); | ||
134 | + gen._mappings = decodedMappings(map); | ||
135 | + return gen; | ||
136 | + }; | ||
137 | + // Internal helpers | ||
138 | + addSegmentInternal = (skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { | ||
139 | + const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = map; | ||
140 | + const line = getLine(mappings, genLine); | ||
141 | + const index = getColumnIndex(line, genColumn); | ||
142 | + if (!source) { | ||
143 | + if (skipable && skipSourceless(line, index)) | ||
144 | + return; | ||
145 | + return insert(line, index, [genColumn]); | ||
146 | + } | ||
147 | + const sourcesIndex = put(sources, source); | ||
148 | + const namesIndex = name ? put(names, name) : NO_NAME; | ||
149 | + if (sourcesIndex === sourcesContent.length) | ||
150 | + sourcesContent[sourcesIndex] = content !== null && content !== void 0 ? content : null; | ||
151 | + if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { | ||
152 | + return; | ||
153 | + } | ||
154 | + return insert(line, index, name | ||
155 | + ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] | ||
156 | + : [genColumn, sourcesIndex, sourceLine, sourceColumn]); | ||
157 | + }; | ||
158 | +})(); | ||
159 | +function getLine(mappings, index) { | ||
160 | + for (let i = mappings.length; i <= index; i++) { | ||
161 | + mappings[i] = []; | ||
162 | + } | ||
163 | + return mappings[index]; | ||
164 | +} | ||
165 | +function getColumnIndex(line, genColumn) { | ||
166 | + let index = line.length; | ||
167 | + for (let i = index - 1; i >= 0; index = i--) { | ||
168 | + const current = line[i]; | ||
169 | + if (genColumn >= current[COLUMN]) | ||
170 | + break; | ||
171 | + } | ||
172 | + return index; | ||
173 | +} | ||
174 | +function insert(array, index, value) { | ||
175 | + for (let i = array.length; i > index; i--) { | ||
176 | + array[i] = array[i - 1]; | ||
177 | + } | ||
178 | + array[index] = value; | ||
179 | +} | ||
180 | +function removeEmptyFinalLines(mappings) { | ||
181 | + const { length } = mappings; | ||
182 | + let len = length; | ||
183 | + for (let i = len - 1; i >= 0; len = i, i--) { | ||
184 | + if (mappings[i].length > 0) | ||
185 | + break; | ||
186 | + } | ||
187 | + if (len < length) | ||
188 | + mappings.length = len; | ||
189 | +} | ||
190 | +function putAll(strarr, array) { | ||
191 | + for (let i = 0; i < array.length; i++) | ||
192 | + put(strarr, array[i]); | ||
193 | +} | ||
194 | +function skipSourceless(line, index) { | ||
195 | + // The start of a line is already sourceless, so adding a sourceless segment to the beginning | ||
196 | + // doesn't generate any useful information. | ||
197 | + if (index === 0) | ||
198 | + return true; | ||
199 | + const prev = line[index - 1]; | ||
200 | + // If the previous segment is also sourceless, then adding another sourceless segment doesn't | ||
201 | + // genrate any new information. Else, this segment will end the source/named segment and point to | ||
202 | + // a sourceless position, which is useful. | ||
203 | + return prev.length === 1; | ||
204 | +} | ||
205 | +function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) { | ||
206 | + // A source/named segment at the start of a line gives position at that genColumn | ||
207 | + if (index === 0) | ||
208 | + return false; | ||
209 | + const prev = line[index - 1]; | ||
210 | + // If the previous segment is sourceless, then we're transitioning to a source. | ||
211 | + if (prev.length === 1) | ||
212 | + return false; | ||
213 | + // If the previous segment maps to the exact same source position, then this segment doesn't | ||
214 | + // provide any new position information. | ||
215 | + return (sourcesIndex === prev[SOURCES_INDEX] && | ||
216 | + sourceLine === prev[SOURCE_LINE] && | ||
217 | + sourceColumn === prev[SOURCE_COLUMN] && | ||
218 | + namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME)); | ||
219 | +} | ||
220 | +function addMappingInternal(skipable, map, mapping) { | ||
221 | + const { generated, source, original, name, content } = mapping; | ||
222 | + if (!source) { | ||
223 | + return addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null, null); | ||
224 | + } | ||
225 | + const s = source; | ||
226 | + return addSegmentInternal(skipable, map, generated.line - 1, generated.column, s, original.line - 1, original.column, name, content); | ||
227 | +} | ||
228 | + | ||
229 | +export { GenMapping, addMapping, addSegment, allMappings, fromMap, maybeAddMapping, maybeAddSegment, setSourceContent, toDecodedMap, toEncodedMap }; | ||
230 | +//# sourceMappingURL=gen-mapping.mjs.map |
1 | +{"version":3,"file":"gen-mapping.mjs","sources":["../src/sourcemap-segment.ts","../src/gen-mapping.ts"],"sourcesContent":["type GeneratedColumn = number;\ntype SourcesIndex = number;\ntype SourceLine = number;\ntype SourceColumn = number;\ntype NamesIndex = number;\n\nexport type SourceMapSegment =\n | [GeneratedColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];\n\nexport const COLUMN = 0;\nexport const SOURCES_INDEX = 1;\nexport const SOURCE_LINE = 2;\nexport const SOURCE_COLUMN = 3;\nexport const NAMES_INDEX = 4;\n","import { SetArray, put } from '@jridgewell/set-array';\nimport { encode } from '@jridgewell/sourcemap-codec';\nimport { TraceMap, decodedMappings } from '@jridgewell/trace-mapping';\n\nimport {\n COLUMN,\n SOURCES_INDEX,\n SOURCE_LINE,\n SOURCE_COLUMN,\n NAMES_INDEX,\n} from './sourcemap-segment';\n\nimport type { SourceMapInput } from '@jridgewell/trace-mapping';\nimport type { SourceMapSegment } from './sourcemap-segment';\nimport type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types';\n\nexport type { DecodedSourceMap, EncodedSourceMap, Mapping };\n\nexport type Options = {\n file?: string | null;\n sourceRoot?: string | null;\n};\n\nconst NO_NAME = -1;\n\n/**\n * A low-level API to associate a generated position with an original source position. Line and\n * column here are 0-based, unlike `addMapping`.\n */\nexport let addSegment: {\n (\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source?: null,\n sourceLine?: null,\n sourceColumn?: null,\n name?: null,\n content?: null,\n ): void;\n (\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: string,\n sourceLine: number,\n sourceColumn: number,\n name?: null,\n content?: string | null,\n ): void;\n (\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: string,\n sourceLine: number,\n sourceColumn: number,\n name: string,\n content?: string | null,\n ): void;\n};\n\n/**\n * A high-level API to associate a generated position with an original source position. Line is\n * 1-based, but column is 0-based, due to legacy behavior in `source-map` library.\n */\nexport let addMapping: {\n (\n map: GenMapping,\n mapping: {\n generated: Pos;\n source?: null;\n original?: null;\n name?: null;\n content?: null;\n },\n ): void;\n (\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: string;\n original: Pos;\n name?: null;\n content?: string | null;\n },\n ): void;\n (\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: string;\n original: Pos;\n name: string;\n content?: string | null;\n },\n ): void;\n};\n\n/**\n * Same as `addSegment`, but will only add the segment if it generates useful information in the\n * resulting map. This only works correctly if segments are added **in order**, meaning you should\n * not add a segment with a lower generated line/column than one that came before.\n */\nexport let maybeAddSegment: typeof addSegment;\n\n/**\n * Same as `addMapping`, but will only add the mapping if it generates useful information in the\n * resulting map. This only works correctly if mappings are added **in order**, meaning you should\n * not add a mapping with a lower generated line/column than one that came before.\n */\nexport let maybeAddMapping: typeof addMapping;\n\n/**\n * Adds/removes the content of the source file to the source map.\n */\nexport let setSourceContent: (map: GenMapping, source: string, content: string | null) => void;\n\n/**\n * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport let toDecodedMap: (map: GenMapping) => DecodedSourceMap;\n\n/**\n * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport let toEncodedMap: (map: GenMapping) => EncodedSourceMap;\n\n/**\n * Constructs a new GenMapping, using the already present mappings of the input.\n */\nexport let fromMap: (input: SourceMapInput) => GenMapping;\n\n/**\n * Returns an array of high-level mapping objects for every recorded segment, which could then be\n * passed to the `source-map` library.\n */\nexport let allMappings: (map: GenMapping) => Mapping[];\n\n// This split declaration is only so that terser can elminiate the static initialization block.\nlet addSegmentInternal: <S extends string | null | undefined>(\n skipable: boolean,\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: S,\n sourceLine: S extends string ? number : null | undefined,\n sourceColumn: S extends string ? number : null | undefined,\n name: S extends string ? string | null | undefined : null | undefined,\n content: S extends string ? string | null | undefined : null | undefined,\n) => void;\n\n/**\n * Provides the state to generate a sourcemap.\n */\nexport class GenMapping {\n private _names = new SetArray();\n private _sources = new SetArray();\n private _sourcesContent: (string | null)[] = [];\n private _mappings: SourceMapSegment[][] = [];\n declare file: string | null | undefined;\n declare sourceRoot: string | null | undefined;\n\n constructor({ file, sourceRoot }: Options = {}) {\n this.file = file;\n this.sourceRoot = sourceRoot;\n }\n\n static {\n addSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {\n return addSegmentInternal(\n false,\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n );\n };\n\n maybeAddSegment = (\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n ) => {\n return addSegmentInternal(\n true,\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n );\n };\n\n addMapping = (map, mapping) => {\n return addMappingInternal(false, map, mapping as Parameters<typeof addMappingInternal>[2]);\n };\n\n maybeAddMapping = (map, mapping) => {\n return addMappingInternal(true, map, mapping as Parameters<typeof addMappingInternal>[2]);\n };\n\n setSourceContent = (map, source, content) => {\n const { _sources: sources, _sourcesContent: sourcesContent } = map;\n sourcesContent[put(sources, source)] = content;\n };\n\n toDecodedMap = (map) => {\n const {\n file,\n sourceRoot,\n _mappings: mappings,\n _sources: sources,\n _sourcesContent: sourcesContent,\n _names: names,\n } = map;\n removeEmptyFinalLines(mappings);\n\n return {\n version: 3,\n file: file || undefined,\n names: names.array,\n sourceRoot: sourceRoot || undefined,\n sources: sources.array,\n sourcesContent,\n mappings,\n };\n };\n\n toEncodedMap = (map) => {\n const decoded = toDecodedMap(map);\n return {\n ...decoded,\n mappings: encode(decoded.mappings as SourceMapSegment[][]),\n };\n };\n\n allMappings = (map) => {\n const out: Mapping[] = [];\n const { _mappings: mappings, _sources: sources, _names: names } = map;\n\n for (let i = 0; i < mappings.length; i++) {\n const line = mappings[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n\n const generated = { line: i + 1, column: seg[COLUMN] };\n let source: string | undefined = undefined;\n let original: Pos | undefined = undefined;\n let name: string | undefined = undefined;\n\n if (seg.length !== 1) {\n source = sources.array[seg[SOURCES_INDEX]];\n original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] };\n\n if (seg.length === 5) name = names.array[seg[NAMES_INDEX]];\n }\n\n out.push({ generated, source, original, name } as Mapping);\n }\n }\n\n return out;\n };\n\n fromMap = (input) => {\n const map = new TraceMap(input);\n const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });\n\n putAll(gen._names, map.names);\n putAll(gen._sources, map.sources as string[]);\n gen._sourcesContent = map.sourcesContent || map.sources.map(() => null);\n gen._mappings = decodedMappings(map) as GenMapping['_mappings'];\n\n return gen;\n };\n\n // Internal helpers\n addSegmentInternal = (\n skipable,\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n ) => {\n const {\n _mappings: mappings,\n _sources: sources,\n _sourcesContent: sourcesContent,\n _names: names,\n } = map;\n const line = getLine(mappings, genLine);\n const index = getColumnIndex(line, genColumn);\n\n if (!source) {\n if (skipable && skipSourceless(line, index)) return;\n return insert(line, index, [genColumn]);\n }\n\n // Sigh, TypeScript can't figure out sourceLine and sourceColumn aren't nullish if source\n // isn't nullish.\n assert<number>(sourceLine);\n assert<number>(sourceColumn);\n\n const sourcesIndex = put(sources, source);\n const namesIndex = name ? put(names, name) : NO_NAME;\n if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content ?? null;\n\n if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {\n return;\n }\n\n return insert(\n line,\n index,\n name\n ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]\n : [genColumn, sourcesIndex, sourceLine, sourceColumn],\n );\n };\n }\n}\n\nfunction assert<T>(_val: unknown): asserts _val is T {\n // noop.\n}\n\nfunction getLine(mappings: SourceMapSegment[][], index: number): SourceMapSegment[] {\n for (let i = mappings.length; i <= index; i++) {\n mappings[i] = [];\n }\n return mappings[index];\n}\n\nfunction getColumnIndex(line: SourceMapSegment[], genColumn: number): number {\n let index = line.length;\n for (let i = index - 1; i >= 0; index = i--) {\n const current = line[i];\n if (genColumn >= current[COLUMN]) break;\n }\n return index;\n}\n\nfunction insert<T>(array: T[], index: number, value: T) {\n for (let i = array.length; i > index; i--) {\n array[i] = array[i - 1];\n }\n array[index] = value;\n}\n\nfunction removeEmptyFinalLines(mappings: SourceMapSegment[][]) {\n const { length } = mappings;\n let len = length;\n for (let i = len - 1; i >= 0; len = i, i--) {\n if (mappings[i].length > 0) break;\n }\n if (len < length) mappings.length = len;\n}\n\nfunction putAll(strarr: SetArray, array: string[]) {\n for (let i = 0; i < array.length; i++) put(strarr, array[i]);\n}\n\nfunction skipSourceless(line: SourceMapSegment[], index: number): boolean {\n // The start of a line is already sourceless, so adding a sourceless segment to the beginning\n // doesn't generate any useful information.\n if (index === 0) return true;\n\n const prev = line[index - 1];\n // If the previous segment is also sourceless, then adding another sourceless segment doesn't\n // genrate any new information. Else, this segment will end the source/named segment and point to\n // a sourceless position, which is useful.\n return prev.length === 1;\n}\n\nfunction skipSource(\n line: SourceMapSegment[],\n index: number,\n sourcesIndex: number,\n sourceLine: number,\n sourceColumn: number,\n namesIndex: number,\n): boolean {\n // A source/named segment at the start of a line gives position at that genColumn\n if (index === 0) return false;\n\n const prev = line[index - 1];\n\n // If the previous segment is sourceless, then we're transitioning to a source.\n if (prev.length === 1) return false;\n\n // If the previous segment maps to the exact same source position, then this segment doesn't\n // provide any new position information.\n return (\n sourcesIndex === prev[SOURCES_INDEX] &&\n sourceLine === prev[SOURCE_LINE] &&\n sourceColumn === prev[SOURCE_COLUMN] &&\n namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME)\n );\n}\n\nfunction addMappingInternal<S extends string | null | undefined>(\n skipable: boolean,\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: S;\n original: S extends string ? Pos : null | undefined;\n name: S extends string ? string | null | undefined : null | undefined;\n content: S extends string ? string | null | undefined : null | undefined;\n },\n) {\n const { generated, source, original, name, content } = mapping;\n if (!source) {\n return addSegmentInternal(\n skipable,\n map,\n generated.line - 1,\n generated.column,\n null,\n null,\n null,\n null,\n null,\n );\n }\n const s: string = source;\n assert<Pos>(original);\n return addSegmentInternal(\n skipable,\n map,\n generated.line - 1,\n generated.column,\n s,\n original.line - 1,\n original.column,\n name,\n content,\n );\n}\n"],"names":[],"mappings":";;;;AAWO,MAAM,MAAM,GAAG,CAAC,CAAC;AACjB,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,WAAW,GAAG,CAAC;;ACQ5B,MAAM,OAAO,GAAG,CAAC,CAAC,CAAC;AAEnB;;;AAGG;AACQ,IAAA,WA+BT;AAEF;;;AAGG;AACQ,IAAA,WA+BT;AAEF;;;;AAIG;AACQ,IAAA,gBAAmC;AAE9C;;;;AAIG;AACQ,IAAA,gBAAmC;AAE9C;;AAEG;AACQ,IAAA,iBAAoF;AAE/F;;;AAGG;AACQ,IAAA,aAAoD;AAE/D;;;AAGG;AACQ,IAAA,aAAoD;AAE/D;;AAEG;AACQ,IAAA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AAG,EACH,SAAS,CAAC,IAAI,GAAG,CAAC,EAClB,SAAS,CAAC,MAAM,EAChB,CAAC,EACD,QAAQ,CAAC,IAAI,GAAG,CAAC,EACjB,QAAQ,CAAC,MAAM,EACf,IAAI,EACJ,OAAO,CACR,CAAC;AACJ;;;;"} |
1 | +(function (global, factory) { | ||
2 | + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/set-array'), require('@jridgewell/sourcemap-codec'), require('@jridgewell/trace-mapping')) : | ||
3 | + typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/set-array', '@jridgewell/sourcemap-codec', '@jridgewell/trace-mapping'], factory) : | ||
4 | + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.genMapping = {}, global.setArray, global.sourcemapCodec, global.traceMapping)); | ||
5 | +})(this, (function (exports, setArray, sourcemapCodec, traceMapping) { 'use strict'; | ||
6 | + | ||
7 | + const COLUMN = 0; | ||
8 | + const SOURCES_INDEX = 1; | ||
9 | + const SOURCE_LINE = 2; | ||
10 | + const SOURCE_COLUMN = 3; | ||
11 | + const NAMES_INDEX = 4; | ||
12 | + | ||
13 | + const NO_NAME = -1; | ||
14 | + /** | ||
15 | + * A low-level API to associate a generated position with an original source position. Line and | ||
16 | + * column here are 0-based, unlike `addMapping`. | ||
17 | + */ | ||
18 | + exports.addSegment = void 0; | ||
19 | + /** | ||
20 | + * A high-level API to associate a generated position with an original source position. Line is | ||
21 | + * 1-based, but column is 0-based, due to legacy behavior in `source-map` library. | ||
22 | + */ | ||
23 | + exports.addMapping = void 0; | ||
24 | + /** | ||
25 | + * Same as `addSegment`, but will only add the segment if it generates useful information in the | ||
26 | + * resulting map. This only works correctly if segments are added **in order**, meaning you should | ||
27 | + * not add a segment with a lower generated line/column than one that came before. | ||
28 | + */ | ||
29 | + exports.maybeAddSegment = void 0; | ||
30 | + /** | ||
31 | + * Same as `addMapping`, but will only add the mapping if it generates useful information in the | ||
32 | + * resulting map. This only works correctly if mappings are added **in order**, meaning you should | ||
33 | + * not add a mapping with a lower generated line/column than one that came before. | ||
34 | + */ | ||
35 | + exports.maybeAddMapping = void 0; | ||
36 | + /** | ||
37 | + * Adds/removes the content of the source file to the source map. | ||
38 | + */ | ||
39 | + exports.setSourceContent = void 0; | ||
40 | + /** | ||
41 | + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects | ||
42 | + * a sourcemap, or to JSON.stringify. | ||
43 | + */ | ||
44 | + exports.toDecodedMap = void 0; | ||
45 | + /** | ||
46 | + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects | ||
47 | + * a sourcemap, or to JSON.stringify. | ||
48 | + */ | ||
49 | + exports.toEncodedMap = void 0; | ||
50 | + /** | ||
51 | + * Constructs a new GenMapping, using the already present mappings of the input. | ||
52 | + */ | ||
53 | + exports.fromMap = void 0; | ||
54 | + /** | ||
55 | + * Returns an array of high-level mapping objects for every recorded segment, which could then be | ||
56 | + * passed to the `source-map` library. | ||
57 | + */ | ||
58 | + exports.allMappings = void 0; | ||
59 | + // This split declaration is only so that terser can elminiate the static initialization block. | ||
60 | + let addSegmentInternal; | ||
61 | + /** | ||
62 | + * Provides the state to generate a sourcemap. | ||
63 | + */ | ||
64 | + class GenMapping { | ||
65 | + constructor({ file, sourceRoot } = {}) { | ||
66 | + this._names = new setArray.SetArray(); | ||
67 | + this._sources = new setArray.SetArray(); | ||
68 | + this._sourcesContent = []; | ||
69 | + this._mappings = []; | ||
70 | + this.file = file; | ||
71 | + this.sourceRoot = sourceRoot; | ||
72 | + } | ||
73 | + } | ||
74 | + (() => { | ||
75 | + exports.addSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { | ||
76 | + return addSegmentInternal(false, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content); | ||
77 | + }; | ||
78 | + exports.maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { | ||
79 | + return addSegmentInternal(true, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content); | ||
80 | + }; | ||
81 | + exports.addMapping = (map, mapping) => { | ||
82 | + return addMappingInternal(false, map, mapping); | ||
83 | + }; | ||
84 | + exports.maybeAddMapping = (map, mapping) => { | ||
85 | + return addMappingInternal(true, map, mapping); | ||
86 | + }; | ||
87 | + exports.setSourceContent = (map, source, content) => { | ||
88 | + const { _sources: sources, _sourcesContent: sourcesContent } = map; | ||
89 | + sourcesContent[setArray.put(sources, source)] = content; | ||
90 | + }; | ||
91 | + exports.toDecodedMap = (map) => { | ||
92 | + const { file, sourceRoot, _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = map; | ||
93 | + removeEmptyFinalLines(mappings); | ||
94 | + return { | ||
95 | + version: 3, | ||
96 | + file: file || undefined, | ||
97 | + names: names.array, | ||
98 | + sourceRoot: sourceRoot || undefined, | ||
99 | + sources: sources.array, | ||
100 | + sourcesContent, | ||
101 | + mappings, | ||
102 | + }; | ||
103 | + }; | ||
104 | + exports.toEncodedMap = (map) => { | ||
105 | + const decoded = exports.toDecodedMap(map); | ||
106 | + return Object.assign(Object.assign({}, decoded), { mappings: sourcemapCodec.encode(decoded.mappings) }); | ||
107 | + }; | ||
108 | + exports.allMappings = (map) => { | ||
109 | + const out = []; | ||
110 | + const { _mappings: mappings, _sources: sources, _names: names } = map; | ||
111 | + for (let i = 0; i < mappings.length; i++) { | ||
112 | + const line = mappings[i]; | ||
113 | + for (let j = 0; j < line.length; j++) { | ||
114 | + const seg = line[j]; | ||
115 | + const generated = { line: i + 1, column: seg[COLUMN] }; | ||
116 | + let source = undefined; | ||
117 | + let original = undefined; | ||
118 | + let name = undefined; | ||
119 | + if (seg.length !== 1) { | ||
120 | + source = sources.array[seg[SOURCES_INDEX]]; | ||
121 | + original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }; | ||
122 | + if (seg.length === 5) | ||
123 | + name = names.array[seg[NAMES_INDEX]]; | ||
124 | + } | ||
125 | + out.push({ generated, source, original, name }); | ||
126 | + } | ||
127 | + } | ||
128 | + return out; | ||
129 | + }; | ||
130 | + exports.fromMap = (input) => { | ||
131 | + const map = new traceMapping.TraceMap(input); | ||
132 | + const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); | ||
133 | + putAll(gen._names, map.names); | ||
134 | + putAll(gen._sources, map.sources); | ||
135 | + gen._sourcesContent = map.sourcesContent || map.sources.map(() => null); | ||
136 | + gen._mappings = traceMapping.decodedMappings(map); | ||
137 | + return gen; | ||
138 | + }; | ||
139 | + // Internal helpers | ||
140 | + addSegmentInternal = (skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { | ||
141 | + const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, } = map; | ||
142 | + const line = getLine(mappings, genLine); | ||
143 | + const index = getColumnIndex(line, genColumn); | ||
144 | + if (!source) { | ||
145 | + if (skipable && skipSourceless(line, index)) | ||
146 | + return; | ||
147 | + return insert(line, index, [genColumn]); | ||
148 | + } | ||
149 | + const sourcesIndex = setArray.put(sources, source); | ||
150 | + const namesIndex = name ? setArray.put(names, name) : NO_NAME; | ||
151 | + if (sourcesIndex === sourcesContent.length) | ||
152 | + sourcesContent[sourcesIndex] = content !== null && content !== void 0 ? content : null; | ||
153 | + if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { | ||
154 | + return; | ||
155 | + } | ||
156 | + return insert(line, index, name | ||
157 | + ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] | ||
158 | + : [genColumn, sourcesIndex, sourceLine, sourceColumn]); | ||
159 | + }; | ||
160 | + })(); | ||
161 | + function getLine(mappings, index) { | ||
162 | + for (let i = mappings.length; i <= index; i++) { | ||
163 | + mappings[i] = []; | ||
164 | + } | ||
165 | + return mappings[index]; | ||
166 | + } | ||
167 | + function getColumnIndex(line, genColumn) { | ||
168 | + let index = line.length; | ||
169 | + for (let i = index - 1; i >= 0; index = i--) { | ||
170 | + const current = line[i]; | ||
171 | + if (genColumn >= current[COLUMN]) | ||
172 | + break; | ||
173 | + } | ||
174 | + return index; | ||
175 | + } | ||
176 | + function insert(array, index, value) { | ||
177 | + for (let i = array.length; i > index; i--) { | ||
178 | + array[i] = array[i - 1]; | ||
179 | + } | ||
180 | + array[index] = value; | ||
181 | + } | ||
182 | + function removeEmptyFinalLines(mappings) { | ||
183 | + const { length } = mappings; | ||
184 | + let len = length; | ||
185 | + for (let i = len - 1; i >= 0; len = i, i--) { | ||
186 | + if (mappings[i].length > 0) | ||
187 | + break; | ||
188 | + } | ||
189 | + if (len < length) | ||
190 | + mappings.length = len; | ||
191 | + } | ||
192 | + function putAll(strarr, array) { | ||
193 | + for (let i = 0; i < array.length; i++) | ||
194 | + setArray.put(strarr, array[i]); | ||
195 | + } | ||
196 | + function skipSourceless(line, index) { | ||
197 | + // The start of a line is already sourceless, so adding a sourceless segment to the beginning | ||
198 | + // doesn't generate any useful information. | ||
199 | + if (index === 0) | ||
200 | + return true; | ||
201 | + const prev = line[index - 1]; | ||
202 | + // If the previous segment is also sourceless, then adding another sourceless segment doesn't | ||
203 | + // genrate any new information. Else, this segment will end the source/named segment and point to | ||
204 | + // a sourceless position, which is useful. | ||
205 | + return prev.length === 1; | ||
206 | + } | ||
207 | + function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) { | ||
208 | + // A source/named segment at the start of a line gives position at that genColumn | ||
209 | + if (index === 0) | ||
210 | + return false; | ||
211 | + const prev = line[index - 1]; | ||
212 | + // If the previous segment is sourceless, then we're transitioning to a source. | ||
213 | + if (prev.length === 1) | ||
214 | + return false; | ||
215 | + // If the previous segment maps to the exact same source position, then this segment doesn't | ||
216 | + // provide any new position information. | ||
217 | + return (sourcesIndex === prev[SOURCES_INDEX] && | ||
218 | + sourceLine === prev[SOURCE_LINE] && | ||
219 | + sourceColumn === prev[SOURCE_COLUMN] && | ||
220 | + namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME)); | ||
221 | + } | ||
222 | + function addMappingInternal(skipable, map, mapping) { | ||
223 | + const { generated, source, original, name, content } = mapping; | ||
224 | + if (!source) { | ||
225 | + return addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null, null); | ||
226 | + } | ||
227 | + const s = source; | ||
228 | + return addSegmentInternal(skipable, map, generated.line - 1, generated.column, s, original.line - 1, original.column, name, content); | ||
229 | + } | ||
230 | + | ||
231 | + exports.GenMapping = GenMapping; | ||
232 | + | ||
233 | + Object.defineProperty(exports, '__esModule', { value: true }); | ||
234 | + | ||
235 | +})); | ||
236 | +//# sourceMappingURL=gen-mapping.umd.js.map |
1 | +{"version":3,"file":"gen-mapping.umd.js","sources":["../src/sourcemap-segment.ts","../src/gen-mapping.ts"],"sourcesContent":["type GeneratedColumn = number;\ntype SourcesIndex = number;\ntype SourceLine = number;\ntype SourceColumn = number;\ntype NamesIndex = number;\n\nexport type SourceMapSegment =\n | [GeneratedColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];\n\nexport const COLUMN = 0;\nexport const SOURCES_INDEX = 1;\nexport const SOURCE_LINE = 2;\nexport const SOURCE_COLUMN = 3;\nexport const NAMES_INDEX = 4;\n","import { SetArray, put } from '@jridgewell/set-array';\nimport { encode } from '@jridgewell/sourcemap-codec';\nimport { TraceMap, decodedMappings } from '@jridgewell/trace-mapping';\n\nimport {\n COLUMN,\n SOURCES_INDEX,\n SOURCE_LINE,\n SOURCE_COLUMN,\n NAMES_INDEX,\n} from './sourcemap-segment';\n\nimport type { SourceMapInput } from '@jridgewell/trace-mapping';\nimport type { SourceMapSegment } from './sourcemap-segment';\nimport type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types';\n\nexport type { DecodedSourceMap, EncodedSourceMap, Mapping };\n\nexport type Options = {\n file?: string | null;\n sourceRoot?: string | null;\n};\n\nconst NO_NAME = -1;\n\n/**\n * A low-level API to associate a generated position with an original source position. Line and\n * column here are 0-based, unlike `addMapping`.\n */\nexport let addSegment: {\n (\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source?: null,\n sourceLine?: null,\n sourceColumn?: null,\n name?: null,\n content?: null,\n ): void;\n (\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: string,\n sourceLine: number,\n sourceColumn: number,\n name?: null,\n content?: string | null,\n ): void;\n (\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: string,\n sourceLine: number,\n sourceColumn: number,\n name: string,\n content?: string | null,\n ): void;\n};\n\n/**\n * A high-level API to associate a generated position with an original source position. Line is\n * 1-based, but column is 0-based, due to legacy behavior in `source-map` library.\n */\nexport let addMapping: {\n (\n map: GenMapping,\n mapping: {\n generated: Pos;\n source?: null;\n original?: null;\n name?: null;\n content?: null;\n },\n ): void;\n (\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: string;\n original: Pos;\n name?: null;\n content?: string | null;\n },\n ): void;\n (\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: string;\n original: Pos;\n name: string;\n content?: string | null;\n },\n ): void;\n};\n\n/**\n * Same as `addSegment`, but will only add the segment if it generates useful information in the\n * resulting map. This only works correctly if segments are added **in order**, meaning you should\n * not add a segment with a lower generated line/column than one that came before.\n */\nexport let maybeAddSegment: typeof addSegment;\n\n/**\n * Same as `addMapping`, but will only add the mapping if it generates useful information in the\n * resulting map. This only works correctly if mappings are added **in order**, meaning you should\n * not add a mapping with a lower generated line/column than one that came before.\n */\nexport let maybeAddMapping: typeof addMapping;\n\n/**\n * Adds/removes the content of the source file to the source map.\n */\nexport let setSourceContent: (map: GenMapping, source: string, content: string | null) => void;\n\n/**\n * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport let toDecodedMap: (map: GenMapping) => DecodedSourceMap;\n\n/**\n * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport let toEncodedMap: (map: GenMapping) => EncodedSourceMap;\n\n/**\n * Constructs a new GenMapping, using the already present mappings of the input.\n */\nexport let fromMap: (input: SourceMapInput) => GenMapping;\n\n/**\n * Returns an array of high-level mapping objects for every recorded segment, which could then be\n * passed to the `source-map` library.\n */\nexport let allMappings: (map: GenMapping) => Mapping[];\n\n// This split declaration is only so that terser can elminiate the static initialization block.\nlet addSegmentInternal: <S extends string | null | undefined>(\n skipable: boolean,\n map: GenMapping,\n genLine: number,\n genColumn: number,\n source: S,\n sourceLine: S extends string ? number : null | undefined,\n sourceColumn: S extends string ? number : null | undefined,\n name: S extends string ? string | null | undefined : null | undefined,\n content: S extends string ? string | null | undefined : null | undefined,\n) => void;\n\n/**\n * Provides the state to generate a sourcemap.\n */\nexport class GenMapping {\n private _names = new SetArray();\n private _sources = new SetArray();\n private _sourcesContent: (string | null)[] = [];\n private _mappings: SourceMapSegment[][] = [];\n declare file: string | null | undefined;\n declare sourceRoot: string | null | undefined;\n\n constructor({ file, sourceRoot }: Options = {}) {\n this.file = file;\n this.sourceRoot = sourceRoot;\n }\n\n static {\n addSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {\n return addSegmentInternal(\n false,\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n );\n };\n\n maybeAddSegment = (\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n ) => {\n return addSegmentInternal(\n true,\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n );\n };\n\n addMapping = (map, mapping) => {\n return addMappingInternal(false, map, mapping as Parameters<typeof addMappingInternal>[2]);\n };\n\n maybeAddMapping = (map, mapping) => {\n return addMappingInternal(true, map, mapping as Parameters<typeof addMappingInternal>[2]);\n };\n\n setSourceContent = (map, source, content) => {\n const { _sources: sources, _sourcesContent: sourcesContent } = map;\n sourcesContent[put(sources, source)] = content;\n };\n\n toDecodedMap = (map) => {\n const {\n file,\n sourceRoot,\n _mappings: mappings,\n _sources: sources,\n _sourcesContent: sourcesContent,\n _names: names,\n } = map;\n removeEmptyFinalLines(mappings);\n\n return {\n version: 3,\n file: file || undefined,\n names: names.array,\n sourceRoot: sourceRoot || undefined,\n sources: sources.array,\n sourcesContent,\n mappings,\n };\n };\n\n toEncodedMap = (map) => {\n const decoded = toDecodedMap(map);\n return {\n ...decoded,\n mappings: encode(decoded.mappings as SourceMapSegment[][]),\n };\n };\n\n allMappings = (map) => {\n const out: Mapping[] = [];\n const { _mappings: mappings, _sources: sources, _names: names } = map;\n\n for (let i = 0; i < mappings.length; i++) {\n const line = mappings[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n\n const generated = { line: i + 1, column: seg[COLUMN] };\n let source: string | undefined = undefined;\n let original: Pos | undefined = undefined;\n let name: string | undefined = undefined;\n\n if (seg.length !== 1) {\n source = sources.array[seg[SOURCES_INDEX]];\n original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] };\n\n if (seg.length === 5) name = names.array[seg[NAMES_INDEX]];\n }\n\n out.push({ generated, source, original, name } as Mapping);\n }\n }\n\n return out;\n };\n\n fromMap = (input) => {\n const map = new TraceMap(input);\n const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });\n\n putAll(gen._names, map.names);\n putAll(gen._sources, map.sources as string[]);\n gen._sourcesContent = map.sourcesContent || map.sources.map(() => null);\n gen._mappings = decodedMappings(map) as GenMapping['_mappings'];\n\n return gen;\n };\n\n // Internal helpers\n addSegmentInternal = (\n skipable,\n map,\n genLine,\n genColumn,\n source,\n sourceLine,\n sourceColumn,\n name,\n content,\n ) => {\n const {\n _mappings: mappings,\n _sources: sources,\n _sourcesContent: sourcesContent,\n _names: names,\n } = map;\n const line = getLine(mappings, genLine);\n const index = getColumnIndex(line, genColumn);\n\n if (!source) {\n if (skipable && skipSourceless(line, index)) return;\n return insert(line, index, [genColumn]);\n }\n\n // Sigh, TypeScript can't figure out sourceLine and sourceColumn aren't nullish if source\n // isn't nullish.\n assert<number>(sourceLine);\n assert<number>(sourceColumn);\n\n const sourcesIndex = put(sources, source);\n const namesIndex = name ? put(names, name) : NO_NAME;\n if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content ?? null;\n\n if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {\n return;\n }\n\n return insert(\n line,\n index,\n name\n ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]\n : [genColumn, sourcesIndex, sourceLine, sourceColumn],\n );\n };\n }\n}\n\nfunction assert<T>(_val: unknown): asserts _val is T {\n // noop.\n}\n\nfunction getLine(mappings: SourceMapSegment[][], index: number): SourceMapSegment[] {\n for (let i = mappings.length; i <= index; i++) {\n mappings[i] = [];\n }\n return mappings[index];\n}\n\nfunction getColumnIndex(line: SourceMapSegment[], genColumn: number): number {\n let index = line.length;\n for (let i = index - 1; i >= 0; index = i--) {\n const current = line[i];\n if (genColumn >= current[COLUMN]) break;\n }\n return index;\n}\n\nfunction insert<T>(array: T[], index: number, value: T) {\n for (let i = array.length; i > index; i--) {\n array[i] = array[i - 1];\n }\n array[index] = value;\n}\n\nfunction removeEmptyFinalLines(mappings: SourceMapSegment[][]) {\n const { length } = mappings;\n let len = length;\n for (let i = len - 1; i >= 0; len = i, i--) {\n if (mappings[i].length > 0) break;\n }\n if (len < length) mappings.length = len;\n}\n\nfunction putAll(strarr: SetArray, array: string[]) {\n for (let i = 0; i < array.length; i++) put(strarr, array[i]);\n}\n\nfunction skipSourceless(line: SourceMapSegment[], index: number): boolean {\n // The start of a line is already sourceless, so adding a sourceless segment to the beginning\n // doesn't generate any useful information.\n if (index === 0) return true;\n\n const prev = line[index - 1];\n // If the previous segment is also sourceless, then adding another sourceless segment doesn't\n // genrate any new information. Else, this segment will end the source/named segment and point to\n // a sourceless position, which is useful.\n return prev.length === 1;\n}\n\nfunction skipSource(\n line: SourceMapSegment[],\n index: number,\n sourcesIndex: number,\n sourceLine: number,\n sourceColumn: number,\n namesIndex: number,\n): boolean {\n // A source/named segment at the start of a line gives position at that genColumn\n if (index === 0) return false;\n\n const prev = line[index - 1];\n\n // If the previous segment is sourceless, then we're transitioning to a source.\n if (prev.length === 1) return false;\n\n // If the previous segment maps to the exact same source position, then this segment doesn't\n // provide any new position information.\n return (\n sourcesIndex === prev[SOURCES_INDEX] &&\n sourceLine === prev[SOURCE_LINE] &&\n sourceColumn === prev[SOURCE_COLUMN] &&\n namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME)\n );\n}\n\nfunction addMappingInternal<S extends string | null | undefined>(\n skipable: boolean,\n map: GenMapping,\n mapping: {\n generated: Pos;\n source: S;\n original: S extends string ? Pos : null | undefined;\n name: S extends string ? string | null | undefined : null | undefined;\n content: S extends string ? string | null | undefined : null | undefined;\n },\n) {\n const { generated, source, original, name, content } = mapping;\n if (!source) {\n return addSegmentInternal(\n skipable,\n map,\n generated.line - 1,\n generated.column,\n null,\n null,\n null,\n null,\n null,\n );\n }\n const s: string = source;\n assert<Pos>(original);\n return addSegmentInternal(\n skipable,\n map,\n generated.line - 1,\n generated.column,\n s,\n original.line - 1,\n original.column,\n name,\n content,\n );\n}\n"],"names":["addSegment","addMapping","maybeAddSegment","maybeAddMapping","setSourceContent","toDecodedMap","toEncodedMap","fromMap","allMappings","SetArray","put","encode","TraceMap","decodedMappings"],"mappings":";;;;;;IAWO,MAAM,MAAM,GAAG,CAAC,CAAC;IACjB,MAAM,aAAa,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,CAAC,CAAC;IACtB,MAAM,aAAa,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,CAAC;;ICQ5B,MAAM,OAAO,GAAG,CAAC,CAAC,CAAC;IAEnB;;;IAGG;AACQA,gCA+BT;IAEF;;;IAGG;AACQC,gCA+BT;IAEF;;;;IAIG;AACQC,qCAAmC;IAE9C;;;;IAIG;AACQC,qCAAmC;IAE9C;;IAEG;AACQC,sCAAoF;IAE/F;;;IAGG;AACQC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AAI,CACL,CAAC;IACH,KAAA;QACD,MAAM,CAAC,GAAW,MAAM,CAAC;IAEzB,IAAA,OAAO,kBAAkB,CACvB,QAAQ,EACR,GAAG,EACH,SAAS,CAAC,IAAI,GAAG,CAAC,EAClB,SAAS,CAAC,MAAM,EAChB,CAAC,EACD,QAAQ,CAAC,IAAI,GAAG,CAAC,EACjB,QAAQ,CAAC,MAAM,EACf,IAAI,EACJ,OAAO,CACR,CAAC;IACJ;;;;;;;;;;"} |
1 | +import type { SourceMapInput } from '@jridgewell/trace-mapping'; | ||
2 | +import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types'; | ||
3 | +export type { DecodedSourceMap, EncodedSourceMap, Mapping }; | ||
4 | +export declare type Options = { | ||
5 | + file?: string | null; | ||
6 | + sourceRoot?: string | null; | ||
7 | +}; | ||
8 | +/** | ||
9 | + * A low-level API to associate a generated position with an original source position. Line and | ||
10 | + * column here are 0-based, unlike `addMapping`. | ||
11 | + */ | ||
12 | +export declare let addSegment: { | ||
13 | + (map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void; | ||
14 | + (map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void; | ||
15 | + (map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void; | ||
16 | +}; | ||
17 | +/** | ||
18 | + * A high-level API to associate a generated position with an original source position. Line is | ||
19 | + * 1-based, but column is 0-based, due to legacy behavior in `source-map` library. | ||
20 | + */ | ||
21 | +export declare let addMapping: { | ||
22 | + (map: GenMapping, mapping: { | ||
23 | + generated: Pos; | ||
24 | + source?: null; | ||
25 | + original?: null; | ||
26 | + name?: null; | ||
27 | + content?: null; | ||
28 | + }): void; | ||
29 | + (map: GenMapping, mapping: { | ||
30 | + generated: Pos; | ||
31 | + source: string; | ||
32 | + original: Pos; | ||
33 | + name?: null; | ||
34 | + content?: string | null; | ||
35 | + }): void; | ||
36 | + (map: GenMapping, mapping: { | ||
37 | + generated: Pos; | ||
38 | + source: string; | ||
39 | + original: Pos; | ||
40 | + name: string; | ||
41 | + content?: string | null; | ||
42 | + }): void; | ||
43 | +}; | ||
44 | +/** | ||
45 | + * Same as `addSegment`, but will only add the segment if it generates useful information in the | ||
46 | + * resulting map. This only works correctly if segments are added **in order**, meaning you should | ||
47 | + * not add a segment with a lower generated line/column than one that came before. | ||
48 | + */ | ||
49 | +export declare let maybeAddSegment: typeof addSegment; | ||
50 | +/** | ||
51 | + * Same as `addMapping`, but will only add the mapping if it generates useful information in the | ||
52 | + * resulting map. This only works correctly if mappings are added **in order**, meaning you should | ||
53 | + * not add a mapping with a lower generated line/column than one that came before. | ||
54 | + */ | ||
55 | +export declare let maybeAddMapping: typeof addMapping; | ||
56 | +/** | ||
57 | + * Adds/removes the content of the source file to the source map. | ||
58 | + */ | ||
59 | +export declare let setSourceContent: (map: GenMapping, source: string, content: string | null) => void; | ||
60 | +/** | ||
61 | + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects | ||
62 | + * a sourcemap, or to JSON.stringify. | ||
63 | + */ | ||
64 | +export declare let toDecodedMap: (map: GenMapping) => DecodedSourceMap; | ||
65 | +/** | ||
66 | + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects | ||
67 | + * a sourcemap, or to JSON.stringify. | ||
68 | + */ | ||
69 | +export declare let toEncodedMap: (map: GenMapping) => EncodedSourceMap; | ||
70 | +/** | ||
71 | + * Constructs a new GenMapping, using the already present mappings of the input. | ||
72 | + */ | ||
73 | +export declare let fromMap: (input: SourceMapInput) => GenMapping; | ||
74 | +/** | ||
75 | + * Returns an array of high-level mapping objects for every recorded segment, which could then be | ||
76 | + * passed to the `source-map` library. | ||
77 | + */ | ||
78 | +export declare let allMappings: (map: GenMapping) => Mapping[]; | ||
79 | +/** | ||
80 | + * Provides the state to generate a sourcemap. | ||
81 | + */ | ||
82 | +export declare class GenMapping { | ||
83 | + private _names; | ||
84 | + private _sources; | ||
85 | + private _sourcesContent; | ||
86 | + private _mappings; | ||
87 | + file: string | null | undefined; | ||
88 | + sourceRoot: string | null | undefined; | ||
89 | + constructor({ file, sourceRoot }?: Options); | ||
90 | +} |
1 | +declare type GeneratedColumn = number; | ||
2 | +declare type SourcesIndex = number; | ||
3 | +declare type SourceLine = number; | ||
4 | +declare type SourceColumn = number; | ||
5 | +declare type NamesIndex = number; | ||
6 | +export declare type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; | ||
7 | +export declare const COLUMN = 0; | ||
8 | +export declare const SOURCES_INDEX = 1; | ||
9 | +export declare const SOURCE_LINE = 2; | ||
10 | +export declare const SOURCE_COLUMN = 3; | ||
11 | +export declare const NAMES_INDEX = 4; | ||
12 | +export {}; |
1 | +import type { SourceMapSegment } from './sourcemap-segment'; | ||
2 | +export interface SourceMapV3 { | ||
3 | + file?: string | null; | ||
4 | + names: readonly string[]; | ||
5 | + sourceRoot?: string; | ||
6 | + sources: readonly (string | null)[]; | ||
7 | + sourcesContent?: readonly (string | null)[]; | ||
8 | + version: 3; | ||
9 | +} | ||
10 | +export interface EncodedSourceMap extends SourceMapV3 { | ||
11 | + mappings: string; | ||
12 | +} | ||
13 | +export interface DecodedSourceMap extends SourceMapV3 { | ||
14 | + mappings: readonly SourceMapSegment[][]; | ||
15 | +} | ||
16 | +export interface Pos { | ||
17 | + line: number; | ||
18 | + column: number; | ||
19 | +} | ||
20 | +export declare type Mapping = { | ||
21 | + generated: Pos; | ||
22 | + source: undefined; | ||
23 | + original: undefined; | ||
24 | + name: undefined; | ||
25 | +} | { | ||
26 | + generated: Pos; | ||
27 | + source: string; | ||
28 | + original: Pos; | ||
29 | + name: string; | ||
30 | +} | { | ||
31 | + generated: Pos; | ||
32 | + source: string; | ||
33 | + original: Pos; | ||
34 | + name: undefined; | ||
35 | +}; |
-
请 注册 或 登录 后发表评论