@cloudbase/weda-ui-mp 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/actions/showMessage/index.js +3 -0
- package/actions/showModal/index.js +3 -0
- package/actions/showToast/index.js +3 -0
- package/app.js +0 -0
- package/components/button/index.js +89 -0
- package/components/button/index.json +4 -0
- package/components/button/index.wxml +22 -0
- package/components/button/index.wxss +13 -0
- package/components/calendar/arrowright--line.svg +3 -0
- package/components/calendar/index.js +439 -0
- package/components/calendar/index.json +5 -0
- package/components/calendar/index.wxml +35 -0
- package/components/calendar/index.wxss +203 -0
- package/components/carousel/index.js +91 -0
- package/components/carousel/index.json +7 -0
- package/components/carousel/index.wxml +6 -0
- package/components/chart/bar/index.js +331 -0
- package/components/chart/bar/index.json +6 -0
- package/components/chart/bar/index.wxml +1 -0
- package/components/chart/bar/index.wxss +9 -0
- package/components/chart/common/config/bar.js +50 -0
- package/components/chart/common/config/global.js +16 -0
- package/components/chart/common/config/line.js +48 -0
- package/components/chart/common/config/pie.js +36 -0
- package/components/chart/common/core/eChartBar.js +267 -0
- package/components/chart/common/core/eChartBase.js +450 -0
- package/components/chart/common/core/eChartLine.js +251 -0
- package/components/chart/common/core/eChartPie.js +169 -0
- package/components/chart/common/data-transform.js +284 -0
- package/components/chart/common/lib/echarts.min.js +18 -0
- package/components/chart/ec-canvas/ec-canvas.js +277 -0
- package/components/chart/ec-canvas/ec-canvas.json +4 -0
- package/components/chart/ec-canvas/ec-canvas.wxml +4 -0
- package/components/chart/ec-canvas/ec-canvas.wxss +4 -0
- package/components/chart/ec-canvas/wx-canvas.js +111 -0
- package/components/chart/line/index.js +326 -0
- package/components/chart/line/index.json +6 -0
- package/components/chart/line/index.wxml +1 -0
- package/components/chart/line/index.wxss +9 -0
- package/components/chart/pie/index.js +257 -0
- package/components/chart/pie/index.json +6 -0
- package/components/chart/pie/index.wxml +1 -0
- package/components/chart/pie/index.wxss +9 -0
- package/components/chart/statisticsCard/index.js +255 -0
- package/components/chart/statisticsCard/index.json +4 -0
- package/components/chart/statisticsCard/index.wxml +9 -0
- package/components/chart/statisticsCard/index.wxss +42 -0
- package/components/common/form-item-wrapper/index.js +20 -0
- package/components/common/form-item-wrapper/index.json +5 -0
- package/components/common/form-item-wrapper/index.wxml +3 -0
- package/components/container/index.js +32 -0
- package/components/container/index.json +4 -0
- package/components/container/index.wxml +3 -0
- package/components/customer-service/index.js +41 -0
- package/components/customer-service/index.json +5 -0
- package/components/customer-service/index.wxml +3 -0
- package/components/customer-service/index.wxss +7 -0
- package/components/dataView/index.js +109 -0
- package/components/dataView/index.json +7 -0
- package/components/dataView/index.wxml +25 -0
- package/components/dataView/index.wxss +0 -0
- package/components/form/checkbox/index.js +145 -0
- package/components/form/checkbox/index.json +7 -0
- package/components/form/checkbox/index.wxml +13 -0
- package/components/form/checkbox/index.wxss +1 -0
- package/components/form/form/index.js +189 -0
- package/components/form/form/index.json +4 -0
- package/components/form/form/index.wxml +5 -0
- package/components/form/form/index.wxss +3 -0
- package/components/form/form/wd-form.wxss +1091 -0
- package/components/form/formcell/index.js +57 -0
- package/components/form/formcell/index.json +4 -0
- package/components/form/formcell/index.wxml +11 -0
- package/components/form/formcell/index.wxss +31 -0
- package/components/form/input/index.js +116 -0
- package/components/form/input/index.json +7 -0
- package/components/form/input/index.wxml +25 -0
- package/components/form/input/index.wxss +22 -0
- package/components/form/location/components/mapChoose/index.js +495 -0
- package/components/form/location/components/mapChoose/index.json +4 -0
- package/components/form/location/components/mapChoose/index.wxml +54 -0
- package/components/form/location/components/mapChoose/index.wxss +301 -0
- package/components/form/location/index.js +494 -0
- package/components/form/location/index.json +10 -0
- package/components/form/location/index.wxml +29 -0
- package/components/form/location/index.wxss +151 -0
- package/components/form/location/location-btn.svg +4 -0
- package/components/form/location/location.svg +4 -0
- package/components/form/radio/index.js +124 -0
- package/components/form/radio/index.json +7 -0
- package/components/form/radio/index.wxml +13 -0
- package/components/form/radio/index.wxss +1 -0
- package/components/form/select/allTimePicker/dataUtils.js +377 -0
- package/components/form/select/allTimePicker/index.js +487 -0
- package/components/form/select/allTimePicker/index.json +7 -0
- package/components/form/select/allTimePicker/index.wxml +35 -0
- package/components/form/select/allTimePicker/index.wxss +118 -0
- package/components/form/select/dropdown-select/index.js +262 -0
- package/components/form/select/dropdown-select/index.json +4 -0
- package/components/form/select/dropdown-select/index.wxml +35 -0
- package/components/form/select/dropdown-select/index.wxss +293 -0
- package/components/form/select/formats-util.js +15 -0
- package/components/form/select/index.js +1017 -0
- package/components/form/select/index.json +10 -0
- package/components/form/select/index.wxml +56 -0
- package/components/form/select/index.wxss +61 -0
- package/components/form/select/region/index.js +120 -0
- package/components/form/selectMultiple/dropdown-select/index.js +202 -0
- package/components/form/selectMultiple/dropdown-select/index.json +4 -0
- package/components/form/selectMultiple/dropdown-select/index.wxml +37 -0
- package/components/form/selectMultiple/dropdown-select/index.wxss +305 -0
- package/components/form/selectMultiple/index.js +328 -0
- package/components/form/selectMultiple/index.json +9 -0
- package/components/form/selectMultiple/index.wxml +20 -0
- package/components/form/selectMultiple/index.wxss +127 -0
- package/components/form/switch/index.js +90 -0
- package/components/form/switch/index.json +7 -0
- package/components/form/switch/index.wxml +11 -0
- package/components/form/switch/index.wxss +1 -0
- package/components/form/textarea/index.js +90 -0
- package/components/form/textarea/index.json +7 -0
- package/components/form/textarea/index.wxml +8 -0
- package/components/form/textarea/index.wxss +10 -0
- package/components/form/tips/index.js +41 -0
- package/components/form/tips/index.json +4 -0
- package/components/form/tips/index.wxml +1 -0
- package/components/form/tips/index.wxss +5 -0
- package/components/form/uploader/compress.js +31 -0
- package/components/form/uploader/index.js +289 -0
- package/components/form/uploader/index.json +10 -0
- package/components/form/uploader/index.wxml +38 -0
- package/components/form/uploader/index.wxss +47 -0
- package/components/form/uploader/weui-uploader.js +310 -0
- package/components/form/uploader/weui-uploader.json +7 -0
- package/components/form/uploader/weui-uploader.wxml +49 -0
- package/components/form/uploader/weui-uploader.wxss +19 -0
- package/components/form/uploaderFile/index.js +481 -0
- package/components/form/uploaderFile/index.json +9 -0
- package/components/form/uploaderFile/index.wxml +52 -0
- package/components/form/uploaderFile/index.wxss +171 -0
- package/components/form-checkbox/index.js +78 -0
- package/components/form-checkbox/index.json +9 -0
- package/components/form-checkbox/index.wxml +6 -0
- package/components/form-date/index.js +72 -0
- package/components/form-date/index.json +9 -0
- package/components/form-date/index.wxml +25 -0
- package/components/form-email/index.js +99 -0
- package/components/form-email/index.json +9 -0
- package/components/form-email/index.wxml +28 -0
- package/components/form-field-behavior/form-field-behavior.js +423 -0
- package/components/form-field-behavior/item-behavior.js +445 -0
- package/components/form-field-behavior/validator.js +132 -0
- package/components/form-image-uploader/index.js +83 -0
- package/components/form-image-uploader/index.json +9 -0
- package/components/form-image-uploader/index.wxml +27 -0
- package/components/form-input/index.js +103 -0
- package/components/form-input/index.json +9 -0
- package/components/form-input/index.wxml +29 -0
- package/components/form-location/index.js +98 -0
- package/components/form-location/index.json +9 -0
- package/components/form-location/index.wxml +28 -0
- package/components/form-multi-region/index.js +62 -0
- package/components/form-multi-region/index.json +9 -0
- package/components/form-multi-region/index.wxml +6 -0
- package/components/form-phone/index.js +95 -0
- package/components/form-phone/index.json +9 -0
- package/components/form-phone/index.wxml +28 -0
- package/components/form-radio/index.js +70 -0
- package/components/form-radio/index.json +9 -0
- package/components/form-radio/index.wxml +6 -0
- package/components/form-region/index.js +59 -0
- package/components/form-region/index.json +9 -0
- package/components/form-region/index.wxml +6 -0
- package/components/form-select/index.js +114 -0
- package/components/form-select/index.json +9 -0
- package/components/form-select/index.wxml +31 -0
- package/components/form-select-multiple/index.js +97 -0
- package/components/form-select-multiple/index.json +9 -0
- package/components/form-select-multiple/index.wxml +29 -0
- package/components/form-switch/index.js +43 -0
- package/components/form-switch/index.json +9 -0
- package/components/form-switch/index.wxml +6 -0
- package/components/form-text-area/index.js +95 -0
- package/components/form-text-area/index.json +9 -0
- package/components/form-text-area/index.wxml +26 -0
- package/components/form-time/index.js +72 -0
- package/components/form-time/index.json +9 -0
- package/components/form-time/index.wxml +6 -0
- package/components/form-upload-file/index.js +73 -0
- package/components/form-upload-file/index.json +9 -0
- package/components/form-upload-file/index.wxml +26 -0
- package/components/form-url/index.js +104 -0
- package/components/form-url/index.json +9 -0
- package/components/form-url/index.wxml +28 -0
- package/components/formdetail/index.js +330 -0
- package/components/formdetail/index.json +7 -0
- package/components/formdetail/index.wxml +7 -0
- package/components/formdetail/index.wxss +277 -0
- package/components/formdetail/wd-form-detail.wxss +245 -0
- package/components/graphicCard/chevron-right.svg +3 -0
- package/components/graphicCard/index.js +205 -0
- package/components/graphicCard/index.json +7 -0
- package/components/graphicCard/index.wxml +27 -0
- package/components/graphicCard/index.wxss +165 -0
- package/components/grid/_util.wxss +67 -0
- package/components/grid/col/index.js +110 -0
- package/components/grid/col/index.json +4 -0
- package/components/grid/col/index.wxml +3 -0
- package/components/grid/index.js +94 -0
- package/components/grid/index.json +4 -0
- package/components/grid/index.wxml +3 -0
- package/components/grid/index.wxss +1206 -0
- package/components/grid/row/index.js +78 -0
- package/components/grid/row/index.json +4 -0
- package/components/grid/row/index.wxml +3 -0
- package/components/image/index.js +203 -0
- package/components/image/index.json +7 -0
- package/components/image/index.wxml +9 -0
- package/components/image/index.wxss +49 -0
- package/components/listView/arrow-right-line.svg +3 -0
- package/components/listView/emptyText.svg +7 -0
- package/components/listView/index.js +656 -0
- package/components/listView/index.json +7 -0
- package/components/listView/index.wxml +82 -0
- package/components/listView/index.wxss +290 -0
- package/components/listView/more-line.svg +3 -0
- package/components/lottery/index.js +301 -0
- package/components/lottery/index.json +4 -0
- package/components/lottery/index.wxml +41 -0
- package/components/lottery/index.wxss +340 -0
- package/components/modal/index.js +65 -0
- package/components/modal/index.json +9 -0
- package/components/modal/index.wxml +18 -0
- package/components/modal/index.wxss +56 -0
- package/components/navLayout/index.js +123 -0
- package/components/navLayout/index.json +8 -0
- package/components/navLayout/index.wxml +22 -0
- package/components/navLayout/index.wxss +131 -0
- package/components/navigationBar/index.js +205 -0
- package/components/navigationBar/index.json +5 -0
- package/components/navigationBar/index.wxml +83 -0
- package/components/navigationBar/index.wxss +205 -0
- package/components/qrcode/index.js +155 -0
- package/components/qrcode/index.json +5 -0
- package/components/qrcode/index.wxml +2 -0
- package/components/qrcode/index.wxss +10 -0
- package/components/richText/index.js +90 -0
- package/components/richText/index.json +4 -0
- package/components/richText/index.wxml +3 -0
- package/components/richText/index.wxss +67 -0
- package/components/scrollView/index.js +119 -0
- package/components/scrollView/index.json +4 -0
- package/components/scrollView/index.wxml +38 -0
- package/components/slot/index.js +25 -0
- package/components/slot/index.json +4 -0
- package/components/slot/index.wxml +3 -0
- package/components/status-content/arrow-right.svg +1 -0
- package/components/status-content/close.svg +1 -0
- package/components/status-content/error.svg +6 -0
- package/components/status-content/index.js +51 -0
- package/components/status-content/index.json +4 -0
- package/components/status-content/index.wxml +28 -0
- package/components/status-content/index.wxss +145 -0
- package/components/swiper/index.js +65 -0
- package/components/swiper/index.json +4 -0
- package/components/swiper/index.wxml +3 -0
- package/components/tabs/index.js +67 -0
- package/components/tabs/index.json +4 -0
- package/components/tabs/index.wxml +10 -0
- package/components/tabs/index.wxss +61 -0
- package/components/text/index.js +40 -0
- package/components/text/index.json +4 -0
- package/components/text/index.wxml +7 -0
- package/components/text/index.wxss +27 -0
- package/components/tooltip/index.js +290 -0
- package/components/tooltip/index.json +4 -0
- package/components/tooltip/index.wxml +18 -0
- package/components/tooltip/index.wxss +72 -0
- package/components/tooltip/wd-tooltip.wxss +25 -0
- package/components/wd-ad/index.js +66 -0
- package/components/wd-ad/index.json +5 -0
- package/components/wd-ad/index.wxml +3 -0
- package/components/wd-ad/index.wxss +3 -0
- package/components/wd-audio/index.js +273 -0
- package/components/wd-audio/index.json +5 -0
- package/components/wd-audio/index.wxml +3 -0
- package/components/wd-audio/index.wxss +0 -0
- package/components/wd-button/index.js +284 -0
- package/components/wd-button/index.json +7 -0
- package/components/wd-button/index.wxml +32 -0
- package/components/wd-button/index.wxss +2 -0
- package/components/wd-button/wd-button.wxss +498 -0
- package/components/wd-calendar/arrowright--line.svg +3 -0
- package/components/wd-calendar/index.js +157 -0
- package/components/wd-calendar/index.json +5 -0
- package/components/wd-calendar/index.wxml +36 -0
- package/components/wd-calendar/index.wxss +203 -0
- package/components/wd-calendar/weeks.js +41 -0
- package/components/wd-canvas/index.js +250 -0
- package/components/wd-canvas/index.json +5 -0
- package/components/wd-canvas/index.wxml +2 -0
- package/components/wd-canvas/index.wxss +0 -0
- package/components/wd-card/index.js +76 -0
- package/components/wd-card/index.json +5 -0
- package/components/wd-card/index.wxml +11 -0
- package/components/wd-card/index.wxss +6 -0
- package/components/wd-card/wd-card.wxss +114 -0
- package/components/wd-checkbox-list/index.js +170 -0
- package/components/wd-checkbox-list/index.json +7 -0
- package/components/wd-checkbox-list/index.wxml +37 -0
- package/components/wd-checkbox-list/index.wxss +2 -0
- package/components/wd-checkbox-list/wd-checkbox-list.wxss +253 -0
- package/components/wd-date/calendar/index.js +111 -0
- package/components/wd-date/calendar/index.json +7 -0
- package/components/wd-date/calendar/index.wxml +38 -0
- package/components/wd-date/calendar/index.wxss +0 -0
- package/components/wd-date/date-picker/index.js +101 -0
- package/components/wd-date/date-picker/index.json +9 -0
- package/components/wd-date/date-picker/index.wxml +41 -0
- package/components/wd-date/date-picker/index.wxss +7 -0
- package/components/wd-date/index.js +129 -0
- package/components/wd-date/index.json +10 -0
- package/components/wd-date/index.wxml +36 -0
- package/components/wd-date/index.wxss +9 -0
- package/components/wd-date/modal/index.js +28 -0
- package/components/wd-date/modal/index.json +5 -0
- package/components/wd-date/modal/index.wxml +14 -0
- package/components/wd-date/modal/index.wxss +3 -0
- package/components/wd-date/time-picker/index.js +202 -0
- package/components/wd-date/time-picker/index.json +5 -0
- package/components/wd-date/time-picker/index.wxml +13 -0
- package/components/wd-date/time-picker/index.wxss +9 -0
- package/components/wd-date/wd-date.wxss +0 -0
- package/components/wd-date/year-month-picker/index.js +128 -0
- package/components/wd-date/year-month-picker/index.json +5 -0
- package/components/wd-date/year-month-picker/index.wxml +8 -0
- package/components/wd-date/year-month-picker/index.wxss +9 -0
- package/components/wd-date-range/index.js +172 -0
- package/components/wd-date-range/index.json +10 -0
- package/components/wd-date-range/index.wxml +41 -0
- package/components/wd-date-range/index.wxss +9 -0
- package/components/wd-date-range/wd-date-range.wxss +0 -0
- package/components/wd-divider/index.js +46 -0
- package/components/wd-divider/index.json +5 -0
- package/components/wd-divider/index.wxml +1 -0
- package/components/wd-divider/index.wxss +2 -0
- package/components/wd-divider/wd-divider.wxss +26 -0
- package/components/wd-form/form-utils.js +55 -0
- package/components/wd-form/index.js +748 -0
- package/components/wd-form/index.json +5 -0
- package/components/wd-form/index.wxml +13 -0
- package/components/wd-form/index.wxss +23 -0
- package/components/wd-form/remote-value.js +76 -0
- package/components/wd-form/wd-form.wxss +1091 -0
- package/components/wd-form-item/index.js +106 -0
- package/components/wd-form-item/index.json +7 -0
- package/components/wd-form-item/index.wxml +47 -0
- package/components/wd-form-item/index.wxss +2 -0
- package/components/wd-form-item/wd-form-item.wxss +1091 -0
- package/components/wd-form-item-read-only/index.js +59 -0
- package/components/wd-form-item-read-only/index.json +5 -0
- package/components/wd-form-item-read-only/index.wxml +10 -0
- package/components/wd-icon/index.js +140 -0
- package/components/wd-icon/index.json +7 -0
- package/components/wd-icon/index.wxml +4 -0
- package/components/wd-icon/index.wxss +4 -0
- package/components/wd-icon/wd-font-icon.wxss +4432 -0
- package/components/wd-icon/wd-icon.wxss +148 -0
- package/components/wd-image/index.js +244 -0
- package/components/wd-image/index.json +7 -0
- package/components/wd-image/index.wxml +11 -0
- package/components/wd-image/index.wxss +11 -0
- package/components/wd-image/wd-image.wxss +80 -0
- package/components/wd-input/index.js +62 -0
- package/components/wd-input/index.json +7 -0
- package/components/wd-input/index.wxml +57 -0
- package/components/wd-input/inner-input/index.js +202 -0
- package/components/wd-input/inner-input/index.json +9 -0
- package/components/wd-input/inner-input/index.wxml +79 -0
- package/components/wd-input/inner-input/index.wxss +2 -0
- package/components/wd-input/inner-input/wd-input.wxss +1574 -0
- package/components/wd-input-email/index.js +63 -0
- package/components/wd-input-email/index.json +7 -0
- package/components/wd-input-email/index.wxml +55 -0
- package/components/wd-input-group/index.js +57 -0
- package/components/wd-input-group/index.json +5 -0
- package/components/wd-input-group/index.wxml +16 -0
- package/components/wd-input-group/index.wxss +1 -0
- package/components/wd-input-group/wd-input-group.wxss +99 -0
- package/components/wd-input-number/index.js +575 -0
- package/components/wd-input-number/index.json +10 -0
- package/components/wd-input-number/index.wxml +66 -0
- package/components/wd-input-number/index.wxss +8 -0
- package/components/wd-input-number/number.js +309 -0
- package/components/wd-input-number/wd-input-number.wxss +243 -0
- package/components/wd-input-phone/index.js +80 -0
- package/components/wd-input-phone/index.json +7 -0
- package/components/wd-input-phone/index.wxml +55 -0
- package/components/wd-input-url/index.js +63 -0
- package/components/wd-input-url/index.json +7 -0
- package/components/wd-input-url/index.wxml +55 -0
- package/components/wd-input-wrap/index.js +112 -0
- package/components/wd-input-wrap/index.json +7 -0
- package/components/wd-input-wrap/index.wxml +32 -0
- package/components/wd-input-wrap/index.wxss +2 -0
- package/components/wd-input-wrap/wd-input-wrap.wxss +220 -0
- package/components/wd-layout/index.js +33 -0
- package/components/wd-layout/index.json +5 -0
- package/components/wd-layout/index.wxml +13 -0
- package/components/wd-layout/index.wxss +2 -0
- package/components/wd-layout/wd-layout.wxss +78 -0
- package/components/wd-location/index.js +49 -0
- package/components/wd-location/index.json +10 -0
- package/components/wd-location/index.wxml +47 -0
- package/components/wd-menu-base-layout/index.js +20 -0
- package/components/wd-menu-base-layout/index.json +5 -0
- package/components/wd-menu-base-layout/index.wxml +3 -0
- package/components/wd-menu-horizontal-layout/index.js +20 -0
- package/components/wd-menu-horizontal-layout/index.json +5 -0
- package/components/wd-menu-horizontal-layout/index.wxml +3 -0
- package/components/wd-menu-layout/index.js +69 -0
- package/components/wd-menu-layout/index.json +8 -0
- package/components/wd-menu-layout/index.wxml +57 -0
- package/components/wd-menu-layout/index.wxss +13 -0
- package/components/wd-menu-layout/utils/index.js +40 -0
- package/components/wd-menu-layout/wd-menu-layout.wxss +632 -0
- package/components/wd-menu-list/index.js +246 -0
- package/components/wd-menu-list/index.json +7 -0
- package/components/wd-menu-list/index.wxml +50 -0
- package/components/wd-menu-list/index.wxss +146 -0
- package/components/wd-menu-list/wd-menu-list.wxss +621 -0
- package/components/wd-menu-nav-layout/index.js +20 -0
- package/components/wd-menu-nav-layout/index.json +5 -0
- package/components/wd-menu-nav-layout/index.wxml +3 -0
- package/components/wd-menu-plant-layout/index.js +20 -0
- package/components/wd-menu-plant-layout/index.json +5 -0
- package/components/wd-menu-plant-layout/index.wxml +3 -0
- package/components/wd-menu-tab-layout/index.js +20 -0
- package/components/wd-menu-tab-layout/index.json +5 -0
- package/components/wd-menu-tab-layout/index.wxml +3 -0
- package/components/wd-menu-vertical-layout/index.js +20 -0
- package/components/wd-menu-vertical-layout/index.json +5 -0
- package/components/wd-menu-vertical-layout/index.wxml +3 -0
- package/components/wd-modal/index.js +184 -0
- package/components/wd-modal/index.json +5 -0
- package/components/wd-modal/index.wxml +16 -0
- package/components/wd-modal/index.wxss +2 -0
- package/components/wd-modal/wd-modal.wxss +206 -0
- package/components/wd-official-account/index.js +28 -0
- package/components/wd-official-account/index.json +5 -0
- package/components/wd-official-account/index.wxml +1 -0
- package/components/wd-official-account/index.wxss +4 -0
- package/components/wd-progress/index.js +127 -0
- package/components/wd-progress/index.json +7 -0
- package/components/wd-progress/index.wxml +29 -0
- package/components/wd-progress/index.wxss +2 -0
- package/components/wd-progress/wd-progress.wxss +1123 -0
- package/components/wd-radio-list/index.js +157 -0
- package/components/wd-radio-list/index.json +7 -0
- package/components/wd-radio-list/index.wxml +37 -0
- package/components/wd-radio-list/index.wxss +2 -0
- package/components/wd-radio-list/wd-radio-list.wxss +181 -0
- package/components/wd-rating/index.js +359 -0
- package/components/wd-rating/index.json +9 -0
- package/components/wd-rating/index.wxml +37 -0
- package/components/wd-rating/index.wxss +2 -0
- package/components/wd-rating/wd-rating.wxss +1116 -0
- package/components/wd-region/index.js +38 -0
- package/components/wd-region/index.json +10 -0
- package/components/wd-region/index.wxml +28 -0
- package/components/wd-region/index.wxss +4 -0
- package/components/wd-select/index.js +78 -0
- package/components/wd-select/index.json +10 -0
- package/components/wd-select/index.wxml +51 -0
- package/components/wd-select/select.wxss +728 -0
- package/components/wd-select-multiple/index.js +74 -0
- package/components/wd-select-multiple/index.json +10 -0
- package/components/wd-select-multiple/index.wxml +51 -0
- package/components/wd-side-tab/index.js +113 -0
- package/components/wd-side-tab/index.json +7 -0
- package/components/wd-side-tab/index.wxml +6 -0
- package/components/wd-side-tab/index.wxss +1 -0
- package/components/wd-switch/index.js +67 -0
- package/components/wd-switch/index.json +7 -0
- package/components/wd-switch/index.wxml +28 -0
- package/components/wd-switch/index.wxss +2 -0
- package/components/wd-switch/wd-switch.wxss +1212 -0
- package/components/wd-tabbar/index.js +196 -0
- package/components/wd-tabbar/index.json +7 -0
- package/components/wd-tabbar/index.wxml +10 -0
- package/components/wd-tabbar/index.wxss +2 -0
- package/components/wd-tabbar/wd-tabbar.wxss +87 -0
- package/components/wd-tabs/index.js +62 -0
- package/components/wd-tabs/index.json +5 -0
- package/components/wd-tabs/index.wxml +34 -0
- package/components/wd-tabs/index.wxss +8 -0
- package/components/wd-tabs/wd-tabs.wxss +265 -0
- package/components/wd-tag/index.js +171 -0
- package/components/wd-tag/index.json +7 -0
- package/components/wd-tag/index.wxml +22 -0
- package/components/wd-tag/index.wxss +3 -0
- package/components/wd-tag/tag-behavior.js +57 -0
- package/components/wd-tag/tag-item/index.js +198 -0
- package/components/wd-tag/tag-item/index.json +7 -0
- package/components/wd-tag/tag-item/index.wxml +15 -0
- package/components/wd-tag/wd-tag.wxss +319 -0
- package/components/wd-tag-select/index.js +107 -0
- package/components/wd-tag-select/index.json +8 -0
- package/components/wd-tag-select/index.wxml +42 -0
- package/components/wd-tag-select/index.wxss +4 -0
- package/components/wd-tag-select/wd-tag-select.wxss +1253 -0
- package/components/wd-text/index.js +162 -0
- package/components/wd-text/index.json +5 -0
- package/components/wd-text/index.wxml +8 -0
- package/components/wd-text/index.wxss +2 -0
- package/components/wd-text/wd-text.wxss +256 -0
- package/components/wd-textarea/index.js +94 -0
- package/components/wd-textarea/index.json +7 -0
- package/components/wd-textarea/index.wxml +31 -0
- package/components/wd-textarea/index.wxss +7 -0
- package/components/wd-textarea/wd-textarea.wxss +91 -0
- package/components/wd-time/index.js +124 -0
- package/components/wd-time/index.json +11 -0
- package/components/wd-time/index.wxml +36 -0
- package/components/wd-time/index.wxss +9 -0
- package/components/wd-time/wd-time.wxss +0 -0
- package/components/wd-top-tab/index.js +113 -0
- package/components/wd-top-tab/index.json +7 -0
- package/components/wd-top-tab/index.wxml +6 -0
- package/components/wd-top-tab/index.wxss +5 -0
- package/components/wd-unified-link/index.js +115 -0
- package/components/wd-unified-link/index.json +5 -0
- package/components/wd-unified-link/index.wxml +3 -0
- package/components/wd-unified-link/index.wxss +2 -0
- package/components/wd-unified-link/wd-link.wxss +45 -0
- package/components/wd-upload-file/index.js +46 -0
- package/components/wd-upload-file/index.json +8 -0
- package/components/wd-upload-file/index.wxml +39 -0
- package/components/wd-upload-image/index.js +64 -0
- package/components/wd-upload-image/index.json +8 -0
- package/components/wd-upload-image/index.wxml +45 -0
- package/components/web-view/index.js +69 -0
- package/components/web-view/index.json +5 -0
- package/components/web-view/index.wxml +1 -0
- package/components/web-view/index.wxss +1 -0
- package/components/wedaVideo/index.js +179 -0
- package/components/wedaVideo/index.json +4 -0
- package/components/wedaVideo/index.wxml +29 -0
- package/components/wedaVideo/index.wxss +20 -0
- package/components/wxOpenApi/phone/index.js +122 -0
- package/components/wxOpenApi/phone/index.json +4 -0
- package/components/wxOpenApi/phone/index.wxml +4 -0
- package/components/wxOpenApi/phone/index.wxss +22 -0
- package/components/wxOpenApi/phoneCode/index.js +102 -0
- package/components/wxOpenApi/phoneCode/index.json +4 -0
- package/components/wxOpenApi/phoneCode/index.wxml +4 -0
- package/components/wxOpenApi/phoneCode/index.wxss +22 -0
- package/components/wxOpenApi/share/index.js +134 -0
- package/components/wxOpenApi/share/index.json +4 -0
- package/components/wxOpenApi/share/index.wxml +4 -0
- package/components/wxOpenApi/share/index.wxss +22 -0
- package/components/wxOpenApi/userInfo/index.js +97 -0
- package/components/wxOpenApi/userInfo/index.json +4 -0
- package/components/wxOpenApi/userInfo/index.wxml +4 -0
- package/components/wxOpenApi/userInfo/index.wxss +22 -0
- package/index.json +128 -0
- package/package.json +16 -0
- package/style/utils.wxss +162 -0
- package/style/wd-design.wxss +606 -0
- package/style/weda-ui.wxss +1412 -0
- package/style/wedatea2td.wxss +56 -0
- package/utils/classnames.js +39 -0
- package/utils/color.js +76 -0
- package/utils/common-behavior.js +1 -0
- package/utils/constant.js +132 -0
- package/utils/date.js +47 -0
- package/utils/dayjs.min.js +1 -0
- package/utils/debounce.js +134 -0
- package/utils/deepEqual.js +42 -0
- package/utils/destr.js +49 -0
- package/utils/dr_square_point.js +29 -0
- package/utils/enum.js +1247 -0
- package/utils/error.js +12 -0
- package/utils/getCustomInfo.js +34 -0
- package/utils/getFormLegacy.js +401 -0
- package/utils/getModelParams.js +43 -0
- package/utils/getWedaApi.js +1 -0
- package/utils/handleEvents.js +34 -0
- package/utils/lodash.js +65 -0
- package/utils/platform.js +158 -0
- package/utils/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js +1323 -0
- package/utils/qrcode/weapp.qrcode.min.js +911 -0
- package/utils/range.js +82 -0
- package/utils/tcb.js +162 -0
- package/utils/tool.js +74 -0
- package/utils/widget-api.js +28 -0
|
@@ -0,0 +1,911 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* weapp.qrcode.js v1.0.0 (https://github.com/yingye/weapp-qrcode#readme)
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6
|
+
!(function (t, e) {
|
|
7
|
+
'object' == typeof exports && 'undefined' != typeof module
|
|
8
|
+
? (module.exports = e())
|
|
9
|
+
: // eslint-disable-next-line no-undef
|
|
10
|
+
'function' == typeof define && define.amd
|
|
11
|
+
? // eslint-disable-next-line no-undef
|
|
12
|
+
define(e)
|
|
13
|
+
: (t.drawQrcode = e());
|
|
14
|
+
})(this, function () {
|
|
15
|
+
'use strict';
|
|
16
|
+
var t = Object.prototype.hasOwnProperty,
|
|
17
|
+
e = Object.prototype.toString,
|
|
18
|
+
r = Object.defineProperty,
|
|
19
|
+
o = Object.getOwnPropertyDescriptor,
|
|
20
|
+
n = function (t) {
|
|
21
|
+
return 'function' == typeof Array.isArray
|
|
22
|
+
? Array.isArray(t)
|
|
23
|
+
: '[object Array]' === e.call(t);
|
|
24
|
+
},
|
|
25
|
+
i = function (r) {
|
|
26
|
+
if (!r || '[object Object]' !== e.call(r)) return !1;
|
|
27
|
+
var o,
|
|
28
|
+
n = t.call(r, 'constructor'),
|
|
29
|
+
i =
|
|
30
|
+
r.constructor &&
|
|
31
|
+
r.constructor.prototype &&
|
|
32
|
+
t.call(r.constructor.prototype, 'isPrototypeOf');
|
|
33
|
+
if (r.constructor && !n && !i) return !1;
|
|
34
|
+
for (o in r);
|
|
35
|
+
return void 0 === o || t.call(r, o);
|
|
36
|
+
},
|
|
37
|
+
a = function (t, e) {
|
|
38
|
+
r && '__proto__' === e.name
|
|
39
|
+
? r(t, e.name, {
|
|
40
|
+
enumerable: !0,
|
|
41
|
+
configurable: !0,
|
|
42
|
+
value: e.newValue,
|
|
43
|
+
writable: !0,
|
|
44
|
+
})
|
|
45
|
+
: (t[e.name] = e.newValue);
|
|
46
|
+
},
|
|
47
|
+
u = function (e, r) {
|
|
48
|
+
if ('__proto__' === r) {
|
|
49
|
+
if (!t.call(e, r)) return;
|
|
50
|
+
if (o) return o(e, r).value;
|
|
51
|
+
}
|
|
52
|
+
return e[r];
|
|
53
|
+
},
|
|
54
|
+
s = function t() {
|
|
55
|
+
var e,
|
|
56
|
+
r,
|
|
57
|
+
o,
|
|
58
|
+
s,
|
|
59
|
+
h,
|
|
60
|
+
l,
|
|
61
|
+
f = arguments[0],
|
|
62
|
+
g = 1,
|
|
63
|
+
c = arguments.length,
|
|
64
|
+
d = !1;
|
|
65
|
+
for (
|
|
66
|
+
'boolean' == typeof f && ((d = f), (f = arguments[1] || {}), (g = 2)),
|
|
67
|
+
(null == f || ('object' != typeof f && 'function' != typeof f)) &&
|
|
68
|
+
(f = {});
|
|
69
|
+
g < c;
|
|
70
|
+
++g
|
|
71
|
+
)
|
|
72
|
+
if (null != (e = arguments[g]))
|
|
73
|
+
for (r in e)
|
|
74
|
+
(o = u(f, r)),
|
|
75
|
+
f !== (s = u(e, r)) &&
|
|
76
|
+
(d && s && (i(s) || (h = n(s)))
|
|
77
|
+
? (h
|
|
78
|
+
? ((h = !1), (l = o && n(o) ? o : []))
|
|
79
|
+
: (l = o && i(o) ? o : {}),
|
|
80
|
+
a(f, { name: r, newValue: t(d, l, s) }))
|
|
81
|
+
: void 0 !== s && a(f, { name: r, newValue: s }));
|
|
82
|
+
return f;
|
|
83
|
+
};
|
|
84
|
+
function h(t) {
|
|
85
|
+
(this.mode = f.MODE_8BIT_BYTE), (this.data = t);
|
|
86
|
+
}
|
|
87
|
+
function l(t, e) {
|
|
88
|
+
(this.typeNumber = t),
|
|
89
|
+
(this.errorCorrectLevel = e),
|
|
90
|
+
(this.modules = null),
|
|
91
|
+
(this.moduleCount = 0),
|
|
92
|
+
(this.dataCache = null),
|
|
93
|
+
(this.dataList = []);
|
|
94
|
+
}
|
|
95
|
+
(h.prototype = {
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
97
|
+
getLength: function (t) {
|
|
98
|
+
return this.data.length;
|
|
99
|
+
},
|
|
100
|
+
write: function (t) {
|
|
101
|
+
for (var e = 0; e < this.data.length; e++)
|
|
102
|
+
t.put(this.data.charCodeAt(e), 8);
|
|
103
|
+
},
|
|
104
|
+
}),
|
|
105
|
+
(l.prototype = {
|
|
106
|
+
addData: function (t) {
|
|
107
|
+
var e = new h(t);
|
|
108
|
+
this.dataList.push(e), (this.dataCache = null);
|
|
109
|
+
},
|
|
110
|
+
isDark: function (t, e) {
|
|
111
|
+
if (t < 0 || this.moduleCount <= t || e < 0 || this.moduleCount <= e)
|
|
112
|
+
throw new Error(t + ',' + e);
|
|
113
|
+
return this.modules[t][e];
|
|
114
|
+
},
|
|
115
|
+
getModuleCount: function () {
|
|
116
|
+
return this.moduleCount;
|
|
117
|
+
},
|
|
118
|
+
make: function () {
|
|
119
|
+
if (this.typeNumber < 1) {
|
|
120
|
+
var t = 1;
|
|
121
|
+
for (t = 1; t < 40; t++) {
|
|
122
|
+
for (
|
|
123
|
+
var e = _.getRSBlocks(t, this.errorCorrectLevel),
|
|
124
|
+
r = new D(),
|
|
125
|
+
o = 0,
|
|
126
|
+
n = 0;
|
|
127
|
+
n < e.length;
|
|
128
|
+
n++
|
|
129
|
+
)
|
|
130
|
+
o += e[n].dataCount;
|
|
131
|
+
for (n = 0; n < this.dataList.length; n++) {
|
|
132
|
+
var i = this.dataList[n];
|
|
133
|
+
r.put(i.mode, 4),
|
|
134
|
+
r.put(i.getLength(), w.getLengthInBits(i.mode, t)),
|
|
135
|
+
i.write(r);
|
|
136
|
+
}
|
|
137
|
+
if (r.getLengthInBits() <= 8 * o) break;
|
|
138
|
+
}
|
|
139
|
+
this.typeNumber = t;
|
|
140
|
+
}
|
|
141
|
+
this.makeImpl(!1, this.getBestMaskPattern());
|
|
142
|
+
},
|
|
143
|
+
makeImpl: function (t, e) {
|
|
144
|
+
(this.moduleCount = 4 * this.typeNumber + 17),
|
|
145
|
+
(this.modules = new Array(this.moduleCount));
|
|
146
|
+
for (var r = 0; r < this.moduleCount; r++) {
|
|
147
|
+
this.modules[r] = new Array(this.moduleCount);
|
|
148
|
+
for (var o = 0; o < this.moduleCount; o++) this.modules[r][o] = null;
|
|
149
|
+
}
|
|
150
|
+
this.setupPositionProbePattern(0, 0),
|
|
151
|
+
this.setupPositionProbePattern(this.moduleCount - 7, 0),
|
|
152
|
+
this.setupPositionProbePattern(0, this.moduleCount - 7),
|
|
153
|
+
this.setupPositionAdjustPattern(),
|
|
154
|
+
this.setupTimingPattern(),
|
|
155
|
+
this.setupTypeInfo(t, e),
|
|
156
|
+
this.typeNumber >= 7 && this.setupTypeNumber(t),
|
|
157
|
+
null == this.dataCache &&
|
|
158
|
+
(this.dataCache = l.createData(
|
|
159
|
+
this.typeNumber,
|
|
160
|
+
this.errorCorrectLevel,
|
|
161
|
+
this.dataList
|
|
162
|
+
)),
|
|
163
|
+
this.mapData(this.dataCache, e);
|
|
164
|
+
},
|
|
165
|
+
setupPositionProbePattern: function (t, e) {
|
|
166
|
+
for (var r = -1; r <= 7; r++)
|
|
167
|
+
if (!(t + r <= -1 || this.moduleCount <= t + r))
|
|
168
|
+
for (var o = -1; o <= 7; o++)
|
|
169
|
+
e + o <= -1 ||
|
|
170
|
+
this.moduleCount <= e + o ||
|
|
171
|
+
(this.modules[t + r][e + o] =
|
|
172
|
+
(0 <= r && r <= 6 && (0 == o || 6 == o)) ||
|
|
173
|
+
(0 <= o && o <= 6 && (0 == r || 6 == r)) ||
|
|
174
|
+
(2 <= r && r <= 4 && 2 <= o && o <= 4));
|
|
175
|
+
},
|
|
176
|
+
getBestMaskPattern: function () {
|
|
177
|
+
for (var t = 0, e = 0, r = 0; r < 8; r++) {
|
|
178
|
+
this.makeImpl(!0, r);
|
|
179
|
+
var o = w.getLostPoint(this);
|
|
180
|
+
(0 == r || t > o) && ((t = o), (e = r));
|
|
181
|
+
}
|
|
182
|
+
return e;
|
|
183
|
+
},
|
|
184
|
+
createMovieClip: function (t, e, r) {
|
|
185
|
+
var o = t.createEmptyMovieClip(e, r);
|
|
186
|
+
this.make();
|
|
187
|
+
for (var n = 0; n < this.modules.length; n++)
|
|
188
|
+
for (var i = 1 * n, a = 0; a < this.modules[n].length; a++) {
|
|
189
|
+
var u = 1 * a;
|
|
190
|
+
this.modules[n][a] &&
|
|
191
|
+
(o.beginFill(0, 100),
|
|
192
|
+
o.moveTo(u, i),
|
|
193
|
+
o.lineTo(u + 1, i),
|
|
194
|
+
o.lineTo(u + 1, i + 1),
|
|
195
|
+
o.lineTo(u, i + 1),
|
|
196
|
+
o.endFill());
|
|
197
|
+
}
|
|
198
|
+
return o;
|
|
199
|
+
},
|
|
200
|
+
setupTimingPattern: function () {
|
|
201
|
+
for (var t = 8; t < this.moduleCount - 8; t++)
|
|
202
|
+
null == this.modules[t][6] && (this.modules[t][6] = t % 2 == 0);
|
|
203
|
+
for (var e = 8; e < this.moduleCount - 8; e++)
|
|
204
|
+
null == this.modules[6][e] && (this.modules[6][e] = e % 2 == 0);
|
|
205
|
+
},
|
|
206
|
+
setupPositionAdjustPattern: function () {
|
|
207
|
+
for (
|
|
208
|
+
var t = w.getPatternPosition(this.typeNumber), e = 0;
|
|
209
|
+
e < t.length;
|
|
210
|
+
e++
|
|
211
|
+
)
|
|
212
|
+
for (var r = 0; r < t.length; r++) {
|
|
213
|
+
var o = t[e],
|
|
214
|
+
n = t[r];
|
|
215
|
+
if (null == this.modules[o][n])
|
|
216
|
+
for (var i = -2; i <= 2; i++)
|
|
217
|
+
for (var a = -2; a <= 2; a++)
|
|
218
|
+
this.modules[o + i][n + a] =
|
|
219
|
+
-2 == i ||
|
|
220
|
+
2 == i ||
|
|
221
|
+
-2 == a ||
|
|
222
|
+
2 == a ||
|
|
223
|
+
(0 == i && 0 == a);
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
setupTypeNumber: function (t) {
|
|
227
|
+
for (var e = w.getBCHTypeNumber(this.typeNumber), r = 0; r < 18; r++) {
|
|
228
|
+
var o = !t && 1 == ((e >> r) & 1);
|
|
229
|
+
this.modules[Math.floor(r / 3)][(r % 3) + this.moduleCount - 8 - 3] =
|
|
230
|
+
o;
|
|
231
|
+
}
|
|
232
|
+
for (r = 0; r < 18; r++) {
|
|
233
|
+
o = !t && 1 == ((e >> r) & 1);
|
|
234
|
+
this.modules[(r % 3) + this.moduleCount - 8 - 3][Math.floor(r / 3)] =
|
|
235
|
+
o;
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
setupTypeInfo: function (t, e) {
|
|
239
|
+
for (
|
|
240
|
+
var r = (this.errorCorrectLevel << 3) | e,
|
|
241
|
+
o = w.getBCHTypeInfo(r),
|
|
242
|
+
n = 0;
|
|
243
|
+
n < 15;
|
|
244
|
+
n++
|
|
245
|
+
) {
|
|
246
|
+
var i = !t && 1 == ((o >> n) & 1);
|
|
247
|
+
n < 6
|
|
248
|
+
? (this.modules[n][8] = i)
|
|
249
|
+
: n < 8
|
|
250
|
+
? (this.modules[n + 1][8] = i)
|
|
251
|
+
: (this.modules[this.moduleCount - 15 + n][8] = i);
|
|
252
|
+
}
|
|
253
|
+
for (n = 0; n < 15; n++) {
|
|
254
|
+
i = !t && 1 == ((o >> n) & 1);
|
|
255
|
+
n < 8
|
|
256
|
+
? (this.modules[8][this.moduleCount - n - 1] = i)
|
|
257
|
+
: n < 9
|
|
258
|
+
? (this.modules[8][15 - n - 1 + 1] = i)
|
|
259
|
+
: (this.modules[8][15 - n - 1] = i);
|
|
260
|
+
}
|
|
261
|
+
this.modules[this.moduleCount - 8][8] = !t;
|
|
262
|
+
},
|
|
263
|
+
mapData: function (t, e) {
|
|
264
|
+
for (
|
|
265
|
+
var r = -1,
|
|
266
|
+
o = this.moduleCount - 1,
|
|
267
|
+
n = 7,
|
|
268
|
+
i = 0,
|
|
269
|
+
a = this.moduleCount - 1;
|
|
270
|
+
a > 0;
|
|
271
|
+
a -= 2
|
|
272
|
+
)
|
|
273
|
+
for (6 == a && a--; ; ) {
|
|
274
|
+
for (var u = 0; u < 2; u++)
|
|
275
|
+
if (null == this.modules[o][a - u]) {
|
|
276
|
+
var s = !1;
|
|
277
|
+
i < t.length && (s = 1 == ((t[i] >>> n) & 1)),
|
|
278
|
+
w.getMask(e, o, a - u) && (s = !s),
|
|
279
|
+
(this.modules[o][a - u] = s),
|
|
280
|
+
-1 == --n && (i++, (n = 7));
|
|
281
|
+
}
|
|
282
|
+
if ((o += r) < 0 || this.moduleCount <= o) {
|
|
283
|
+
(o -= r), (r = -r);
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
}),
|
|
289
|
+
(l.PAD0 = 236),
|
|
290
|
+
(l.PAD1 = 17),
|
|
291
|
+
(l.createData = function (t, e, r) {
|
|
292
|
+
for (var o = _.getRSBlocks(t, e), n = new D(), i = 0; i < r.length; i++) {
|
|
293
|
+
var a = r[i];
|
|
294
|
+
n.put(a.mode, 4),
|
|
295
|
+
n.put(a.getLength(), w.getLengthInBits(a.mode, t)),
|
|
296
|
+
a.write(n);
|
|
297
|
+
}
|
|
298
|
+
var u = 0;
|
|
299
|
+
for (i = 0; i < o.length; i++) u += o[i].dataCount;
|
|
300
|
+
if (n.getLengthInBits() > 8 * u)
|
|
301
|
+
throw new Error(
|
|
302
|
+
'code length overflow. (' + n.getLengthInBits() + '>' + 8 * u + ')'
|
|
303
|
+
);
|
|
304
|
+
for (
|
|
305
|
+
n.getLengthInBits() + 4 <= 8 * u && n.put(0, 4);
|
|
306
|
+
n.getLengthInBits() % 8 != 0;
|
|
307
|
+
|
|
308
|
+
)
|
|
309
|
+
n.putBit(!1);
|
|
310
|
+
for (
|
|
311
|
+
;
|
|
312
|
+
!(
|
|
313
|
+
n.getLengthInBits() >= 8 * u ||
|
|
314
|
+
(n.put(l.PAD0, 8), n.getLengthInBits() >= 8 * u)
|
|
315
|
+
);
|
|
316
|
+
|
|
317
|
+
)
|
|
318
|
+
n.put(l.PAD1, 8);
|
|
319
|
+
return l.createBytes(n, o);
|
|
320
|
+
}),
|
|
321
|
+
(l.createBytes = function (t, e) {
|
|
322
|
+
for (
|
|
323
|
+
var r = 0,
|
|
324
|
+
o = 0,
|
|
325
|
+
n = 0,
|
|
326
|
+
i = new Array(e.length),
|
|
327
|
+
a = new Array(e.length),
|
|
328
|
+
u = 0;
|
|
329
|
+
u < e.length;
|
|
330
|
+
u++
|
|
331
|
+
) {
|
|
332
|
+
var s = e[u].dataCount,
|
|
333
|
+
h = e[u].totalCount - s;
|
|
334
|
+
(o = Math.max(o, s)), (n = Math.max(n, h)), (i[u] = new Array(s));
|
|
335
|
+
for (var l = 0; l < i[u].length; l++) i[u][l] = 255 & t.buffer[l + r];
|
|
336
|
+
r += s;
|
|
337
|
+
var f = w.getErrorCorrectPolynomial(h),
|
|
338
|
+
g = new A(i[u], f.getLength() - 1).mod(f);
|
|
339
|
+
a[u] = new Array(f.getLength() - 1);
|
|
340
|
+
for (l = 0; l < a[u].length; l++) {
|
|
341
|
+
var c = l + g.getLength() - a[u].length;
|
|
342
|
+
a[u][l] = c >= 0 ? g.get(c) : 0;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
var d = 0;
|
|
346
|
+
for (l = 0; l < e.length; l++) d += e[l].totalCount;
|
|
347
|
+
var m = new Array(d),
|
|
348
|
+
v = 0;
|
|
349
|
+
for (l = 0; l < o; l++)
|
|
350
|
+
for (u = 0; u < e.length; u++) l < i[u].length && (m[v++] = i[u][l]);
|
|
351
|
+
for (l = 0; l < n; l++)
|
|
352
|
+
for (u = 0; u < e.length; u++) l < a[u].length && (m[v++] = a[u][l]);
|
|
353
|
+
return m;
|
|
354
|
+
});
|
|
355
|
+
for (
|
|
356
|
+
var f = {
|
|
357
|
+
MODE_NUMBER: 1,
|
|
358
|
+
MODE_ALPHA_NUM: 2,
|
|
359
|
+
MODE_8BIT_BYTE: 4,
|
|
360
|
+
MODE_KANJI: 8,
|
|
361
|
+
},
|
|
362
|
+
g = { L: 1, M: 0, Q: 3, H: 2 },
|
|
363
|
+
c = 0,
|
|
364
|
+
d = 1,
|
|
365
|
+
m = 2,
|
|
366
|
+
v = 3,
|
|
367
|
+
p = 4,
|
|
368
|
+
C = 5,
|
|
369
|
+
B = 6,
|
|
370
|
+
L = 7,
|
|
371
|
+
w = {
|
|
372
|
+
PATTERN_POSITION_TABLE: [
|
|
373
|
+
[],
|
|
374
|
+
[6, 18],
|
|
375
|
+
[6, 22],
|
|
376
|
+
[6, 26],
|
|
377
|
+
[6, 30],
|
|
378
|
+
[6, 34],
|
|
379
|
+
[6, 22, 38],
|
|
380
|
+
[6, 24, 42],
|
|
381
|
+
[6, 26, 46],
|
|
382
|
+
[6, 28, 50],
|
|
383
|
+
[6, 30, 54],
|
|
384
|
+
[6, 32, 58],
|
|
385
|
+
[6, 34, 62],
|
|
386
|
+
[6, 26, 46, 66],
|
|
387
|
+
[6, 26, 48, 70],
|
|
388
|
+
[6, 26, 50, 74],
|
|
389
|
+
[6, 30, 54, 78],
|
|
390
|
+
[6, 30, 56, 82],
|
|
391
|
+
[6, 30, 58, 86],
|
|
392
|
+
[6, 34, 62, 90],
|
|
393
|
+
[6, 28, 50, 72, 94],
|
|
394
|
+
[6, 26, 50, 74, 98],
|
|
395
|
+
[6, 30, 54, 78, 102],
|
|
396
|
+
[6, 28, 54, 80, 106],
|
|
397
|
+
[6, 32, 58, 84, 110],
|
|
398
|
+
[6, 30, 58, 86, 114],
|
|
399
|
+
[6, 34, 62, 90, 118],
|
|
400
|
+
[6, 26, 50, 74, 98, 122],
|
|
401
|
+
[6, 30, 54, 78, 102, 126],
|
|
402
|
+
[6, 26, 52, 78, 104, 130],
|
|
403
|
+
[6, 30, 56, 82, 108, 134],
|
|
404
|
+
[6, 34, 60, 86, 112, 138],
|
|
405
|
+
[6, 30, 58, 86, 114, 142],
|
|
406
|
+
[6, 34, 62, 90, 118, 146],
|
|
407
|
+
[6, 30, 54, 78, 102, 126, 150],
|
|
408
|
+
[6, 24, 50, 76, 102, 128, 154],
|
|
409
|
+
[6, 28, 54, 80, 106, 132, 158],
|
|
410
|
+
[6, 32, 58, 84, 110, 136, 162],
|
|
411
|
+
[6, 26, 54, 82, 110, 138, 166],
|
|
412
|
+
[6, 30, 58, 86, 114, 142, 170],
|
|
413
|
+
],
|
|
414
|
+
G15: 1335,
|
|
415
|
+
G18: 7973,
|
|
416
|
+
G15_MASK: 21522,
|
|
417
|
+
getBCHTypeInfo: function (t) {
|
|
418
|
+
for (var e = t << 10; w.getBCHDigit(e) - w.getBCHDigit(w.G15) >= 0; )
|
|
419
|
+
e ^= w.G15 << (w.getBCHDigit(e) - w.getBCHDigit(w.G15));
|
|
420
|
+
return ((t << 10) | e) ^ w.G15_MASK;
|
|
421
|
+
},
|
|
422
|
+
getBCHTypeNumber: function (t) {
|
|
423
|
+
for (var e = t << 12; w.getBCHDigit(e) - w.getBCHDigit(w.G18) >= 0; )
|
|
424
|
+
e ^= w.G18 << (w.getBCHDigit(e) - w.getBCHDigit(w.G18));
|
|
425
|
+
return (t << 12) | e;
|
|
426
|
+
},
|
|
427
|
+
getBCHDigit: function (t) {
|
|
428
|
+
for (var e = 0; 0 != t; ) e++, (t >>>= 1);
|
|
429
|
+
return e;
|
|
430
|
+
},
|
|
431
|
+
getPatternPosition: function (t) {
|
|
432
|
+
return w.PATTERN_POSITION_TABLE[t - 1];
|
|
433
|
+
},
|
|
434
|
+
getMask: function (t, e, r) {
|
|
435
|
+
switch (t) {
|
|
436
|
+
case c:
|
|
437
|
+
return (e + r) % 2 == 0;
|
|
438
|
+
case d:
|
|
439
|
+
return e % 2 == 0;
|
|
440
|
+
case m:
|
|
441
|
+
return r % 3 == 0;
|
|
442
|
+
case v:
|
|
443
|
+
return (e + r) % 3 == 0;
|
|
444
|
+
case p:
|
|
445
|
+
return (Math.floor(e / 2) + Math.floor(r / 3)) % 2 == 0;
|
|
446
|
+
case C:
|
|
447
|
+
return ((e * r) % 2) + ((e * r) % 3) == 0;
|
|
448
|
+
case B:
|
|
449
|
+
return (((e * r) % 2) + ((e * r) % 3)) % 2 == 0;
|
|
450
|
+
case L:
|
|
451
|
+
return (((e * r) % 3) + ((e + r) % 2)) % 2 == 0;
|
|
452
|
+
default:
|
|
453
|
+
throw new Error('bad maskPattern:' + t);
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
getErrorCorrectPolynomial: function (t) {
|
|
457
|
+
for (var e = new A([1], 0), r = 0; r < t; r++)
|
|
458
|
+
e = e.multiply(new A([1, y.gexp(r)], 0));
|
|
459
|
+
return e;
|
|
460
|
+
},
|
|
461
|
+
getLengthInBits: function (t, e) {
|
|
462
|
+
if (1 <= e && e < 10)
|
|
463
|
+
switch (t) {
|
|
464
|
+
case f.MODE_NUMBER:
|
|
465
|
+
return 10;
|
|
466
|
+
case f.MODE_ALPHA_NUM:
|
|
467
|
+
return 9;
|
|
468
|
+
case f.MODE_8BIT_BYTE:
|
|
469
|
+
case f.MODE_KANJI:
|
|
470
|
+
return 8;
|
|
471
|
+
default:
|
|
472
|
+
throw new Error('mode:' + t);
|
|
473
|
+
}
|
|
474
|
+
else if (e < 27)
|
|
475
|
+
switch (t) {
|
|
476
|
+
case f.MODE_NUMBER:
|
|
477
|
+
return 12;
|
|
478
|
+
case f.MODE_ALPHA_NUM:
|
|
479
|
+
return 11;
|
|
480
|
+
case f.MODE_8BIT_BYTE:
|
|
481
|
+
return 16;
|
|
482
|
+
case f.MODE_KANJI:
|
|
483
|
+
return 10;
|
|
484
|
+
default:
|
|
485
|
+
throw new Error('mode:' + t);
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
if (!(e < 41)) throw new Error('type:' + e);
|
|
489
|
+
switch (t) {
|
|
490
|
+
case f.MODE_NUMBER:
|
|
491
|
+
return 14;
|
|
492
|
+
case f.MODE_ALPHA_NUM:
|
|
493
|
+
return 13;
|
|
494
|
+
case f.MODE_8BIT_BYTE:
|
|
495
|
+
return 16;
|
|
496
|
+
case f.MODE_KANJI:
|
|
497
|
+
return 12;
|
|
498
|
+
default:
|
|
499
|
+
throw new Error('mode:' + t);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
getLostPoint: function (t) {
|
|
504
|
+
for (var e = t.getModuleCount(), r = 0, o = 0; o < e; o++)
|
|
505
|
+
for (var n = 0; n < e; n++) {
|
|
506
|
+
for (var i = 0, a = t.isDark(o, n), u = -1; u <= 1; u++)
|
|
507
|
+
if (!(o + u < 0 || e <= o + u))
|
|
508
|
+
for (var s = -1; s <= 1; s++)
|
|
509
|
+
n + s < 0 ||
|
|
510
|
+
e <= n + s ||
|
|
511
|
+
(0 == u && 0 == s) ||
|
|
512
|
+
(a == t.isDark(o + u, n + s) && i++);
|
|
513
|
+
i > 5 && (r += 3 + i - 5);
|
|
514
|
+
}
|
|
515
|
+
for (o = 0; o < e - 1; o++)
|
|
516
|
+
for (n = 0; n < e - 1; n++) {
|
|
517
|
+
var h = 0;
|
|
518
|
+
t.isDark(o, n) && h++,
|
|
519
|
+
t.isDark(o + 1, n) && h++,
|
|
520
|
+
t.isDark(o, n + 1) && h++,
|
|
521
|
+
t.isDark(o + 1, n + 1) && h++,
|
|
522
|
+
(0 != h && 4 != h) || (r += 3);
|
|
523
|
+
}
|
|
524
|
+
for (o = 0; o < e; o++)
|
|
525
|
+
for (n = 0; n < e - 6; n++)
|
|
526
|
+
t.isDark(o, n) &&
|
|
527
|
+
!t.isDark(o, n + 1) &&
|
|
528
|
+
t.isDark(o, n + 2) &&
|
|
529
|
+
t.isDark(o, n + 3) &&
|
|
530
|
+
t.isDark(o, n + 4) &&
|
|
531
|
+
!t.isDark(o, n + 5) &&
|
|
532
|
+
t.isDark(o, n + 6) &&
|
|
533
|
+
(r += 40);
|
|
534
|
+
for (n = 0; n < e; n++)
|
|
535
|
+
for (o = 0; o < e - 6; o++)
|
|
536
|
+
t.isDark(o, n) &&
|
|
537
|
+
!t.isDark(o + 1, n) &&
|
|
538
|
+
t.isDark(o + 2, n) &&
|
|
539
|
+
t.isDark(o + 3, n) &&
|
|
540
|
+
t.isDark(o + 4, n) &&
|
|
541
|
+
!t.isDark(o + 5, n) &&
|
|
542
|
+
t.isDark(o + 6, n) &&
|
|
543
|
+
(r += 40);
|
|
544
|
+
var l = 0;
|
|
545
|
+
for (n = 0; n < e; n++) for (o = 0; o < e; o++) t.isDark(o, n) && l++;
|
|
546
|
+
return (r += 10 * (Math.abs((100 * l) / e / e - 50) / 5));
|
|
547
|
+
},
|
|
548
|
+
},
|
|
549
|
+
y = {
|
|
550
|
+
glog: function (t) {
|
|
551
|
+
if (t < 1) throw new Error('glog(' + t + ')');
|
|
552
|
+
return y.LOG_TABLE[t];
|
|
553
|
+
},
|
|
554
|
+
gexp: function (t) {
|
|
555
|
+
for (; t < 0; ) t += 255;
|
|
556
|
+
for (; t >= 256; ) t -= 255;
|
|
557
|
+
return y.EXP_TABLE[t];
|
|
558
|
+
},
|
|
559
|
+
EXP_TABLE: new Array(256),
|
|
560
|
+
LOG_TABLE: new Array(256),
|
|
561
|
+
},
|
|
562
|
+
E = 0;
|
|
563
|
+
E < 8;
|
|
564
|
+
E++
|
|
565
|
+
)
|
|
566
|
+
y.EXP_TABLE[E] = 1 << E;
|
|
567
|
+
for (E = 8; E < 256; E++)
|
|
568
|
+
y.EXP_TABLE[E] =
|
|
569
|
+
y.EXP_TABLE[E - 4] ^
|
|
570
|
+
y.EXP_TABLE[E - 5] ^
|
|
571
|
+
y.EXP_TABLE[E - 6] ^
|
|
572
|
+
y.EXP_TABLE[E - 8];
|
|
573
|
+
for (E = 0; E < 255; E++) y.LOG_TABLE[y.EXP_TABLE[E]] = E;
|
|
574
|
+
function A(t, e) {
|
|
575
|
+
if (void 0 == t.length) throw new Error(t.length + '/' + e);
|
|
576
|
+
for (var r = 0; r < t.length && 0 == t[r]; ) r++;
|
|
577
|
+
this.num = new Array(t.length - r + e);
|
|
578
|
+
for (var o = 0; o < t.length - r; o++) this.num[o] = t[o + r];
|
|
579
|
+
}
|
|
580
|
+
function _(t, e) {
|
|
581
|
+
(this.totalCount = t), (this.dataCount = e);
|
|
582
|
+
}
|
|
583
|
+
function D() {
|
|
584
|
+
(this.buffer = []), (this.length = 0);
|
|
585
|
+
}
|
|
586
|
+
return (
|
|
587
|
+
(A.prototype = {
|
|
588
|
+
get: function (t) {
|
|
589
|
+
return this.num[t];
|
|
590
|
+
},
|
|
591
|
+
getLength: function () {
|
|
592
|
+
return this.num.length;
|
|
593
|
+
},
|
|
594
|
+
multiply: function (t) {
|
|
595
|
+
for (
|
|
596
|
+
var e = new Array(this.getLength() + t.getLength() - 1), r = 0;
|
|
597
|
+
r < this.getLength();
|
|
598
|
+
r++
|
|
599
|
+
)
|
|
600
|
+
for (var o = 0; o < t.getLength(); o++)
|
|
601
|
+
e[r + o] ^= y.gexp(y.glog(this.get(r)) + y.glog(t.get(o)));
|
|
602
|
+
return new A(e, 0);
|
|
603
|
+
},
|
|
604
|
+
mod: function (t) {
|
|
605
|
+
if (this.getLength() - t.getLength() < 0) return this;
|
|
606
|
+
for (
|
|
607
|
+
var e = y.glog(this.get(0)) - y.glog(t.get(0)),
|
|
608
|
+
r = new Array(this.getLength()),
|
|
609
|
+
o = 0;
|
|
610
|
+
o < this.getLength();
|
|
611
|
+
o++
|
|
612
|
+
)
|
|
613
|
+
r[o] = this.get(o);
|
|
614
|
+
for (o = 0; o < t.getLength(); o++)
|
|
615
|
+
r[o] ^= y.gexp(y.glog(t.get(o)) + e);
|
|
616
|
+
return new A(r, 0).mod(t);
|
|
617
|
+
},
|
|
618
|
+
}),
|
|
619
|
+
(_.RS_BLOCK_TABLE = [
|
|
620
|
+
[1, 26, 19],
|
|
621
|
+
[1, 26, 16],
|
|
622
|
+
[1, 26, 13],
|
|
623
|
+
[1, 26, 9],
|
|
624
|
+
[1, 44, 34],
|
|
625
|
+
[1, 44, 28],
|
|
626
|
+
[1, 44, 22],
|
|
627
|
+
[1, 44, 16],
|
|
628
|
+
[1, 70, 55],
|
|
629
|
+
[1, 70, 44],
|
|
630
|
+
[2, 35, 17],
|
|
631
|
+
[2, 35, 13],
|
|
632
|
+
[1, 100, 80],
|
|
633
|
+
[2, 50, 32],
|
|
634
|
+
[2, 50, 24],
|
|
635
|
+
[4, 25, 9],
|
|
636
|
+
[1, 134, 108],
|
|
637
|
+
[2, 67, 43],
|
|
638
|
+
[2, 33, 15, 2, 34, 16],
|
|
639
|
+
[2, 33, 11, 2, 34, 12],
|
|
640
|
+
[2, 86, 68],
|
|
641
|
+
[4, 43, 27],
|
|
642
|
+
[4, 43, 19],
|
|
643
|
+
[4, 43, 15],
|
|
644
|
+
[2, 98, 78],
|
|
645
|
+
[4, 49, 31],
|
|
646
|
+
[2, 32, 14, 4, 33, 15],
|
|
647
|
+
[4, 39, 13, 1, 40, 14],
|
|
648
|
+
[2, 121, 97],
|
|
649
|
+
[2, 60, 38, 2, 61, 39],
|
|
650
|
+
[4, 40, 18, 2, 41, 19],
|
|
651
|
+
[4, 40, 14, 2, 41, 15],
|
|
652
|
+
[2, 146, 116],
|
|
653
|
+
[3, 58, 36, 2, 59, 37],
|
|
654
|
+
[4, 36, 16, 4, 37, 17],
|
|
655
|
+
[4, 36, 12, 4, 37, 13],
|
|
656
|
+
[2, 86, 68, 2, 87, 69],
|
|
657
|
+
[4, 69, 43, 1, 70, 44],
|
|
658
|
+
[6, 43, 19, 2, 44, 20],
|
|
659
|
+
[6, 43, 15, 2, 44, 16],
|
|
660
|
+
[4, 101, 81],
|
|
661
|
+
[1, 80, 50, 4, 81, 51],
|
|
662
|
+
[4, 50, 22, 4, 51, 23],
|
|
663
|
+
[3, 36, 12, 8, 37, 13],
|
|
664
|
+
[2, 116, 92, 2, 117, 93],
|
|
665
|
+
[6, 58, 36, 2, 59, 37],
|
|
666
|
+
[4, 46, 20, 6, 47, 21],
|
|
667
|
+
[7, 42, 14, 4, 43, 15],
|
|
668
|
+
[4, 133, 107],
|
|
669
|
+
[8, 59, 37, 1, 60, 38],
|
|
670
|
+
[8, 44, 20, 4, 45, 21],
|
|
671
|
+
[12, 33, 11, 4, 34, 12],
|
|
672
|
+
[3, 145, 115, 1, 146, 116],
|
|
673
|
+
[4, 64, 40, 5, 65, 41],
|
|
674
|
+
[11, 36, 16, 5, 37, 17],
|
|
675
|
+
[11, 36, 12, 5, 37, 13],
|
|
676
|
+
[5, 109, 87, 1, 110, 88],
|
|
677
|
+
[5, 65, 41, 5, 66, 42],
|
|
678
|
+
[5, 54, 24, 7, 55, 25],
|
|
679
|
+
[11, 36, 12],
|
|
680
|
+
[5, 122, 98, 1, 123, 99],
|
|
681
|
+
[7, 73, 45, 3, 74, 46],
|
|
682
|
+
[15, 43, 19, 2, 44, 20],
|
|
683
|
+
[3, 45, 15, 13, 46, 16],
|
|
684
|
+
[1, 135, 107, 5, 136, 108],
|
|
685
|
+
[10, 74, 46, 1, 75, 47],
|
|
686
|
+
[1, 50, 22, 15, 51, 23],
|
|
687
|
+
[2, 42, 14, 17, 43, 15],
|
|
688
|
+
[5, 150, 120, 1, 151, 121],
|
|
689
|
+
[9, 69, 43, 4, 70, 44],
|
|
690
|
+
[17, 50, 22, 1, 51, 23],
|
|
691
|
+
[2, 42, 14, 19, 43, 15],
|
|
692
|
+
[3, 141, 113, 4, 142, 114],
|
|
693
|
+
[3, 70, 44, 11, 71, 45],
|
|
694
|
+
[17, 47, 21, 4, 48, 22],
|
|
695
|
+
[9, 39, 13, 16, 40, 14],
|
|
696
|
+
[3, 135, 107, 5, 136, 108],
|
|
697
|
+
[3, 67, 41, 13, 68, 42],
|
|
698
|
+
[15, 54, 24, 5, 55, 25],
|
|
699
|
+
[15, 43, 15, 10, 44, 16],
|
|
700
|
+
[4, 144, 116, 4, 145, 117],
|
|
701
|
+
[17, 68, 42],
|
|
702
|
+
[17, 50, 22, 6, 51, 23],
|
|
703
|
+
[19, 46, 16, 6, 47, 17],
|
|
704
|
+
[2, 139, 111, 7, 140, 112],
|
|
705
|
+
[17, 74, 46],
|
|
706
|
+
[7, 54, 24, 16, 55, 25],
|
|
707
|
+
[34, 37, 13],
|
|
708
|
+
[4, 151, 121, 5, 152, 122],
|
|
709
|
+
[4, 75, 47, 14, 76, 48],
|
|
710
|
+
[11, 54, 24, 14, 55, 25],
|
|
711
|
+
[16, 45, 15, 14, 46, 16],
|
|
712
|
+
[6, 147, 117, 4, 148, 118],
|
|
713
|
+
[6, 73, 45, 14, 74, 46],
|
|
714
|
+
[11, 54, 24, 16, 55, 25],
|
|
715
|
+
[30, 46, 16, 2, 47, 17],
|
|
716
|
+
[8, 132, 106, 4, 133, 107],
|
|
717
|
+
[8, 75, 47, 13, 76, 48],
|
|
718
|
+
[7, 54, 24, 22, 55, 25],
|
|
719
|
+
[22, 45, 15, 13, 46, 16],
|
|
720
|
+
[10, 142, 114, 2, 143, 115],
|
|
721
|
+
[19, 74, 46, 4, 75, 47],
|
|
722
|
+
[28, 50, 22, 6, 51, 23],
|
|
723
|
+
[33, 46, 16, 4, 47, 17],
|
|
724
|
+
[8, 152, 122, 4, 153, 123],
|
|
725
|
+
[22, 73, 45, 3, 74, 46],
|
|
726
|
+
[8, 53, 23, 26, 54, 24],
|
|
727
|
+
[12, 45, 15, 28, 46, 16],
|
|
728
|
+
[3, 147, 117, 10, 148, 118],
|
|
729
|
+
[3, 73, 45, 23, 74, 46],
|
|
730
|
+
[4, 54, 24, 31, 55, 25],
|
|
731
|
+
[11, 45, 15, 31, 46, 16],
|
|
732
|
+
[7, 146, 116, 7, 147, 117],
|
|
733
|
+
[21, 73, 45, 7, 74, 46],
|
|
734
|
+
[1, 53, 23, 37, 54, 24],
|
|
735
|
+
[19, 45, 15, 26, 46, 16],
|
|
736
|
+
[5, 145, 115, 10, 146, 116],
|
|
737
|
+
[19, 75, 47, 10, 76, 48],
|
|
738
|
+
[15, 54, 24, 25, 55, 25],
|
|
739
|
+
[23, 45, 15, 25, 46, 16],
|
|
740
|
+
[13, 145, 115, 3, 146, 116],
|
|
741
|
+
[2, 74, 46, 29, 75, 47],
|
|
742
|
+
[42, 54, 24, 1, 55, 25],
|
|
743
|
+
[23, 45, 15, 28, 46, 16],
|
|
744
|
+
[17, 145, 115],
|
|
745
|
+
[10, 74, 46, 23, 75, 47],
|
|
746
|
+
[10, 54, 24, 35, 55, 25],
|
|
747
|
+
[19, 45, 15, 35, 46, 16],
|
|
748
|
+
[17, 145, 115, 1, 146, 116],
|
|
749
|
+
[14, 74, 46, 21, 75, 47],
|
|
750
|
+
[29, 54, 24, 19, 55, 25],
|
|
751
|
+
[11, 45, 15, 46, 46, 16],
|
|
752
|
+
[13, 145, 115, 6, 146, 116],
|
|
753
|
+
[14, 74, 46, 23, 75, 47],
|
|
754
|
+
[44, 54, 24, 7, 55, 25],
|
|
755
|
+
[59, 46, 16, 1, 47, 17],
|
|
756
|
+
[12, 151, 121, 7, 152, 122],
|
|
757
|
+
[12, 75, 47, 26, 76, 48],
|
|
758
|
+
[39, 54, 24, 14, 55, 25],
|
|
759
|
+
[22, 45, 15, 41, 46, 16],
|
|
760
|
+
[6, 151, 121, 14, 152, 122],
|
|
761
|
+
[6, 75, 47, 34, 76, 48],
|
|
762
|
+
[46, 54, 24, 10, 55, 25],
|
|
763
|
+
[2, 45, 15, 64, 46, 16],
|
|
764
|
+
[17, 152, 122, 4, 153, 123],
|
|
765
|
+
[29, 74, 46, 14, 75, 47],
|
|
766
|
+
[49, 54, 24, 10, 55, 25],
|
|
767
|
+
[24, 45, 15, 46, 46, 16],
|
|
768
|
+
[4, 152, 122, 18, 153, 123],
|
|
769
|
+
[13, 74, 46, 32, 75, 47],
|
|
770
|
+
[48, 54, 24, 14, 55, 25],
|
|
771
|
+
[42, 45, 15, 32, 46, 16],
|
|
772
|
+
[20, 147, 117, 4, 148, 118],
|
|
773
|
+
[40, 75, 47, 7, 76, 48],
|
|
774
|
+
[43, 54, 24, 22, 55, 25],
|
|
775
|
+
[10, 45, 15, 67, 46, 16],
|
|
776
|
+
[19, 148, 118, 6, 149, 119],
|
|
777
|
+
[18, 75, 47, 31, 76, 48],
|
|
778
|
+
[34, 54, 24, 34, 55, 25],
|
|
779
|
+
[20, 45, 15, 61, 46, 16],
|
|
780
|
+
]),
|
|
781
|
+
(_.getRSBlocks = function (t, e) {
|
|
782
|
+
var r = _.getRsBlockTable(t, e);
|
|
783
|
+
if (void 0 == r)
|
|
784
|
+
throw new Error(
|
|
785
|
+
'bad rs block @ typeNumber:' + t + '/errorCorrectLevel:' + e
|
|
786
|
+
);
|
|
787
|
+
for (var o = r.length / 3, n = [], i = 0; i < o; i++)
|
|
788
|
+
for (
|
|
789
|
+
var a = r[3 * i + 0], u = r[3 * i + 1], s = r[3 * i + 2], h = 0;
|
|
790
|
+
h < a;
|
|
791
|
+
h++
|
|
792
|
+
)
|
|
793
|
+
n.push(new _(u, s));
|
|
794
|
+
return n;
|
|
795
|
+
}),
|
|
796
|
+
(_.getRsBlockTable = function (t, e) {
|
|
797
|
+
switch (e) {
|
|
798
|
+
case g.L:
|
|
799
|
+
return _.RS_BLOCK_TABLE[4 * (t - 1) + 0];
|
|
800
|
+
case g.M:
|
|
801
|
+
return _.RS_BLOCK_TABLE[4 * (t - 1) + 1];
|
|
802
|
+
case g.Q:
|
|
803
|
+
return _.RS_BLOCK_TABLE[4 * (t - 1) + 2];
|
|
804
|
+
case g.H:
|
|
805
|
+
return _.RS_BLOCK_TABLE[4 * (t - 1) + 3];
|
|
806
|
+
default:
|
|
807
|
+
return;
|
|
808
|
+
}
|
|
809
|
+
}),
|
|
810
|
+
(D.prototype = {
|
|
811
|
+
get: function (t) {
|
|
812
|
+
var e = Math.floor(t / 8);
|
|
813
|
+
return 1 == ((this.buffer[e] >>> (7 - (t % 8))) & 1);
|
|
814
|
+
},
|
|
815
|
+
put: function (t, e) {
|
|
816
|
+
for (var r = 0; r < e; r++) this.putBit(1 == ((t >>> (e - r - 1)) & 1));
|
|
817
|
+
},
|
|
818
|
+
getLengthInBits: function () {
|
|
819
|
+
return this.length;
|
|
820
|
+
},
|
|
821
|
+
putBit: function (t) {
|
|
822
|
+
var e = Math.floor(this.length / 8);
|
|
823
|
+
this.buffer.length <= e && this.buffer.push(0),
|
|
824
|
+
t && (this.buffer[e] |= 128 >>> this.length % 8),
|
|
825
|
+
this.length++;
|
|
826
|
+
},
|
|
827
|
+
}),
|
|
828
|
+
function (t) {
|
|
829
|
+
(t = t || {}),
|
|
830
|
+
(t = s(
|
|
831
|
+
!0,
|
|
832
|
+
{
|
|
833
|
+
width: 256,
|
|
834
|
+
height: 256,
|
|
835
|
+
x: 0,
|
|
836
|
+
y: 0,
|
|
837
|
+
typeNumber: -1,
|
|
838
|
+
correctLevel: g.H,
|
|
839
|
+
background: '#ffffff',
|
|
840
|
+
foreground: '#000000',
|
|
841
|
+
image: {
|
|
842
|
+
imageResource: '',
|
|
843
|
+
dx: 0,
|
|
844
|
+
dy: 0,
|
|
845
|
+
dWidth: 100,
|
|
846
|
+
dHeight: 100,
|
|
847
|
+
},
|
|
848
|
+
},
|
|
849
|
+
t
|
|
850
|
+
)).canvasId || t.ctx
|
|
851
|
+
? (function () {
|
|
852
|
+
var e,
|
|
853
|
+
r = new l(t.typeNumber, t.correctLevel);
|
|
854
|
+
r.addData(
|
|
855
|
+
(function (t) {
|
|
856
|
+
var e, r, o, n;
|
|
857
|
+
for (e = '', o = t.length, r = 0; r < o; r++)
|
|
858
|
+
(n = t.charCodeAt(r)) >= 1 && n <= 127
|
|
859
|
+
? (e += t.charAt(r))
|
|
860
|
+
: n > 2047
|
|
861
|
+
? ((e += String.fromCharCode(224 | ((n >> 12) & 15))),
|
|
862
|
+
(e += String.fromCharCode(128 | ((n >> 6) & 63))),
|
|
863
|
+
(e += String.fromCharCode(128 | ((n >> 0) & 63))))
|
|
864
|
+
: ((e += String.fromCharCode(192 | ((n >> 6) & 31))),
|
|
865
|
+
(e += String.fromCharCode(128 | ((n >> 0) & 63))));
|
|
866
|
+
return e;
|
|
867
|
+
})(t.text)
|
|
868
|
+
),
|
|
869
|
+
r.make(),
|
|
870
|
+
(e = t.ctx
|
|
871
|
+
? t.ctx
|
|
872
|
+
: t._this
|
|
873
|
+
? wx.createCanvasContext &&
|
|
874
|
+
wx.createCanvasContext(t.canvasId, t._this)
|
|
875
|
+
: wx.createCanvasContext &&
|
|
876
|
+
wx.createCanvasContext(t.canvasId));
|
|
877
|
+
for (
|
|
878
|
+
var o = t.width / r.getModuleCount(),
|
|
879
|
+
n = t.height / r.getModuleCount(),
|
|
880
|
+
i = 0;
|
|
881
|
+
i < r.getModuleCount();
|
|
882
|
+
i++
|
|
883
|
+
)
|
|
884
|
+
for (var a = 0; a < r.getModuleCount(); a++) {
|
|
885
|
+
var u = r.isDark(i, a) ? t.foreground : t.background;
|
|
886
|
+
e.setFillStyle(u);
|
|
887
|
+
var s = Math.ceil((a + 1) * o) - Math.floor(a * o),
|
|
888
|
+
h = Math.ceil((i + 1) * o) - Math.floor(i * o);
|
|
889
|
+
e.fillRect(
|
|
890
|
+
Math.round(a * o) + t.x,
|
|
891
|
+
Math.round(i * n) + t.y,
|
|
892
|
+
s,
|
|
893
|
+
h
|
|
894
|
+
);
|
|
895
|
+
}
|
|
896
|
+
t.image.imageResource &&
|
|
897
|
+
e.drawImage(
|
|
898
|
+
t.image.imageResource,
|
|
899
|
+
t.image.dx,
|
|
900
|
+
t.image.dy,
|
|
901
|
+
t.image.dWidth,
|
|
902
|
+
t.image.dHeight
|
|
903
|
+
),
|
|
904
|
+
e.draw(!1, function (e) {
|
|
905
|
+
t.callback && t.callback(e);
|
|
906
|
+
});
|
|
907
|
+
})()
|
|
908
|
+
: console.warn('please set canvasId or ctx!');
|
|
909
|
+
}
|
|
910
|
+
);
|
|
911
|
+
});
|