weapps-plugin-jingtong-verify 1.6.0 → 1.6.2-beta
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 -1
- package/app.json +33 -41
- package/package.json +21 -21
- package/sdk.js +309 -320
- package/weapps-plugin-jingtong-verify/components/card-modal/card-modal.js +31 -31
- package/weapps-plugin-jingtong-verify/components/card-modal/card-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/card-modal/card-modal.wxml +9 -9
- package/weapps-plugin-jingtong-verify/components/card-modal/card-modal.wxss +65 -65
- package/weapps-plugin-jingtong-verify/components/face-error-modal/face-error-modal.js +37 -37
- package/weapps-plugin-jingtong-verify/components/face-error-modal/face-error-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/face-error-modal/face-error-modal.wxml +30 -30
- package/weapps-plugin-jingtong-verify/components/face-error-modal/face-error-modal.wxss +79 -79
- package/weapps-plugin-jingtong-verify/components/face-modal/face-modal.js +32 -32
- package/weapps-plugin-jingtong-verify/components/face-modal/face-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/face-modal/face-modal.wxml +16 -16
- package/weapps-plugin-jingtong-verify/components/face-modal/face-modal.wxss +57 -57
- package/weapps-plugin-jingtong-verify/components/gsd-lib/anim/anim.min.js +1 -1
- package/weapps-plugin-jingtong-verify/components/gsd-lib/crypto/crypto.js +37 -37
- package/weapps-plugin-jingtong-verify/components/gsd-lib/crypto/index.js +44 -44
- package/weapps-plugin-jingtong-verify/components/gsd-lib/dayjs/index.js +351 -351
- package/weapps-plugin-jingtong-verify/components/gsd-lib/event/index.js +117 -117
- package/weapps-plugin-jingtong-verify/components/gsd-lib/index.js +63 -63
- package/weapps-plugin-jingtong-verify/components/gsd-lib/map/index.js +10 -10
- package/weapps-plugin-jingtong-verify/components/gsd-lib/map/qmap.js +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-lib/storage/index.js +114 -114
- package/weapps-plugin-jingtong-verify/components/gsd-lib/utils/index.js +218 -218
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/formCheck.js +72 -72
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/formController.js +47 -47
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/icon.js +11 -11
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/list.js +16 -16
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/navigator.js +33 -33
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/primarySecondButton.js +18 -18
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-agree/index.js +12 -12
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-agree/index.json +5 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-agree/index.wxml +15 -15
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-badge/index.js +47 -47
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-badge/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-badge/index.wxml +13 -13
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-button-group/index.js +44 -44
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-button-group/index.json +5 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-button-group/index.wxml +28 -28
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-cell/index.js +30 -30
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-cell/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-cell/index.wxml +42 -42
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-cell/index.wxss +1 -1
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-date-picker-en/index.js +418 -418
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-date-picker-en/index.json +5 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-date-picker-en/index.wxml +29 -29
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-dropdown/index.js +11 -11
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-dropdown/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-dropdown/index.wxml +4 -4
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form/index.js +179 -182
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form/index.wxml +16 -16
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-cell/index.js +92 -92
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-cell/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-cell/index.wxml +12 -12
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-cell/index.wxss +2 -2
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-item/index.js +49 -49
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-item/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-item/index.wxml +14 -14
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-icon/index.js +33 -33
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-icon/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-icon/index.wxml +2 -2
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-index-list/index.js +108 -108
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-index-list/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-index-list/index.wxml +53 -53
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-input/index.js +236 -241
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-input/index.json +8 -8
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-input/index.wxml +49 -49
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-picker/index.js +328 -328
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-picker/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-picker/index.wxml +26 -26
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-popover/index.js +159 -159
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-popover/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-popover/index.wxml +10 -10
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-search/index.js +112 -112
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-search/index.json +5 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-search/index.wxml +21 -21
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-switch/index.js +21 -21
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-switch/index.json +7 -7
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-switch/index.wxml +16 -16
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-tips/index.js +50 -50
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-tips/index.json +5 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-tips/index.wxml +27 -27
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/add.svg +13 -13
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/arrow.svg +14 -14
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/delete.svg +16 -16
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/preview.svg +21 -21
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/user.svg +13 -13
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-agree.wxss +147 -147
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-badge.wxss +41 -41
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-button-group.wxss +244 -244
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-cell.wxss +220 -220
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-dropdown.wxss +115 -115
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-form-cell.wxss +101 -101
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-form-item.wxss +174 -174
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-form.wxss +101 -101
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-icon.wxss +268 -268
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-index-list.wxss +206 -206
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-input.wxss +206 -214
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-picker.wxss +139 -139
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-popover.wxss +129 -129
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-search.wxss +171 -171
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-switch.wxss +176 -176
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-tips.wxss +173 -173
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/icon/iconfont.wxss +160 -160
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/main.wxss +283 -283
- package/weapps-plugin-jingtong-verify/components/gsd-ui/utils/helper.js +55 -55
- package/weapps-plugin-jingtong-verify/components/gsd-ui/utils/validType.js +117 -117
- package/weapps-plugin-jingtong-verify/components/gsd-ui/utils/validator.js +106 -106
- package/weapps-plugin-jingtong-verify/components/lock-face-modal/lock-face-modal.js +32 -32
- package/weapps-plugin-jingtong-verify/components/lock-face-modal/lock-face-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/lock-face-modal/lock-face-modal.wxml +8 -8
- package/weapps-plugin-jingtong-verify/components/lock-face-modal/lock-face-modal.wxss +57 -57
- package/weapps-plugin-jingtong-verify/components/modal/modal.js +32 -32
- package/weapps-plugin-jingtong-verify/components/modal/modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/modal/modal.wxml +28 -28
- package/weapps-plugin-jingtong-verify/components/modal/modal.wxss +84 -84
- package/weapps-plugin-jingtong-verify/components/my-modal/my-modal.js +82 -82
- package/weapps-plugin-jingtong-verify/components/my-modal/my-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/my-modal/my-modal.wxml +18 -18
- package/weapps-plugin-jingtong-verify/components/my-modal/my-modal.wxss +72 -72
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.js +39 -47
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.wxml +9 -11
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.wxss +51 -51
- package/weapps-plugin-jingtong-verify/i18n/index.js +7 -7
- package/weapps-plugin-jingtong-verify/i18n/logout.js +10 -10
- package/weapps-plugin-jingtong-verify/i18n/rules.js +262 -403
- package/weapps-plugin-jingtong-verify/pages/bind-phone/bind-phone.js +86 -86
- package/weapps-plugin-jingtong-verify/pages/bind-phone/bind-phone.json +6 -6
- package/weapps-plugin-jingtong-verify/pages/bind-phone/bind-phone.wxml +20 -20
- package/weapps-plugin-jingtong-verify/pages/bind-phone/bind-phone.wxss +51 -51
- package/weapps-plugin-jingtong-verify/pages/confirm-phone/confirm-phone.js +167 -167
- package/weapps-plugin-jingtong-verify/pages/confirm-phone/confirm-phone.json +3 -3
- package/weapps-plugin-jingtong-verify/pages/confirm-phone/confirm-phone.wxml +30 -30
- package/weapps-plugin-jingtong-verify/pages/confirm-phone/confirm-phone.wxss +91 -91
- package/weapps-plugin-jingtong-verify/pages/face-error-reason/face-error-reason.js +79 -79
- package/weapps-plugin-jingtong-verify/pages/face-error-reason/face-error-reason.json +5 -5
- package/weapps-plugin-jingtong-verify/pages/face-error-reason/face-error-reason.wxml +19 -19
- package/weapps-plugin-jingtong-verify/pages/face-error-reason/face-error-reason.wxss +44 -44
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.js +1558 -1812
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.json +17 -17
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.wxml +504 -522
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.wxss +133 -185
- package/weapps-plugin-jingtong-verify/pages/log-off/log-off.js +127 -127
- package/weapps-plugin-jingtong-verify/pages/log-off/log-off.json +5 -5
- package/weapps-plugin-jingtong-verify/pages/log-off/log-off.wxml +36 -36
- package/weapps-plugin-jingtong-verify/pages/log-off/log-off.wxss +60 -60
- package/weapps-plugin-jingtong-verify/pages/login-manage/login-manage.js +106 -106
- package/weapps-plugin-jingtong-verify/pages/login-manage/login-manage.json +3 -3
- package/weapps-plugin-jingtong-verify/pages/login-manage/login-manage.wxml +29 -29
- package/weapps-plugin-jingtong-verify/pages/login-manage/login-manage.wxss +68 -68
- package/weapps-plugin-jingtong-verify/pages/logoff-success/logoff-success.js +24 -24
- package/weapps-plugin-jingtong-verify/pages/logoff-success/logoff-success.json +3 -3
- package/weapps-plugin-jingtong-verify/pages/logoff-success/logoff-success.wxml +12 -12
- package/weapps-plugin-jingtong-verify/pages/logoff-success/logoff-success.wxss +33 -33
- package/weapps-plugin-jingtong-verify/pages/nation-list/nation-list.js +120 -110
- package/weapps-plugin-jingtong-verify/pages/nation-list/nation-list.json +6 -6
- package/weapps-plugin-jingtong-verify/pages/nation-list/nation-list.wxml +9 -9
- package/weapps-plugin-jingtong-verify/pages/nation-list/nation-list.wxss +1 -1
- package/weapps-plugin-jingtong-verify/pages/passport-verify/passport-verify.js +864 -854
- package/weapps-plugin-jingtong-verify/pages/passport-verify/passport-verify.json +11 -11
- package/weapps-plugin-jingtong-verify/pages/passport-verify/passport-verify.wxml +162 -162
- package/weapps-plugin-jingtong-verify/pages/passport-verify/passport-verify.wxss +64 -64
- package/weapps-plugin-jingtong-verify/pages/setting/setting.js +328 -331
- package/weapps-plugin-jingtong-verify/pages/setting/setting.json +5 -5
- package/weapps-plugin-jingtong-verify/pages/setting/setting.wxml +91 -91
- package/weapps-plugin-jingtong-verify/pages/setting/setting.wxss +69 -69
- package/weapps-plugin-jingtong-verify/pages/user-info/user-info.js +306 -306
- package/weapps-plugin-jingtong-verify/pages/user-info/user-info.json +7 -7
- package/weapps-plugin-jingtong-verify/pages/user-info/user-info.wxml +142 -142
- package/weapps-plugin-jingtong-verify/pages/user-info/user-info.wxss +110 -110
- package/weapps-plugin-jingtong-verify/style/page.wxss +13 -13
- package/weapps-plugin-jingtong-verify/utils/QDTrackerNew/QDTracker.js +15 -15
- package/weapps-plugin-jingtong-verify/utils/QDTrackerNew/QDTrackerMain.js +59 -59
- package/weapps-plugin-jingtong-verify/utils/country.js +209 -209
- package/weapps-plugin-jingtong-verify/utils/index.js +306 -306
- package/weapps-plugin-jingtong-verify/utils/jsencrypt.min.js +1 -1
- package/weapps-plugin-jingtong-verify/utils/request.js +1 -670
- package/weapps-plugin-jingtong-verify/utils/rules.js +301 -405
- package/weapps-plugin-jingtong-verify/utils/tifadmin_config.js +61 -61
- package/weapps-plugin-jingtong-verify/utils/validate.js +772 -910
- package/weapps-plugin-jingtong-verify/components/custom-steps/custom-steps.js +0 -41
- package/weapps-plugin-jingtong-verify/components/custom-steps/custom-steps.json +0 -4
- package/weapps-plugin-jingtong-verify/components/custom-steps/custom-steps.wxml +0 -20
- package/weapps-plugin-jingtong-verify/components/custom-steps/custom-steps.wxss +0 -112
- package/weapps-plugin-jingtong-verify/components/to-other-modal/to-other-modal.js +0 -73
- package/weapps-plugin-jingtong-verify/components/to-other-modal/to-other-modal.json +0 -4
- package/weapps-plugin-jingtong-verify/components/to-other-modal/to-other-modal.wxml +0 -19
- package/weapps-plugin-jingtong-verify/components/to-other-modal/to-other-modal.wxss +0 -72
- package/weapps-plugin-jingtong-verify/images/bank-card-verify.png +0 -0
- package/weapps-plugin-jingtong-verify/images/chek_right.png +0 -0
- package/weapps-plugin-jingtong-verify/images/chevron-down.png +0 -0
- package/weapps-plugin-jingtong-verify/images/chevron-up.png +0 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-login/bank-card-login.js +0 -506
- package/weapps-plugin-jingtong-verify/pages/bank-card-login/bank-card-login.json +0 -8
- package/weapps-plugin-jingtong-verify/pages/bank-card-login/bank-card-login.wxml +0 -79
- package/weapps-plugin-jingtong-verify/pages/bank-card-login/bank-card-login.wxss +0 -212
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-face-setting/bank-card-login-forgot-face-setting.js +0 -1392
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-face-setting/bank-card-login-forgot-face-setting.json +0 -10
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-face-setting/bank-card-login-forgot-face-setting.wxml +0 -247
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-face-setting/bank-card-login-forgot-face-setting.wxss +0 -397
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-sms-setting/bank-card-login-forgot-sms-setting.js +0 -66
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-sms-setting/bank-card-login-forgot-sms-setting.wxml +0 -2
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-pwd-setting/bank-card-login-pwd-setting.js +0 -463
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-pwd-setting/bank-card-login-pwd-setting.json +0 -8
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-pwd-setting/bank-card-login-pwd-setting.wxml +0 -69
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-pwd-setting/bank-card-login-pwd-setting.wxss +0 -232
- package/weapps-plugin-jingtong-verify/pages/bank-card-verify/bank-card-verify.js +0 -984
- package/weapps-plugin-jingtong-verify/pages/bank-card-verify/bank-card-verify.json +0 -12
- package/weapps-plugin-jingtong-verify/pages/bank-card-verify/bank-card-verify.wxml +0 -157
- package/weapps-plugin-jingtong-verify/pages/bank-card-verify/bank-card-verify.wxss +0 -258
- package/weapps-plugin-jingtong-verify/pages/login-help/login-help.js +0 -147
- package/weapps-plugin-jingtong-verify/pages/login-help/login-help.json +0 -4
- package/weapps-plugin-jingtong-verify/pages/login-help/login-help.wxml +0 -48
- package/weapps-plugin-jingtong-verify/pages/login-help/login-help.wxss +0 -166
- package/weapps-plugin-jingtong-verify/pages/login-manage-setting/login-manage-setting.js +0 -189
- package/weapps-plugin-jingtong-verify/pages/login-manage-setting/login-manage-setting.json +0 -4
- package/weapps-plugin-jingtong-verify/pages/login-manage-setting/login-manage-setting.wxml +0 -19
- package/weapps-plugin-jingtong-verify/pages/login-manage-setting/login-manage-setting.wxss +0 -69
- package/weapps-plugin-jingtong-verify/utils/constantVal.js +0 -75
- package/weapps-plugin-jingtong-verify/utils/md5.js +0 -184
|
@@ -1,352 +1,352 @@
|
|
|
1
|
-
! function (t, e) {
|
|
2
|
-
'object' == typeof exports && 'undefined' != typeof module ? module.exports = e() : 'function' == typeof define && define.amd ? define(e) : t.dayjs = e()
|
|
3
|
-
}(this, function () {
|
|
4
|
-
'use strict';
|
|
5
|
-
let t = 'millisecond',
|
|
6
|
-
e = 'second',
|
|
7
|
-
n = 'minute',
|
|
8
|
-
r = 'hour',
|
|
9
|
-
s = 'day',
|
|
10
|
-
i = 'week',
|
|
11
|
-
a = 'month',
|
|
12
|
-
u = 'year',
|
|
13
|
-
c = /^(\d{4})-?(\d{1,2})-?(\d{0,2})(.*?(\d{1,2}):(\d{1,2}):(\d{1,2}))?.?(\d{1,3})?$/,
|
|
14
|
-
o = /\[.*?\]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,
|
|
15
|
-
h = {
|
|
16
|
-
name: 'en',
|
|
17
|
-
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
|
|
18
|
-
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_')
|
|
19
|
-
},
|
|
20
|
-
d = function (t, e, n) {
|
|
21
|
-
let r = String(t);
|
|
22
|
-
return !r || r.length >= e ? t : '' + Array(e + 1 - r.length).join(n) + t
|
|
23
|
-
},
|
|
24
|
-
$ = {
|
|
25
|
-
padStart: d,
|
|
26
|
-
padZoneStr(t) {
|
|
27
|
-
let e = Math.abs(t),
|
|
28
|
-
n = Math.floor(e / 60),
|
|
29
|
-
r = e % 60;
|
|
30
|
-
return (t <= 0 ? '+' : '-') + d(n, 2, '0') + ':' + d(r, 2, '0')
|
|
31
|
-
},
|
|
32
|
-
monthDiff(t, e) {
|
|
33
|
-
let n = 12 * (e.year() - t.year()) + (e.month() - t.month()),
|
|
34
|
-
r = t.clone().add(n, 'months'),
|
|
35
|
-
s = e - r < 0,
|
|
36
|
-
i = t.clone().add(n + (s ? -1 : 1), 'months');
|
|
37
|
-
return Number(-(n + (e - r) / (s ? r - i : i - r)))
|
|
38
|
-
},
|
|
39
|
-
absFloor(t) {
|
|
40
|
-
return t < 0 ? Math.ceil(t) || 0 : Math.floor(t)
|
|
41
|
-
},
|
|
42
|
-
prettyUnit(c) {
|
|
43
|
-
return {
|
|
44
|
-
M: a,
|
|
45
|
-
y: u,
|
|
46
|
-
w: i,
|
|
47
|
-
d: s,
|
|
48
|
-
h: r,
|
|
49
|
-
m: n,
|
|
50
|
-
s: e,
|
|
51
|
-
ms: t
|
|
52
|
-
} [c] || String(c || '').toLowerCase().replace(/s$/, '')
|
|
53
|
-
},
|
|
54
|
-
isUndefined(t) {
|
|
55
|
-
return void 0 === t
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
f = 'en',
|
|
59
|
-
l = {};
|
|
60
|
-
l[f] = h;
|
|
61
|
-
let m = function (t) {
|
|
62
|
-
return t instanceof D
|
|
63
|
-
},
|
|
64
|
-
y = function (t, e, n) {
|
|
65
|
-
let r;
|
|
66
|
-
if (!t) return null;
|
|
67
|
-
if ('string' == typeof t) l[t] && (r = t), e && (l[t] = e, r = t);
|
|
68
|
-
else {
|
|
69
|
-
let s = t.name;
|
|
70
|
-
l[s] = t, r = s
|
|
71
|
-
}
|
|
72
|
-
return n || (f = r), r
|
|
73
|
-
},
|
|
74
|
-
M = function (t, e) {
|
|
75
|
-
if (m(t)) return t.clone();
|
|
76
|
-
let n = e || {};
|
|
77
|
-
return n.date = t, new D(n)
|
|
78
|
-
},
|
|
79
|
-
S = function (t, e) {
|
|
80
|
-
return M(t, {
|
|
81
|
-
locale: e.$L
|
|
82
|
-
})
|
|
83
|
-
},
|
|
84
|
-
p = $;
|
|
85
|
-
p.parseLocale = y, p.isDayjs = m, p.wrapper = S;
|
|
86
|
-
let D = function () {
|
|
87
|
-
function h(t) {
|
|
88
|
-
this.parse(t)
|
|
89
|
-
}
|
|
90
|
-
let d = h.prototype;
|
|
91
|
-
return d.parse = function (t) {
|
|
92
|
-
let e, n;
|
|
93
|
-
this.$d = null === (e = t.date) ? new Date(NaN) : p.isUndefined(e) ? new Date : e instanceof Date ? e : 'string' == typeof e && /.*[^Z]$/i.test(e) && (n = e.match(c)) ? new Date(n[1], n[2] - 1, n[3] || 1, n[5] || 0, n[6] || 0, n[7] || 0, n[8] || 0) : new Date(e), this.init(t)
|
|
94
|
-
}, d.init = function (t) {
|
|
95
|
-
this.$y = this.$d.getFullYear(), this.$M = this.$d.getMonth(), this.$D = this.$d.getDate(), this.$W = this.$d.getDay(), this.$H = this.$d.getHours(), this.$m = this.$d.getMinutes(), this.$s = this.$d.getSeconds(), this.$ms = this.$d.getMilliseconds(), this.$L = this.$L || y(t.locale, null, !0) || f
|
|
96
|
-
}, d.$utils = function () {
|
|
97
|
-
return p
|
|
98
|
-
}, d.isValid = function () {
|
|
99
|
-
return !('Invalid Date' === this.$d.toString())
|
|
100
|
-
}, d.$compare = function (t) {
|
|
101
|
-
return this.valueOf() - M(t).valueOf()
|
|
102
|
-
}, d.isSame = function (t) {
|
|
103
|
-
return 0 === this.$compare(t)
|
|
104
|
-
}, d.isBefore = function (t) {
|
|
105
|
-
return this.$compare(t) < 0
|
|
106
|
-
}, d.isAfter = function (t) {
|
|
107
|
-
return this.$compare(t) > 0
|
|
108
|
-
}, d.year = function () {
|
|
109
|
-
return this.$y
|
|
110
|
-
}, d.month = function () {
|
|
111
|
-
return this.$M
|
|
112
|
-
}, d.day = function () {
|
|
113
|
-
return this.$W
|
|
114
|
-
}, d.date = function () {
|
|
115
|
-
return this.$D
|
|
116
|
-
}, d.hour = function () {
|
|
117
|
-
return this.$H
|
|
118
|
-
}, d.minute = function () {
|
|
119
|
-
return this.$m
|
|
120
|
-
}, d.second = function () {
|
|
121
|
-
return this.$s
|
|
122
|
-
}, d.millisecond = function () {
|
|
123
|
-
return this.$ms
|
|
124
|
-
}, d.unix = function () {
|
|
125
|
-
return Math.floor(this.valueOf() / 1e3)
|
|
126
|
-
}, d.valueOf = function () {
|
|
127
|
-
return this.$d.getTime()
|
|
128
|
-
}, d.startOf = function (t, c) {
|
|
129
|
-
let o = this,
|
|
130
|
-
h = !!p.isUndefined(c) || c,
|
|
131
|
-
d = function (t, e) {
|
|
132
|
-
let n = S(new Date(o.$y, e, t), o);
|
|
133
|
-
return h ? n : n.endOf(s)
|
|
134
|
-
},
|
|
135
|
-
$ = function (t, e) {
|
|
136
|
-
return S(o.toDate()[t].apply(o.toDate(), h ? [0, 0, 0, 0].slice(e) : [23, 59, 59, 999].slice(e)), o)
|
|
137
|
-
};
|
|
138
|
-
switch (p.prettyUnit(t)) {
|
|
139
|
-
case u:
|
|
140
|
-
return h ? d(1, 0) : d(31, 11);
|
|
141
|
-
case a:
|
|
142
|
-
return h ? d(1, this.$M) : d(0, this.$M + 1);
|
|
143
|
-
case i:
|
|
144
|
-
return d(h ? this.$D - this.$W : this.$D + (6 - this.$W), this.$M);
|
|
145
|
-
case s:
|
|
146
|
-
case 'date':
|
|
147
|
-
return $('setHours', 0);
|
|
148
|
-
case r:
|
|
149
|
-
return $('setMinutes', 1);
|
|
150
|
-
case n:
|
|
151
|
-
return $('setSeconds', 2);
|
|
152
|
-
case e:
|
|
153
|
-
return $('setMilliseconds', 3);
|
|
154
|
-
default:
|
|
155
|
-
return this.clone()
|
|
156
|
-
}
|
|
157
|
-
}, d.endOf = function (t) {
|
|
158
|
-
return this.startOf(t, !1)
|
|
159
|
-
}, d.$set = function (i, c) {
|
|
160
|
-
switch (p.prettyUnit(i)) {
|
|
161
|
-
case s:
|
|
162
|
-
this.$d.setDate(this.$D + (c - this.$W));
|
|
163
|
-
break;
|
|
164
|
-
case 'date':
|
|
165
|
-
this.$d.setDate(c);
|
|
166
|
-
break;
|
|
167
|
-
case a:
|
|
168
|
-
this.$d.setMonth(c);
|
|
169
|
-
break;
|
|
170
|
-
case u:
|
|
171
|
-
this.$d.setFullYear(c);
|
|
172
|
-
break;
|
|
173
|
-
case r:
|
|
174
|
-
this.$d.setHours(c);
|
|
175
|
-
break;
|
|
176
|
-
case n:
|
|
177
|
-
this.$d.setMinutes(c);
|
|
178
|
-
break;
|
|
179
|
-
case e:
|
|
180
|
-
this.$d.setSeconds(c);
|
|
181
|
-
break;
|
|
182
|
-
case t:
|
|
183
|
-
this.$d.setMilliseconds(c)
|
|
184
|
-
}
|
|
185
|
-
return this.init(), this
|
|
186
|
-
}, d.set = function (t, e) {
|
|
187
|
-
return this.clone().$set(t, e)
|
|
188
|
-
}, d.add = function (t, c) {
|
|
189
|
-
let o = this;
|
|
190
|
-
t = Number(t);
|
|
191
|
-
let h, d = p.prettyUnit(c),
|
|
192
|
-
$ = function (e, n) {
|
|
193
|
-
let r = o.set('date', 1).set(e, n + t);
|
|
194
|
-
return r.set('date', Math.min(o.$D, r.daysInMonth()))
|
|
195
|
-
};
|
|
196
|
-
if (d === a) return $(a, this.$M);
|
|
197
|
-
if (d === u) return $(u, this.$y);
|
|
198
|
-
switch (d) {
|
|
199
|
-
case n:
|
|
200
|
-
h = 6e4;
|
|
201
|
-
break;
|
|
202
|
-
case r:
|
|
203
|
-
h = 36e5;
|
|
204
|
-
break;
|
|
205
|
-
case s:
|
|
206
|
-
h = 864e5;
|
|
207
|
-
break;
|
|
208
|
-
case i:
|
|
209
|
-
h = 6048e5;
|
|
210
|
-
break;
|
|
211
|
-
case e:
|
|
212
|
-
h = 1e3;
|
|
213
|
-
break;
|
|
214
|
-
default:
|
|
215
|
-
h = 1
|
|
216
|
-
}
|
|
217
|
-
let f = this.valueOf() + t * h;
|
|
218
|
-
return S(f, this)
|
|
219
|
-
}, d.subtract = function (t, e) {
|
|
220
|
-
return this.add(-1 * t, e)
|
|
221
|
-
}, d.format = function (t) {
|
|
222
|
-
let e = this,
|
|
223
|
-
n = t || 'YYYY-MM-DDTHH:mm:ssZ',
|
|
224
|
-
r = p.padZoneStr(this.$d.getTimezoneOffset()),
|
|
225
|
-
s = this.$locale(),
|
|
226
|
-
i = s.weekdays,
|
|
227
|
-
a = s.months,
|
|
228
|
-
u = function (t, e, n, r) {
|
|
229
|
-
return t && t[e] || n[e].substr(0, r)
|
|
230
|
-
};
|
|
231
|
-
return n.replace(o, function (t) {
|
|
232
|
-
if (t.indexOf('[') > -1) return t.replace(/\[|\]/g, '');
|
|
233
|
-
switch (t) {
|
|
234
|
-
case 'YY':
|
|
235
|
-
return String(e.$y).slice(-2);
|
|
236
|
-
case 'YYYY':
|
|
237
|
-
return String(e.$y);
|
|
238
|
-
case 'M':
|
|
239
|
-
return String(e.$M + 1);
|
|
240
|
-
case 'MM':
|
|
241
|
-
return p.padStart(e.$M + 1, 2, '0');
|
|
242
|
-
case 'MMM':
|
|
243
|
-
return u(s.monthsShort, e.$M, a, 3);
|
|
244
|
-
case 'MMMM':
|
|
245
|
-
return a[e.$M];
|
|
246
|
-
case 'D':
|
|
247
|
-
return String(e.$D);
|
|
248
|
-
case 'DD':
|
|
249
|
-
return p.padStart(e.$D, 2, '0');
|
|
250
|
-
case 'd':
|
|
251
|
-
return String(e.$W);
|
|
252
|
-
case 'dd':
|
|
253
|
-
return u(s.weekdaysMin, e.$W, i, 2);
|
|
254
|
-
case 'ddd':
|
|
255
|
-
return u(s.weekdaysShort, e.$W, i, 3);
|
|
256
|
-
case 'dddd':
|
|
257
|
-
return i[e.$W];
|
|
258
|
-
case 'H':
|
|
259
|
-
return String(e.$H);
|
|
260
|
-
case 'HH':
|
|
261
|
-
return p.padStart(e.$H, 2, '0');
|
|
262
|
-
case 'h':
|
|
263
|
-
case 'hh':
|
|
264
|
-
return 0 === e.$H ? 12 : p.padStart(e.$H < 13 ? e.$H : e.$H - 12, 'hh' === t ? 2 : 1, '0');
|
|
265
|
-
case 'a':
|
|
266
|
-
return e.$H < 12 ? 'am' : 'pm';
|
|
267
|
-
case 'A':
|
|
268
|
-
return e.$H < 12 ? 'AM' : 'PM';
|
|
269
|
-
case 'm':
|
|
270
|
-
return String(e.$m);
|
|
271
|
-
case 'mm':
|
|
272
|
-
return p.padStart(e.$m, 2, '0');
|
|
273
|
-
case 's':
|
|
274
|
-
return String(e.$s);
|
|
275
|
-
case 'ss':
|
|
276
|
-
return p.padStart(e.$s, 2, '0');
|
|
277
|
-
case 'SSS':
|
|
278
|
-
return p.padStart(e.$ms, 3, '0');
|
|
279
|
-
case 'Z':
|
|
280
|
-
return r;
|
|
281
|
-
default:
|
|
282
|
-
return r.replace(':', '')
|
|
283
|
-
}
|
|
284
|
-
})
|
|
285
|
-
}, d.diff = function (t, c, o) {
|
|
286
|
-
let h = p.prettyUnit(c),
|
|
287
|
-
d = M(t),
|
|
288
|
-
$ = this - d,
|
|
289
|
-
f = p.monthDiff(this, d);
|
|
290
|
-
switch (h) {
|
|
291
|
-
case u:
|
|
292
|
-
f /= 12;
|
|
293
|
-
break;
|
|
294
|
-
case a:
|
|
295
|
-
break;
|
|
296
|
-
case 'quarter':
|
|
297
|
-
f /= 3;
|
|
298
|
-
break;
|
|
299
|
-
case i:
|
|
300
|
-
f = $ / 6048e5;
|
|
301
|
-
break;
|
|
302
|
-
case s:
|
|
303
|
-
f = $ / 864e5;
|
|
304
|
-
break;
|
|
305
|
-
case r:
|
|
306
|
-
f = $ / 36e5;
|
|
307
|
-
break;
|
|
308
|
-
case n:
|
|
309
|
-
f = $ / 6e4;
|
|
310
|
-
break;
|
|
311
|
-
case e:
|
|
312
|
-
f = $ / 1e3;
|
|
313
|
-
break;
|
|
314
|
-
default:
|
|
315
|
-
f = $
|
|
316
|
-
}
|
|
317
|
-
return o ? f : p.absFloor(f)
|
|
318
|
-
}, d.daysInMonth = function () {
|
|
319
|
-
return this.endOf(a).$D
|
|
320
|
-
}, d.$locale = function () {
|
|
321
|
-
return l[this.$L]
|
|
322
|
-
}, d.locale = function (t, e) {
|
|
323
|
-
let n = this.clone();
|
|
324
|
-
return n.$L = y(t, e, !0), n
|
|
325
|
-
}, d.clone = function () {
|
|
326
|
-
return S(this.toDate(), this)
|
|
327
|
-
}, d.toDate = function () {
|
|
328
|
-
return new Date(this.$d)
|
|
329
|
-
}, d.toArray = function () {
|
|
330
|
-
return [this.$y, this.$M, this.$D, this.$H, this.$m, this.$s, this.$ms]
|
|
331
|
-
}, d.toJSON = function () {
|
|
332
|
-
return this.toISOString()
|
|
333
|
-
}, d.toISOString = function () {
|
|
334
|
-
return this.toDate().toISOString()
|
|
335
|
-
}, d.toObject = function () {
|
|
336
|
-
return {
|
|
337
|
-
years: this.$y,
|
|
338
|
-
months: this.$M,
|
|
339
|
-
date: this.$D,
|
|
340
|
-
hours: this.$H,
|
|
341
|
-
minutes: this.$m,
|
|
342
|
-
seconds: this.$s,
|
|
343
|
-
milliseconds: this.$ms
|
|
344
|
-
}
|
|
345
|
-
}, d.toString = function () {
|
|
346
|
-
return this.$d.toUTCString()
|
|
347
|
-
}, h
|
|
348
|
-
}();
|
|
349
|
-
return M.extend = function (t, e) {
|
|
350
|
-
return t(e, D, M), M
|
|
351
|
-
}, M.locale = y, M.isDayjs = m, M.en = l[f], M
|
|
1
|
+
! function (t, e) {
|
|
2
|
+
'object' == typeof exports && 'undefined' != typeof module ? module.exports = e() : 'function' == typeof define && define.amd ? define(e) : t.dayjs = e()
|
|
3
|
+
}(this, function () {
|
|
4
|
+
'use strict';
|
|
5
|
+
let t = 'millisecond',
|
|
6
|
+
e = 'second',
|
|
7
|
+
n = 'minute',
|
|
8
|
+
r = 'hour',
|
|
9
|
+
s = 'day',
|
|
10
|
+
i = 'week',
|
|
11
|
+
a = 'month',
|
|
12
|
+
u = 'year',
|
|
13
|
+
c = /^(\d{4})-?(\d{1,2})-?(\d{0,2})(.*?(\d{1,2}):(\d{1,2}):(\d{1,2}))?.?(\d{1,3})?$/,
|
|
14
|
+
o = /\[.*?\]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,
|
|
15
|
+
h = {
|
|
16
|
+
name: 'en',
|
|
17
|
+
weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
|
|
18
|
+
months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_')
|
|
19
|
+
},
|
|
20
|
+
d = function (t, e, n) {
|
|
21
|
+
let r = String(t);
|
|
22
|
+
return !r || r.length >= e ? t : '' + Array(e + 1 - r.length).join(n) + t
|
|
23
|
+
},
|
|
24
|
+
$ = {
|
|
25
|
+
padStart: d,
|
|
26
|
+
padZoneStr(t) {
|
|
27
|
+
let e = Math.abs(t),
|
|
28
|
+
n = Math.floor(e / 60),
|
|
29
|
+
r = e % 60;
|
|
30
|
+
return (t <= 0 ? '+' : '-') + d(n, 2, '0') + ':' + d(r, 2, '0')
|
|
31
|
+
},
|
|
32
|
+
monthDiff(t, e) {
|
|
33
|
+
let n = 12 * (e.year() - t.year()) + (e.month() - t.month()),
|
|
34
|
+
r = t.clone().add(n, 'months'),
|
|
35
|
+
s = e - r < 0,
|
|
36
|
+
i = t.clone().add(n + (s ? -1 : 1), 'months');
|
|
37
|
+
return Number(-(n + (e - r) / (s ? r - i : i - r)))
|
|
38
|
+
},
|
|
39
|
+
absFloor(t) {
|
|
40
|
+
return t < 0 ? Math.ceil(t) || 0 : Math.floor(t)
|
|
41
|
+
},
|
|
42
|
+
prettyUnit(c) {
|
|
43
|
+
return {
|
|
44
|
+
M: a,
|
|
45
|
+
y: u,
|
|
46
|
+
w: i,
|
|
47
|
+
d: s,
|
|
48
|
+
h: r,
|
|
49
|
+
m: n,
|
|
50
|
+
s: e,
|
|
51
|
+
ms: t
|
|
52
|
+
} [c] || String(c || '').toLowerCase().replace(/s$/, '')
|
|
53
|
+
},
|
|
54
|
+
isUndefined(t) {
|
|
55
|
+
return void 0 === t
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
f = 'en',
|
|
59
|
+
l = {};
|
|
60
|
+
l[f] = h;
|
|
61
|
+
let m = function (t) {
|
|
62
|
+
return t instanceof D
|
|
63
|
+
},
|
|
64
|
+
y = function (t, e, n) {
|
|
65
|
+
let r;
|
|
66
|
+
if (!t) return null;
|
|
67
|
+
if ('string' == typeof t) l[t] && (r = t), e && (l[t] = e, r = t);
|
|
68
|
+
else {
|
|
69
|
+
let s = t.name;
|
|
70
|
+
l[s] = t, r = s
|
|
71
|
+
}
|
|
72
|
+
return n || (f = r), r
|
|
73
|
+
},
|
|
74
|
+
M = function (t, e) {
|
|
75
|
+
if (m(t)) return t.clone();
|
|
76
|
+
let n = e || {};
|
|
77
|
+
return n.date = t, new D(n)
|
|
78
|
+
},
|
|
79
|
+
S = function (t, e) {
|
|
80
|
+
return M(t, {
|
|
81
|
+
locale: e.$L
|
|
82
|
+
})
|
|
83
|
+
},
|
|
84
|
+
p = $;
|
|
85
|
+
p.parseLocale = y, p.isDayjs = m, p.wrapper = S;
|
|
86
|
+
let D = function () {
|
|
87
|
+
function h(t) {
|
|
88
|
+
this.parse(t)
|
|
89
|
+
}
|
|
90
|
+
let d = h.prototype;
|
|
91
|
+
return d.parse = function (t) {
|
|
92
|
+
let e, n;
|
|
93
|
+
this.$d = null === (e = t.date) ? new Date(NaN) : p.isUndefined(e) ? new Date : e instanceof Date ? e : 'string' == typeof e && /.*[^Z]$/i.test(e) && (n = e.match(c)) ? new Date(n[1], n[2] - 1, n[3] || 1, n[5] || 0, n[6] || 0, n[7] || 0, n[8] || 0) : new Date(e), this.init(t)
|
|
94
|
+
}, d.init = function (t) {
|
|
95
|
+
this.$y = this.$d.getFullYear(), this.$M = this.$d.getMonth(), this.$D = this.$d.getDate(), this.$W = this.$d.getDay(), this.$H = this.$d.getHours(), this.$m = this.$d.getMinutes(), this.$s = this.$d.getSeconds(), this.$ms = this.$d.getMilliseconds(), this.$L = this.$L || y(t.locale, null, !0) || f
|
|
96
|
+
}, d.$utils = function () {
|
|
97
|
+
return p
|
|
98
|
+
}, d.isValid = function () {
|
|
99
|
+
return !('Invalid Date' === this.$d.toString())
|
|
100
|
+
}, d.$compare = function (t) {
|
|
101
|
+
return this.valueOf() - M(t).valueOf()
|
|
102
|
+
}, d.isSame = function (t) {
|
|
103
|
+
return 0 === this.$compare(t)
|
|
104
|
+
}, d.isBefore = function (t) {
|
|
105
|
+
return this.$compare(t) < 0
|
|
106
|
+
}, d.isAfter = function (t) {
|
|
107
|
+
return this.$compare(t) > 0
|
|
108
|
+
}, d.year = function () {
|
|
109
|
+
return this.$y
|
|
110
|
+
}, d.month = function () {
|
|
111
|
+
return this.$M
|
|
112
|
+
}, d.day = function () {
|
|
113
|
+
return this.$W
|
|
114
|
+
}, d.date = function () {
|
|
115
|
+
return this.$D
|
|
116
|
+
}, d.hour = function () {
|
|
117
|
+
return this.$H
|
|
118
|
+
}, d.minute = function () {
|
|
119
|
+
return this.$m
|
|
120
|
+
}, d.second = function () {
|
|
121
|
+
return this.$s
|
|
122
|
+
}, d.millisecond = function () {
|
|
123
|
+
return this.$ms
|
|
124
|
+
}, d.unix = function () {
|
|
125
|
+
return Math.floor(this.valueOf() / 1e3)
|
|
126
|
+
}, d.valueOf = function () {
|
|
127
|
+
return this.$d.getTime()
|
|
128
|
+
}, d.startOf = function (t, c) {
|
|
129
|
+
let o = this,
|
|
130
|
+
h = !!p.isUndefined(c) || c,
|
|
131
|
+
d = function (t, e) {
|
|
132
|
+
let n = S(new Date(o.$y, e, t), o);
|
|
133
|
+
return h ? n : n.endOf(s)
|
|
134
|
+
},
|
|
135
|
+
$ = function (t, e) {
|
|
136
|
+
return S(o.toDate()[t].apply(o.toDate(), h ? [0, 0, 0, 0].slice(e) : [23, 59, 59, 999].slice(e)), o)
|
|
137
|
+
};
|
|
138
|
+
switch (p.prettyUnit(t)) {
|
|
139
|
+
case u:
|
|
140
|
+
return h ? d(1, 0) : d(31, 11);
|
|
141
|
+
case a:
|
|
142
|
+
return h ? d(1, this.$M) : d(0, this.$M + 1);
|
|
143
|
+
case i:
|
|
144
|
+
return d(h ? this.$D - this.$W : this.$D + (6 - this.$W), this.$M);
|
|
145
|
+
case s:
|
|
146
|
+
case 'date':
|
|
147
|
+
return $('setHours', 0);
|
|
148
|
+
case r:
|
|
149
|
+
return $('setMinutes', 1);
|
|
150
|
+
case n:
|
|
151
|
+
return $('setSeconds', 2);
|
|
152
|
+
case e:
|
|
153
|
+
return $('setMilliseconds', 3);
|
|
154
|
+
default:
|
|
155
|
+
return this.clone()
|
|
156
|
+
}
|
|
157
|
+
}, d.endOf = function (t) {
|
|
158
|
+
return this.startOf(t, !1)
|
|
159
|
+
}, d.$set = function (i, c) {
|
|
160
|
+
switch (p.prettyUnit(i)) {
|
|
161
|
+
case s:
|
|
162
|
+
this.$d.setDate(this.$D + (c - this.$W));
|
|
163
|
+
break;
|
|
164
|
+
case 'date':
|
|
165
|
+
this.$d.setDate(c);
|
|
166
|
+
break;
|
|
167
|
+
case a:
|
|
168
|
+
this.$d.setMonth(c);
|
|
169
|
+
break;
|
|
170
|
+
case u:
|
|
171
|
+
this.$d.setFullYear(c);
|
|
172
|
+
break;
|
|
173
|
+
case r:
|
|
174
|
+
this.$d.setHours(c);
|
|
175
|
+
break;
|
|
176
|
+
case n:
|
|
177
|
+
this.$d.setMinutes(c);
|
|
178
|
+
break;
|
|
179
|
+
case e:
|
|
180
|
+
this.$d.setSeconds(c);
|
|
181
|
+
break;
|
|
182
|
+
case t:
|
|
183
|
+
this.$d.setMilliseconds(c)
|
|
184
|
+
}
|
|
185
|
+
return this.init(), this
|
|
186
|
+
}, d.set = function (t, e) {
|
|
187
|
+
return this.clone().$set(t, e)
|
|
188
|
+
}, d.add = function (t, c) {
|
|
189
|
+
let o = this;
|
|
190
|
+
t = Number(t);
|
|
191
|
+
let h, d = p.prettyUnit(c),
|
|
192
|
+
$ = function (e, n) {
|
|
193
|
+
let r = o.set('date', 1).set(e, n + t);
|
|
194
|
+
return r.set('date', Math.min(o.$D, r.daysInMonth()))
|
|
195
|
+
};
|
|
196
|
+
if (d === a) return $(a, this.$M);
|
|
197
|
+
if (d === u) return $(u, this.$y);
|
|
198
|
+
switch (d) {
|
|
199
|
+
case n:
|
|
200
|
+
h = 6e4;
|
|
201
|
+
break;
|
|
202
|
+
case r:
|
|
203
|
+
h = 36e5;
|
|
204
|
+
break;
|
|
205
|
+
case s:
|
|
206
|
+
h = 864e5;
|
|
207
|
+
break;
|
|
208
|
+
case i:
|
|
209
|
+
h = 6048e5;
|
|
210
|
+
break;
|
|
211
|
+
case e:
|
|
212
|
+
h = 1e3;
|
|
213
|
+
break;
|
|
214
|
+
default:
|
|
215
|
+
h = 1
|
|
216
|
+
}
|
|
217
|
+
let f = this.valueOf() + t * h;
|
|
218
|
+
return S(f, this)
|
|
219
|
+
}, d.subtract = function (t, e) {
|
|
220
|
+
return this.add(-1 * t, e)
|
|
221
|
+
}, d.format = function (t) {
|
|
222
|
+
let e = this,
|
|
223
|
+
n = t || 'YYYY-MM-DDTHH:mm:ssZ',
|
|
224
|
+
r = p.padZoneStr(this.$d.getTimezoneOffset()),
|
|
225
|
+
s = this.$locale(),
|
|
226
|
+
i = s.weekdays,
|
|
227
|
+
a = s.months,
|
|
228
|
+
u = function (t, e, n, r) {
|
|
229
|
+
return t && t[e] || n[e].substr(0, r)
|
|
230
|
+
};
|
|
231
|
+
return n.replace(o, function (t) {
|
|
232
|
+
if (t.indexOf('[') > -1) return t.replace(/\[|\]/g, '');
|
|
233
|
+
switch (t) {
|
|
234
|
+
case 'YY':
|
|
235
|
+
return String(e.$y).slice(-2);
|
|
236
|
+
case 'YYYY':
|
|
237
|
+
return String(e.$y);
|
|
238
|
+
case 'M':
|
|
239
|
+
return String(e.$M + 1);
|
|
240
|
+
case 'MM':
|
|
241
|
+
return p.padStart(e.$M + 1, 2, '0');
|
|
242
|
+
case 'MMM':
|
|
243
|
+
return u(s.monthsShort, e.$M, a, 3);
|
|
244
|
+
case 'MMMM':
|
|
245
|
+
return a[e.$M];
|
|
246
|
+
case 'D':
|
|
247
|
+
return String(e.$D);
|
|
248
|
+
case 'DD':
|
|
249
|
+
return p.padStart(e.$D, 2, '0');
|
|
250
|
+
case 'd':
|
|
251
|
+
return String(e.$W);
|
|
252
|
+
case 'dd':
|
|
253
|
+
return u(s.weekdaysMin, e.$W, i, 2);
|
|
254
|
+
case 'ddd':
|
|
255
|
+
return u(s.weekdaysShort, e.$W, i, 3);
|
|
256
|
+
case 'dddd':
|
|
257
|
+
return i[e.$W];
|
|
258
|
+
case 'H':
|
|
259
|
+
return String(e.$H);
|
|
260
|
+
case 'HH':
|
|
261
|
+
return p.padStart(e.$H, 2, '0');
|
|
262
|
+
case 'h':
|
|
263
|
+
case 'hh':
|
|
264
|
+
return 0 === e.$H ? 12 : p.padStart(e.$H < 13 ? e.$H : e.$H - 12, 'hh' === t ? 2 : 1, '0');
|
|
265
|
+
case 'a':
|
|
266
|
+
return e.$H < 12 ? 'am' : 'pm';
|
|
267
|
+
case 'A':
|
|
268
|
+
return e.$H < 12 ? 'AM' : 'PM';
|
|
269
|
+
case 'm':
|
|
270
|
+
return String(e.$m);
|
|
271
|
+
case 'mm':
|
|
272
|
+
return p.padStart(e.$m, 2, '0');
|
|
273
|
+
case 's':
|
|
274
|
+
return String(e.$s);
|
|
275
|
+
case 'ss':
|
|
276
|
+
return p.padStart(e.$s, 2, '0');
|
|
277
|
+
case 'SSS':
|
|
278
|
+
return p.padStart(e.$ms, 3, '0');
|
|
279
|
+
case 'Z':
|
|
280
|
+
return r;
|
|
281
|
+
default:
|
|
282
|
+
return r.replace(':', '')
|
|
283
|
+
}
|
|
284
|
+
})
|
|
285
|
+
}, d.diff = function (t, c, o) {
|
|
286
|
+
let h = p.prettyUnit(c),
|
|
287
|
+
d = M(t),
|
|
288
|
+
$ = this - d,
|
|
289
|
+
f = p.monthDiff(this, d);
|
|
290
|
+
switch (h) {
|
|
291
|
+
case u:
|
|
292
|
+
f /= 12;
|
|
293
|
+
break;
|
|
294
|
+
case a:
|
|
295
|
+
break;
|
|
296
|
+
case 'quarter':
|
|
297
|
+
f /= 3;
|
|
298
|
+
break;
|
|
299
|
+
case i:
|
|
300
|
+
f = $ / 6048e5;
|
|
301
|
+
break;
|
|
302
|
+
case s:
|
|
303
|
+
f = $ / 864e5;
|
|
304
|
+
break;
|
|
305
|
+
case r:
|
|
306
|
+
f = $ / 36e5;
|
|
307
|
+
break;
|
|
308
|
+
case n:
|
|
309
|
+
f = $ / 6e4;
|
|
310
|
+
break;
|
|
311
|
+
case e:
|
|
312
|
+
f = $ / 1e3;
|
|
313
|
+
break;
|
|
314
|
+
default:
|
|
315
|
+
f = $
|
|
316
|
+
}
|
|
317
|
+
return o ? f : p.absFloor(f)
|
|
318
|
+
}, d.daysInMonth = function () {
|
|
319
|
+
return this.endOf(a).$D
|
|
320
|
+
}, d.$locale = function () {
|
|
321
|
+
return l[this.$L]
|
|
322
|
+
}, d.locale = function (t, e) {
|
|
323
|
+
let n = this.clone();
|
|
324
|
+
return n.$L = y(t, e, !0), n
|
|
325
|
+
}, d.clone = function () {
|
|
326
|
+
return S(this.toDate(), this)
|
|
327
|
+
}, d.toDate = function () {
|
|
328
|
+
return new Date(this.$d)
|
|
329
|
+
}, d.toArray = function () {
|
|
330
|
+
return [this.$y, this.$M, this.$D, this.$H, this.$m, this.$s, this.$ms]
|
|
331
|
+
}, d.toJSON = function () {
|
|
332
|
+
return this.toISOString()
|
|
333
|
+
}, d.toISOString = function () {
|
|
334
|
+
return this.toDate().toISOString()
|
|
335
|
+
}, d.toObject = function () {
|
|
336
|
+
return {
|
|
337
|
+
years: this.$y,
|
|
338
|
+
months: this.$M,
|
|
339
|
+
date: this.$D,
|
|
340
|
+
hours: this.$H,
|
|
341
|
+
minutes: this.$m,
|
|
342
|
+
seconds: this.$s,
|
|
343
|
+
milliseconds: this.$ms
|
|
344
|
+
}
|
|
345
|
+
}, d.toString = function () {
|
|
346
|
+
return this.$d.toUTCString()
|
|
347
|
+
}, h
|
|
348
|
+
}();
|
|
349
|
+
return M.extend = function (t, e) {
|
|
350
|
+
return t(e, D, M), M
|
|
351
|
+
}, M.locale = y, M.isDayjs = m, M.en = l[f], M
|
|
352
352
|
})
|